<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>
<![CDATA[powersybedit-hobbylu]]></title>
 <link>
http://hobbylu.blogcn.com</link>
<description>
<![CDATA[本人学习研究sybase已经n多年了，从刚开始什么都不会，到现在自诩为的"专家"，感受也颇深。我都会sybase什么东西呢？sybase是一个软件公司，其中包括了ase，asa，iq，rs，ma，pb，pd等等等等。ase我应该算是精通了，我开发了ase的灾难恢复软件powersybedit，开发了存储过程调试器，开发了日志查看器等软件。asa方面，也能够做一些数据的恢复，还有密码的破解（可能有人认为很简单，但事实上在加密条件下，dba用户被修改等情况下的破解，嘿嘿，我还是有办法的）。iq么，一些皮毛，准备入手学习。rs么基本上没有什么问题，做过大型的复制系统，双向复制等等。pb么，代码总归看得懂，用起来也没有问题。pd么，呵呵，仅仅会用而已，画画流程图表结构设计等。]]></description>
<managingEditor>
<![CDATA[hobbylu]]></managingEditor>
<dc:creator>
<![CDATA[hobbylu]]></dc:creator>
<blogcn_uid>
hobbylu</blogcn_uid>
<blogcn_hits>
9983</blogcn_hits>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[在recovery的时候发生692错误故障处理]]></title>
<link>
http://hobbylu.blogcn.com/diary,16907210.shtml</link>
<description>
<![CDATA[有一个客户，在系统发生异常掉电之后，启动数据库，发生了以下错误，导致数据库无法正常recovery。00:00000:00018:2008/06/11 16:00:08.45 server&nbsp; Error: 692, Severity: 20, State: 1<BR>00:00000:00018:2008/06/11 16:00:08.45 server&nbsp; Uninitialized logical page '28114' was read while accessing object '3' in database '18'. Please contact Sybase Technical Support.<BR>这种故障在正常操作下，已经无法恢复数据库，里面的数据需要通过使用恢复工具进行恢复了（建议使用<FONT size=5>powersybedit</FONT>)。用poweredit读取裸设备方式，对改页面进行了分析，发现该页面确实是一个空页，所有的字节全部是0000 0000。那么如何避免这个故障，并将这个页面变成一个有效的页面呢？可以做如下处理：<BR>首先读取该对象的其他页，然后将该页的页号修改为这个空页所在的页号，如上实例为 28114，回写磁盘后，关闭改文件，重新启动数据库。但过程中有可能会多次出现这个故障，需要重复操作，较为麻烦。<BR>经过一系列的处理，该数据库可以正常启动，某些数据就可以通过正常的bcp出来。<BR>]]></description>
<pubDate>
2008-06-16 08:37:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,16907210.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,16907210.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[15.0.2的新特性]]></title>
<link>
http://hobbylu.blogcn.com/diary,16450215.shtml</link>
<description>
<![CDATA[&nbsp;
<DIV v:shape="_x0000_s1026">
<DIV class=O1 style="mso-line-spacing: '135 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 22pt; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN"><B>New feature: application tracing</B></SPAN></SPAN><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 20pt; FONT-FAMILY: SimSun; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN"> </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="FONT-SIZE: 111%"><SPAN style="LEFT: -5.96%; POSITION: absolute; mso-special-format: bullet">•</SPAN></SPAN><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 20pt; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN">Set options in another session </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="FONT-SIZE: 111%"><SPAN style="LEFT: -5.96%; POSITION: absolute; mso-special-format: bullet">•</SPAN></SPAN><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 20pt; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN">Display executing SQL in another session </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="FONT-SIZE: 111%"><SPAN style="LEFT: -5.96%; POSITION: absolute; mso-special-format: bullet">•</SPAN></SPAN><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 20pt; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN">Capture output from that other session into a file </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 20pt; FONT-FAMILY: SimSun; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN"></SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">set tracefile '/tmp/spid36.out' for 36 </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">go </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">-- 'set' commands apply to session 36 from now on </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">set showplan on </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">set show_sqltext on </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">go </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: SimSun; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'"></SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">-- disable tracing again </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">set tracefile off </SPAN></SPAN></DIV>
<DIV class=O1 style="mso-line-spacing: '90 20 0'; mso-margin-left-alt: 336; mso-text-indent-alt: 72"><SPAN style="mso-bidi-font-family: Arial"><SPAN lang=EN-US style="FONT-SIZE: 16pt; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Courier New'">set tracefile off for 36 </SPAN></SPAN></DIV>
<DIV class=O style="mso-line-spacing: '90 50 0'; mso-margin-left-alt: 288; mso-char-wrap: 1; mso-kinsoku-overflow: 1"></DIV></DIV>]]></description>
<pubDate>
2008-06-02 08:29:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,16450215.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,16450215.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[心情沉重-心挂四川]]></title>
<link>
http://hobbylu.blogcn.com/diary,15974262.shtml</link>
<description>
<![CDATA[<P>悼念所有汶川地震死难人士，同情所有受灾群众！</P>]]></description>
<pubDate>
2008-05-19 09:46:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,15974262.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,15974262.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[关于AUL for sybase版本的开发]]></title>
<link>
http://hobbylu.blogcn.com/diary,15968075.shtml</link>
<description>
<![CDATA[<P>AUL FOR SYBASE版本开发已经初具雏形。原先的powersybedit开发是基于MS MFC，只能运行于windows平台，因此要运行于其他操作系统，需要进行较大的移植工作，很多MFC的库都得替换成标准c++，c，工作量还是较大。<BR>本来以为自己会vc，就懂c++了，事实上却非如此，因为vc在整体上来说，开发东西还是挺方便的，特别是很多类库，但在c++上却区别挺大，比如CString类，还好在c++中有std::string可以替换。<BR><BR>哎，明天再写，儿子又要我陪了！</P>]]></description>
<pubDate>
2008-05-18 22:13:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,15968075.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,15968075.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[无题]]></title>
<link>
http://hobbylu.blogcn.com/diary,15407910.shtml</link>
<description>
<![CDATA[<P>好久好久没有上自己的博客了，每个时间段都有自己感兴趣的地方，前一段时间钟情于股票，试着自己去分析一些股票信息，于是弄了一些股票的源代码，并取出数据进行分析。可惜大行情实在事不好，大大的套牢啊。<BR><BR>AUL跟我联系上，希望推出AUL FOR SYBASE版本，因此已经推出了AUL FOR SYBASE的测试版本，大家感兴趣可以下载。这个工具可以完全脱离出sybase的环境，有一定的数据恢复功能，但肯定有很多bug，在接下来的日子中，可能想推出其他平台的版本，比如linux、unix等，工作量还是比较大。<BR><BR>我一直都有一个域名和空间，叫<A href="http://www.db-expert.com">www.db-expert.com</A>，可惜自己不会弄网站，还没有推出来，如果能够推出，或许对自己的市场化会有很大的帮助。思考再三，还是决定去弄，争取在五月份能够跟大家见面。<BR><BR>另外最近有很多公司想跟我合作项目，可惜本人时间实在是有限制，毕竟现在还是在国有企业中工作的员工。不过，如果做些咨询服务或者不要脱身的工作，我想我还是会给大家提供帮助的。<BR><BR>还有开始着手培训和使用sybase的产品ma,并在实验环境中测试通过，但总觉得缺少点东西。如果大家感兴趣，我可以为大家介绍一下，MA的工作原理，和简单环境的建立。<BR><BR>对了，今天还是儿子三周岁生日，日子过的好快。给宝宝祝福一下吧，健康快乐永远伴随你。</P>]]></description>
<pubDate>
2008-04-26 18:16:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,15407910.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,15407910.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[扩展文件系统访问]]></title>
<link>
http://hobbylu.blogcn.com/diary,9399585.shtml</link>
<description>
<![CDATA[<H1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT color=#000000>扩展文件系统访问</FONT></SPAN></H1>
<H3 style="MARGIN: auto 0cm"><FONT color=#000000>一、什么是扩展文件系统访问（<SPAN lang=EN-US>XFS</SPAN>）？</FONT></H3>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 2" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">ASE 12.5</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">之后的版本包含了很多个新的特性和功能。其中有一个非常有用的就是扩展文件系统访问。<SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 2" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">在目前的商业系统中，很多情况下数据可能并不会所有的都存入到数据库中，而有可能是以文件的方式存在，因此引入了<SPAN lang=EN-US>XFS</SPAN>这个概念，可以让<SPAN lang=EN-US>ASE</SPAN>管理好需要管理的文件，并能够通过<SPAN lang=EN-US>sql</SPAN>语句来进行操作。<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">要能够访问操作系统文件，需要在数据库中建立对应的代理表。代理表的功能就是在文件和数据库要操作的表直接建立一个映射关系。代理表的一些特性本文中就不再赘述。建立了代理表之后，就可以使用标准的<SPAN lang=EN-US>T-SQL</SPAN>命令来对文件进行创建、删除、写和查询了。当然这其中也包括了权限，组，属主等属性。<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">扩展文件访问提供了两个不同的方式。<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo4; tab-stops: list 57.0pt" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold"><SPAN style="mso-list: Ignore">1、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">使用文件访问，你可以使用将代理表映射到单独的一个<SPAN lang=EN-US>ASCII</SPAN>文本文件。<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 57pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo4; tab-stops: list 57.0pt" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"><SPAN style="mso-list: Ignore">2、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">使用扩展文件目录访问，你可以将代理表映射到一个目录，和它的所有的子目录和文件。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<H3 style="MARGIN: auto 0cm"><FONT color=#000000>二、<SPAN lang=EN-US>XFS</SPAN>配置过程</FONT></H3>
<H4 style="MARGIN: 14pt 0cm 14.5pt"><FONT size=5><FONT color=#000000><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">、</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial>XFS</FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">的授权</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><o:p></o:p></SPAN></FONT></FONT></H4>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>XFS</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">的功能，只有在你的<SPAN lang=EN-US>ASE_XFS</SPAN>许可证生效之后，才能够在你的系统中使用。至于如何配置许可证，这里就不多描述，具体可以参考<SPAN lang=EN-US>SYSAM</SPAN>相关文档。<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<H4 style="MARGIN: 14pt 0cm 14.5pt"><FONT size=5><FONT color=#000000><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>2</FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">、激活文件访问</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><o:p></o:p></SPAN></FONT></FONT></H4>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">将配置参数<SPAN lang=EN-US>enable cis</SPAN>设置为<SPAN lang=EN-US>1</SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>sp_configure ‘enable cis’,1<o:p></o:p></SPAN></P>
<H3 style="MARGIN: auto 0cm"><FONT color=#000000>三、使用文件系统访问</FONT></H3>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">访问文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><A name=EnablingXFS></A><A name=UsingFiles></A><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本例中，我们将建立一个名叫</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Xerrors</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的代理表，直接映射到</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">%SYBASE_ASE%\install</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">目录下的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">errorlog</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">create proxy_table Xerrors external file at 'c:\sybase\ASE-12_5\install\errorlog' <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">这条命令创建了一个只有一个名为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">’record’</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">列的表，类型是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">varchar(255)</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">。现在我们可以查询错误日志文件中的内容了。比如：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">select record from Xerrors</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <SPAN style="mso-bidi-font-weight: bold">where record like "%ASE_XFS%"</SPAN> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">record</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">------</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">00:00000:00000:2007/07/30 22:46:57.67 kernel<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Checked out license ASE_XFS<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">对于代理表映射到一个文件，需要以下条件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l3 level1 lfo5; tab-stops: list 36.0pt" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"><SPAN style="mso-list: Ignore">1、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文件比如是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">ASCII</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文本格式的。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l3 level1 lfo5; tab-stops: list 36.0pt" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"><SPAN style="mso-list: Ignore">2、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">ASE</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">引擎必须有权限访问相应文件。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l3 level1 lfo5; tab-stops: list 36.0pt" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"><SPAN style="mso-list: Ignore">3、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">如果文件是要被创建的，那么在创建目录需要有写权限。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 3" align=left><A name=Over255></A><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">2 </SPAN></B><B><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">访问行长超过</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">255</SPAN></B><B><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">字节的文本</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在这种情况下，我们需要对代理表显示指定列名以及长度，如：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">create existing table Xtext (record varchar(512) null)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR>external file at 'c:\sybase\ASE-12_5\install\errorlog' <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -36pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 3; mso-list: l3 level1 lfo5; tab-stops: list 36.0pt" align=left><A name=DefiningCols></A><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-font-kerning: 0pt; mso-fareast-font-family: Verdana"><SPAN style="mso-list: Ignore">4、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">如何定义文件中的列</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">对于一些格式化的文本文件，比如</SPAN><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">bcp</SPAN><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-weight: bold">文件等，我们可以在代理表中指定改文件的列名，就如同原始的表一样，如：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">create [existing] table Xpublishers</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>(</B> <BR><B><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>pub_id <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>char(4),</B> <BR><B><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>pub_name varchar(40),</B> <BR><B><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>city <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>varchar(20),</B> <BR><B><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>state char(2)</B> <BR><B>)</B> <BR><B>external file at 'full file path' [</B></SPAN><B><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">列分隔符</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> "&lt;string&gt;"]</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 3" align=left><A name=CommandsFileAccess></A><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">3.4 </SPAN></B><B><SPAN style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">文件访问支持的命令</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 13.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">支持的命令如下：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l4 level1 lfo1; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">insert</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l4 level1 lfo1; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l4 level1 lfo1; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">truncate</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l4 level1 lfo1; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">drop</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI></UL>
<H3 style="MARGIN: auto 0cm"><A name=DirAccess></A><FONT color=#000000>四、使用目录访问</FONT></H3>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<H4 style="MARGIN: 14pt 0cm 14.5pt"><A name=AccessingDir></A><FONT size=5><FONT color=#000000><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial>1 </FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">访问一个目录</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><o:p></o:p></SPAN></FONT></FONT></H4>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">访问目录主要包括以下几个功能：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l1 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">操作目录，子目录还有文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">efficiently insert new files with content. <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l1 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">新建目录</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l1 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">拷贝目录</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l1 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">删除文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI></UL>
<H4 style="MARGIN: 14pt 0cm 14.5pt"><A name=DirAccessRules></A><FONT size=5><FONT color=#000000><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial>2 </FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">目录访问规则</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><o:p></o:p></SPAN></FONT></FONT></H4>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">目录必须被</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">ase</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">可以访问得到。在创建代理表的时候，路径上加上</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">’;R’</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">可以让代理表访问子目录。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">以下是创建代理表命令：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">create proxy_table Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>external directory at '/home/sybase/dir1;R'</B> <o:p></o:p></SPAN></P>
<H4 style="MARGIN: 14pt 0cm 14.5pt"><A name=DirAccessCmds></A><FONT size=5><FONT color=#000000><SPAN lang=EN-US style="mso-font-kerning: 0pt"><FONT face=Arial>3 </FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-font-kerning: 0pt">目录访问支持的命令</SPAN><SPAN lang=EN-US style="mso-font-kerning: 0pt"><o:p></o:p></SPAN></FONT></FONT></H4>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select into</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">insert</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">delete</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">update</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">writetext</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l2 level1 lfo3; tab-stops: list 36.0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">readtext</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI></UL>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">例子如下</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select filename, filetype from Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>where filetype = 'REG'</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select into</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select * into local_table</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>from Xdirect</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select * into Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>from local_table</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">insert</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">insert into Xdirect (filename, content)</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>values('dir2/inventory', 'canned soup, magazines, </B><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">insert into Xdirect (filename, filetype)</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>values ("subdir1", "DIR")</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">delete</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">delete from Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>where filename = "dir2/dir3/farm_supplies"</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">update</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">update Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>set filename = 'just_cupcakes'</B> <BR><B>where filename = 'dir2/dir3/baked_goods'</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">writetext</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">declare @value varbinary(16)</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>select @value = textptr(content) from Xdirect</B> <BR><B>where filename = "batteries"</B> <BR><B>writetext Xdirect.content @value "solar calculators"</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><U><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">readtext</SPAN></U></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">select content from Xdirect</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>where filename = "batteries"</B> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">declare @val varbinary(16)</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> <BR><B>select @val = textptr(content) from Xdirect</B> <BR><B>where filename = "batteries"</B> <BR><B>&nbsp;readtext Xdirect.content @val 1 5 using chars</B> <o:p></o:p></SPAN></P>
<H3 style="MARGIN: auto 0cm"><FONT color=#000000>五、结束语</FONT></H3>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan" align=left><SPAN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">本文对扩展文件访问从概念上、操作上做了一些简单的介绍，其中会有不足之处，请大家多多指正。也希望本文对大家有一定的帮助。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>]]></description>
<pubDate>
2007-08-07 09:54:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,9399585.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,9399585.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[powersybedit之数据误删恢复]]></title>
<link>
http://hobbylu.blogcn.com/diary,9141872.shtml</link>
<description>
<![CDATA[<P>数据库某个表被误删的情况下如何进行恢复。（不考虑有备份的情况）<BR>一般情况下，1、可以通过扫描整个数据库的设备进行恢复；2、扫描日志。<BR>第二种办法需要保证日志没有被截断的情况下.当然就算truncate log on checkpoint选项打开，如果马上对数据库做一个dump，在某种程度上还是可以对日志进行恢复的。powersybedit对于日志表syslogs有一个原始操作语句的功能。也就是可以把日志中delete掉的数据变成一条sql语句。因此，可以有针对性的对所有的页中的页的表id为8的也进行扫描和分析，得出被删除表的数据。powersybedit目前没有很方便的可以输入参数的方式进行扫描，目前只能修改代码进行控制，不过我想不久的将来，我会将这个功能实现的。</P>]]></description>
<pubDate>
2007-07-29 15:38:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,9141872.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,9141872.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[powersybedit推出新功能]]></title>
<link>
http://hobbylu.blogcn.com/diary,9048781.shtml</link>
<description>
<![CDATA[powersybedit是一个非常强大的sybase数据恢复软件<BR>最近有一个客户，系统硬盘损坏，经过抢救之后，得到了一些破损的备份文件，由于破损，无法正常的load数据库当中。因此要恢复里面所有的表。该破损文件有2G大小，表有一百多个，在原来的版本中只能够一个一个进行扫描，进度相当缓慢，因此进行了修改和优化，使系统支持扫描一次文件，对所有的需要扫描的表进行分析。此项工作已经基本完成，效率提高将近50倍。算是一个创举吧。最后从文件中恢复出近一千万的数据，所化的时间，也仅为2-3小时]]></description>
<pubDate>
2007-07-26 11:20:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,9048781.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,9048781.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[无题]]></title>
<link>
http://hobbylu.blogcn.com/diary,8472358.shtml</link>
<description>
<![CDATA[好久没有写日志了，想想应该把自己最擅长的东西推销出去，sybase灾难恢复。有这方面需要的，可以跟我联系]]></description>
<pubDate>
2007-07-10 23:57:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,8472358.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,8472358.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[有关利用java功能在ase中建立自己需要的函数]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259103.shtml</link>
<description>
<![CDATA[create function (SQLJ)
说明通过将SQL 包装加入到Java 静态方法中，创建用户定义的函数。可返
回一由该方法定义的值。
语法create function [owner.]sql_function_name
( [ sql_parameter_name sql_datatype
[( length)| (precision[, scale ]) ]
[ [, sql_parameter_name sql_datatype
[( length )| ( precision[, scale ]) ]]
... ] ] )
returns sql_datatype
[ ( length)| (precision[, scale ]) ]
[modifies sql data]
[returns null on null input |
called on null input]
[deterministic | not deterministic]
[exportable]
language java
parameter style java
external name 'java_method_name
[ ( [java_datatype[, java_datatype
...] ] ) ] '
参数sql_function_name
是函数的Transact-SQL 名称。它必须符合标识符的规则且不能是变量。
sql_parameter_name
是该函数的参数名。函数执行时，提供每个输入参数的值。参数是可
选的， SQLJ 函数不需要带参数。
参数名必须符合标识符的规则。如果参数的值包含非字母数字字符，
则必须用引号将其引起来。这包括数据库名或所有者名限定的对象
名，因为它们包含一个句点。如果参数值以数字字符开头，则还必须
用引号将其引起来。
sql_datatype [(length) | ( precision [, scale])]
是参数的Transact-SQL 数据类型。有关这些参数的详细信息，请参见
第90 页的create procedure。
sql_datatype 是SQL 过程签名。
returns sql_datatype
指定函数的结果数据类型。
modifies sql data
表示Java 方法调用SQL 操作，读取并修改数据库中的SQL 数据。这
是缺省的、同时也是唯一的实现方法。将它包含进来是为了在语法上
与ANSI 标准兼容。

create function square_root
(input_number double precision) returns
double precision
language java parameter style java
external name 'java.lang.Math.sqrt'
]]></description>
<pubDate>
2007-01-07 09:48:39.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259103.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259103.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[读取其他session的临时表内容]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259175.shtml</link>
<description>
<![CDATA[临时表，大家都知道是以#号为开头，并在tempdb数据库中建立的，而临时表又是session相关的。你的session读取不了别人的临时表中的内容。当然其他人也无法获取你的临时表的信息，就算有sa的权限。
但是我想很多人对别的session临时表的内容都非常感兴趣，那么我想可以通过以下的办法来获取其中的内容。
dbcc page的命令对于一个优秀的dba来说是应该掌握的一条命令，我们可以通过dbcc page读取出该临时表在tempdb中的相关页面信息，并将其分析出来。当然这个数据如果直接通过你的直觉去读取的话，我想对任何人都是一件很困难的事情。幸运的是，我在2006年写了一个东东，powersybedit，可以分析页面结构，我们就可以通过使用这个东东来获取其中的内容。
具体的操作我就不详细讲了，讲述了上述的过程之后，或许对大家有所帮助。


2007 1 6 wriiten in sjtu library
]]></description>
<pubDate>
2007-01-06 13:14:13.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259175.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259175.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[今天浏览了一下sybase官方网站，没想到上面居然有我的一篇文章]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259251.shtml</link>
<description>
<![CDATA[摘录如下
Sybase：直接查询段的空间使用情况 

问：使用sp_helpsegment可以看到段的空间使用情况，但是显示结果中还有段上的所有表和索引信息，对于一个建有很多表的段来说，这是很恐怖的。想直接看到所关心的段的空间使用情况，请高手指点一下? 

答： 

/*Author Hobbylu*/ 

/*Reference from sybase procedures*/ 

/*2005-07-01*/ 

create procedure sp_helpsegment_me 

@segname varchar(30) = NULL /* segment name */ 

as 

declare @segbit int, /* this is the bit version of the segment # */ 

@segment int, /* the segment number of the segment */ 

@free_pages int, /* unused pages in segment */ 

@factor float, /* conversion factor to convert to MB */ 

@clr_pages int, /* Space reserved for CLRs */ 

@total_pages int, /* total allocatable log space */ 

@used_pages int, /* allocated log space */ 

@ismixedlog int /* mixed log & data database ? */ 

if @@trancount = 0 

begin 

set chained off 

end 

set transaction isolation level 1 

set nocount on 

/* 

** If no segment name given, get 'em all. 

*/ 

if @segname is null 

begin 


--Adaptive Server has expanded all '*' elements in the following statement 

select syssegments.segment, syssegments.name, syssegments.status 

from syssegments order by segment 

return (0) 

end 

/* 

** Make sure the segment exists 

*/ 

if not exists (select * 

from syssegments 

where name = @segname) 

begin 

/* 17520, "There is no such segment as '%1!'." */ 

raiserror 17520, @segname 

return (1) 

end 

/* 

** Show the syssegment entry, then the fragments and size it is on, 

** then any dependent objects in the database. 

*/ 

--Adaptive Server has expanded all '*' elements in the following statement 

select syssegments.segment, syssegments.name, syssegments.status 

from syssegments 

where name = @segname 

/* 

** Set the bit position for the segment. 

*/ 

select @segment = segment 

from syssegments 

where name = @segname 

/* 

** Now set the segments on @devname sysusages. 

*/ 

if (@segment < 31) 

select @segbit = power(2, @segment) 

else 

/* 

** Since this is segment 31, power(2, 31) will overflow 

** since segmap is an int. We'll grab the machine-dependent 

** bit mask from spt_values to set the right bit. 

*/ 

select @segbit = low 

from master.dbo.spt_values 

where type = "E" 

and number = 2 

/* 

** Get factor for conversion of pages to megabytes from spt_values 

*/ 

select @factor = convert(float, low) / 1048576.0 

from master.dbo.spt_values 

where number = 1 and type = "E" 

select @total_pages = sum(u.size) 

from master.dbo.sysusages u 

where u.segmap & @segbit = @segbit 

and u.dbid = db_id() 

select @ismixedlog = status2 & 32768 

from master.dbo.sysdatabases where dbid = db_id() 

/* 

** Select the sizes of the segments 

*/ 

if (@segbit = 4) 

begin 

select device = d.name, 

size = convert(varchar(20), round((sum(u.size) * @factor), 0)) + "MB" 

from master.dbo.sysusages u, master.dbo.sysdevices d 

where u.segmap & @segbit = @segbit 

and u.dbid = db_id() 

and d.status & 2 = 2 

and u.vstart between d.low and d.high 

group by d.name order by d.name 

select @clr_pages = lct_admin("reserved_for_rollbacks", db_id()) 

select @free_pages = lct_admin("logsegment_freepages", db_id()) 

- @clr_pages 

select free_pages = @free_pages 

if(@ismixedlog = 32768) 

begin 

/* 

** For a mixed log and data database, we cannot 

** deduce the log used space from the total space 

** as it is mixed with data. So we take the expensive 

** way by scanning syslogs. 

*/ 

select @used_pages = lct_admin("num_logpages", db_id()) 

/* Account allocation pages as used pages */ 

select @used_pages = @used_pages + (@total_pages / 256) 

end 

else 

begin 

/* Dedicated log database */ 

select @used_pages = @total_pages - @free_pages 

- @clr_pages 

end 

end 

else 

begin 

select device = d.name, 

size = convert(varchar(20), round((sum(u.size) * @factor), 0)) + "MB", 

free_pages = sum(curunreservedpgs(db_id(), u.lstart, u.unreservedpgs)) 

from master.dbo.sysusages u, master.dbo.sysdevices d 

where u.segmap & @segbit = @segbit 

and u.dbid = db_id() 

and d.status & 2 = 2 

and u.vstart between d.low and d.high 

group by d.name order by d.name 

select @free_pages = sum(curunreservedpgs(db_id(), u.lstart, u.unreservedpgs)) 

from master.dbo.sysusages u 

where u.segmap & @segbit = @segbit 

and u.dbid = db_id() 

select @used_pages = @total_pages - @free_pages 

select @clr_pages = 0 

end 

/* 

** Select the dependent objects 

*/ 


/* 

** Print total_size, total_pages, free_pages, used_pages and reserved_pages 

*/ 

select total_size = convert(varchar(15), 

round(@total_pages * @factor, 0)) + "MB", 

total_pages = convert(char(15), @total_pages), 

free_pages = convert(char(15), @free_pages), 

used_pages = convert(char(15), @used_pages), 

reserved_pages = convert(char(15), @clr_pages) 


return (0
 
http://www.sybase.com.cn/gvswse/site/china/content.jsp?_doc_id=1831]]></description>
<pubDate>
2007-01-06 11:56:57.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259251.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259251.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[有关存储过程特点的一些介绍]]></title>
<link>
http://hobbylu.blogcn.com/diary,104261329.shtml</link>
<description>
<![CDATA[存储过程的特点 
　　Sybase的存储过程是集中存储在ASE中的预先定义且已经编译好的事务。存储过程由SQL语句和流程控制语句组成。它的功能包括:接受参数;调用另一过程;返回一个状态值给调用过程或批处理,指示调用成功或失败;返回若干个参数值给调用过程或批处理,为调用者提供动态结果;在远程ASE中运行等。 　　 

存储过程的性能特点如下 
　　?存储过程是预编译过的,这就意味着它与普通的SQL语句或批处理的SQL语句不同,当首次运行一个存储过程时,SQL Server的查询处理器对其进行分析,在排除了语法错误之后形成存储在系统中的可执行方案。由于查询处理的大部分工作已经完成,所以存储过程执行速度很快。 

?存储过程和待处理的数据都放在同一台运行ASE的计算机上,使用存储过程查询当地的数据,效率自然很高。 

?存储过程一般多由Client端通过存储过程的名字进行调用,即跨网传送的只是存储过程的名字及少量的参数(如果有的话),而不是构成存储过程的许多SQL语句,因此可以减少网络传输量,加快系统响应速度。 

?存储过程还有着如同C语言子函数那样的被调用和返回值的方便特性。 

所以,存储过程大大增强了SQL语言的功能、效率和灵活性。掌握和应用好存储过程,对进一步发挥Sybase数据库系统的强大功能有着重要的意义。 
 
]]></description>
<pubDate>
2007-01-06 11:40:22.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104261329.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104261329.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[今天下午口语考试]]></title>
<link>
http://hobbylu.blogcn.com/diary,104260747.shtml</link>
<description>
<![CDATA[来到交大的图书馆，感觉这里环境真不错，又有空调，在寒冬中有一股股的暖意]]></description>
<pubDate>
2007-01-06 11:32:30.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104260747.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104260747.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[同一设备数据库如何分离日志与数据(转自sybase)]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259322.shtml</link>
<description>
<![CDATA[ 

sybase中，如何分离日志与数据在同一设备的数据库？ 详细步骤，已测试成功 

1、备份数据库，包括 master 和你要分离数据与日志的应用库,最好是备份所有数据库； 

2、检查数据库的日志是否有单独的存放设备，如有，则直接到第5步； 

3、如没有单独的日志设备，则增加一个设备：disk init .....； 

4、alter database db_name log on new_log_device=xxx 

5、sp_logdevice dbname,new_logdev (移动日志设备) 

6、sp_dropsegment logsegment, db_name, device_name (如果数据库有多个设备既放数据又放日志，则要相应的运行几次 

7、创建一个临时表，然后往里面插入足够的数据，然后截断日志 


use db_name 
go 
create table t1 (id int) 
go 

declare @loop int 
select @loop = 1 

while(@loop<500) 
begin 
insert t1 values(@loop) 
select @loop = @loop + 1 
end
go

dump tran db_name with truncate_only
go
 

8、到此，数据与日志的分离已经完成，使用sp_helpdb db_name或sp_helplog查看是否已分离。 

增加和删除 segment 并不移动当前的已分配空间。日志至少有一个扩充（extend）位于以前的 segment 上（还记得吗，为对象分配存贮单元时，实际是以 extend 为单位的。）。如果当前 extend 被填满，需要再为日志分配时，ASE会在新的 segment 上分配（segment 约束它不得不这么做）。此时，截断日志就可以回收以前分配的 extend 了。 

最后，还是要备份所有数据库
 
 
]]></description>
<pubDate>
2006-12-10 13:32:23.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259322.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259322.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[存储过程调试工具的完善]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259384.shtml</link>
<description>
<![CDATA[增加了结果显示的功能。]]></description>
<pubDate>
2006-12-08 09:49:04.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259384.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259384.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[告各位来访的兄弟姐妹们]]></title>
<link>
http://hobbylu.blogcn.com/diary,104260822.shtml</link>
<description>
<![CDATA[很高兴您能来我的博客访问，不知道你能否留下您的联系方式，或者您是什么公司的？还有能否留下您使用了sybase的什么产品，版本是多少，平台是什么？谢谢各位！！另外，在这里我留下我的联系方式：qq31827516，msn:hobbylu@msn.com]]></description>
<pubDate>
2006-11-26 22:20:41.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104260822.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104260822.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[今天去听算法的课了，结果什么懂听不懂。]]></title>
<link>
http://hobbylu.blogcn.com/diary,104260899.shtml</link>
<description>
<![CDATA[发觉自己已经落后很多了。]]></description>
<pubDate>
2006-11-25 21:09:59.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104260899.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104260899.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[有几天没有写日志了]]></title>
<link>
http://hobbylu.blogcn.com/diary,104261388.shtml</link>
<description>
<![CDATA[最近一段时间一直都没有心情写blog，又到周末了，总结一下吧。
周一、二、三去了苏州无锡，接下来回到上海，基本上无所事事。]]></description>
<pubDate>
2006-11-24 16:28:40.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104261388.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104261388.shtml#comment</comments>
</item>
<item>
<blogcn_uid>
<![CDATA[1342103]]></blogcn_uid>
<title>
<![CDATA[新版本的procdebug程序版本发布]]></title>
<link>
http://hobbylu.blogcn.com/diary,104259453.shtml</link>
<description>
<![CDATA[[url=http://222.44.33.134/root/luzi/procdebug.rar]procdebug[/url]经过一些朋友的鼓励，终于决定把存储过程调试工具继续下去。功能已经具备，已经可以可以进行完整的调试了。[img]http://images.blogcn.com/2006/11/19/11/hobbylu,20061119214020.jpg[/img]
]]></description>
<pubDate>
2006-11-19 21:40:00.0</pubDate>
<guid>
http://hobbylu.blogcn.com/diary,104259453.shtml</guid>
<comments>
http://hobbylu.blogcn.com/diary,104259453.shtml#comment</comments>
</item>
</channel>
</rss>