<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>AnySQL.net</title>
	
	<link>http://www.anysql.net</link>
	<description>Oracle DBA,MySQL DBA, 数据恢复, 数据迁移, 报表软件, 性能优化, 系统监控</description>
	<lastBuildDate>Tue, 16 Mar 2010 11:59:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AnySQL" /><feedburner:info uri="anysql" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://www.anysql.net</link><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url><title>AnySQL.net</title></image><feedburner:emailServiceId>AnySQL</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
		<title>用DataCopy进行Oracle数据同步</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/zq1Z0icwxUc/datacopy-data-sync-mode.html</link>
		<comments>http://www.anysql.net/tools/datacopy-data-sync-mode.html#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:59:54 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Copy]]></category>
		<category><![CDATA[Data]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=747</guid>
		<description><![CDATA[&#160; &#160; DataCopy(下载)并不一定是指从源端取得数据, 然后INSERT到目标端, 插入只是一个默认操作而已, 其实在目标端还可以做UPDATE或DELETE操作. 对于INSERT可以使用Direct Path Load的方式, 速度可以比得上CTAS, 其他的操作方式, 则只能实现Array DML了. 在日常的DBA工作中, 还是会有一些数据同步的需求的, 这时DataCopy应当可以减轻你的工作量.

&#160; &#160; 在DataCopy中增加了两个命令行选项, 以支持不同的操作方式. 


 * sync&#160; &#160; = sync mode (INSERT,UPDATE,DELETE,UPDINS,INSUPD,DELINS).
 * unique&#160; = primary key or unique key columns of target table.


&#160; &#160; 除INSERT操作外(SYNC选项的默认值), UPDATE/DELETE操作都需要指定目标端表的主键列, 以用在WHERE条件中. UPDATE操作会根据指定的主键列去更新非主键列的值(SYNC=UPDATE), 而DELETE操作则直接在目标端根据主键列删除记录(SYNC=DELETE). 


datacopy user1=... user2=... table1=emp table2=emp_sync sync=delete unique=empno
datacopy user1=... user2=... table1=emp [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; DataCopy(<a href="http://www.anysql.net/software/datacopy.zip">下载</a>)并不一定是指从源端取得数据, 然后INSERT到目标端, 插入只是一个默认操作而已, 其实在目标端还可以做UPDATE或DELETE操作. 对于INSERT可以使用Direct Path Load的方式, 速度可以比得上CTAS, 其他的操作方式, 则只能实现Array DML了. 在日常的DBA工作中, 还是会有一些数据同步的需求的, 这时DataCopy应当可以减轻你的工作量.</p>

<p>&nbsp; &nbsp; 在DataCopy中增加了两个命令行选项, 以支持不同的操作方式. </p>

<blockquote class="prefont">
 * sync&nbsp; &nbsp; = sync mode (INSERT,UPDATE,DELETE,UPDINS,INSUPD,DELINS).<br />
 * unique&nbsp; = primary key or unique key columns of target table.<br />
</blockquote>

<p>&nbsp; &nbsp; 除INSERT操作外(SYNC选项的默认值), UPDATE/DELETE操作都需要指定目标端表的主键列, 以用在WHERE条件中. UPDATE操作会根据指定的主键列去更新非主键列的值(SYNC=UPDATE), 而DELETE操作则直接在目标端根据主键列删除记录(SYNC=DELETE). </p>

<blockquote class="prefont">
datacopy user1=... user2=... table1=emp table2=emp_sync sync=delete unique=empno<br />
datacopy user1=... user2=... table1=emp table2=emp_sync sync=update unique=empno
</blockquote>

<p>&nbsp; &nbsp; 根据前面的三种基本操作还可以延伸出来额外的三种操作, 在目标端用PL/SQL代码来实现, 第一种是UPDATE-INSERT方式, 在目标端先进行UPDATE, 如果更新0条记录, 则进行INSERT. 这种方式适合于以UPDATE为主的数据同步.</p>

<blockquote class="prefont">
datacopy user1=... user2=... table1=emp table2=emp_sync sync=updins unique=empno<br />
</blockquote>

<p>&nbsp; &nbsp; 第二种是INSERT-UPDATE方式, 在目标端先进行INSERT, 如果主键冲突, 则进行UPDATE. 这种方式适合于以INSERT为主的数据同步.</p>

<blockquote class="prefont">
datacopy user1=... user2=... table1=emp table2=emp_sync sync=insupd unique=empno<br />
</blockquote>

<p>&nbsp; &nbsp; 第三种是DELETE-INSERT方式, 在目标端先进行DELETE, 再进行INSERT操作. 这种方式的执行成本会比较高, 但逻辑简单.</p>

<blockquote class="prefont">
datacopy user1=... user2=... table1=emp table2=emp_sync sync=delins unique=empno<br />
</blockquote>

<p>&nbsp; &nbsp; 后面的三种方式, 如果要用PL/SQL来实现Array接口, 代码还是有一点复杂的, 如果要实现动态SQL的处理, 估计更复杂. 并且大量的循环, 用外部C写的程会更有效率. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/15 -- <a href="http://www.anysql.net/tools/datacopy-utility.html" title="学习OCI之DataCopy程序">学习OCI之DataCopy程序</a> (5)</li><li>2009/11/07 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-data-migration-test.html" title="MySQL数据迁移测试">MySQL数据迁移测试</a> (8)</li><li>2009/06/09 -- <a href="http://www.anysql.net/tools/copydata-perl-scripts.html" title="copydata异构数据拷贝">copydata异构数据拷贝</a> (6)</li><li>2009/04/02 -- <a href="http://www.anysql.net/tools/sqluldr2_license.html" title="给SQLULDR2加上Key保护">给SQLULDR2加上Key保护</a> (6)</li><li>2008/03/30 -- <a href="http://www.anysql.net/tools/buy_lenovo_ibm_thinkpad.html" title="AUL也走品牌路线?">AUL也走品牌路线?</a> (2)</li><li>2010/03/10 -- <a href="http://www.anysql.net/tools/sqluldr2-read-sql-from-stdin.html" title="SQLULDR2从标准输入读取SQL">SQLULDR2从标准输入读取SQL</a> (0)</li><li>2010/03/06 -- <a href="http://www.anysql.net/tools/sqluldr2-better-command-options.html" title="简化SQLULDR2的命令行选项设置">简化SQLULDR2的命令行选项设置</a> (1)</li><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/02/08 -- <a href="http://www.anysql.net/tools/sqluldr2-form-display.html" title="SQLULDR2也可改善用户体验">SQLULDR2也可改善用户体验</a> (4)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=zq1Z0icwxUc:vN54iM1RuRo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=zq1Z0icwxUc:vN54iM1RuRo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=zq1Z0icwxUc:vN54iM1RuRo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=zq1Z0icwxUc:vN54iM1RuRo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=zq1Z0icwxUc:vN54iM1RuRo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=zq1Z0icwxUc:vN54iM1RuRo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/zq1Z0icwxUc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/datacopy-data-sync-mode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/datacopy-data-sync-mode.html</feedburner:origLink></item>
		<item>
		<title>学习OCI之DataCopy程序</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/J5lzkPtJzxA/datacopy-utility.html</link>
		<comments>http://www.anysql.net/tools/datacopy-utility.html#comments</comments>
		<pubDate>Mon, 15 Mar 2010 04:44:17 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Copy]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[Import]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=746</guid>
		<description><![CDATA[&#160; &#160; 周末继续看了看OCI接口的资料, 着重于以前没有搞懂的LONG/LOB类型处理接口, 写了一个DataCopy程序来作为学习的结果. DataCopy可以在两个Oracle库之间以比较快的速度拷贝数据, 这个速度至少要比EXP/IMP来迁移数据来得快, 并且支持最大100MB的LONG/LONG RAW/CLOB/BLOB值, 一般情况下够用了吧.

&#160; &#160;  没有说明文档, 只有命令行帮助. 


DataCopy: Fast Oracle Data Copy (Demo Version), Release 2.0.1
(c) Copyright Lou Fangxin (AnySQL.net) 2010, all rights reserved.

Usage: datacopy keyword=value [,keyword=value,...]

Valid Keywords:
&#160;  user1&#160;  = username/password@tnsname for source database.
&#160;  user2&#160;  = username/password@tnsname for target database.
&#160;  table&#160;  = [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 周末继续看了看OCI接口的资料, 着重于以前没有搞懂的LONG/LOB类型处理接口, 写了一个<a href="http://www.anysql.net/software/datacopy.zip">DataCopy</a>程序来作为学习的结果. DataCopy可以在两个Oracle库之间以比较快的速度拷贝数据, 这个速度至少要比EXP/IMP来迁移数据来得快, 并且支持最大100MB的LONG/LONG RAW/CLOB/BLOB值, 一般情况下够用了吧.</p>

<p>&nbsp; &nbsp;  没有说明文档, 只有命令行帮助. </p>

<blockquote class="prefont">
DataCopy: Fast Oracle Data Copy (Demo Version), Release 2.0.1<br />
(c) Copyright Lou Fangxin (AnySQL.net) 2010, all rights reserved.<br />
<br />
Usage: datacopy keyword=value [,keyword=value,...]<br />
<br />
Valid Keywords:<br />
&nbsp;  user1&nbsp;  = username/password@tnsname for source database.<br />
&nbsp;  user2&nbsp;  = username/password@tnsname for target database.<br />
&nbsp;  table&nbsp;  = table name for both source and target.<br />
&nbsp;  tables&nbsp; = table name list for both source and target.<br />
&nbsp;  table1&nbsp; = source table name to query data from.<br />
&nbsp;  table2&nbsp; = target table name to insert data into.<br />
&nbsp;  query1&nbsp; = select SQL for source database.<br />
&nbsp;  query2&nbsp; = insert SQL for target database.<br />
 * wait&nbsp; &nbsp; = wait time in microsecond after each array.<br />
&nbsp;  read&nbsp; &nbsp; = set DB_FILE_MULTIBLOCK_READ_COUNT at session level<br />
&nbsp;  sort&nbsp; &nbsp; = set SORT_AREA_SIZE at session level (UNIT:MB)<br />
&nbsp;  hash&nbsp; &nbsp; = set HASH_AREA_SIZE at session level (UNIT:MB)<br />
&nbsp;  serial&nbsp; = set _serial_direct_read to TRUE at session level<br />
&nbsp;  array&nbsp;  = array fetch size<br />
&nbsp;  rows&nbsp; &nbsp; = print log information for every given rows.<br />
&nbsp;  long&nbsp; &nbsp; = maximum size for long, long raw, CLOB, BLOB columns.<br />
 * crypt&nbsp;  = encrypt the connection info only, no data copy (YES/NO).<br />
&nbsp;  parfile = read command option from parameter file<br />
 * direct&nbsp; = direct mode (YES/NO).<br />
 * nolog&nbsp;  = no archive log for direct mode (YES/NO).<br />
 * parallel= allow parallel load for direct mode (YES/NO).<br />
 * sync&nbsp; &nbsp; = sync mode (INSERT,UPDATE,DELETE,UPDINS,INSUPD,DELINS).<br />
 * unique&nbsp; = primary key or unique key columns of target table.<br />
&nbsp;  log&nbsp; &nbsp;  = log file name for screen messages.<br />
<br />
Notes:<br />
&nbsp;  datacopy user1=scott/tiger user2=scott/tiger table=emp<br />
&nbsp;  datacopy user1=scott/tiger user2=scott/tiger table=emp direct=yes<br />
&nbsp;  datacopy user1=scott/tiger user2=scott/tiger table1=emp table2=emp_his
</blockquote>

<p>&nbsp; &nbsp;  数据拷贝中, 目标端数据库并不一定是INSERT操作, 也可以是UPDATE或DELETE, 或一段PL/SQL代码, 默认情况下是INSERT而已. 并且也只是实现了OCI的Array操作接口, 在真实情况下有什么实用价值, 就让各自去延伸了. </p>
<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/16 -- <a href="http://www.anysql.net/tools/datacopy-data-sync-mode.html" title="用DataCopy进行Oracle数据同步">用DataCopy进行Oracle数据同步</a> (0)</li><li>2009/06/09 -- <a href="http://www.anysql.net/tools/copydata-perl-scripts.html" title="copydata异构数据拷贝">copydata异构数据拷贝</a> (6)</li><li>2009/04/02 -- <a href="http://www.anysql.net/tools/sqluldr2_license.html" title="给SQLULDR2加上Key保护">给SQLULDR2加上Key保护</a> (6)</li><li>2009/03/31 -- <a href="http://www.anysql.net/tools/sqluldr2_simple_query.html" title="指定表名导出文本">指定表名导出文本</a> (0)</li><li>2008/10/24 -- <a href="http://www.anysql.net/aulmydul/real_owner_aul_dmp.html" title="AUL DMP中用户名不再是MYDUL了">AUL DMP中用户名不再是MYDUL了</a> (4)</li><li>2008/05/15 -- <a href="http://www.anysql.net/dba/aul_better_for_nchar.html" title="将dmp数据导入到另一个表">将dmp数据导入到另一个表</a> (3)</li><li>2008/02/20 -- <a href="http://www.anysql.net/dba/export_charset_convert.html" title="导出时的字符集转换">导出时的字符集转换</a> (1)</li><li>2007/11/28 -- <a href="http://www.anysql.net/oracle/tune_oracle_exp_imp.html" title="如何提高Oracle exp/imp的速度?">如何提高Oracle exp/imp的速度?</a> (7)</li><li>2007/11/09 -- <a href="http://www.anysql.net/aulmydul/aul_robustdmp.html" title="AUL 5对恢复成DMP格式支持得更好了">AUL 5对恢复成DMP格式支持得更好了</a> (1)</li><li>2007/07/10 -- <a href="http://www.anysql.net/tools/dmp2utf8_download_increase.html" title="dmp2utf8的下载量骤增, 不知什么原因?">dmp2utf8的下载量骤增, 不知什么原因?</a> (5)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=J5lzkPtJzxA:pI90hNKHPe8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=J5lzkPtJzxA:pI90hNKHPe8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=J5lzkPtJzxA:pI90hNKHPe8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=J5lzkPtJzxA:pI90hNKHPe8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=J5lzkPtJzxA:pI90hNKHPe8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=J5lzkPtJzxA:pI90hNKHPe8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/J5lzkPtJzxA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/datacopy-utility.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/datacopy-utility.html</feedburner:origLink></item>
		<item>
		<title>SQLULDR2从标准输入读取SQL</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/EyVMW4_wGc4/sqluldr2-read-sql-from-stdin.html</link>
		<comments>http://www.anysql.net/tools/sqluldr2-read-sql-from-stdin.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 11:52:32 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLLDR]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=745</guid>
		<description><![CDATA[&#160; &#160; 从今天开始, SQLULDR2可以从标准输入设备接受复杂的SQL语句了. 如下所示, SQL是人工输入的, 而最后一行的反斜杆用来表示输入结束. 


D:\&#62;sqluldr2 scott/tiger file=- sql=-
select
 *
 from tab
/
DBOBJECTS,TABLE,
BLOB,TABLE,
SPACE_DAILY,TABLE,
SQLULDR2_LOG,TABLE,
TRADE_MONTHLY_SUMMARY,TABLE,
TRADE_DATA,TABLE,


&#160; &#160; 这个可以省去创建SQL文件的步骤, 更重要的是在Linux的Shell或Perl脚本中调用SQLULDR2, 并传入复杂的SQL时, 也不需要创建SQL文件了, 而且很容易使用Shell或Perl中的变量, 进行替换生成动态的SQL. 例如, 我们经常会见到如下脚本. 


sqlplus -s "/ as sysdba" &#60;&#60; EOF
select 
 *
 from tab;
exit
EOF


&#160; &#160; 现在SQLULDR2也可以这样用了, 在Linux的Shell或Perl脚本中同样使用. 


sqluldr2 sys file=- sql=- &#60;&#60; EOF
select 
 *
 from tab
EOF


&#160; &#160; 使用这个功能, 可以使嵌入SQLULDR2的批脚本更具有通用性, 方便移值到不同的平台. 


Relative Posts:2010/01/15 -- 两个用户的SQLULDR2需求 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 从今天开始, SQLULDR2可以从标准输入设备接受复杂的SQL语句了. 如下所示, SQL是人工输入的, 而最后一行的反斜杆用来表示输入结束. </p>

<blockquote class="prefont">
D:\&gt;sqluldr2 scott/tiger file=- sql=-<br />
select<br />
 *<br />
 from tab<br />
/<br />
DBOBJECTS,TABLE,<br />
BLOB,TABLE,<br />
SPACE_DAILY,TABLE,<br />
SQLULDR2_LOG,TABLE,<br />
TRADE_MONTHLY_SUMMARY,TABLE,<br />
TRADE_DATA,TABLE,
</blockquote>

<p>&nbsp; &nbsp; 这个可以省去创建SQL文件的步骤, 更重要的是在Linux的Shell或Perl脚本中调用SQLULDR2, 并传入复杂的SQL时, 也不需要创建SQL文件了, 而且很容易使用Shell或Perl中的变量, 进行替换生成动态的SQL. 例如, 我们经常会见到如下脚本. </p>

<blockquote class="prefont">
sqlplus -s "/ as sysdba" &lt;&lt; EOF<br />
select <br />
 *<br />
 from tab;<br />
exit<br />
EOF
</blockquote>

<p>&nbsp; &nbsp; 现在SQLULDR2也可以这样用了, 在Linux的Shell或Perl脚本中同样使用. </p>

<blockquote class="prefont">
sqluldr2 sys file=- sql=- &lt;&lt; EOF<br />
select <br />
 *<br />
 from tab<br />
EOF
</blockquote>

<p>&nbsp; &nbsp; 使用这个功能, 可以使嵌入SQLULDR2的批脚本更具有通用性, 方便移值到不同的平台. </p>


<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/01/15 -- <a href="http://www.anysql.net/tools/sqluldr2-create-table-syntax.html" title="两个用户的SQLULDR2需求">两个用户的SQLULDR2需求</a> (1)</li><li>2010/03/06 -- <a href="http://www.anysql.net/tools/sqluldr2-better-command-options.html" title="简化SQLULDR2的命令行选项设置">简化SQLULDR2的命令行选项设置</a> (1)</li><li>2010/02/08 -- <a href="http://www.anysql.net/tools/sqluldr2-form-display.html" title="SQLULDR2也可改善用户体验">SQLULDR2也可改善用户体验</a> (4)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-column-separator-option.html" title="SQLULDR2的按列文本输出">SQLULDR2的按列文本输出</a> (0)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-customized-escape-chars.html" title="SQLULDR2的自定义转义符处理">SQLULDR2的自定义转义符处理</a> (2)</li><li>2009/10/30 -- <a href="http://www.anysql.net/tools/sqluldr2-high-perf-insert-unload.html" title="SQLULDR2功能增加, 性能不减">SQLULDR2功能增加, 性能不减</a> (14)</li><li>2009/10/27 -- <a href="http://www.anysql.net/tools/sqluldr2-more-escape-chars.html" title="将SQLULDR2转义符进行到底">将SQLULDR2转义符进行到底</a> (3)</li><li>2009/10/26 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-escape-char.html" title="SQLULDR2处理MySQL转义符">SQLULDR2处理MySQL转义符</a> (1)</li><li>2009/08/31 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-null-value.html" title="SQLULDR2处理MySQL的空值">SQLULDR2处理MySQL的空值</a> (2)</li><li>2009/06/03 -- <a href="http://www.anysql.net/tools/sqluldr2-alter-session.html" title="SQLULDR2会话级设置">SQLULDR2会话级设置</a> (1)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=EyVMW4_wGc4:pHPtmST-hMI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=EyVMW4_wGc4:pHPtmST-hMI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=EyVMW4_wGc4:pHPtmST-hMI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=EyVMW4_wGc4:pHPtmST-hMI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=EyVMW4_wGc4:pHPtmST-hMI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=EyVMW4_wGc4:pHPtmST-hMI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/EyVMW4_wGc4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/sqluldr2-read-sql-from-stdin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/sqluldr2-read-sql-from-stdin.html</feedburner:origLink></item>
		<item>
		<title>简化SQLULDR2的命令行选项设置</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/hu9mX4v337s/sqluldr2-better-command-options.html</link>
		<comments>http://www.anysql.net/tools/sqluldr2-better-command-options.html#comments</comments>
		<pubDate>Sat, 06 Mar 2010 02:15:09 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[SQLLDR]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=744</guid>
		<description><![CDATA[&#160; &#160; 看到Kamus对SQLULDR2的留言后, 破有感触. 人们应当比较关注, 他们想要的功能用起来方便是否, 关键并不在于功能的多少. 而SQLULDR2的众多的命令行选项, 也确实有些让人发晕, 包括我自已. 

&#160; &#160; 为了方便大多数人使用, 简化了SQLULDR2的命令行帮助, 简化到如下所示. 


SQL*UnLoader: Fast Oracle Text Unloader (GZIP), Release 3.0.1
(@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.

Usage: SQLULDR2 keyword=value [,keyword=value,...]

Valid Keywords:
&#160;  user&#160; &#160; = username/password@tnsname
&#160;  sql&#160; &#160;  = SQL file name
&#160;  query&#160;  = select [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 看到<a href="http://www.dbform.com">Kamus</a>对SQLULDR2的<a href="http://www.anysql.net/tools/sqluldr2-form-display.html#comment-2962">留言</a>后, 破有感触. 人们应当比较关注, 他们想要的功能用起来方便是否, 关键并不在于功能的多少. 而SQLULDR2的众多的命令行选项, 也确实有些让人发晕, 包括我自已. </p>

<p>&nbsp; &nbsp; 为了方便大多数人使用, 简化了SQLULDR2的命令行帮助, 简化到如下所示. </p>

<blockquote class="prefont">
SQL*UnLoader: Fast Oracle Text Unloader (GZIP), Release 3.0.1<br />
(@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.<br />
<br />
Usage: SQLULDR2 keyword=value [,keyword=value,...]<br />
<br />
Valid Keywords:<br />
&nbsp;  user&nbsp; &nbsp; = username/password@tnsname<br />
&nbsp;  sql&nbsp; &nbsp;  = SQL file name<br />
&nbsp;  query&nbsp;  = select statement<br />
&nbsp;  field&nbsp;  = separator string between fields<br />
&nbsp;  record&nbsp; = separator string between records<br />
&nbsp;  rows&nbsp; &nbsp; = print progress for every given rows (default, 1000000)<br />
&nbsp;  file&nbsp; &nbsp; = output file name(default: uldrdata.txt)<br />
&nbsp;  log&nbsp; &nbsp;  = log file name, prefix with + to append mode<br />
&nbsp;  fast&nbsp; &nbsp; = auto tuning the session level parameters(YES)<br />
&nbsp;  text&nbsp; &nbsp; = output type (MYSQL, CSV, MYSQLINS, ORACLEINS, FORM, SEARCH).<br />
&nbsp;  parfile = read command option from parameter file<br />
<br />
&nbsp; for field and record, you can use '0x' to specify hex character code,<br />
&nbsp; \r=0x0d \n=0x0a |=0x7c ,=0x2c, \t=0x09, :=0x3a, #=0x23, "=0x22 '=0x27
</blockquote>

<p>&nbsp; &nbsp; 对于专家而言, 可以用如下方式得到以前全部的命令行选项. </p>

<blockquote class="prefont">
sqluldr2 help=yes
</blockquote>

<p>&nbsp; &nbsp; 通过引入一个TEXT选项, 来针对不同格式的导出进行相关选项的设置, 不仅方便了大家使用, 也可以对SQLULDR2的功能有一个很直接的了解, 例如SQLULDR2可以导出数据给MySQL用, 或导出成Excel可以打开的标准CSV文件, 或是生成MySQL和ORACLE上的INSERT语句, 也可以按列显示记录, 或为一些特殊的搜索程序生成数据源. </p>

<p>&nbsp; &nbsp; 再次感谢Kamus的好建议, 今年是支付宝的用户体验年, 应当从用户角度进行反思. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2008/01/25 -- <a href="http://www.anysql.net/tools/ociuldr_update_20080125.html" title="ociuldr更新(2008/01/25)">ociuldr更新(2008/01/25)</a> (13)</li><li>2007/08/22 -- <a href="http://www.anysql.net/tools/ociuldr_option_array.html" title="ociuldr的更新, 为了更好的long类型支持">ociuldr的更新, 为了更好的long类型支持</a> (1)</li><li>2007/01/02 -- <a href="http://www.anysql.net/tools/ociuldr_bind_variable.html" title="在ociuldr的SQL中使用绑定变量">在ociuldr的SQL中使用绑定变量</a> (4)</li><li>2010/02/08 -- <a href="http://www.anysql.net/tools/sqluldr2-form-display.html" title="SQLULDR2也可改善用户体验">SQLULDR2也可改善用户体验</a> (4)</li><li>2010/01/15 -- <a href="http://www.anysql.net/tools/sqluldr2-create-table-syntax.html" title="两个用户的SQLULDR2需求">两个用户的SQLULDR2需求</a> (1)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-column-separator-option.html" title="SQLULDR2的按列文本输出">SQLULDR2的按列文本输出</a> (0)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-customized-escape-chars.html" title="SQLULDR2的自定义转义符处理">SQLULDR2的自定义转义符处理</a> (2)</li><li>2009/10/27 -- <a href="http://www.anysql.net/tools/sqluldr2-more-escape-chars.html" title="将SQLULDR2转义符进行到底">将SQLULDR2转义符进行到底</a> (3)</li><li>2009/10/26 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-escape-char.html" title="SQLULDR2处理MySQL转义符">SQLULDR2处理MySQL转义符</a> (1)</li><li>2009/08/31 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-null-value.html" title="SQLULDR2处理MySQL的空值">SQLULDR2处理MySQL的空值</a> (2)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=hu9mX4v337s:M86StY0F54o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=hu9mX4v337s:M86StY0F54o:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=hu9mX4v337s:M86StY0F54o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=hu9mX4v337s:M86StY0F54o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=hu9mX4v337s:M86StY0F54o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=hu9mX4v337s:M86StY0F54o:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/hu9mX4v337s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/sqluldr2-better-command-options.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/sqluldr2-better-command-options.html</feedburner:origLink></item>
		<item>
		<title>为DataReport增加条件过滤功能</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/tIfIPcdwwrU/webchart-rows-filter.html</link>
		<comments>http://www.anysql.net/tools/webchart-rows-filter.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 12:54:42 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=742</guid>
		<description><![CDATA[&#160; &#160; 为了查询出保存在员工表(SCOTT.EMP)中, 每个部门工资最高的三个人, 如果是Oracle数据库, 大家可以使用Windows分组汇总函数来轻松地实现, 如下所示. 


SELECT * FROM (
SELECT DEPTNO, EMPNO, ENAME, SAL,
&#160;  RANK() OVER (PARTITION BY DEPTNO ORDER BY SAL DESC) RNK
FROM EMP ) WHERE RNK &#60;= 3


&#160; &#160; 但如果员工表存放在MySQL数据库, 或其他数据库, 如SQLLite中, 要实现同样的功能, 就比较复杂了, 至少我现在都还不会. 但利用DataReport以前开发的功能, 及刚增加的条件过滤功能, 就可以轻松实现这个需求. 


webchart.query_1=select deptno, empno, ename, sal from emp
webchart.express_1=rank&#124;x&#124;rnk::sal&#124;deptno
webchart.filter_1=3.5-x&#124;rank
webchart.sort_1=deptno,rank
webchart.group_1=1


&#160; &#160; 如果Filter中的公司算出来的值小于0, 那么这条记录就会被删除, 在这个例子中, 如果排名这一列的值大于3, 这个公式算出来的值就为负数, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 为了查询出保存在员工表(SCOTT.EMP)中, 每个部门工资最高的三个人, 如果是Oracle数据库, 大家可以使用Windows分组汇总函数来轻松地实现, 如下所示. </p>

<blockquote class="prefont">
SELECT * FROM (<br />
SELECT DEPTNO, EMPNO, ENAME, SAL,<br />
&nbsp;  RANK() OVER (PARTITION BY DEPTNO ORDER BY SAL DESC) RNK<br />
FROM EMP ) WHERE RNK &lt;= 3
</blockquote>

<p>&nbsp; &nbsp; 但如果员工表存放在MySQL数据库, 或其他数据库, 如SQLLite中, 要实现同样的功能, 就比较复杂了, 至少我现在都还不会. 但利用DataReport以前开发的功能, 及刚增加的条件过滤功能, 就可以轻松实现这个需求. </p>

<blockquote class="prefont">
webchart.query_1=select deptno, empno, ename, sal from emp<br />
webchart.express_1=rank|x|rnk::sal|deptno<br />
<strong>webchart.filter_1=3.5-x|rank</strong><br />
webchart.sort_1=deptno,rank<br />
webchart.group_1=1
</blockquote>

<p>&nbsp; &nbsp; 如果Filter中的公司算出来的值小于0, 那么这条记录就会被删除, 在这个例子中, 如果排名这一列的值大于3, 这个公式算出来的值就为负数, 所以只保留了前三名, 达到了我们的业务要求. 页面输出如下所示的表格: </p>

<blockquote class="prefont">
<table border="1" width="550" cellspacing="0" cellpadding="2">
<caption align="center">
<font size="5"></font>
</caption>
<tr>
<th width="16%">deptno</th><th width="16%">empno</th><th width="25%">ename</th><th width="25%">sal</th><th width="16%">rank</th>
</tr>
<tr>
<td rowspan="3" align="right">10</td><td bgcolor="#eeeeee" align="right">7839</td><td bgcolor="#eeeeee" align="center">KING</td><td bgcolor="#eeeeee" align="right">5000.0</td><td bgcolor="#eeeeee" align="right">1</td>
</tr>
<tr>
<td align="right">7782</td><td align="center">CLARK</td><td align="right">2450.0</td><td align="right">2</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align="right">7934</td><td bgcolor="#eeeeee" align="center">MILLER</td><td bgcolor="#eeeeee" align="right">1300.0</td><td bgcolor="#eeeeee" align="right">3</td>
</tr>
<tr>
<td rowspan="3" align="right">20</td><td align="right">7788</td><td align="center">SSCOTT</td><td align="right">3000.0</td><td align="right">1</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align="right">7902</td><td bgcolor="#eeeeee" align="center">FORD</td><td bgcolor="#eeeeee" align="right">3000.0</td><td bgcolor="#eeeeee" align="right">2</td>
</tr>
<tr>
<td align="right">7566</td><td align="center">JONESS</td><td align="right">2975.0</td><td align="right">3</td>
</tr>
<tr>
<td rowspan="3" align="right">30</td><td bgcolor="#eeeeee" align="right">7698</td><td bgcolor="#eeeeee" align="center">BLAKE</td><td bgcolor="#eeeeee" align="right">2850.0</td><td bgcolor="#eeeeee" align="right">1</td>
</tr>
<tr>
<td align="right">7499</td><td align="center">ALLEN</td><td align="right">1600.0</td><td align="right">2</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align="right">7844</td><td bgcolor="#eeeeee" align="center">TURNER</td><td bgcolor="#eeeeee" align="right">1500.0</td><td bgcolor="#eeeeee" align="right">3</td>
</tr>
</table>
</blockquote>

<p>&nbsp; &nbsp; 将这些处理放在应用服务器端实现, 不仅让SQL变得通用, 如果访问频率极高, 还可以减轻数据库端的压力. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li><li>2009/12/02 -- <a href="http://www.anysql.net/tools/webchart-xml-html-escape-chars.html" title="添加URL/HTML字符转义功能">添加URL/HTML字符转义功能</a> (1)</li><li>2009/09/21 -- <a href="http://www.anysql.net/tools/four-extra-businees-charts.html" title="多支持了四种业务图">多支持了四种业务图</a> (0)</li><li>2009/07/28 -- <a href="http://www.anysql.net/tools/webchart-jfreechart-support.html" title="DataReport增加JfreeChart支持">DataReport增加JfreeChart支持</a> (7)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=tIfIPcdwwrU:a28ypsK6ugw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=tIfIPcdwwrU:a28ypsK6ugw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=tIfIPcdwwrU:a28ypsK6ugw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=tIfIPcdwwrU:a28ypsK6ugw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=tIfIPcdwwrU:a28ypsK6ugw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=tIfIPcdwwrU:a28ypsK6ugw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/tIfIPcdwwrU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-rows-filter.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-rows-filter.html</feedburner:origLink></item>
		<item>
		<title>WebChart的DB连接配置2</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/mioJpCeBTDk/webchart-dbconn-config2.html</link>
		<comments>http://www.anysql.net/tools/webchart-dbconn-config2.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 06:47:30 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=741</guid>
		<description><![CDATA[&#160; &#160; 从应用架构角度出发, 为DataReport增加了逻库连接层后, 为了与物理连接层清晰地分开, 就对原来的数据库连接配置作了改动. 由于这儿并不能算是文档, 就贴个配置范例来说明一下了. 


# WebChart元数据库连接名称
ADMINDB=DEFAULT

# 启用的数据库连接
PHYSICAL.DBLIST=ORACLE&#124;MYSQL

# 连接参数设置
PHYSICAL.ORACLE.DBTYPE=oracle
PHYSICAL.ORACLE.DBHOST=localhost:1521:db10g
PHYSICAL.ORACLE.DBUSER=scott
PHYSICAL.ORACLE.DBPASS=8500B089B7B516CE
PHYSICAL.ORACLE.MAXCONNS=4
PHYSICAL.ORACLE.INITCONNS=1
PHYSICAL.ORACLE.LOCALE=ENGLISH

PHYSICAL.MYSQL.DBTYPE=mysql
PHYSICAL.MYSQL.DBHOST=localhost:3306/test
PHYSICAL.MYSQL.DBUSER=
PHYSICAL.MYSQL.DBPASS=1B820063CEA8A955
PHYSICAL.MYSQL.MAXCONNS=4
PHYSICAL.MYSQL.INITCONNS=1
PHYSICAL.MYSQL.LOCALE=ENGLISH

LOGICAL.DBLIST=DEFAULT
LOGICAL.DEFAULT=RANDOM&#124;ORACLE,MYSQL


&#160; &#160; 这个配置可以让DataReport以Oracle或MySQL为数据源, 如果同时有Oracle及MySQL, 则可以随机从Oracle或MySQL中读取数据展示. 在上一个改进后, 所有的Demo页面都已经改成同时支持Oracle和MySQL了, 你可以重新下载软件包进行更新. 

Relative Posts:2010/02/20 -- 定义不同数据源的SQL (3)2010/01/05 -- DataReport中的FORALL循环 (0)2009/03/17 -- MySQL上的WebChart (0)2010/03/04 -- 为DataReport增加条件过滤功能 (1)2010/01/26 -- 逻辑连接层与物理连接层(2) (1)2010/01/20 -- 逻辑连接层与物理连接层 (4)2010/01/08 -- DataReport中的超级表达式 (0)2010/01/08 -- DataReport的重复值合并 (0)2009/12/29 -- DataReport中的Cache为王 (4)2009/12/28 -- 统一DataReport的Servlet (2)]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 从<a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html">应用架构角度</a>出发, 为DataReport增加了逻库连接层后, 为了与物理连接层清晰地分开, 就对原来的<a href="http://www.anysql.net/tools/webchart_dbconn_config.html">数据库连接配置</a>作了改动. 由于这儿并不能算是文档, 就贴个配置范例来说明一下了. </p>

<blockquote class="prefont">
# WebChart元数据库连接名称<br />
ADMINDB=DEFAULT<br />
<br />
# 启用的数据库连接<br />
PHYSICAL.DBLIST=ORACLE|MYSQL<br />
<br />
# 连接参数设置<br />
PHYSICAL.ORACLE.DBTYPE=oracle<br />
PHYSICAL.ORACLE.DBHOST=localhost:1521:db10g<br />
PHYSICAL.ORACLE.DBUSER=scott<br />
PHYSICAL.ORACLE.DBPASS=8500B089B7B516CE<br />
PHYSICAL.ORACLE.MAXCONNS=4<br />
PHYSICAL.ORACLE.INITCONNS=1<br />
PHYSICAL.ORACLE.LOCALE=ENGLISH<br />
<br />
PHYSICAL.MYSQL.DBTYPE=mysql<br />
PHYSICAL.MYSQL.DBHOST=localhost:3306/test<br />
PHYSICAL.MYSQL.DBUSER=<br />
PHYSICAL.MYSQL.DBPASS=1B820063CEA8A955<br />
PHYSICAL.MYSQL.MAXCONNS=4<br />
PHYSICAL.MYSQL.INITCONNS=1<br />
PHYSICAL.MYSQL.LOCALE=ENGLISH<br />
<br />
LOGICAL.DBLIST=DEFAULT<br />
LOGICAL.DEFAULT=RANDOM|ORACLE,MYSQL
</blockquote>

<p>&nbsp; &nbsp; 这个配置可以让DataReport以Oracle或MySQL为数据源, 如果同时有Oracle及MySQL, 则可以随机从Oracle或MySQL中读取数据展示. 在<a href="http://www.anysql.net/tools/webchart-multidb-support.html">上一个改进</a>后, 所有的Demo页面都已经改成同时支持Oracle和MySQL了, 你可以重新<a href="http://www.anysql.net/software/webchart.zip">下载软件包</a>进行更新. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2009/03/17 -- <a href="http://www.anysql.net/tools/webchart_mysql_demo.html" title="MySQL上的WebChart">MySQL上的WebChart</a> (0)</li><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/01/26 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess2.html" title="逻辑连接层与物理连接层(2)">逻辑连接层与物理连接层(2)</a> (1)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=mioJpCeBTDk:F5WAcVYoERE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=mioJpCeBTDk:F5WAcVYoERE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=mioJpCeBTDk:F5WAcVYoERE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=mioJpCeBTDk:F5WAcVYoERE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=mioJpCeBTDk:F5WAcVYoERE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=mioJpCeBTDk:F5WAcVYoERE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/mioJpCeBTDk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-dbconn-config2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-dbconn-config2.html</feedburner:origLink></item>
		<item>
		<title>定义不同数据源的SQL</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/U_N_w1ZWEKU/webchart-multidb-support.html</link>
		<comments>http://www.anysql.net/tools/webchart-multidb-support.html#comments</comments>
		<pubDate>Sat, 20 Feb 2010 06:43:02 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=740</guid>
		<description><![CDATA[&#160; &#160; DataReport的几个演示页面, 有的人喜欢在Oracle上跑, 有的人喜欢在MySQL上跑. 而针对不同的数据源, SQL的写法是不同的, 因此演示页面是和某类数据源绑定的, 给第一次接触DataReport的人带来了一定的困惑. 

&#160; &#160; 不过现在可以为不同的数据源定义不同的SQL了, 如下所示. 


WEBCHART.QUERY_1=*

WEBCHART.QUERY_ORACLE_1=select 
&#160; &#160; &#160; to_char(trade_month,'yyyy/mm') month , 
&#160; &#160; &#160; trade_count count 
&#160; from trade_monthly_summary 
&#160; where to_char(trade_month,'yyyy')='2008'
&#160; 
WEBCHART.QUERY_MYSQL_1=select 
&#160; &#160; &#160; trade_month,
&#160; &#160; &#160; trade_count+0 as count 
&#160; from trade_summary_monthly 
&#160; where year(trade_month) = 2008


&#160; &#160; 将最上层的SQL定义成星号, 这时DataReport会根据数据源的类型, 进行进一步查找, 如果连到Oracle数据库, 就取上面一条SQL语句, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; DataReport的几个演示页面, 有的人喜欢在Oracle上跑, 有的人喜欢在MySQL上跑. 而针对不同的数据源, SQL的写法是不同的, 因此演示页面是和某类数据源绑定的, 给第一次接触DataReport的人带来了一定的困惑. </p>

<p>&nbsp; &nbsp; 不过现在可以为不同的数据源定义不同的SQL了, 如下所示. </p>

<blockquote class="prefont">
WEBCHART.QUERY_1=*<br />
<br />
WEBCHART.QUERY_ORACLE_1=select <br />
&nbsp; &nbsp; &nbsp; to_char(trade_month,'yyyy/mm') month , <br />
&nbsp; &nbsp; &nbsp; trade_count count <br />
&nbsp; from trade_monthly_summary <br />
&nbsp; where to_char(trade_month,'yyyy')='2008'<br />
&nbsp; <br />
WEBCHART.QUERY_MYSQL_1=select <br />
&nbsp; &nbsp; &nbsp; trade_month,<br />
&nbsp; &nbsp; &nbsp; trade_count+0 as count <br />
&nbsp; from trade_summary_monthly <br />
&nbsp; where year(trade_month) = 2008<br />
</blockquote>

<p>&nbsp; &nbsp; 将最上层的SQL定义成星号, 这时DataReport会根据数据源的类型, 进行进一步查找, 如果连到Oracle数据库, 就取上面一条SQL语句, 如果连接的是MySQL数据库, 则取下面一条SQL, 进行不同数据源类型的自动匹配, 使得报表定义变得更加灵活. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/26 -- <a href="http://www.anysql.net/tools/webchart-dbconn-config2.html" title="WebChart的DB连接配置2">WebChart的DB连接配置2</a> (0)</li><li>2010/01/26 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess2.html" title="逻辑连接层与物理连接层(2)">逻辑连接层与物理连接层(2)</a> (1)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li><li>2009/12/02 -- <a href="http://www.anysql.net/tools/webchart-xml-html-escape-chars.html" title="添加URL/HTML字符转义功能">添加URL/HTML字符转义功能</a> (1)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=U_N_w1ZWEKU:c1v1bCb3MT4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=U_N_w1ZWEKU:c1v1bCb3MT4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=U_N_w1ZWEKU:c1v1bCb3MT4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=U_N_w1ZWEKU:c1v1bCb3MT4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=U_N_w1ZWEKU:c1v1bCb3MT4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=U_N_w1ZWEKU:c1v1bCb3MT4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/U_N_w1ZWEKU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-multidb-support.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-multidb-support.html</feedburner:origLink></item>
		<item>
		<title>SQLULDR2也可改善用户体验</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/bk_DvFHk9fw/sqluldr2-form-display.html</link>
		<comments>http://www.anysql.net/tools/sqluldr2-form-display.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 07:13:32 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[SQLLDR]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=739</guid>
		<description><![CDATA[&#160; &#160; 做DBA要经常为其他人员查询一些数据, 有些记录的字段数很多, 用SQLPLUS直接出结果时, 很难对得整齐, 因此没有什么用户体验, 会被内部人员投诉, 外部用户的体验关系着企业的业绩, 内部员工的体验关系到工作的满意度. 

&#160; &#160; Spool的结果的确很乱, 在Yong Huang提议在AnySQL中加入MySQL按列显示功能后, 就在文本导出工具中也加入了这个功能, 第一版本的ociuldr使用如下参数. 


ociuldr form=yes ...


&#160; &#160; 第二版的文本导出工具也有这个功能, 只是SQLULDR2中需要设置三个选项才行. 


$sqluldr2 scott/tiger query=emp form=yes
$sqluldr2 scott/tiger query=emp colsep=0x20:0x20 field=0x0a record=0x0a0x0a file=-

EMPNO&#160; &#160; : 7369
ENAME&#160; &#160; : SMITH
JOB&#160; &#160; &#160; : CLERK
MGR&#160; &#160; &#160; : 7902
HIREDATE : 1980-12-17 00:00:00
SAL&#160; &#160; &#160; : 800
COMM&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 做DBA要经常为其他人员查询一些数据, 有些记录的字段数很多, 用SQLPLUS直接出结果时, 很难对得整齐, 因此没有什么用户体验, 会被内部人员投诉, 外部用户的体验关系着企业的业绩, 内部员工的体验关系到工作的满意度. </p>

<p>&nbsp; &nbsp; Spool的结果的确很乱, 在Yong Huang提议在AnySQL中加入MySQL<a href="http://www.anysql.net/anysql/anysql_form_display.html">按列显示</a>功能后, 就在文本导出工具中也加入了这个功能, 第一版本的ociuldr使用如下参数. </p>

<blockquote class="prefont">
ociuldr form=yes ...
</blockquote>

<p>&nbsp; &nbsp; 第二版的文本导出工具也有这个功能, 只是SQLULDR2中需要设置三个选项才行. </p>

<blockquote class="prefont">
$sqluldr2 scott/tiger query=emp form=yes<br />
$sqluldr2 scott/tiger query=emp colsep=0x20:0x20 field=0x0a record=0x0a0x0a file=-<br />
<br />
EMPNO&nbsp; &nbsp; : 7369<br />
ENAME&nbsp; &nbsp; : SMITH<br />
JOB&nbsp; &nbsp; &nbsp; : CLERK<br />
MGR&nbsp; &nbsp; &nbsp; : 7902<br />
HIREDATE : 1980-12-17 00:00:00<br />
SAL&nbsp; &nbsp; &nbsp; : 800<br />
COMM&nbsp; &nbsp;  :<br />
DEPTNO&nbsp;  : 20<br />
<br />
EMPNO&nbsp; &nbsp; : 7499<br />
ENAME&nbsp; &nbsp; : ALLEN<br />
JOB&nbsp; &nbsp; &nbsp; : SALESMAN<br />
MGR&nbsp; &nbsp; &nbsp; : 7698<br />
HIREDATE : 1981-02-20 00:00:00<br />
SAL&nbsp; &nbsp; &nbsp; : 1600<br />
COMM&nbsp; &nbsp;  : 300<br />
DEPTNO&nbsp;  : 30<br />
......
</blockquote>

<p>&nbsp; &nbsp; 能用SQLULDR2来改善用户体验, 真是当初意想不到的事情. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/06 -- <a href="http://www.anysql.net/tools/sqluldr2-better-command-options.html" title="简化SQLULDR2的命令行选项设置">简化SQLULDR2的命令行选项设置</a> (1)</li><li>2010/01/15 -- <a href="http://www.anysql.net/tools/sqluldr2-create-table-syntax.html" title="两个用户的SQLULDR2需求">两个用户的SQLULDR2需求</a> (1)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-column-separator-option.html" title="SQLULDR2的按列文本输出">SQLULDR2的按列文本输出</a> (0)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-customized-escape-chars.html" title="SQLULDR2的自定义转义符处理">SQLULDR2的自定义转义符处理</a> (2)</li><li>2009/10/27 -- <a href="http://www.anysql.net/tools/sqluldr2-more-escape-chars.html" title="将SQLULDR2转义符进行到底">将SQLULDR2转义符进行到底</a> (3)</li><li>2009/10/26 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-escape-char.html" title="SQLULDR2处理MySQL转义符">SQLULDR2处理MySQL转义符</a> (1)</li><li>2009/08/31 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-null-value.html" title="SQLULDR2处理MySQL的空值">SQLULDR2处理MySQL的空值</a> (2)</li><li>2009/04/02 -- <a href="http://www.anysql.net/tools/sqluldr2_license.html" title="给SQLULDR2加上Key保护">给SQLULDR2加上Key保护</a> (6)</li><li>2008/01/25 -- <a href="http://www.anysql.net/tools/ociuldr_update_20080125.html" title="ociuldr更新(2008/01/25)">ociuldr更新(2008/01/25)</a> (13)</li><li>2007/08/22 -- <a href="http://www.anysql.net/tools/ociuldr_option_array.html" title="ociuldr的更新, 为了更好的long类型支持">ociuldr的更新, 为了更好的long类型支持</a> (1)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=bk_DvFHk9fw:Vhxfa9WS6p8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=bk_DvFHk9fw:Vhxfa9WS6p8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=bk_DvFHk9fw:Vhxfa9WS6p8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=bk_DvFHk9fw:Vhxfa9WS6p8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=bk_DvFHk9fw:Vhxfa9WS6p8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=bk_DvFHk9fw:Vhxfa9WS6p8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/bk_DvFHk9fw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/sqluldr2-form-display.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/sqluldr2-form-display.html</feedburner:origLink></item>
		<item>
		<title>DataReport的Form格式显示</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/Vh-tmG_-KOs/webchart-form-data-display.html</link>
		<comments>http://www.anysql.net/tools/webchart-form-data-display.html#comments</comments>
		<pubDate>Thu, 04 Feb 2010 06:11:45 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[WebCh]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=738</guid>
		<description><![CDATA[&#160; &#160; 一直以来, DataReport都是用表格方式显示多行数据, 当我们查询少量字段数很多的记录时, 就不希望以表格方式显示记录, 而希望以Form格式显示, 如下面显示的员工表的信息. 







EMPNO7782


ENAMECLARK


JOBMANAGER


MGR7839


HIREDATE1981-06-09 00:00:00.0


SAL2450


COMM&#160;


DEPTNO10







EMPNO7839


ENAMEKING


JOBPRESIDENT


MGR&#160;


HIREDATE1981-11-17 00:00:00.0


SAL5000


COMM&#160;


DEPTNO10




&#160; &#160; 实现这个功能, 并没有修改任何一行代码, 只是改了一下控制显示格式的XSL文件, 然后在报表定义文件中加入一行. 


WEBCHART.XMLATTR=form="yes"
WEBCHART.QUERY_1=SELECT * FROM EMP WHERE DEPTNO=10


&#160; &#160; 想要更丰富的格式, 只需要再改进一下XSL文件即可, 不需要修改Java代码, 不过这需要你对XML和XSLT比较熟悉. 


Relative Posts:2010/03/04 -- 为DataReport增加条件过滤功能 (1)2010/02/20 -- 定义不同数据源的SQL (3)2010/01/20 -- 逻辑连接层与物理连接层 (4)2010/01/08 -- DataReport中的超级表达式 (0)2010/01/08 -- DataReport的重复值合并 (0)2010/01/05 -- DataReport中的FORALL循环 (0)2009/12/29 -- DataReport中的Cache为王 (4)2009/12/28 -- 统一DataReport的Servlet (2)2009/12/02 -- 添加URL/HTML字符转义功能 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 一直以来, DataReport都是用表格方式显示多行数据, 当我们查询少量字段数很多的记录时, 就不希望以表格方式显示记录, 而希望以Form格式显示, 如下面显示的员工表的信息. </p>

<blockquote>
<table border="1" width="510" cellspacing="0" cellpadding="2">
<caption align="center">
<font size="5"></font>
</caption>
<tr>
<td width="20%" align="center">EMPNO</td><td>7782</td>
</tr>
<tr>
<td width="20%" align="center">ENAME</td><td>CLARK</td>
</tr>
<tr>
<td width="20%" align="center">JOB</td><td>MANAGER</td>
</tr>
<tr>
<td width="20%" align="center">MGR</td><td>7839</td>
</tr>
<tr>
<td width="20%" align="center">HIREDATE</td><td>1981-06-09 00:00:00.0</td>
</tr>
<tr>
<td width="20%" align="center">SAL</td><td>2450</td>
</tr>
<tr>
<td width="20%" align="center">COMM</td><td>&nbsp;</td>
</tr>
<tr>
<td width="20%" align="center">DEPTNO</td><td>10</td>
</tr>
<tr>
<td colspan="2" align="center">
<br>
</td>
</tr>
<tr>
<td width="20%" align="center">EMPNO</td><td>7839</td>
</tr>
<tr>
<td width="20%" align="center">ENAME</td><td>KING</td>
</tr>
<tr>
<td width="20%" align="center">JOB</td><td>PRESIDENT</td>
</tr>
<tr>
<td width="20%" align="center">MGR</td><td>&nbsp;</td>
</tr>
<tr>
<td width="20%" align="center">HIREDATE</td><td>1981-11-17 00:00:00.0</td>
</tr>
<tr>
<td width="20%" align="center">SAL</td><td>5000</td>
</tr>
<tr>
<td width="20%" align="center">COMM</td><td>&nbsp;</td>
</tr>
<tr>
<td width="20%" align="center">DEPTNO</td><td>10</td>
</tr>
</table>
</blockquote>

<p>&nbsp; &nbsp; 实现这个功能, 并没有修改任何一行代码, 只是改了一下控制显示格式的<a href="http://www.anysql.net/doc/default.xsl">XSL文件</a>, 然后在报表定义文件中加入一行. </p>

<blockquote class="prefont">
WEBCHART.XMLATTR=form="yes"<br />
WEBCHART.QUERY_1=SELECT * FROM EMP WHERE DEPTNO=10
</blockquote>

<p>&nbsp; &nbsp; 想要更丰富的格式, 只需要再改进一下XSL文件即可, 不需要修改Java代码, 不过这需要你对XML和XSLT比较熟悉. </p>


<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li><li>2009/12/02 -- <a href="http://www.anysql.net/tools/webchart-xml-html-escape-chars.html" title="添加URL/HTML字符转义功能">添加URL/HTML字符转义功能</a> (1)</li><li>2009/09/21 -- <a href="http://www.anysql.net/tools/four-extra-businees-charts.html" title="多支持了四种业务图">多支持了四种业务图</a> (0)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vh-tmG_-KOs:dln8JGwSymI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vh-tmG_-KOs:dln8JGwSymI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vh-tmG_-KOs:dln8JGwSymI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=Vh-tmG_-KOs:dln8JGwSymI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vh-tmG_-KOs:dln8JGwSymI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vh-tmG_-KOs:dln8JGwSymI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/Vh-tmG_-KOs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-form-data-display.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-form-data-display.html</feedburner:origLink></item>
		<item>
		<title>谈谈历史遗留问题</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/QQh2NtJ3rhk/history-problems.html</link>
		<comments>http://www.anysql.net/life/history-problems.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 12:16:37 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=737</guid>
		<description><![CDATA[&#160; &#160; 首先要承认有历史遗留问题是好事, 因为这一般是在事物新生期被忽略的细节上的问题, 而且往往是因为事物起始时高度关注与追求高速发展, 与解决细节问题之间的时间和资源上的冲突, 就IT系统来讲, 历史遗留问题越多, 表明当初发展的速度越快, 因为一开始资源上也显不足. 先要在心里承认历史遗留问题的正常性, 不出问题时大家都容易理解, 但要是出了问题, 心中不一定能容忍历史遗留问题的客观性. 

&#160; &#160; 除了时间和资源外, 在当时的条件下, 解决新生期的细节上的问题是入不付出的, 并且事物不会因为这个细节上的问题, 而导致当时的失败, 甚至可能什么都表现不出来, 相当长的一段时间内都会隐藏得很好, 除了当时事物的制造者可能知道外, 不是所有的细节上的问题在形成之初就是已知的, 都认为这是一个十分完美的事物. 

&#160; &#160; 虽然不是所有的细节上的问题在形成之初就是已知的, 但有很多应当是已知的, 只是这个细节上的问题, 在传承上出了问题, 事物可能前后经由多个人进行修改与完善, 前面已经感觉到的问题, 如果没有有效地交托给下一个, 就隐藏了, 没被隐藏的一般都是比较大的问题, 不会成为历史遗留问题. 

&#160; &#160; 历史遗留问题的发现一般都是由于事故, 量变引起质变, 在量没有到达之前, 不会形成事故, 不会有让人感觉到难过的严重危害. 拿IT系统来说, 用户数的增长, 业务的增长, 数据量的极速增长, 到一定的量后, 才会发现当初被忽略的细节现在都成了头痛的问题, 成了历史遗留问题, 不满意的用户绝对数量在增加. 在用户的心目中, 事物应当变得越来越完善, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 首先要承认有历史遗留问题是好事, 因为这一般是在事物新生期被忽略的细节上的问题, 而且往往是因为事物起始时高度关注与追求高速发展, 与解决细节问题之间的时间和资源上的冲突, 就IT系统来讲, 历史遗留问题越多, 表明当初发展的速度越快, 因为一开始资源上也显不足. 先要在心里承认历史遗留问题的正常性, 不出问题时大家都容易理解, 但要是出了问题, 心中不一定能容忍历史遗留问题的客观性. </p>

<p>&nbsp; &nbsp; 除了时间和资源外, 在当时的条件下, 解决新生期的细节上的问题是入不付出的, 并且事物不会因为这个细节上的问题, 而导致当时的失败, 甚至可能什么都表现不出来, 相当长的一段时间内都会隐藏得很好, 除了当时事物的制造者可能知道外, 不是所有的细节上的问题在形成之初就是已知的, 都认为这是一个十分完美的事物. </p>

<p>&nbsp; &nbsp; 虽然不是所有的细节上的问题在形成之初就是已知的, 但有很多应当是已知的, 只是这个细节上的问题, 在传承上出了问题, 事物可能前后经由多个人进行修改与完善, 前面已经感觉到的问题, 如果没有有效地交托给下一个, 就隐藏了, 没被隐藏的一般都是比较大的问题, 不会成为历史遗留问题. </p>

<p>&nbsp; &nbsp; 历史遗留问题的发现一般都是由于事故, 量变引起质变, 在量没有到达之前, 不会形成事故, 不会有让人感觉到难过的严重危害. 拿IT系统来说, 用户数的增长, 业务的增长, 数据量的极速增长, 到一定的量后, 才会发现当初被忽略的细节现在都成了头痛的问题, 成了历史遗留问题, 不满意的用户绝对数量在增加. 在用户的心目中, 事物应当变得越来越完善, 但当发现没有变化时, 变得越来越失望, 为什么当初没造成用户体验问题, 现在却造成了用户体验问题, 当时用得好好的, 什么也没有变, 就变成了问题很多的事物了. 看来对既有事物的完善速度必须要超过社会发展的速度, 才不会引起用户体验问题. </p>

<p>&nbsp; &nbsp; 一个历史遗留问题的爆发, 往往会引出更多的历史遗留问题, 站在今天的时间点回首看去, 会发现一个一个的黑洞, 从而引生出放弃旧事物, 开发新事物的想法, 并且很容易取得一致的共识, 大量的历史遗留问题是很难解决的, 重新做一个要比改造来得更快更好. 另外此时彼时物虽是人已非, 每个人都不想去修复历史遗留问题, 因为长期的积累, 这些问题已经变得很难处理, 处理好了只是个小功劳, 处理不好就是大问题. <p>

<p>&nbsp; &nbsp; 有部份的历史遗留问题一定是通过创建新事物来解决的, 也有一些必须通过修复来解决的, 当你偏向于某一方时, 就会在一定的时间段内引起一定的问题, 问题在于你能否支撑过这段青黄不接的时期. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/01/04 -- <a href="http://www.anysql.net/life/my-first-book-content.html" title="最近在整理的几篇文档">最近在整理的几篇文档</a> (2)</li><li>2009/09/11 -- <a href="http://www.anysql.net/dba/where-is-dba-future.html" title="DBA有什么个人前途?">DBA有什么个人前途?</a> (18)</li><li>2009/09/08 -- <a href="http://www.anysql.net/life/why-we-buy-apartment.html" title="因丈母娘的需求而买房?">因丈母娘的需求而买房?</a> (5)</li><li>2009/09/03 -- <a href="http://www.anysql.net/life/build-online-trade-credit.html" title="收费有助于网购信用">收费有助于网购信用</a> (1)</li><li>2009/08/25 -- <a href="http://www.anysql.net/dba/dba-experience-growth.html" title="关于技术积累的几点想法">关于技术积累的几点想法</a> (6)</li><li>2009/08/17 -- <a href="http://www.anysql.net/life/create-dba-extra-values.html" title="努力创造DBA额外价值">努力创造DBA额外价值</a> (27)</li><li>2009/08/12 -- <a href="http://www.anysql.net/life/with-value-based-life.html" title="个人价值决定个人回报">个人价值决定个人回报</a> (13)</li><li>2009/08/04 -- <a href="http://www.anysql.net/dba/dba-most-important-things.html" title="DBA最缺的不是技术">DBA最缺的不是技术</a> (8)</li><li>2009/08/02 -- <a href="http://www.anysql.net/life/harder-work-than-dba.html" title="当群众演员比干DBA还累">当群众演员比干DBA还累</a> (9)</li><li>2009/07/29 -- <a href="http://www.anysql.net/dba/how-dns-work-for-us.html" title="域名解释与行人问路">域名解释与行人问路</a> (2)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=QQh2NtJ3rhk:qVA3yNyoCpk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=QQh2NtJ3rhk:qVA3yNyoCpk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=QQh2NtJ3rhk:qVA3yNyoCpk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=QQh2NtJ3rhk:qVA3yNyoCpk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=QQh2NtJ3rhk:qVA3yNyoCpk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=QQh2NtJ3rhk:qVA3yNyoCpk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/QQh2NtJ3rhk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/life/history-problems.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.anysql.net/life/history-problems.html</feedburner:origLink></item>
		<item>
		<title>逻辑连接层与物理连接层(2)</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/E-32LwusiAc/webchart-logical-dbaccess2.html</link>
		<comments>http://www.anysql.net/tools/webchart-logical-dbaccess2.html#comments</comments>
		<pubDate>Tue, 26 Jan 2010 12:11:19 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=735</guid>
		<description><![CDATA[&#160; &#160; 上一次只想到了逻辑逻辑层和物理连接层之间的三种关系, 等价(FIRST), 随机(RANDOM), 顺序(FAILOVER). 其实后面一直在思考, 阅读了一些相关文章, 糊思乱想了一通后, 又增加了两种访问方式. 

&#160; &#160; 按位置(POSITION)访问, 指程序提供一个标识位置的数, 然后与逻辑连接层的连接源数目进行取余操作, 根据余数来获取指定位置的数据源. 继续上一次中的四个MySQL的例子, 我们创建如下逻辑连接, 在访问时如果提供的值是5, 则最后取到的是5余4的位置, 即SLAVE1. 


LOGICAL.DEFAULT=POSITION&#124;MASTER,SLAVE1,SLAVE2,SLAVE3


&#160; &#160; 按范围(RANGE)访问, 指程序提供一个标识位置的数, 然后与逻辑连接层的连接数据源进行比较操作, 按顺序找到指定位置的数据源. 继续上一次中的四个MySQL的例子, 我们创建如下逻辑连接, 在访问时如果提供的值是250, 则最后取到的是小于300的位置, 即SLAVE2. 同前面的按位置相比, 这个可以在增减数据源时, 将影响控制得更好.


LOGICAL.DEFAULT=POSITION&#124;MASTER,SLAVE1,SLAVE2,SLAVE3
LOGICAL.DEFAULT.VALUES=100,200,300,400


&#160; &#160; 在程序中, 可以根据业务特色提供这个标识位置的数, 然后在JDBC的访问URL中提供这个值, 访问代码如下所示. 


try {
&#160; Connection db = DriverManager.getConnection("jdbc:anysql:default/250", null);
&#160; ......
&#160; db.close();
}
catch (SQLException sqle) 
{
&#160; ......
}


&#160; &#160; 接下来当然还会思考有没有新的方式了, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html">上一次</a>只想到了逻辑逻辑层和物理连接层之间的三种关系, 等价(FIRST), 随机(RANDOM), 顺序(FAILOVER). 其实后面一直在思考, 阅读了一些相关文章, 糊思乱想了一通后, 又增加了两种访问方式. </p>

<p>&nbsp; &nbsp; 按位置(POSITION)访问, 指程序提供一个标识位置的数, 然后与逻辑连接层的连接源数目进行取余操作, 根据余数来获取指定位置的数据源. 继续上一次中的四个MySQL的例子, 我们创建如下逻辑连接, 在访问时如果提供的值是5, 则最后取到的是5余4的位置, 即SLAVE1. </p>

<blockquote class="prefont">
LOGICAL.DEFAULT=POSITION|MASTER,SLAVE1,SLAVE2,SLAVE3
</blockquote>

<p>&nbsp; &nbsp; 按范围(RANGE)访问, 指程序提供一个标识位置的数, 然后与逻辑连接层的连接数据源进行比较操作, 按顺序找到指定位置的数据源. 继续上一次中的四个MySQL的例子, 我们创建如下逻辑连接, 在访问时如果提供的值是250, 则最后取到的是小于300的位置, 即SLAVE2. 同前面的按位置相比, 这个可以在增减数据源时, 将影响控制得更好.</p>

<blockquote class="prefont">
LOGICAL.DEFAULT=POSITION|MASTER,SLAVE1,SLAVE2,SLAVE3<br />
LOGICAL.DEFAULT.VALUES=100,200,300,400
</blockquote>

<p>&nbsp; &nbsp; 在程序中, 可以根据业务特色提供这个标识位置的数, 然后在JDBC的访问URL中提供这个值, 访问代码如下所示. </p>

<blockquote class="prefont">
try {<br />
&nbsp; Connection db = DriverManager.getConnection("jdbc:anysql:default/250", null);<br />
&nbsp; ......<br />
&nbsp; db.close();<br />
}<br />
catch (SQLException sqle) <br />
{<br />
&nbsp; ......<br />
}<br />
</blockquote>

<p>&nbsp; &nbsp; 接下来当然还会思考有没有新的方式了, 有了这些访问方式, 进一步抽像一下, 可以看看能不能将数据库当成一个磁盘(Database as Disk)来看, 写一个弱弱的DatabaseRaid类在实验室玩玩数据冗余. </p><h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/26 -- <a href="http://www.anysql.net/tools/webchart-dbconn-config2.html" title="WebChart的DB连接配置2">WebChart的DB连接配置2</a> (0)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li><li>2009/12/02 -- <a href="http://www.anysql.net/tools/webchart-xml-html-escape-chars.html" title="添加URL/HTML字符转义功能">添加URL/HTML字符转义功能</a> (1)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=E-32LwusiAc:gh2OUWf7Qj0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=E-32LwusiAc:gh2OUWf7Qj0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=E-32LwusiAc:gh2OUWf7Qj0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=E-32LwusiAc:gh2OUWf7Qj0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=E-32LwusiAc:gh2OUWf7Qj0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=E-32LwusiAc:gh2OUWf7Qj0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/E-32LwusiAc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-logical-dbaccess2.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-logical-dbaccess2.html</feedburner:origLink></item>
		<item>
		<title>AnySQL JDBC Driver</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/Vb_nk18Qfik/anysql-jdbc-driver.html</link>
		<comments>http://www.anysql.net/tools/anysql-jdbc-driver.html#comments</comments>
		<pubDate>Thu, 21 Jan 2010 07:55:43 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=734</guid>
		<description><![CDATA[&#160; &#160; 上一篇中的逻辑连接层, 通过一个DBLogicalManager类来实现, 并不是标准的JDBC调用方式, 如果要使现有的程序能很快用上这个功能, 要么更改程序, 要么就去实现一个JDBC Driver类, 让程序透明化. 显然第二种方法很好, 于是就写一个AnySQL JDBC Driver类吧. 

&#160; &#160; JDBC Driver的类名为: 


com.lfx.db.AnySQLDriver


&#160; &#160; 使用这个类时, 需要传入一个保存连接配置信息(逻辑库, 物理库)的文件, 只要创建一个类实例就行了. 


new com.lfx.db.AnySQLDriver(Sting config_file);


&#160; &#160; 接下来就可以用标准的JDBC来获得逻辑库的连接了, URL规则为: 


jdbc:anysql:logical_database_name


&#160; &#160; 比如在批处理中, 要从上一篇的三个Slave库中的一个读取一条记录, 就可以使用如下代码. 


try {
&#160; Connection db = DriverManager.getConnection("jdbc:anysql:readdb", null);
&#160; ......
&#160; db.close();
}
catch (SQLException sqle) 
{
&#160; ......
}


&#160; &#160; 现在还没有真正投入使用, 只在实验室中测试了一下, 感觉上还可以. 

Relative Posts:2009/02/26 -- [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 上一篇中的逻辑连接层, 通过一个DBLogicalManager类来实现, 并不是标准的JDBC调用方式, 如果要使现有的程序能很快用上这个功能, 要么更改程序, 要么就去实现一个JDBC Driver类, 让程序透明化. 显然第二种方法很好, 于是就写一个AnySQL JDBC Driver类吧. </p>

<p>&nbsp; &nbsp; JDBC Driver的类名为: </p>

<blockquote class="prefont">
com.lfx.db.AnySQLDriver
</blockquote>

<p>&nbsp; &nbsp; 使用这个类时, 需要传入一个保存连接配置信息(逻辑库, 物理库)的文件, 只要创建一个类实例就行了. </p>

<blockquote class="prefont">
new com.lfx.db.AnySQLDriver(Sting config_file);
</blockquote>

<p>&nbsp; &nbsp; 接下来就可以用标准的JDBC来获得逻辑库的连接了, URL规则为: </p>

<blockquote class="prefont">
jdbc:anysql:logical_database_name
</blockquote>

<p>&nbsp; &nbsp; 比如在批处理中, 要从上一篇的三个Slave库中的一个读取一条记录, 就可以使用如下代码. </p>

<blockquote class="prefont">
try {<br />
&nbsp; Connection db = DriverManager.getConnection("jdbc:anysql:readdb", null);<br />
&nbsp; ......<br />
&nbsp; db.close();<br />
}<br />
catch (SQLException sqle) <br />
{<br />
&nbsp; ......<br />
}<br />
</blockquote>

<p>&nbsp; &nbsp; 现在还没有真正投入使用, 只在实验室中测试了一下, 感觉上还可以. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2009/02/26 -- <a href="http://www.anysql.net/anysql/anysql_db_query.html" title="AnySQL DB查询组件">AnySQL DB查询组件</a> (0)</li><li>2009/01/14 -- <a href="http://www.anysql.net/developer/webchart_excel.html" title="WebChart的Excel导出">WebChart的Excel导出</a> (4)</li><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/26 -- <a href="http://www.anysql.net/tools/webchart-dbconn-config2.html" title="WebChart的DB连接配置2">WebChart的DB连接配置2</a> (0)</li><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/26 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess2.html" title="逻辑连接层与物理连接层(2)">逻辑连接层与物理连接层(2)</a> (1)</li><li>2010/01/20 -- <a href="http://www.anysql.net/tools/webchart-logical-dbaccess.html" title="逻辑连接层与物理连接层">逻辑连接层与物理连接层</a> (4)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vb_nk18Qfik:Q0VAIVyYQa0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vb_nk18Qfik:Q0VAIVyYQa0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vb_nk18Qfik:Q0VAIVyYQa0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=Vb_nk18Qfik:Q0VAIVyYQa0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vb_nk18Qfik:Q0VAIVyYQa0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=Vb_nk18Qfik:Q0VAIVyYQa0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/Vb_nk18Qfik" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/anysql-jdbc-driver.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/anysql-jdbc-driver.html</feedburner:origLink></item>
		<item>
		<title>逻辑连接层与物理连接层</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/_93KQwd_M5A/webchart-logical-dbaccess.html</link>
		<comments>http://www.anysql.net/tools/webchart-logical-dbaccess.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 08:52:27 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[WebChart]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=733</guid>
		<description><![CDATA[&#160; &#160; 为了更好地利用MySQL的廉价复制(Slave)功能, 在DataReport的数据库连接层中增加了逻辑连接层, 原来是直接指定物理边接层. 当然数据库连接池还是在物理连接层实现的, 逻辑连接层则可以指定一种关系, 然后根据关系来获得指定的数据库物理连接, 当应用使用逻辑连接层来访问时, 其实是自动根据关系挑选一个物理连接. 

&#160; &#160; 还是举一个例子来说明一下, 比如你有一台主MySQL库(master)后面挂了三台从MySQL库(Slave), 然后用DataReport去搭建一个以读为主的应用, 希望DataReport能首先随机挑选三个Slave库中的一台进行读取, 如果三台Slave都不行, 则从Master进行读取. 

&#160; &#160; 首先定义四台MySQL数据库的连接, 称为物理层的配置. 


PHYSICAL.DBLIST=MASTER&#124;SLAVE1&#124;SLAVE2&#124;SLAVE3


&#160; &#160; 然后定义逻辑连接层, 以实现上面的要求. 


LOGICAL.DBLIST=writedb&#124;slavedb&#124;readdb
LOGICAL.WRITEDB=FIRST&#124;MASTER
LOGICAL.SLAVEDB=RANDOM&#124;SLAVE1,SLAVE2,SLAVE3
LOGICAL.READDB=FAILOVER&#124;SLAVEDB,WRITEDB


&#160; &#160; 其中FIRST表示读取第一个连接池, RANDOM表示从后面的连接中随机选一个, FAILOVER表示第一个失败的话，取下一个. 通过这三种关系, 就实现了我们的要求. 然后给物理连接池及每个逻辑连接都加上状态判断, 当遇到连接关闭的错误时, 就将相应的连接池标记为不可用(Markdown), 逻辑库层可以主动跳过已经被Markdown的下一级节点, 按照规则查找到一个可用的物理数据库连接.

&#160; &#160; 在DataReport中还设置了一个守护进程, 会每分钟检查各个Markdown的物理连接池, 偿试去Markup, 一当出现意外的物理库回到正常状态, 就可以提供服务, 使应用保持高可用状态. 

Relative Posts:2010/03/04 -- 为DataReport增加条件过滤功能 (1)2010/02/20 -- 定义不同数据源的SQL (3)2010/01/08 -- DataReport中的超级表达式 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 为了更好地利用MySQL的廉价复制(Slave)功能, 在DataReport的数据库连接层中增加了逻辑连接层, 原来是直接指定物理边接层. 当然数据库连接池还是在物理连接层实现的, 逻辑连接层则可以指定一种关系, 然后根据关系来获得指定的数据库物理连接, 当应用使用逻辑连接层来访问时, 其实是自动根据关系挑选一个物理连接. </p>

<p>&nbsp; &nbsp; 还是举一个例子来说明一下, 比如你有一台主MySQL库(master)后面挂了三台从MySQL库(Slave), 然后用DataReport去搭建一个以读为主的应用, 希望DataReport能首先随机挑选三个Slave库中的一台进行读取, 如果三台Slave都不行, 则从Master进行读取. </p>

<p>&nbsp; &nbsp; 首先定义四台MySQL数据库的连接, 称为物理层的配置. </p>

<blockquote class="prefont">
PHYSICAL.DBLIST=MASTER|SLAVE1|SLAVE2|SLAVE3
</blockquote>

<p>&nbsp; &nbsp; 然后定义逻辑连接层, 以实现上面的要求. </p>

<blockquote class="prefont">
LOGICAL.DBLIST=writedb|slavedb|readdb<br />
LOGICAL.WRITEDB=FIRST|MASTER<br />
LOGICAL.SLAVEDB=RANDOM|SLAVE1,SLAVE2,SLAVE3<br />
LOGICAL.READDB=FAILOVER|SLAVEDB,WRITEDB
</blockquote>

<p>&nbsp; &nbsp; 其中FIRST表示读取第一个连接池, RANDOM表示从后面的连接中随机选一个, FAILOVER表示第一个失败的话，取下一个. 通过这三种关系, 就实现了我们的要求. 然后给物理连接池及每个逻辑连接都加上状态判断, 当遇到连接关闭的错误时, 就将相应的连接池标记为不可用(Markdown), 逻辑库层可以主动跳过已经被Markdown的下一级节点, 按照规则查找到一个可用的物理数据库连接.</p>

<p>&nbsp; &nbsp; 在DataReport中还设置了一个守护进程, 会每分钟检查各个Markdown的物理连接池, 偿试去Markup, 一当出现意外的物理库回到正常状态, 就可以提供服务, 使应用保持高可用状态. </p>

<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/04 -- <a href="http://www.anysql.net/tools/webchart-rows-filter.html" title="为DataReport增加条件过滤功能">为DataReport增加条件过滤功能</a> (1)</li><li>2010/02/20 -- <a href="http://www.anysql.net/tools/webchart-multidb-support.html" title="定义不同数据源的SQL">定义不同数据源的SQL</a> (3)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-super-expression.html" title="DataReport中的超级表达式">DataReport中的超级表达式</a> (0)</li><li>2010/01/08 -- <a href="http://www.anysql.net/tools/webchart-merge-dup-values.html" title="DataReport的重复值合并">DataReport的重复值合并</a> (0)</li><li>2010/01/05 -- <a href="http://www.anysql.net/tools/webchart-forall-loop.html" title="DataReport中的FORALL循环">DataReport中的FORALL循环</a> (0)</li><li>2009/12/29 -- <a href="http://www.anysql.net/tools/webchart-page-cache.html" title="DataReport中的Cache为王">DataReport中的Cache为王</a> (4)</li><li>2009/12/28 -- <a href="http://www.anysql.net/tools/webchart-one-java-servlet.html" title="统一DataReport的Servlet">统一DataReport的Servlet</a> (2)</li><li>2009/12/02 -- <a href="http://www.anysql.net/tools/webchart-xml-html-escape-chars.html" title="添加URL/HTML字符转义功能">添加URL/HTML字符转义功能</a> (1)</li><li>2009/09/21 -- <a href="http://www.anysql.net/tools/four-extra-businees-charts.html" title="多支持了四种业务图">多支持了四种业务图</a> (0)</li><li>2009/07/28 -- <a href="http://www.anysql.net/tools/webchart-jfreechart-support.html" title="DataReport增加JfreeChart支持">DataReport增加JfreeChart支持</a> (7)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=_93KQwd_M5A:e1GixlxBWjI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=_93KQwd_M5A:e1GixlxBWjI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=_93KQwd_M5A:e1GixlxBWjI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=_93KQwd_M5A:e1GixlxBWjI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=_93KQwd_M5A:e1GixlxBWjI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=_93KQwd_M5A:e1GixlxBWjI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/_93KQwd_M5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/webchart-logical-dbaccess.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/webchart-logical-dbaccess.html</feedburner:origLink></item>
		<item>
		<title>两个用户的SQLULDR2需求</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/fcEHqZGuNGo/sqluldr2-create-table-syntax.html</link>
		<comments>http://www.anysql.net/tools/sqluldr2-create-table-syntax.html#comments</comments>
		<pubDate>Fri, 15 Jan 2010 13:28:47 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLLDR]]></category>
		<category><![CDATA[Table]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=732</guid>
		<description><![CDATA[&#160; &#160; 有两个用户要求SQLULDR2能根据查询语句的结果给出建表的语法, 先提出要求的是一个国外网友, 当时没有理他, 这周一个国内网友也提出了同样的需求, 想想也比较合理, 于是就满足一下吧. 

&#160; &#160; 建表的语法会写在SQLLDR的控制文件中, 并不生成独立的SQL文件, 当我们运行如下命令. 


sqluldr2 scott/tiger query=emp table=emp


&#160; &#160; 得到的SQLLDR控制文件(emp_sqlldr.ctl)中, 就包含了建表语法, 如下所示. 


--
-- SQL*UnLoader: Fast Oracle Text Unloader (GZIP), Release 3.0.1
-- (@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.
--
/*
&#160; CREATE TABLE emp (
&#160; &#160; EMPNO NUMBER(4),
&#160; &#160; ENAME VARCHAR2(10),
&#160; &#160; JOB VARCHAR2(9),
&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 有两个用户要求SQLULDR2能根据查询语句的结果给出建表的语法, 先提出要求的是一个国外网友, 当时没有理他, 这周一个国内网友也提出了同样的需求, 想想也比较合理, 于是就满足一下吧. </p>

<p>&nbsp; &nbsp; 建表的语法会写在SQLLDR的控制文件中, 并不生成独立的SQL文件, 当我们运行如下命令. </p>

<blockquote class="prefont">
sqluldr2 scott/tiger query=emp table=emp
</blockquote>

<p>&nbsp; &nbsp; 得到的SQLLDR控制文件(emp_sqlldr.ctl)中, 就包含了建表语法, 如下所示. </p>

<blockquote class="prefont">
--<br />
-- SQL*UnLoader: Fast Oracle Text Unloader (GZIP), Release 3.0.1<br />
-- (@) Copyright Lou Fangxin (AnySQL.net) 2004 - 2010, all rights reserved.<br />
--<br />
/*<br />
&nbsp; CREATE TABLE emp (<br />
&nbsp; &nbsp; EMPNO NUMBER(4),<br />
&nbsp; &nbsp; ENAME VARCHAR2(10),<br />
&nbsp; &nbsp; JOB VARCHAR2(9),<br />
&nbsp; &nbsp; MGR NUMBER(4),<br />
&nbsp; &nbsp; HIREDATE DATE,<br />
&nbsp; &nbsp; SAL NUMBER(7,2),<br />
&nbsp; &nbsp; COMM NUMBER(7,2),<br />
&nbsp; &nbsp; DEPTNO NUMBER(2)<br />
&nbsp; );<br />
*/<br />
OPTIONS(BINDSIZE=2097152,READSIZE=2097152,ERRORS=-1,ROWS=50000)<br />
LOAD DATA<br />
INFILE 'uldrdata.txt' "STR X'0a'"<br />
INSERT INTO TABLE emp<br />
FIELDS TERMINATED BY X'2c' TRAILING NULLCOLS<br />
(<br />
&nbsp; EMPNO CHAR(6) NULLIF EMPNO=BLANKS,<br />
&nbsp; ENAME CHAR(10) NULLIF ENAME=BLANKS,<br />
&nbsp; JOB CHAR(9) NULLIF JOB=BLANKS,<br />
&nbsp; MGR CHAR(6) NULLIF MGR=BLANKS,<br />
&nbsp; HIREDATE DATE "YYYY-MM-DD HH24:MI:SS" NULLIF HIREDATE=BLANKS,<br />
&nbsp; SAL CHAR(10) NULLIF SAL=BLANKS,<br />
&nbsp; COMM CHAR(10) NULLIF COMM=BLANKS,<br />
&nbsp; DEPTNO CHAR(4) NULLIF DEPTNO=BLANKS<br />
)
</blockquote>

<p>&nbsp; &nbsp; 数据类型的准确性还有待验证, 并且只是Oracle的建表语法, CHAR和VARCHAR2也没有进行区分, 若有必要可进一步改善. </p>


<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2010/03/10 -- <a href="http://www.anysql.net/tools/sqluldr2-read-sql-from-stdin.html" title="SQLULDR2从标准输入读取SQL">SQLULDR2从标准输入读取SQL</a> (0)</li><li>2010/03/06 -- <a href="http://www.anysql.net/tools/sqluldr2-better-command-options.html" title="简化SQLULDR2的命令行选项设置">简化SQLULDR2的命令行选项设置</a> (1)</li><li>2010/02/08 -- <a href="http://www.anysql.net/tools/sqluldr2-form-display.html" title="SQLULDR2也可改善用户体验">SQLULDR2也可改善用户体验</a> (4)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-column-separator-option.html" title="SQLULDR2的按列文本输出">SQLULDR2的按列文本输出</a> (0)</li><li>2009/12/25 -- <a href="http://www.anysql.net/tools/sqluldr2-customized-escape-chars.html" title="SQLULDR2的自定义转义符处理">SQLULDR2的自定义转义符处理</a> (2)</li><li>2009/10/30 -- <a href="http://www.anysql.net/tools/sqluldr2-high-perf-insert-unload.html" title="SQLULDR2功能增加, 性能不减">SQLULDR2功能增加, 性能不减</a> (14)</li><li>2009/10/27 -- <a href="http://www.anysql.net/tools/sqluldr2-more-escape-chars.html" title="将SQLULDR2转义符进行到底">将SQLULDR2转义符进行到底</a> (3)</li><li>2009/10/26 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-escape-char.html" title="SQLULDR2处理MySQL转义符">SQLULDR2处理MySQL转义符</a> (1)</li><li>2009/08/31 -- <a href="http://www.anysql.net/tools/sqluldr2-mysql-null-value.html" title="SQLULDR2处理MySQL的空值">SQLULDR2处理MySQL的空值</a> (2)</li><li>2009/04/02 -- <a href="http://www.anysql.net/tools/sqluldr2_license.html" title="给SQLULDR2加上Key保护">给SQLULDR2加上Key保护</a> (6)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=fcEHqZGuNGo:BUrZuuYih_g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=fcEHqZGuNGo:BUrZuuYih_g:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=fcEHqZGuNGo:BUrZuuYih_g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=fcEHqZGuNGo:BUrZuuYih_g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=fcEHqZGuNGo:BUrZuuYih_g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=fcEHqZGuNGo:BUrZuuYih_g:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/fcEHqZGuNGo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/tools/sqluldr2-create-table-syntax.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.anysql.net/tools/sqluldr2-create-table-syntax.html</feedburner:origLink></item>
		<item>
		<title>出售AUL固定许可证</title>
		<link>http://feedproxy.google.com/~r/AnySQL/~3/97OAalUwqEM/aul-fixed-license-mode.html</link>
		<comments>http://www.anysql.net/aulmydul/aul-fixed-license-mode.html#comments</comments>
		<pubDate>Sun, 10 Jan 2010 11:58:43 +0000</pubDate>
		<dc:creator>anysql</dc:creator>
				<category><![CDATA[AUL/MyDUL]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Recovery]]></category>

		<guid isPermaLink="false">http://www.anysql.net/?p=731</guid>
		<description><![CDATA[&#160; &#160; 每次启动AUL都需要不同的许可证, 这种方式已经持续了好几年了, 不用说别人早已觉得烦了, 连我自已也觉得有点烦, 既然这样, 就将它改掉吧. 从Windows版本开始, 最新的AUL在同一台机器上, 注册码将不会再改变, 保持固定, 称之为固定许可证. 

&#160; &#160; 例如, 在我的笔记本上, 每次启动AUL都得到如下输出. 


Register Code: DETO-NODT-JETT-DNMX-DDCN
AUL : AnySQL UnLoader(MyDUL) for Oracle 8/8i/9i/10g/11g, release 5.1.1

(C) Copyright Lou Fangxin 2005-2010 (AnySQL.net), all rights reserved.

AUL&#62;


&#160; &#160; 这里所说的同一台机器, 并不是指物理的机器, 即使只是操作系统的重装, 也有可能让注册码发生更改, 从而需要新的许可证, 固定许可证方式将对AUL的用户更加有利, 其他平台的AUL也将一步一步进行许可证改造. 

&#160; &#160; 在固定许可证模式下, 你购买AUL时, 不只是得到了一次服务, 更重要的是你真正得到达了一个长期可用的许可证. 



Relative Posts:2009/06/09 -- AUL程序上的两处缺陷 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; &nbsp; 每次启动AUL都需要不同的许可证, 这种方式已经持续了好几年了, 不用说别人早已觉得烦了, 连我自已也觉得有点烦, 既然这样, 就将它改掉吧. 从Windows版本开始, 最新的AUL在同一台机器上, 注册码将不会再改变, 保持固定, 称之为固定许可证. </p>

<p>&nbsp; &nbsp; 例如, 在我的笔记本上, 每次启动AUL都得到如下输出. </p>

<blockquote class="prefont">
Register Code: DETO-NODT-JETT-DNMX-DDCN<br />
AUL : AnySQL UnLoader(MyDUL) for Oracle 8/8i/9i/10g/11g, release 5.1.1<br />
<br />
(C) Copyright Lou Fangxin 2005-2010 (AnySQL.net), all rights reserved.<br />
<br />
AUL&gt;
</blockquote>

<p>&nbsp; &nbsp; 这里所说的同一台机器, 并不是指物理的机器, 即使只是操作系统的重装, 也有可能让注册码发生更改, 从而需要新的许可证, 固定许可证方式将对AUL的用户更加有利, 其他平台的AUL也将一步一步进行许可证改造. </p>

<p>&nbsp; &nbsp; 在固定许可证模式下, 你购买AUL时, 不只是得到了一次服务, 更重要的是你真正得到达了一个长期可用的许可证. </p>



<h3  class="related_post_title">Relative Posts:</h3><ul class="related_post"><li>2009/06/09 -- <a href="http://www.anysql.net/aulmydul/aul-bugs-found-200906.html" title="AUL程序上的两处缺陷">AUL程序上的两处缺陷</a> (1)</li><li>2009/04/26 -- <a href="http://www.anysql.net/aulmydul/aul_customer_world_map.html" title="拯救数据, 拯救地球?">拯救数据, 拯救地球?</a> (9)</li><li>2008/08/01 -- <a href="http://www.anysql.net/aulmydul/to_date_from_quarter.html" title="终极Oracle数据恢复工具 &#8212; AUL">终极Oracle数据恢复工具 &#8212; AUL</a> (8)</li><li>2008/07/06 -- <a href="http://www.anysql.net/aulmydul/tuning_update_sql_01.html" title="连错库误删100多张表">连错库误删100多张表</a> (9)</li><li>2008/04/16 -- <a href="http://www.anysql.net/aulmydul/qq_by_mobile_phone.html" title="AUL Sybase数据恢复工具">AUL Sybase数据恢复工具</a> (4)</li><li>2008/03/30 -- <a href="http://www.anysql.net/tools/buy_lenovo_ibm_thinkpad.html" title="AUL也走品牌路线?">AUL也走品牌路线?</a> (2)</li><li>2008/03/28 -- <a href="http://www.anysql.net/aulmydul/blame_after_steal_mydul.html" title="选择AUL恢复数据的理由">选择AUL恢复数据的理由</a> (3)</li><li>2008/03/19 -- <a href="http://www.anysql.net/aulmydul/oracle_final_data_recovery.html" title="Oracle数据恢复服务模式">Oracle数据恢复服务模式</a> (0)</li><li>2007/11/06 -- <a href="http://www.anysql.net/aulmydul/aul_compress_beta.html" title="将完成AUL最后一个心愿, 支持Compress表">将完成AUL最后一个心愿, 支持Compress表</a> (2)</li><li>2009/11/20 -- <a href="http://www.anysql.net/aulmydul/aul-fail-oracle-bug-7705591.html" title="首次AUL恢复失败案例">首次AUL恢复失败案例</a> (1)</li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AnySQL?a=97OAalUwqEM:Lhf2kQ3vva0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=97OAalUwqEM:Lhf2kQ3vva0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=97OAalUwqEM:Lhf2kQ3vva0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AnySQL?i=97OAalUwqEM:Lhf2kQ3vva0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=97OAalUwqEM:Lhf2kQ3vva0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AnySQL?a=97OAalUwqEM:Lhf2kQ3vva0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/AnySQL?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AnySQL/~4/97OAalUwqEM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.anysql.net/aulmydul/aul-fixed-license-mode.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.anysql.net/aulmydul/aul-fixed-license-mode.html</feedburner:origLink></item>
	</channel>
</rss>
