<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"> 
<channel>
  <title>DBA Tools</title>
  <link>http://www.dbatools.net/</link>
  <description>Writing professional DBA tools and scripts for better DBA life</description>
  <dc:language>en-us</dc:language>
  <dc:creator>anysql@live.com</dc:creator>
  <dc:rights>Copyright 2012</dc:rights>
  <dc:date>2011-04-20T20:57:07+08:00</dc:date>
  <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=5.01" />
  <admin:errorReportsTo rdf:resource="mailto:anysql@live.com" />
  <sy:updatePeriod>hourly</sy:updatePeriod>
  <sy:updateFrequency>1</sy:updateFrequency>
  <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

  
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dbatools" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="dbatools" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
  <title>Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</title>
  <link>http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html</link>
  <description><![CDATA[&nbsp; &nbsp; I create a tablespace based on an Oracle ASM disk group with two physical disks, and create a table with 499999 rows to make sure the data distributed on two disks evenly. SQL&gt; select disk_number, name,path from v$asm_disk;...]]></description>
  <guid isPermaLink="false">2397@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; I create a tablespace based on an Oracle ASM disk group with two physical disks, and create a table with 499999 rows to make sure the data distributed on two disks evenly.</p>
 
<blockquote class="prefont">
SQL&gt; select disk_number, name,path from v$asm_disk;<br />
<br />
DISK_NUMBER NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  PATH<br />
----------- ---------------- ------------------------------<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 TEST_0000&nbsp; &nbsp; &nbsp; &nbsp; E:\ORACLEASM\FILE01.ASM<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TEST_0001&nbsp; &nbsp; &nbsp; &nbsp; E:\ORACLEASM\FILE02.ASM<br />
<br />
SQL&gt; create table emp_asm tablespace asmdemo as<br />
&nbsp; 2&nbsp; select * from emp_bak where rownum &lt; 500000;
</blockquote>
 
<p>&nbsp; &nbsp; Now we will use the <a href="http://www.mydul.net/software/aul6.zip">AUL version 6</a> (with direct ASM access) to recover the table rows from the ASM storage. First prepare a text file ("disk.txt") contains the disk image files, as following: </p>
 
<blockquote class="prefont">
E:\ORACLEASM\FILE01.ASM<br />
E:\ORACLEASM\FILE01.ASM
</blockquote>
 
<p>&nbsp; &nbsp; Now we start the AUL 6, and run "ASM OPEN disk.txt" to open the disk files, and run "ASM LIST" to show the opened disks (all ASM command in AUL starts with "ASM"). </p>
 
<blockquote class="prefont">
E:\oracleasm&gt;aul6<br />
Register Code: BHAR-KDKF-QPHG-WLXQ-ZANU<br />
AUL : AnySQL UnLoader(MyDUL) for Oracle 11g and ASM, release 6.0.0<br />
<br />
(C) Copyright Lou Fangxin 2005-2012 (AnySQL.net), all rights reserved.<br />
<br />
AUL&gt; asm open disk.txt<br />
2012-03-07 09:46:37<br />
2012-03-07 09:46:37<br />
AUL&gt; asm list<br />
2012-03-07 09:46:42<br />
Total Disks = 2, ausize=1048576, blksize=4096<br />
<br />
 disk&nbsp; &nbsp;  size block disk name&nbsp; &nbsp; &nbsp; &nbsp; disk group&nbsp;  disk path<br />
===== ======== ===== ================ ============ ========================<br />
&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 200&nbsp; 4096 TEST_0000&nbsp; &nbsp; &nbsp; &nbsp; TEST&nbsp; &nbsp; &nbsp; &nbsp;  e:\oracleasm\file01.asm<br />
&nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; 200&nbsp; 4096 TEST_0001&nbsp; &nbsp; &nbsp; &nbsp; TEST&nbsp; &nbsp; &nbsp; &nbsp;  e:\oracleasm\file02.asm<br />
<br />
f1b1disk = 0, f1b1au = 2, score=256, compat=0x0a100000<br />
file=(1,0,2,1), disk=(2,0,2,2), alias=(6,0,2,6)<br />
2012-03-07 09:46:42<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; We can run "ASM ALIAS" to find out all the data files created in Oracle ASM. </p>
 
<blockquote class="prefont">
AUL&gt; asm alias<br />
2012-03-07 09:49:25<br />
&nbsp; &nbsp; file&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inc parent fstblk flag&nbsp; refer alias<br />
======== ============ ====== ====== ==== ====== ==========================<br />
&nbsp; &nbsp; &nbsp; -1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -1&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; 2 DB10G<br />
&nbsp; &nbsp; &nbsp; -1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -1&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; 3 DATAFILE<br />
&nbsp; &nbsp;  256&nbsp; &nbsp; 748430975&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; 3&nbsp;  18&nbsp; &nbsp;  -1 ASMDEMO<br />
2012-03-07 09:49:25<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; We see that there is one oracle data file (with file id equals 256), please remember the file id in the first column. Now we will prepare a text file for AUL to specify the data files used for data recovery. </p>
 
<blockquote class="prefont">
# TS&nbsp;  FILENO&nbsp;  PATH<br />
5&nbsp; &nbsp;  5&nbsp; &nbsp;  +256
</blockquote>
 
<p>&nbsp; &nbsp; For data files stored in Oracle ASM storage, we just put the file id with prefix "+" for file name, now we run "OPEN" command in AUL. </p>
 
<blockquote class="prefont">
AUL&gt; OPEN DB.TXT<br />
*&nbsp; ts#&nbsp; rfn ver bsize&nbsp; &nbsp;  blocks&nbsp;  sizemb filename<br />
- ---- ---- --- ----- ---------- -------- -----------------------------------<br />
Y&nbsp; &nbsp; 6&nbsp; &nbsp; 5 a2&nbsp;  8192&nbsp; &nbsp; &nbsp; 16384&nbsp; &nbsp; &nbsp; &nbsp; 0 +256<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; Now we will run the AUL scan command to report the data segments (no system data file here, so we need to find out the data object id of each segment). </p>
 
<blockquote class="prefont">
AUL&gt; scan data<br />
2012-03-07 09:56:52<br />
RDBA=0x0140000c(5/12),type=0x06,fmt=0xa2,seq=0x01,flag=0x04<br />
seg/obj=0x00003486=13446,csc=0x0000.004233eb,itc=3,typ=1 - DATA<br />
tab#=&nbsp; 0&nbsp; &nbsp;  nrow=&nbsp;  2&nbsp; &nbsp;  offs=&nbsp;  0<br />
<br />
RDBA=0x01400014(5/20),type=0x06,fmt=0xa2,seq=0x02,flag=0x04<br />
seg/obj=0x00003490=13456,csc=0x0000.0041856a,itc=3,typ=1 - DATA<br />
tab#=&nbsp; 0&nbsp; &nbsp;  nrow= 174&nbsp; &nbsp;  offs=&nbsp;  0<br />
<br />
2012-03-07 09:56:52<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; The data segment with data object id equals 13456 contains the rows we needed here. </p>
 
<blockquote class="prefont">
AUL&gt; unload object 13456 to 13456.txt;<br />
2012-03-07 10:00:07<br />
Sucessfully unload 499999 rows ...<br />
2012-03-07 10:00:21<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; Now we have get all our data back, congratulations! </p>
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mydul/oracle-asm-data-recovery-aulasm.html">AUL for Oracle ASM, Oracle ASM Data Recovery Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-better-than-dul.html">AUL/MyDUL vs. Oracle DUL, which is better?</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-sourcecode.html">Recover the Oracle stored procedures' source code.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/new-aul-license-mode-on-linux.html">Change of the AUL license mode on Linux platform.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-customer-wold-map.html">Save the customer's data, resue the world.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=4FQyFO7alqk:NLWiHJNGaSk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=4FQyFO7alqk:NLWiHJNGaSk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=4FQyFO7alqk:NLWiHJNGaSk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=4FQyFO7alqk:NLWiHJNGaSk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=4FQyFO7alqk:NLWiHJNGaSk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=4FQyFO7alqk:NLWiHJNGaSk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyDUL</dc:subject>
  <dc:date>2011-04-20T20:57:07+08:00</dc:date>
  <pubDate>Wed, 20 Apr 2011 20:57:07 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">ASM</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">AUL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MyDUL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Oracle</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Recovery</category>
  
  </item>
  
  <item>
  <title>Change of the AUL license mode on Linux platform.</title>
  <link>http://www.dbatools.net/mydul/new-aul-license-mode-on-linux.html</link>
  <description><![CDATA[&nbsp; &nbsp; AUL is a well known Oracle data recovery utility, it has helped lot's of customers to find their data back from corrupted Oracle database (file corrupted, system dropped, table truncated etc). &nbsp; &nbsp; New AUL license is required...]]></description>
  <guid isPermaLink="false">2396@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; AUL is a well known Oracle data recovery utility, it has helped lot's of customers to find their data back from corrupted Oracle database (file corrupted, system dropped, table truncated etc).</p>

<p>&nbsp; &nbsp; New AUL license is required only after you reboot your Linux server, this give you more convenience to perform complex Oracle data recovery job, without interrupted by a sudden AUL abnormal, in which case you can restart AUL and resume the job quickly enough. </p>

<p>&nbsp; &nbsp; With the new AUL license mode, the register code will not change for one linux boot. </p>

<blockquote class="prefont">
Register Code: XBDI-BVSH-PWER-MLNP-ONRG<br />
AUL : AnySQL UnLoader(MyDUL) for Oracle 8/8i/9i/10g/11g, release 5.1.2<br />
<br />
(C) Copyright Lou Fangxin 2005-2010 (AnySQL.net), all rights reserved.<br />
<br />
AUL&gt;
</blockquote>

<p>&nbsp; &nbsp; If you reboot the Linux server, and start AUL again, the register code is changed. </p>

<blockquote class="prefont">
Register Code: LTCC-EBLF-EORC-FBDM-POJB<br />
AUL : AnySQL UnLoader(MyDUL) for Oracle 8/8i/9i/10g/11g, release 5.1.2<br />
<br />
(C) Copyright Lou Fangxin 2005-2010 (AnySQL.net), all rights reserved.<br />
<br />
AUL&gt;
</blockquote>

<p>&nbsp; &nbsp; How long the linux server can run without reboot? Some of our application have been keeping on running for more than 3 years, in which case you can have a valid AUL license for 3 years. Is it good news for you?</p>

</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html">Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/fixed-aul-license-is-available.html">Fixed AUL license is available now for you</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-better-than-dul.html">AUL/MyDUL vs. Oracle DUL, which is better?</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-indexes.html">Recover the table's index structure information.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-sourcecode.html">Recover the Oracle stored procedures' source code.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=e6hYjBWPx_o:TnwDk6yek7A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=e6hYjBWPx_o:TnwDk6yek7A:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=e6hYjBWPx_o:TnwDk6yek7A:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=e6hYjBWPx_o:TnwDk6yek7A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=e6hYjBWPx_o:TnwDk6yek7A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=e6hYjBWPx_o:TnwDk6yek7A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyDUL</dc:subject>
  <dc:date>2011-04-20T20:43:16+08:00</dc:date>
  <pubDate>Wed, 20 Apr 2011 20:43:16 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">AUL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">License</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MyDUL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Oracle</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Recovery</category>
  
  </item>
  
  <item>
  <title>AUL for Oracle ASM, Oracle ASM Data Recovery Utility.</title>
  <link>http://www.dbatools.net/mydul/oracle-asm-data-recovery-aulasm.html</link>
  <description><![CDATA[&nbsp; &nbsp; I create a tablespace based on an Oracle ASM disk group with two physical disks, and create a table with 499999 rows to make sure the data distributed on two disks evenly. SQL&gt; select disk_number, name,path from v$asm_disk;...]]></description>
  <guid isPermaLink="false">2395@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; I create a tablespace based on an Oracle ASM disk group with two physical disks, and create a table with 499999 rows to make sure the data distributed on two disks evenly.</p>
 
<blockquote class="prefont">
SQL&gt; select disk_number, name,path from v$asm_disk;<br />
<br />
DISK_NUMBER NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  PATH<br />
----------- ---------------- ------------------------------<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 TEST_0000&nbsp; &nbsp; &nbsp; &nbsp; E:\ORACLEASM\FILE01.ASM<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TEST_0001&nbsp; &nbsp; &nbsp; &nbsp; E:\ORACLEASM\FILE02.ASM<br />
<br />
SQL&gt; create table emp_asm tablespace asmdemo as<br />
&nbsp; 2&nbsp; select * from emp_bak where rownum &lt; 500000;
</blockquote>
 
<p>&nbsp; &nbsp; Now we will use the <a href="http://www.mydul.net/software/aul6.zip">AUL version 6</a> (with direct ASM access) to recover the table rows from the ASM storage. First prepare a text file ("disk.txt") contains the disk image files, as following: </p>
 
<blockquote class="prefont">
E:\ORACLEASM\FILE01.ASM<br />
E:\ORACLEASM\FILE01.ASM
</blockquote>
 
<p>&nbsp; &nbsp; Now we start the AUL 6, and run "ASM OPEN disk.txt" to open the disk files, and run "ASM LIST" to show the opened disks (all ASM command in AUL starts with "ASM"). </p>
 
<blockquote class="prefont">
E:\oracleasm&gt;aul6<br />
Register Code: BHAR-KDKF-QPHG-WLXQ-ZANU<br />
AUL : AnySQL UnLoader(MyDUL) for Oracle 11g and ASM, release 6.0.0<br />
<br />
(C) Copyright Lou Fangxin 2005-2012 (AnySQL.net), all rights reserved.<br />
<br />
AUL&gt; asm open disk.txt<br />
2012-03-07 09:46:37<br />
2012-03-07 09:46:37<br />
AUL&gt; asm list<br />
2012-03-07 09:46:42<br />
Total Disks = 2, ausize=1048576, blksize=4096<br />
<br />
 disk&nbsp; &nbsp;  size block disk name&nbsp; &nbsp; &nbsp; &nbsp; disk group&nbsp;  disk path<br />
===== ======== ===== ================ ============ ========================<br />
&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 200&nbsp; 4096 TEST_0000&nbsp; &nbsp; &nbsp; &nbsp; TEST&nbsp; &nbsp; &nbsp; &nbsp;  e:\oracleasm\file01.asm<br />
&nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; 200&nbsp; 4096 TEST_0001&nbsp; &nbsp; &nbsp; &nbsp; TEST&nbsp; &nbsp; &nbsp; &nbsp;  e:\oracleasm\file02.asm<br />
<br />
f1b1disk = 0, f1b1au = 2, score=256, compat=0x0a100000<br />
file=(1,0,2,1), disk=(2,0,2,2), alias=(6,0,2,6)<br />
2012-03-07 09:46:42<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; We can run "ASM ALIAS" to find out all the data files created in Oracle ASM. </p>
 
<blockquote class="prefont">
AUL&gt; asm alias<br />
2012-03-07 09:49:25<br />
&nbsp; &nbsp; file&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inc parent fstblk flag&nbsp; refer alias<br />
======== ============ ====== ====== ==== ====== ==========================<br />
&nbsp; &nbsp; &nbsp; -1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -1&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; 2 DB10G<br />
&nbsp; &nbsp; &nbsp; -1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -1&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; 3 DATAFILE<br />
&nbsp; &nbsp;  256&nbsp; &nbsp; 748430975&nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; 3&nbsp;  18&nbsp; &nbsp;  -1 ASMDEMO<br />
2012-03-07 09:49:25<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; We see that there is one oracle data file (with file id equals 256), please remember the file id in the first column. Now we will prepare a text file for AUL to specify the data files used for data recovery. </p>
 
<blockquote class="prefont">
# TS&nbsp;  FILENO&nbsp;  PATH<br />
5&nbsp; &nbsp;  5&nbsp; &nbsp;  +256
</blockquote>
 
<p>&nbsp; &nbsp; For data files stored in Oracle ASM storage, we just put the file id with prefix "+" for file name, now we run "OPEN" command in AUL. </p>
 
<blockquote class="prefont">
AUL&gt; OPEN DB.TXT<br />
*&nbsp; ts#&nbsp; rfn ver bsize&nbsp; &nbsp;  blocks&nbsp;  sizemb filename<br />
- ---- ---- --- ----- ---------- -------- -----------------------------------<br />
Y&nbsp; &nbsp; 6&nbsp; &nbsp; 5 a2&nbsp;  8192&nbsp; &nbsp; &nbsp; 16384&nbsp; &nbsp; &nbsp; &nbsp; 0 +256<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; Now we will run the AUL scan command to report the data segments (no system data file here, so we need to find out the data object id of each segment). </p>
 
<blockquote class="prefont">
AUL&gt; scan data<br />
2012-03-07 09:56:52<br />
RDBA=0x0140000c(5/12),type=0x06,fmt=0xa2,seq=0x01,flag=0x04<br />
seg/obj=0x00003486=13446,csc=0x0000.004233eb,itc=3,typ=1 - DATA<br />
tab#=&nbsp; 0&nbsp; &nbsp;  nrow=&nbsp;  2&nbsp; &nbsp;  offs=&nbsp;  0<br />
<br />
RDBA=0x01400014(5/20),type=0x06,fmt=0xa2,seq=0x02,flag=0x04<br />
seg/obj=0x00003490=13456,csc=0x0000.0041856a,itc=3,typ=1 - DATA<br />
tab#=&nbsp; 0&nbsp; &nbsp;  nrow= 174&nbsp; &nbsp;  offs=&nbsp;  0<br />
<br />
2012-03-07 09:56:52<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; The data segment with data object id equals 13456 contains the rows we needed here. </p>
 
<blockquote class="prefont">
AUL&gt; unload object 13456 to 13456.txt;<br />
2012-03-07 10:00:07<br />
Sucessfully unload 499999 rows ...<br />
2012-03-07 10:00:21<br />
AUL&gt;
</blockquote>
 
<p>&nbsp; &nbsp; Now we have get all our data back, congratulations! </p>
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html">Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-better-than-dul.html">AUL/MyDUL vs. Oracle DUL, which is better?</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-sourcecode.html">Recover the Oracle stored procedures' source code.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/new-aul-license-mode-on-linux.html">Change of the AUL license mode on Linux platform.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-customer-wold-map.html">Save the customer's data, resue the world.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=H3aUXqUXQ2s:POn4aCYn5_I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=H3aUXqUXQ2s:POn4aCYn5_I:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=H3aUXqUXQ2s:POn4aCYn5_I:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=H3aUXqUXQ2s:POn4aCYn5_I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=H3aUXqUXQ2s:POn4aCYn5_I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=H3aUXqUXQ2s:POn4aCYn5_I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyDUL</dc:subject>
  <dc:date>2011-04-15T19:28:35+08:00</dc:date>
  <pubDate>Fri, 15 Apr 2011 19:28:35 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">ASM</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">AUL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Oracle</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Recovery</category>
  
  </item>
  
  <item>
  <title>Trigger based data replication utility from Oracle to MySQL database</title>
  <link>http://www.dbatools.net/mytools/oracle-mysql-data-replication-mysqlsync.html</link>
  <description><![CDATA[&nbsp; &nbsp; In some read focus system, we may make copies of the write database to take the heavy read activites, however how to make a read database if we plan to write on Oracle and read from MySQL database?...]]></description>
  <guid isPermaLink="false">2394@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; In some read focus system, we may make copies of the write database to take the heavy read activites, however how to make a read database if we plan to write on Oracle and read from MySQL database? Since the write is not heavy, we could incrementally replicate data from Oracle to MySQL with data capture by trigger or by Oracle materialized view log. </p>

<p>&nbsp; &nbsp; I have wrote a tool for <a href="http://www.dbatools.net/mytools/datasync-data-replication.html">Oracle to Oracle replication</a>, now I will release another tool <a href="http://www.dbatools.net/software/mysqlsync.zip">mysqlsync</a> to do this job.  </p>

<blockquote class="prefont">
DataSync: Oracle Data Replication Utility, Release 3.0.1<br />
(c) Copyright Lou Fangxin (AnySQL.net) 2010, all rights reserved.<br />
<br />
Usage: datasync keyword=value [,keyword=value,...]<br />
<br />
Valid Keywords:<br />
&nbsp;  user1&nbsp;  = username/password@host:port:sid for source database.<br />
&nbsp;  user2&nbsp;  = username/password@host:port:database for target database.<br />
&nbsp;  array&nbsp;  = array fetch size<br />
&nbsp;  long&nbsp; &nbsp; = maximum size for long, long raw, CLOB, BLOB columns.<br />
&nbsp;  crypt&nbsp;  = encrypt the connection info only, no data copy (YES/NO).<br />
&nbsp;  parfile = read command option from parameter file<br />
&nbsp;  config&nbsp; = configuration file.<br />
 * wait&nbsp; &nbsp; = wait time in tenth of second after each loop.<br />
 * rowid&nbsp;  = use rowid based materialized vew log table(FULL/INSERT).<br />
 * dbid&nbsp; &nbsp; = target database flag column of log table.<br />
 * dblist&nbsp; = all target database flag columns of log table.<br />
 * charset = character set name of the target database.<br />
 * ncharset= national character set name of the target database.<br />
 * safe&nbsp; &nbsp; = double column buffer for character set conversion.<br />
&nbsp;  log&nbsp; &nbsp;  = log file name for screen messages.<br />
<br />
Notes:<br />
&nbsp;  datasync user1=scott/tiger user2=scott/tiger config=scott.cfg<br />
<br />
Config:<br />
&nbsp;  Source # Key Col # Log Table # Target # Part # Conf # Filler<br />
&nbsp;  EMP&nbsp; &nbsp; # EMPNO&nbsp;  # MLOG$_EMP # EMP
</blockquote>

<p>&nbsp; &nbsp; Then we will start to do the replication of table (SCOTT.EMP), it's very simple. </p>
 
<p>&nbsp; &nbsp; 1, Create Materilaized View Log on SCOTT.EMP</p>
 
<blockquote class="prefont">
CREATE MATERILIZED VIEW LOG ON EMP WITH SEQUENCE, PRIMARY KEY;<br />
CREATE INDEX MLOG$_EMP_IX1 ON MLOG$_EMP (SEQUENCE$$);
</blockquote>
 
<p>&nbsp; &nbsp; 2, Prepare a configuration file for replication, one table per line.</p>
 
<blockquote class="prefont">
D:\&gt;type scott.cfg<br />
EMP&nbsp; #EMPNO&nbsp;  #MLOG$_EMP&nbsp; #EMP
</blockquote>
 
<p>&nbsp; &nbsp; 3, Data initialize between tow databases with <a href="http://www.dbatools.net/mytools/ora2mysql-oracle-mysql-data-migration.html">DataCopy for MySQL (ora2mysql)</a></p>
 
<blockquote class="prefont">
ora2mysql user1=scott/tiger@db1 user2=test/test@localhost:3306:test table=emp
</blockquote>
 
<p>&nbsp; &nbsp; 4, start data replication daemon with init mode</p>
 
<blockquote class="prefont">
mysqlsync user1=scott/tiger@db1 user2=test/test@localhost:3306:test config=scott.cfg
</blockquote>
 
<p>&nbsp; &nbsp; 5, Make DML changes on source database, changes will be replicated to MySQL database.</p>
 
<blockquote class="prefont">
update emp set comm = nvl(comm,0) + 200;
</blockquote>
 
<p>&nbsp; &nbsp; Now you have a very light replication tools, you can use it to make read database for you application. </p>
 
 
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/ora2mysql-oracle-mysql-data-migration.html">Migrate Oracle data to MySQL database with ora2mysql utility</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/datasync-data-replication.html">DataSync: Data Replication (SCOTT.EMP) between Oracle databases</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html">Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/oracle-asm-data-recovery-aulasm.html">AUL for Oracle ASM, Oracle ASM Data Recovery Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/us7ascii-utf8-data-migration.html">Data Migration between different Oracle character set</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=Iz213KiJY5A:6sF7Ahaq17g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Iz213KiJY5A:6sF7Ahaq17g:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Iz213KiJY5A:6sF7Ahaq17g:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Iz213KiJY5A:6sF7Ahaq17g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=Iz213KiJY5A:6sF7Ahaq17g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Iz213KiJY5A:6sF7Ahaq17g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2011-04-10T12:27:51+08:00</dc:date>
  <pubDate>Sun, 10 Apr 2011 12:27:51 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MySQL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Oracle</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Replication</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Shareplex</category>
  
  </item>
  
  <item>
  <title>Migrate Oracle data to MySQL database with ora2mysql utility</title>
  <link>http://www.dbatools.net/mytools/ora2mysql-oracle-mysql-data-migration.html</link>
  <description><![CDATA[&nbsp; &nbsp; I wrote a program named (ora2mysql) when learning MySQL C API client programing, it can be used for data migration from Oracle to MySQL database, and I think it's definatelly a good utility for DBAs who need manages...]]></description>
  <guid isPermaLink="false">2393@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; I wrote a program named (ora2mysql) when learning MySQL C API client programing, it can be used for data migration from Oracle to MySQL database, and I think it's definatelly a good utility for DBAs who need manages both Oracle and MySQL databases. </p>

<p>&nbsp; &nbsp; It's very easy to use it, for example: </p>

<blockquote class="prefont"><p>
D:\&gt;ora2mysql user1=scott/tiger user2=test/test@localhost:3306:test table=emp<br />
&nbsp; &nbsp; &nbsp; &nbsp;  0 rows processed at 2011-04-02 15:03:08.<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 rows processed at 2011-04-02 15:03:08.
</p></blockquote>

<p>&nbsp; &nbsp; The performance is quite good, with a 35 fields table, the average speed is 6000+ rows per second. </p>

<blockquote class="prefont"><p>
$ ./ora2mysql.bin parfile=test.txt<br />
&nbsp; &nbsp; &nbsp; &nbsp;  0 rows processed at 2011-04-08 14:04:24.<br />
&nbsp; &nbsp; 100000 rows processed at 2011-04-08 14:04:39.<br />
&nbsp; &nbsp; 200000 rows processed at 2011-04-08 14:04:54.<br />
&nbsp; &nbsp; 300000 rows processed at 2011-04-08 14:05:09.<br />
&nbsp; &nbsp; 400000 rows processed at 2011-04-08 14:05:24.<br />
&nbsp; &nbsp; 500000 rows processed at 2011-04-08 14:05:39.<br />
&nbsp; &nbsp; 600000 rows processed at 2011-04-08 14:05:54.<br />
&nbsp; &nbsp; 700000 rows processed at 2011-04-08 14:06:09.<br />
&nbsp; &nbsp; 800000 rows processed at 2011-04-08 14:06:24.<br />
&nbsp; &nbsp; 900000 rows processed at 2011-04-08 14:06:39.<br />
&nbsp;  1000000 rows processed at 2011-04-08 14:06:54.<br />
&nbsp;  1000000 rows processed at 2011-04-08 14:06:54.<br />
</p></blockquote>

<p>&nbsp; &nbsp; I have upload the <a href="http://www.anysql.net/software/ora2mysql.zip">Windows</a>/<a href="http://www.anysql.net/software/ora2mysql_linux32.zip">Linux 32</a>/<a href="http://www.anysql.net/software/ora2mysql_linux64.zip">Linux x86-64</a> binary to my site for download, for linux binary the big file is statically linked with MySQL client library. </p>

<p>&nbsp; &nbsp; If you have any problem for this utility info me by email, if you feel it really helps you, you can make donation with PayPal. This utility is always free for you. </p>
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/oracle-mysql-data-replication-mysqlsync.html">Trigger based data replication utility from Oracle to MySQL database</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/mysql-trigger-for-asyncdata.html">Implement materialized view log on MySQL for asyncdata</a> (1)</div>
        
            <div><a href="http://www.dbatools.net/mytools/oracle-trigger-for-asyncdata.html">Using trigger for asyncdata log table in Oracle database</a> (2)</div>
        
            <div><a href="http://www.dbatools.net/mytools/migrate-data-with-asyncdata.html">Migrate data between different databases with asyncdata script</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html">Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=PF-BErhy5nM:mBATmM8-79U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PF-BErhy5nM:mBATmM8-79U:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PF-BErhy5nM:mBATmM8-79U:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PF-BErhy5nM:mBATmM8-79U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=PF-BErhy5nM:mBATmM8-79U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PF-BErhy5nM:mBATmM8-79U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2011-04-08T15:41:13+08:00</dc:date>
  <pubDate>Fri, 08 Apr 2011 15:41:13 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Migration</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MySQL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Oracle</category>
  
  </item>
  
  <item>
  <title>Windows GUI version of SQLULDR2 and DataCopy released.</title>
  <link>http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html</link>
  <description><![CDATA[&nbsp; &nbsp; SQLULDR2 is a DBA utility to extract Oracle table's data to flat text file, it's based on OCI with excellent performance. Since most of uses like GUI interface, so I released a GUI version of SQLULDR2, let's call...]]></description>
  <guid isPermaLink="false">2392@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><P>&nbsp; &nbsp; SQLULDR2 is a DBA utility to extract Oracle table's data to flat text file, it's based on <A class=zem_slink title="Oracle Call Interface" href="http://en.wikipedia.org/wiki/Oracle_Call_Interface" rel=wikipedia>OCI</A> with excellent performance. Since most of uses like GUI interface, so I released a GUI version of SQLULDR2, let's call it <A href="http://www.dbatools.net/software/sqluldr2w.zip">SQLULDR2 for Windows</A>. With the following user interface.</P>

<BLOCKQUOTE>
<IMG border=0 src="http://www.dbatools.net/images/sqluldr2ui.png">
</BLOCKQUOTE>

<P>&nbsp; &nbsp; DataCopy is a DBA utility to move data between different Oracle databases with middle file generation, it's based on OCI with excellent performance. Since most of uses like GUI interface, so I released a GUI version of DataCopy too, let's call it <A href="http://www.dbatools.net/software/datacopyw.zip">DataCopy for Windows</A>. With the following user interface.</P>

<BLOCKQUOTE>
<IMG border=0 src="http://www.dbatools.net/images/datacopyui.png">
</BLOCKQUOTE>

<P>&nbsp; &nbsp; Any questions or suggestions, please info me, thanks. </P>


</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/parallel-sqluldr2-datacopy.html">Parallel execution of SQLULDR2 or DataCopy for huge tables</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html">SQLULDR2 : Native Parallel Support! Parallel Inside!</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html">SQLULDR2 Windows Developer SDK Released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-datacopy-version.html">DataCopy : Native Parallel Support Now ! Parallel Inside !</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/datacopy-utility.html">DataCopy : Oracle data migration utility, faster than exp/imp</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=BD-Fap_k_5U:UhzWLYNVO80:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=BD-Fap_k_5U:UhzWLYNVO80:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=BD-Fap_k_5U:UhzWLYNVO80:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=BD-Fap_k_5U:UhzWLYNVO80:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=BD-Fap_k_5U:UhzWLYNVO80:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=BD-Fap_k_5U:UhzWLYNVO80:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-05-13T09:50:16+08:00</dc:date>
  <pubDate>Thu, 13 May 2010 09:50:16 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Copy</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Export</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Text</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tools</category>
  
  </item>
  
  <item>
  <title>SQLULDR2 : Native Parallel Support! Parallel Inside!</title>
  <link>http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html</link>
  <description><![CDATA[&nbsp; &nbsp; Supposed that we want to unload a huge table (100gb+) to text file, how to do it quickly? The answer is parallel unloading. I will suggest you perform a manual parallel by split the big table into multiple...]]></description>
  <guid isPermaLink="false">2391@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><P>&nbsp; &nbsp; Supposed that we want to unload a huge table (100gb+) to text file, how to do it quickly? The answer is parallel unloading. I will suggest you perform a manual parallel by split the big table into multiple pieces with different where clause. But now I think the manual parallel is too complex, and it may perform multiple times full table scan, which brings extra IO overhead to the storage system, so I add the native parallel feature. </P>

<P>&nbsp; &nbsp; In parallel SQLULDR2, we can split huge table into multiple piece by rowid range, each parallel slave just take piece of the data with extra IO overhead to the storage system. You just need to tell the parallel degree and the big table name in the SQL to do the parallel. Supposed that we have the following SQL query.</P>

<BLOCKQUOTE class=prefont>
SELECT E.EMPNO, E.ENAME, D.DNAME<BR>
&nbsp; FROM EMP E, DEPT D<BR>
WHERE E.DEPTNO = D.DEPTNO
</BLOCKQUOTE>

<P>&nbsp; &nbsp; Supposed that the EMP is a huge table, we want to parallize the unload process. I will introduce two new options for parallel unloading. </P>

<BLOCKQUOTE class=prefont>
&nbsp; split&nbsp; = table name for automatically parallelization.<BR>
&nbsp; degree&nbsp; = parallelize data copy degree (2-128).<BR>
</BLOCKQUOTE>

<P>&nbsp; &nbsp; We also need to change the SQL query for parallel unloading, you can use two bind variables in the SQL, "MINRID" for the lower rowid range and "MAXRID" for the upper rowid range. So I rewrite the SQL as following. </P>

<BLOCKQUOTE class=prefont>
SELECT E.EMPNO, E.ENAME, D.DNAME<BR>
&nbsp; FROM EMP E, DEPT D<BR>
WHERE E.DEPTNO = D.DEPTNO AND <BR>
&nbsp; E.ROWID &gt;= :MINRID AND E.ROWID &lt; :MAXRID
</BLOCKQUOTE>

<P>&nbsp; &nbsp; If we want to unload the EMP table only, we just need pass the following options to SQLULDR2 for parallel unloading. </P>

<BLOCKQUOTE class=prefont>
user=scott/tiger<BR>
query=select * from emp where rowid &gt;= :minrid and rowid &lt; :maxrid<BR>
split=emp<BR>
degree=4<BR>
file=uldrdata.%p.txt<BR>
log=log.%p.log<BR>
</BLOCKQUOTE>

<P>&nbsp; &nbsp; The "%p" will be replaced by the parallel slave id (start from 1). With the parallel unloading feature, We can unload data very quickly. In a PC server with local disk only, I can unload data to text file with 32MB per second. </P>
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html">SQLULDR2 Windows Developer SDK Released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/datacopy-utility.html">DataCopy : Oracle data migration utility, faster than exp/imp</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-oracle-migrate-data-to-mysql.html">Migrate data from Oracle to MySQL with SQLULDR2</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-license.html">License required for full SQLULDR2 (Oracle Text Unload) version.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=13qYXZrFrhU:2sq2Ohu9pgA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=13qYXZrFrhU:2sq2Ohu9pgA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=13qYXZrFrhU:2sq2Ohu9pgA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=13qYXZrFrhU:2sq2Ohu9pgA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=13qYXZrFrhU:2sq2Ohu9pgA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=13qYXZrFrhU:2sq2Ohu9pgA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-04-30T11:43:41+08:00</dc:date>
  <pubDate>Fri, 30 Apr 2010 11:43:41 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Export</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Migration</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Text</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tools</category>
  
  </item>
  
  <item>
  <title>SQLULDR2 Windows Developer SDK Released.</title>
  <link>http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html</link>
  <description><![CDATA[&nbsp; &nbsp; SQLULDR2 is a fast and flexible Oracle text unload utility, but it did not have a good GUI interface, that's because I am not good at writing Microsoft MFC program to create GUI interface. But many and many...]]></description>
  <guid isPermaLink="false">2390@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; SQLULDR2 is a fast and flexible Oracle text unload utility, but it did not have a good GUI interface, that's because I am not good at writing Microsoft MFC program to create GUI interface. But many and many users like GUI based utility, so I released the SQLULDR2 Windows developer SDK (<a href="http://www.dbatools.net/software/sqluldr2sdk.zip">sqluldr2sdk.zip</a>), with the core SQLULDR2 API function, you can develop your own Oracle text unload utility. </p>

<p>&nbsp; &nbsp; There is a demo program in the download package, it's a small C program to login to Oracle as SYS schema and unload some rows to text file. </p>

<blockquote class="prefont">
#include &lt;stdio.h&gt;<br />
#include "sqluldr2.h"<br />
<br />
void main()<br />
{<br />
&nbsp;  void *h = NULL;<br />
&nbsp;  SQLULDR2HandleAlloc(&amp;h);<br />
&nbsp;  if (h != NULL)<br />
&nbsp;  {<br />
&nbsp; &nbsp; &nbsp;  SQLULDR2HandleSetAttr(h, "USER=SYS");<br />
&nbsp; &nbsp; &nbsp;  SQLULDR2HandleSetAttr(h, "QUERY=SELECT * FROM TAB");<br />
&nbsp; &nbsp; &nbsp;  SQLULDR2HandleExecute(h);<br />
&nbsp; &nbsp; &nbsp;  SQLULDR2HandleFree(h);<br />
&nbsp;  }<br />
}
</blockquote>

<p>&nbsp; &nbsp; If you are good at GUI programing, or you are interesting in GUI programing, please take the lessio to write a GUI interface for SQLULDR2. All the <a href="http://www.dbatools.net/software/sqluldr.zip">SQLULDR2</a> attributes can be list by the following command. </p>

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

<p>&nbsp; &nbsp; For the DataCopy utility, I will release the Windows deveoper SDK soon.</p> 
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-license.html">License required for full SQLULDR2 (Oracle Text Unload) version.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-oracle-migrate-data-to-mysql.html">Migrate data from Oracle to MySQL with SQLULDR2</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html">SQLULDR2 : Native Parallel Support! Parallel Inside!</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-sqluldr2-datacopy.html">Parallel execution of SQLULDR2 or DataCopy for huge tables</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=Del9-T_2loU:ne3e3UUFV3s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Del9-T_2loU:ne3e3UUFV3s:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Del9-T_2loU:ne3e3UUFV3s:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Del9-T_2loU:ne3e3UUFV3s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=Del9-T_2loU:ne3e3UUFV3s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=Del9-T_2loU:ne3e3UUFV3s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-04-19T23:55:38+08:00</dc:date>
  <pubDate>Mon, 19 Apr 2010 23:55:38 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Export</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Migration</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">sqlldr</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Text</category>
  
  </item>
  
  <item>
  <title>DataCopy : Native Parallel Support Now ! Parallel Inside !</title>
  <link>http://www.dbatools.net/mytools/parallel-datacopy-version.html</link>
  <description><![CDATA[&nbsp; &nbsp; We can write a Perl or shell script to start multiple datacopy process with TabSplit utility, now you don't need to write such a Perl or shell script, I have combined the code of TabSplit and DataCopy, we...]]></description>
  <guid isPermaLink="false">2389@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; We can write a Perl or shell script to start multiple datacopy process with <a href="http://www.anysql.net/tools/parallel-datacopy-datasync.html">TabSplit</a> utility, now you don't need to write such a Perl or shell script, I have combined the code of TabSplit and DataCopy, we can start multiple datacopy thread on Windows or multiple process on Linux/Unix to parallel data copy between different Oracle databases quickly. It's native parallel support now!</p>

<p>&nbsp; &nbsp; Just need to specify the parallel degree with "DEGREE" command line option.</p>

<blockquote class="prefont">
datacopy user=..... table1=sql_summary table2=sql_summary2 <strong>degree=2</strong>
</blockquote>

<p>&nbsp; &nbsp; Table SQL_SUMMARY has ten million rows, let's check out the log output. </p>

<blockquote class="prefont">
&nbsp; &nbsp; &nbsp; &nbsp;  0 rows processed at 2010-04-16 13:35:55.<br />
&nbsp; &nbsp; &nbsp; &nbsp;  0 rows processed at 2010-04-16 13:35:55.<br />
&nbsp;  1000000 rows processed at 2010-04-16 13:36:04.<br />
&nbsp;  1000000 rows processed at 2010-04-16 13:36:04.<br />
&nbsp;  2000000 rows processed at 2010-04-16 13:36:14.<br />
&nbsp;  2000000 rows processed at 2010-04-16 13:36:14.<br />
&nbsp;  3000000 rows processed at 2010-04-16 13:36:24.<br />
&nbsp;  3000000 rows processed at 2010-04-16 13:36:24.<br />
&nbsp;  4000000 rows processed at 2010-04-16 13:36:34.<br />
&nbsp;  4000000 rows processed at 2010-04-16 13:36:34.<br />
&nbsp;  5000000 rows processed at 2010-04-16 13:36:43.<br />
&nbsp;  5000000 rows processed at 2010-04-16 13:36:43.<br />
&nbsp;  5207041 rows processed at 2010-04-16 13:36:45.<br />
&nbsp;  5378556 rows processed at 2010-04-16 13:36:47.
</blockquote>

<p>&nbsp; &nbsp; DataCopy now need to access some dictionary views, we should grant select catalog role to the source user. You can download the <a href="http://www.anysql.net/software/datacopy.zip">new version</a> for performance testing, I hope DataCopy to be a very useful data migration utility for Oracle. </p>


</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/datacopy-utility.html">DataCopy : Oracle data migration utility, faster than exp/imp</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/ora2mysql-oracle-mysql-data-migration.html">Migrate Oracle data to MySQL database with ora2mysql utility</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html">SQLULDR2 : Native Parallel Support! Parallel Inside!</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html">SQLULDR2 Windows Developer SDK Released.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=JjpmkZC2nx8:PpeutkJc6sQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=JjpmkZC2nx8:PpeutkJc6sQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=JjpmkZC2nx8:PpeutkJc6sQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=JjpmkZC2nx8:PpeutkJc6sQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=JjpmkZC2nx8:PpeutkJc6sQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=JjpmkZC2nx8:PpeutkJc6sQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-04-17T00:21:33+08:00</dc:date>
  <pubDate>Sat, 17 Apr 2010 00:21:33 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Copy</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Migration</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tools</category>
  
  </item>
  
  <item>
  <title>Parallel execution of SQLULDR2 or DataCopy for huge tables</title>
  <link>http://www.dbatools.net/mytools/parallel-sqluldr2-datacopy.html</link>
  <description><![CDATA[&nbsp; &nbsp; If we want to process huge tables (few hunderds of gigabytes), it will take long time for a single SQLULDR2 or DataCopy process, single process can makde single CPU exhausted. To speedup the process, we need maually partitioned...]]></description>
  <guid isPermaLink="false">2388@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; If we want to process huge tables (few hunderds of gigabytes), it will take long time for a single SQLULDR2 or DataCopy process, single process can makde single CPU exhausted. To speedup the process, we need maually partitioned the huge tables, and start multiple SQLULDR2 or DataCopy processes. But manuall partition is too complex for us, we need automate the partition method. </p>
 
<p>&nbsp; &nbsp; The key is how to split huge tables into multiple pieces, if we split it manually, then we can only perform manually parallel process, if we can split it automatically, then we can perform automatically parallel process. I wrote a program (<a href="http://www.dbatools.net/software/tabsplit.zip">TabSplit</a>) to handle the split work by rowid range. </p>

<blockquote class="prefont">
Usage: tabsplit user=... owner=... table=... [part=...] [degree=...]
</blockquote>
 
<p>&nbsp; &nbsp; There is a big table (EMP_HIS) on my local database, I need to unload it text file with parallel degree 4 to save time. Let's split it with TabSplit utility. </p>

<blockquote class="prefont">
D:\&gt;tabsplit owner=scott table=emp_his degree=4<br />
ROWID&gt;='AAADAUAAEAAAE0xAAA' AND ROWID &lt; 'AAADAUAAEAAAFUIEAA'<br />
ROWID&gt;='AAADAUAAEAAAFUJAAA' AND ROWID &lt; 'AAADAUAAEAAAHEIEAA'<br />
ROWID&gt;='AAADAUAAEAAAHEJAAA' AND ROWID &lt; 'AAADAUAAEAAAHiIEAA'<br />
ROWID&gt;='AAADAUAAEAAAHiJAAA' AND ROWID &lt; 'AAADAUAAEAAAH8IEAA'
</blockquote>
 
<p>&nbsp; &nbsp; Now we will check the record count of each piece, and then summarize the total record count. </p>
 
<blockquote class="prefont">
SQL&gt; select count(*) from scott.emp_his where<br />
&nbsp; 2&nbsp; ROWID&gt;='AAADAUAAEAAAE0xAAA' AND ROWID &lt; 'AAADAUAAEAAAFUIEAA';<br />
<br />
&nbsp; &nbsp; 307200<br />
<br />
SQL&gt; select count(*) from scott.emp_his where<br />
&nbsp; 2&nbsp; ROWID&gt;='AAADAUAAEAAAFUJAAA' AND ROWID &lt; 'AAADAUAAEAAAHEIEAA';<br />
<br />
&nbsp; &nbsp; 309421<br />
<br />
SQL&gt; select count(*) from scott.emp_his where<br />
&nbsp; 2&nbsp; ROWID&gt;='AAADAUAAEAAAHEJAAA' AND ROWID &lt; 'AAADAUAAEAAAHiIEAA';<br />
<br />
&nbsp; &nbsp; 309606<br />
<br />
SQL&gt; select count(*) from scott.emp_his where<br />
&nbsp; 2&nbsp; ROWID&gt;='AAADAUAAEAAAHiJAAA' AND ROWID &lt; 'AAADAUAAEAAAH8IEAA';<br />
<br />
&nbsp; &nbsp; 253469<br />
<br />
SQL&gt; select 307200+309421+309606+253469 from DUAL;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1179696
</blockquote>
 
<p>&nbsp; &nbsp; And we query the record count by a full table scan in Oracle. </p>
 
<blockquote class="prefont">
SQL&gt; select count(*) from scott.emp_his;<br />
<br />
&nbsp;  1179696
</blockquote>
 
<p>&nbsp; &nbsp; We found that the record count matched, it's good news for us. Now we can write packer scripts to start multiple SQLULDR2 or DataCopy processes quickly for huge tables. </p>

 
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html">SQLULDR2 Windows Developer SDK Released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-license.html">License required for full SQLULDR2 (Oracle Text Unload) version.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html">SQLULDR2 : Native Parallel Support! Parallel Inside!</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-datacopy-version.html">DataCopy : Native Parallel Support Now ! Parallel Inside !</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=I-_qu6Umq3Y:4A89EPs-HlY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=I-_qu6Umq3Y:4A89EPs-HlY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=I-_qu6Umq3Y:4A89EPs-HlY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=I-_qu6Umq3Y:4A89EPs-HlY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=I-_qu6Umq3Y:4A89EPs-HlY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=I-_qu6Umq3Y:4A89EPs-HlY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-04-15T16:06:06+08:00</dc:date>
  <pubDate>Thu, 15 Apr 2010 16:06:06 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Copy</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Export</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Parallel</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Text</category>
  
  </item>
  
  <item>
  <title>Data Migration between different Oracle character set</title>
  <link>http://www.dbatools.net/mytools/us7ascii-utf8-data-migration.html</link>
  <description><![CDATA[&nbsp; &nbsp; Supposed that we have few handerds of data stored in US7ASCII database, and we need to switch the system to an UTF8 database, how could we get the system switched in just few minutes without long period outage...]]></description>
  <guid isPermaLink="false">2387@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; Supposed that we have few handerds of data stored in US7ASCII database, and we need to switch the system to an UTF8 database, how could we get the system switched in just few minutes without long period outage window? </p>

<p>&nbsp; &nbsp; Usually we need to unload the data into flat file form US7ASCII database (with NLS_LANG = .US7ASCII), and then change the NLS_LANG to local language character set, for example ZHS16GBK, and load the text file into UTF8 database. </p> 

<p>&nbsp; &nbsp; It seems hard in the past, but now have can use DataCopy &amp; DataSync to get it done. I added two new command line options into them to support character set conversion. </p>

<blockquote class="prefont">
 * charset = character set name of the target database.<br />
 * ncharset= national character set name of the target database.
</blockquote>

<p>&nbsp; &nbsp; Both DataCopy &amp; DataSync have two database connections, source connection and target connection. The character set of source connection is controled by the NLS_LANG variable, and the character set of target connection can be controled by the two new command line options now. So we can do the character set conversion without flat file generation, we can do it in one command.</p>

<blockquote class="prefont">
datacopy user1=... user2=... table=... charset=ZHS16GBK ncharset=AL32UTF8
</blockquote>

<p>&nbsp; &nbsp; We can use DataSync to do incremental conversion, and then just take few minutes to swithover the system to new database. If you have these kind of data migration jobs, you should use them to relax your works.</p>

</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/oracle-mysql-data-replication-mysqlsync.html">Trigger based data replication utility from Oracle to MySQL database</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-datacopy-version.html">DataCopy : Native Parallel Support Now ! Parallel Inside !</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-sqluldr2-datacopy.html">Parallel execution of SQLULDR2 or DataCopy for huge tables</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/datasync-data-replication.html">DataSync: Data Replication (SCOTT.EMP) between Oracle databases</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=j35w2cbJNrw:zjKqJDIgPY8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=j35w2cbJNrw:zjKqJDIgPY8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=j35w2cbJNrw:zjKqJDIgPY8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=j35w2cbJNrw:zjKqJDIgPY8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=j35w2cbJNrw:zjKqJDIgPY8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=j35w2cbJNrw:zjKqJDIgPY8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-04-14T12:35:25+08:00</dc:date>
  <pubDate>Wed, 14 Apr 2010 12:35:25 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Copy</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Replication</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">US7ASCII</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">UTF8</category>
  
  </item>
  
  <item>
  <title>DataSync: Data Replication (SCOTT.EMP) between Oracle databases</title>
  <link>http://www.dbatools.net/mytools/datasync-data-replication.html</link>
  <description><![CDATA[&nbsp; &nbsp; I want to introduce a new utility for data replication solution based on materialized view log or user defined triggers, I named it as DataSync, suppose that we want to replicate table (SCOTT.EMP)'s data from DB1 to DB2...]]></description>
  <guid isPermaLink="false">2386@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; I want to introduce a new utility for data replication solution based on materialized view log or user defined triggers, I named it as <a href="http://www.dbatools.net/software/datasync.zip">DataSync</a>, suppose that we want to replicate table (SCOTT.EMP)'s data from DB1 to DB2 with low latency (less than 5s). Take a look at the command line help first.</p>

<blockquote class="prefont">
DataSync: Oracle Data Replication Utility, Release 2.0.1<br />
(c) Copyright Lou Fangxin (AnySQL.net) 2010, all rights reserved.<br />
<br />
Usage: datasync keyword=value [,keyword=value,...]<br />
<br />
Valid Keywords:<br />
&nbsp;  user&nbsp; &nbsp; = username/password@tnsname for source and target.<br />
&nbsp;  user1&nbsp;  = username/password@tnsname for source database.<br />
&nbsp;  user2&nbsp;  = username/password@tnsname for target database.<br />
 * wait&nbsp; &nbsp; = wait time in microsecond after each array.<br />
&nbsp;  array&nbsp;  = array fetch size<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 />
&nbsp;  config&nbsp; = config files.<br />
 * dbid&nbsp; &nbsp; = target database flag column of log table.<br />
 * dblist&nbsp; = all target database flag columns of log table.<br />
 * init&nbsp; &nbsp; = fix message out of sync before replication(YES).<br />
&nbsp;  log&nbsp; &nbsp;  = log file name for screen messages.<br />
<br />
Notes:<br />
&nbsp;  datasync user1=scott/tiger user2=scott/tiger config=scott.cfg init=yes<br />
<br />
Config:<br />
&nbsp;  Source # Primary Key # Log Table # Target # Conflict # Filler # Where
</blockquote>

<p>&nbsp; &nbsp; Then we will start to do the replication of table (SCOTT.EMP), it's very simple. </p>

<p>&nbsp; &nbsp; 1, Create Materilaized View Log on SCOTT.EMP</p>

<blockquote class="prefont">
CREATE MATERILIZED VIEW LOG ON EMP WITH SEQUENCE, PRIMARY KEY;<br />
CREATE INDEX MLOG$_EMP_IX1 ON MLOG$_EMP (SEQUENCE$$);
</blockquote>

<p>&nbsp; &nbsp; 2, Prepare a configuration file for replication, one table per line.</p>

<blockquote class="prefont">
D:\&gt;type scott.cfg<br />
EMP&nbsp; #EMPNO&nbsp;  #MLOG$_EMP&nbsp; #EMP
</blockquote>

<p>&nbsp; &nbsp; 3, Data initialize between tow databases with <a href="http://www.dbatools.net/software/datacopy.zip">DataCopy</a></p>

<blockquote class="prefont">
datacopy user1=scott/tiger@db1 user2=scott/tiger@db2 table=emp
</blockquote>

<p>&nbsp; &nbsp; 4, start data replication daemon with init mode</p>

<blockquote class="prefont">
datasync user1=scott/tiger@db1 user2=scott/tiger@db2 config=scott.cfg
</blockquote>

<p>&nbsp; &nbsp; 5, Make DML changes on source database, changes will be replicated.</p>

<blockquote class="prefont">
update emp set comm = nvl(comm,0) + 200;
</blockquote>

<p>&nbsp; &nbsp; Now you have a very light replication tools, you can use it to make read database for you application. </p>


</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/oracle-mysql-data-replication-mysqlsync.html">Trigger based data replication utility from Oracle to MySQL database</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/us7ascii-utf8-data-migration.html">Data Migration between different Oracle character set</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/aul-oracle-asm-data-recovery-test.html">Oracle ASM Data Recovery Test of AUL for Oracle ASM Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mydul/oracle-asm-data-recovery-aulasm.html">AUL for Oracle ASM, Oracle ASM Data Recovery Utility.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/ora2mysql-oracle-mysql-data-migration.html">Migrate Oracle data to MySQL database with ora2mysql utility</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=inp9519of_g:AkDlrCdZehU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=inp9519of_g:AkDlrCdZehU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=inp9519of_g:AkDlrCdZehU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=inp9519of_g:AkDlrCdZehU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=inp9519of_g:AkDlrCdZehU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=inp9519of_g:AkDlrCdZehU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-03-25T15:52:42+08:00</dc:date>
  <pubDate>Thu, 25 Mar 2010 15:52:42 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Replication</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Shareplex</category>
  
  </item>
  
  <item>
  <title>DataCopy : Oracle data migration utility, faster than exp/imp</title>
  <link>http://www.dbatools.net/mytools/datacopy-utility.html</link>
  <description><![CDATA[&nbsp; &nbsp; We always use Oracle exp and imp utilities to move data from one oracle database to another, but the Oracle imp utility is really slow, because it does not support direct path load, and we must prepare lot's...]]></description>
  <guid isPermaLink="false">2385@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; We always use Oracle exp and imp utilities to move data from one oracle database to another, but the Oracle imp utility is really slow, because it does not support direct path load, and we must prepare lot's of storage to store the dmp file. Another way is to use database link and CTAS command, but the database server must be accessable in network. Is there a tool to copy data between Oracle databases without file genration and no database link required? Yes, we now have the <a href="http://www.dbatools.net/software/datacopy.zip">DataCopy</a> utility. </p>

<p>&nbsp; &nbsp; It's very easy to use, I don't think we need read a detailed document before we start to use it. Just read the command line help and enjoy it. </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;  user&nbsp; &nbsp; = username/password@tnsname for source and target.<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 />
 * conflict= conflict columns for update on 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; For any question of this utility, add my MSN for online communication. </p>

</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-datacopy-gui-version.html">Windows GUI version of SQLULDR2 and DataCopy released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-inside-sqluldr2.html">SQLULDR2 : Native Parallel Support! Parallel Inside!</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-windows-sdk-released.html">SQLULDR2 Windows Developer SDK Released.</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/parallel-datacopy-version.html">DataCopy : Native Parallel Support Now ! Parallel Inside !</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/sqluldr2-license.html">License required for full SQLULDR2 (Oracle Text Unload) version.</a> (0)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=gl2HhydJAq0:0s-iT9W0Upg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=gl2HhydJAq0:0s-iT9W0Upg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=gl2HhydJAq0:0s-iT9W0Upg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=gl2HhydJAq0:0s-iT9W0Upg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=gl2HhydJAq0:0s-iT9W0Upg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=gl2HhydJAq0:0s-iT9W0Upg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-03-17T17:45:34+08:00</dc:date>
  <pubDate>Wed, 17 Mar 2010 17:45:34 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Data</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Export</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Import</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Migration</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tools</category>
  
  </item>
  
  <item>
  <title>Define the row filters for reports in WebChart</title>
  <link>http://www.dbatools.net/mytools/webchart-rows-filter.html</link>
  <description><![CDATA[&nbsp; &nbsp; Supposed that we are creating a report of the top 3 highest salary employees for every department (check the Oracle demo table : SCOTT.EMP). If the table is stored in Oracle database, we could generate the report with...]]></description>
  <guid isPermaLink="false">2384@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; Supposed that we are creating a report of the top 3 highest salary employees for every department (check the Oracle demo table : SCOTT.EMP). If the table is stored in Oracle database, we could generate the report with one Oracle SQL query as following. </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; But if we store this employee table in MySQL or SQLLite database, generating the top n salary employee report will be very complex or difficult. It's hard for us to know different SQL syntax on different database systems. With the feature of the WebChart, you can generate the report with very simple SQL query. </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; If the result of filter express for specific row is negative, the specific row is removed from the result set. For example, if the salary rank is large than 3, the result will be negative number, and the employee record is removed by the program, and just keep the top 3 employees for every department as we required, and we will get a result page as following. </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; By doing the computation at application side, we make the SQL very simple. If the report is accessed very frequently, we also reduce the load of database server. </p>
</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/webchart-multidb-support.html">Define different SQLs for different databases in WebChart</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-mysql-examples.html">WebChart Sample Pages on MySQL Database</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/experience/logical-database-access-layer.html">The logical database layer and physical database layer</a> (1)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-new-xsl-template.html">Change the WebChart XSL template to show nagivation links</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-href-links.html">Create the HREF links in WebChart Pages</a> (9)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=DwxwXYvEff8:hA2d0LYujZY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=DwxwXYvEff8:hA2d0LYujZY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=DwxwXYvEff8:hA2d0LYujZY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=DwxwXYvEff8:hA2d0LYujZY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=DwxwXYvEff8:hA2d0LYujZY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=DwxwXYvEff8:hA2d0LYujZY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-03-04T22:42:16+08:00</dc:date>
  <pubDate>Thu, 04 Mar 2010 22:42:16 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Java</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MySQL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tomcat</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">WebChart</category>
  
  </item>
  
  <item>
  <title>Define different SQLs for different databases in WebChart</title>
  <link>http://www.dbatools.net/mytools/webchart-multidb-support.html</link>
  <description><![CDATA[&nbsp; &nbsp; Some people like to run WebChart demo application on Oracle database, while some other people may like to run WebChart demo application on MySQL database. Seems I have to write two WebChart demo applications, one for Oracle, another...]]></description>
  <guid isPermaLink="false">2383@http://www.dbatools.net/</guid>
  <content:encoded><![CDATA[
      <p>Author: <a href="http://www.dbatools.net">AnySQL</a>, published on <a href="http://www.dbatools.net">dbatools.net</a>, Oracle Data Recovery, Tools, WebChart Report, etc. </p><p>&nbsp; &nbsp; Some people like to run WebChart demo application on Oracle database, while some other people may like to run WebChart demo application on MySQL database. Seems I have to write two WebChart demo applications, one for Oracle, another one for MySQL database. </p>

<p>&nbsp; &nbsp; I think I should not ask customer to use Oracle or MySQL, WebChart should support almost all major different database systems. It's possible now to define different SQLs for different databases, for example, we define the following SQLs as the data source of one WebChart page. </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; When connect to Oracle, it will run the SQL defined for the Oracle database, when connect to MySQL, it will run the SQL defined for the MySQL database. It's possible to create one demo application to work fine for both Oracle and MySQL, and other different types of databases. </p>

</p>
      <p><b>Related Posts</b></p>
	
            <div><a href="http://www.dbatools.net/mytools/webchart-rows-filter.html">Define the row filters for reports in WebChart</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-mysql-examples.html">WebChart Sample Pages on MySQL Database</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/experience/logical-database-access-layer.html">The logical database layer and physical database layer</a> (1)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-new-xsl-template.html">Change the WebChart XSL template to show nagivation links</a> (0)</div>
        
            <div><a href="http://www.dbatools.net/mytools/webchart-href-links.html">Create the HREF links in WebChart Pages</a> (9)</div>
        
      </p>
      <p><b><a href="http://twitter.com/dbatools" target="_blank">Twitter Me?</a> | 
  <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbatools?a=PDHC_GIR5KM:FP4KBdnPNLg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PDHC_GIR5KM:FP4KBdnPNLg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/dbatools?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PDHC_GIR5KM:FP4KBdnPNLg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbatools?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PDHC_GIR5KM:FP4KBdnPNLg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbatools?i=PDHC_GIR5KM:FP4KBdnPNLg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbatools?a=PDHC_GIR5KM:FP4KBdnPNLg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/dbatools?d=qj6IDK7rITs" border="0"></img></a>
</div>]]></content:encoded>
  <dc:subject>MyTools</dc:subject>
  <dc:date>2010-03-03T17:01:11+08:00</dc:date>
  <pubDate>Wed, 03 Mar 2010 17:01:11 +0800</pubDate>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Java</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">MySQL</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">Tomcat</category>
  
     <category domain="http://www.sixapart.com/ns/types#tag">WebChart</category>
  
  </item>
  
</channel>
</rss>
