<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6358172729910540781</id><updated>2011-12-09T09:47:19.273-08:00</updated><title type='text'>Welcome to My World.</title><subtitle type='html'>This blog is dedicated for Oracle community.  You can learn and sharing your experience here.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-4802458091492197931</id><published>2008-06-16T00:08:00.000-07:00</published><updated>2008-06-16T00:12:01.013-07:00</updated><title type='text'>Clean Up 10g CRS After Failed Installation</title><content type='html'>Some people might be don't have access to metalink, so i would like to help those people in clean up failed CRS installation in Oracle 10g RAC&lt;br /&gt;&lt;br /&gt;1. Run rootdelete.sh script then the rootdeinstall.sh script from the $ORA_CRS_HOME/install directory on any nodes you are removing CRS. Running these scripts should be sufficent to clean up your CRS install.  If you have any problems with these scripts please open a service request.&lt;br /&gt;&lt;br /&gt;If for some reason you have to manually remove the install due to problems with the scripts, continue to step 2:&lt;br /&gt;&lt;br /&gt;2. Stop the Nodeapps on all nodes:&lt;br /&gt;&lt;br /&gt;  srvctl stop nodeapps -n &lt;node&gt;&lt;br /&gt;&lt;br /&gt;3. Prevent CRS from starting when the node reboot. To do this issue the following as root:&lt;br /&gt;&lt;br /&gt;Sun:&lt;br /&gt;  rm /etc/init.d/init.cssd&lt;br /&gt;  rm /etc/init.d/init.crs&lt;br /&gt;  rm /etc/init.d/init.crsd&lt;br /&gt;  rm /etc/init.d/init.evmd&lt;br /&gt;  rm /etc/rc3.d/K96init.crs&lt;br /&gt;  rm /etc/rc3.d/S96init.crs&lt;br /&gt;      rm -Rf /var/opt/oracle/scls_scr&lt;br /&gt;      rm -Rf /var/opt/oracle/oprocd&lt;br /&gt;  rm /etc/inittab.crs&lt;br /&gt;  cp /etc/inittab.orig /etc/inittab&lt;br /&gt;&lt;br /&gt;Linux:&lt;br /&gt;      rm /etc/oracle/*&lt;br /&gt;  rm -f /etc/init.d/init.cssd&lt;br /&gt;  rm -f /etc/init.d/init.crs&lt;br /&gt;  rm -f /etc/init.d/init.crsd&lt;br /&gt;  rm -f /etc/init.d/init.evmd&lt;br /&gt;  rm -f /etc/rc2.d/K96init.crs&lt;br /&gt;  rm -f /etc/rc2.d/S96init.crs&lt;br /&gt;  rm -f /etc/rc3.d/K96init.crs&lt;br /&gt;  rm -f /etc/rc3.d/S96init.crs&lt;br /&gt;  rm -f /etc/rc5.d/K96init.crs&lt;br /&gt;  rm -f /etc/rc5.d/S96init.crs&lt;br /&gt;      rm -Rf /etc/oracle/scls_scr&lt;br /&gt;  rm -f /etc/inittab.crs&lt;br /&gt;  cp /etc/inittab.orig /etc/inittab&lt;br /&gt;&lt;br /&gt;HP-UX:&lt;br /&gt;  rm /sbin/init.d/init.cssd&lt;br /&gt;  rm /sbin/init.d/init.crs&lt;br /&gt;  rm /sbin/init.d/init.crsd&lt;br /&gt;  rm /sbin/init.d/init.evmd&lt;br /&gt;      rm /sbin/rc2.d/K960init.crs&lt;br /&gt;      rm /sbin/rc2.d/K001init.crs&lt;br /&gt;  rm /sbin/rc3.d/K960init.crs&lt;br /&gt;  rm /sbin/rc3.d/S960init.crs&lt;br /&gt;      rm -Rf /var/opt/oracle/scls_scr&lt;br /&gt;      rm -Rf /var/opt/oracle/oprocd&lt;br /&gt;  rm /etc/inittab.crs&lt;br /&gt;  cp /etc/inittab.orig /etc/inittab&lt;br /&gt;&lt;br /&gt;HP Tru64:&lt;br /&gt;  rm /sbin/init.d/init.cssd&lt;br /&gt;  rm /sbin/init.d/init.crs&lt;br /&gt;  rm /sbin/init.d/init.crsd&lt;br /&gt;  rm /sbin/init.d/init.evmd&lt;br /&gt;  rm /sbin/rc3.d/K96init.crs&lt;br /&gt;  rm /sbin/rc3.d/S96init.crs&lt;br /&gt;      rm -Rf /var/opt/oracle/scls_scr&lt;br /&gt;      rm -Rf /var/opt/oracle/oprocd&lt;br /&gt;  rm /etc/inittab.crs&lt;br /&gt;  cp /etc/inittab.orig /etc/inittab&lt;br /&gt;&lt;br /&gt;IBM AIX:&lt;br /&gt;  rm /etc/init.cssd&lt;br /&gt;  rm /etc/init.crs&lt;br /&gt;  rm /etc/init.crsd&lt;br /&gt;  rm /etc/init.evmd&lt;br /&gt;  rm /etc/rc.d/rc2.d/K96init.crs&lt;br /&gt;  rm /etc/rc.d/rc2.d/S96init.crs&lt;br /&gt;      rm -Rf /etc/oracle/scls_scr&lt;br /&gt;      rm -Rf /etc/oracle/oprocd&lt;br /&gt;  rm /etc/inittab.crs&lt;br /&gt;  cp /etc/inittab.orig /etc/inittab&lt;br /&gt;&lt;br /&gt;4. If they are not already down, kill off EVM, CRS, and CSS processes or reboot the node:&lt;br /&gt;&lt;br /&gt;  ps -ef | grep crs &lt;br /&gt;  kill &lt;crs&gt;&lt;br /&gt;  ps -ef | grep evm&lt;br /&gt;  kill &lt;evm&gt;&lt;br /&gt;  ps -ef | grep css &lt;br /&gt;  kill &lt;css&gt;&lt;br /&gt;&lt;br /&gt; Do not kill any OS processes, for example icssvr_daemon process&lt;br /&gt;&lt;br /&gt;5. If there is no other Oracle software running (like listeners, DB's, etc...), you can remove the files in /var/tmp/.oracle or /tmp/.oracle.  Example:&lt;br /&gt;&lt;br /&gt;      rm -f /var/tmp/.oracle&lt;br /&gt;      or&lt;br /&gt;      rm -f /tmp/.oracle&lt;br /&gt;&lt;br /&gt;6. Remove the ocr.loc in /etc/oracle&lt;br /&gt;&lt;br /&gt;7. De-install the CRS home in the Oracle Universal Installer&lt;br /&gt;&lt;br /&gt;8. Remove the CRS install location:&lt;br /&gt;&lt;br /&gt;    rm -Rf &lt;crs&gt;/*&lt;br /&gt;&lt;br /&gt;9. Clean out the OCR and Voting Files with dd commands.  Example:&lt;br /&gt;&lt;br /&gt;      dd if=/dev/zero of=/dev/rdsk/V1064_vote_01_20m.dbf bs=8192 count=2560&lt;br /&gt;      dd if=/dev/zero of=/dev/rdsk/ocrV1064_100m.ora bs=8192 count=12800&lt;br /&gt;&lt;br /&gt; If you placed the OCR and voting disk on a shared filesystem, remove them.&lt;br /&gt;&lt;br /&gt; If you are removing the RDBMS installation, also clean out any ASM disks if&lt;br /&gt; they have already been used.&lt;br /&gt;&lt;br /&gt;10.If you would like to re-install CRS, follow the steps in the RAC Installation manual.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this will help you out&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers&lt;/crs&gt;&lt;/css&gt;&lt;/evm&gt;&lt;/crs&gt;&lt;/node&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-4802458091492197931?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/4802458091492197931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=4802458091492197931' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/4802458091492197931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/4802458091492197931'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/06/clean-up-10g-crs-after-failed.html' title='Clean Up 10g CRS After Failed Installation'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-5566596285544238103</id><published>2008-05-29T00:56:00.000-07:00</published><updated>2008-05-29T00:57:22.749-07:00</updated><title type='text'>PLS-213: package STANDARD not accessible</title><content type='html'>Today when i was creating a new database (10.2.0.2) using DBCA for CMS Production, i got error "PLS-213: package STANDARD not accessible".  How to solve this problem?.  Well there are few things that you have to check&lt;br /&gt;&lt;br /&gt;1. Check standard.sql does exists under ORACLE_HOME/rdbms/admin&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;ora10g@bahamut:/home/ora10g/10.2/rdbms/admin&gt; ls -arlt st*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   -rw-r-----   1 ora10g   dba          144274 Jun 30 2005  stdspec.sql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   -rw-r-----   1 ora10g   dba           19277 Jun 30 2005  stdbody.sql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   -rw-r-----   1 ora10g   dba              65 Jun 30 2005  standard.sql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Check that glogin.sql (ORACLE_HOME/sqlplus/admin) does not contain "set serveroutput on"&lt;br /&gt;&lt;br /&gt;Here my problem was caused because serveroutput was set to on, after remove it for temporary then i can continue database creation through DBCA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GBU&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-5566596285544238103?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/5566596285544238103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=5566596285544238103' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5566596285544238103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5566596285544238103'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/05/pls-213-package-standard-not-accessible.html' title='PLS-213: package STANDARD not accessible'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-5796061901665402030</id><published>2008-03-03T23:16:00.000-08:00</published><updated>2008-03-04T18:38:10.418-08:00</updated><title type='text'>Could not connect from production application to production database</title><content type='html'>This problem just happen a moment ago and still fresh i think. Right after i finished my lunch, application sys admin asked why we could not connect from hawaii through sqlplus?&lt;br /&gt;&lt;br /&gt;Then i tried to start investigating&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ora10g@hawaii:/home/ora10g&gt; sqlplus system@zpacdb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SQL*Plus: Release 10.2.0.2.0 - Production on Tue Mar 4 13:41:05 2008&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Enter password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ERROR:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ORA-00022: invalid session ID; access denied&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First i thought something must be blocking the connection.  Then i tried to connect from my local and it appears OK, secondly then i checked the listener because my local and the application server using different listnener.  again this appears OK when i tried connect from my local using application server listener.&lt;br /&gt;&lt;br /&gt;So what is the problem? why we could not connect?&lt;br /&gt;&lt;br /&gt;I worked together with application sys admin and UNIX sys admin and they found that the hostname of the application server was changed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ora10g@hawaii:/home/ora10g&gt; hostname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tahiti&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oh my GOD, hostname shouldn't tahiti, it should be hawaii.  So we changed it back as soon as possible&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ora10g@hawaii:/home/ora10g&gt; hostname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;hawaii&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and now we can connect again and continue our live&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have a nice day&lt;br /&gt;&lt;br /&gt;FZheng&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-5796061901665402030?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/5796061901665402030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=5796061901665402030' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5796061901665402030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5796061901665402030'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/03/could-not-connect-from-production.html' title='Could not connect from production application to production database'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-3901552051646361281</id><published>2008-02-28T23:50:00.000-08:00</published><updated>2008-02-29T00:11:58.439-08:00</updated><title type='text'>How to find characters in string?</title><content type='html'>Again, one of application testing people came to me and ask "How could we find character in string?".  Well i suddenly remember there is one new SQL function in  Oracle 10g.  Lets take a look the example&lt;br /&gt;&lt;br /&gt;vd@bahamut&gt; select postal from t2;&lt;br /&gt;&lt;br /&gt;POSTAL&lt;br /&gt;----------&lt;br /&gt;11470&lt;br /&gt;11520&lt;br /&gt;15880&lt;br /&gt;13963&lt;br /&gt;11788&lt;br /&gt;11880&lt;br /&gt;15576&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1190a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1A7I1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11ao2&lt;/span&gt;&lt;br /&gt;16502&lt;br /&gt;15570&lt;br /&gt;16890&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I99it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We have 4 rows that contains character in postal code column. How do we find this 4 rows?&lt;br /&gt;&lt;br /&gt;vd@bahamut&gt; select postal from t2 WHERE REGEXP_LIKE (postal, '[a-zA-Z]');&lt;br /&gt;&lt;br /&gt;POSTAL&lt;br /&gt;----------&lt;br /&gt;1190a&lt;br /&gt;1A7I1&lt;br /&gt;11ao2&lt;br /&gt;I99it&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;yes, the answer is SQL new function REGEXP_LIKE.&lt;br /&gt;&lt;br /&gt;[a-zA-Z] is to find from 'a' to 'z' and 'A' to 'Z'.&lt;br /&gt;&lt;br /&gt;remember that this only work in Oracle 10g and future release&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this article will help you&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;FZheng&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-3901552051646361281?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/3901552051646361281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=3901552051646361281' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/3901552051646361281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/3901552051646361281'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/02/how-to-find-characters-in-string.html' title='How to find characters in string?'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-5633157505028580032</id><published>2008-02-20T01:25:00.000-08:00</published><updated>2008-02-20T04:34:44.748-08:00</updated><title type='text'>How about if my current redolog is lost?</title><content type='html'>Some of people might be not aware of losing current redolog and some other might be thinking 'No, We won't be able to do recovery if current redolog is lost?.  So the question can we do or can't we do?&lt;br /&gt;&lt;br /&gt;Actually yes we can do recover and depends on your database is closed consistently or not. If your database is not closed consistently then you need to restore from backup and perform point in time recovery (you should run your database in archivelog mode) and there might be lost transaction. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here i did a testing that database is not closed consistently (i presumed i have lost everthing, i mean the box)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First restore from backup, here i used RMAN&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel ch_1 type disk;&lt;br /&gt;3&gt; restore controlfile to '/backup/restore/dbvdasm/control01.ctl';&lt;br /&gt;4&gt; set newname for datafile '/backup/restore/dbvd/sysaux01.dbf' to '/backup/restore/dbvdasm/sysaux01.dbf';&lt;br /&gt;5&gt; set newname for datafile '/backup/restore/dbvd/system01.dbf' to '/backup/restore/dbvdasm/system01.dbf';&lt;br /&gt;6&gt; set newname for datafile '/backup/restore/dbvd/test1.dbf' to '/backup/restore/dbvdasm/test1.dbf';&lt;br /&gt;7&gt; set newname for datafile '/backup/restore/dbvd/undotbs01.dbf' to '/backup/restore/dbvdasm/undotbs01.dbf';&lt;br /&gt;8&gt; set newname for datafile '/backup/restore/dbvd/users01.dbf' to '/backup/restore/dbvdasm/users01.dbf';&lt;br /&gt;9&gt; restore database;&lt;br /&gt;10&gt; set archivelog destination to '/backup/restore/dbvdasm/';&lt;br /&gt;11&gt; restore archivelog all;&lt;br /&gt;12&gt; release channel ch_1;&lt;br /&gt;13&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;allocated channel: ch_1&lt;br /&gt;channel ch_1: sid=142 devtype=DISK&lt;br /&gt;&lt;br /&gt;Starting restore at 20-FEB-08&lt;br /&gt;&lt;br /&gt;channel ch_1: starting datafile backupset restore&lt;br /&gt;channel ch_1: restoring control file&lt;br /&gt;output filename=/backup/restore/dbvdasm/control01.ctl&lt;br /&gt;channel ch_1: reading from backup piece /backup/restore/df_0mj96lbf_1_1.DBVD.bus&lt;br /&gt;channel ch_1: restored backup piece 1&lt;br /&gt;piece handle=/backup/restore/df_0mj96lbf_1_1.DBVD.bus tag=TAG20080220T145750&lt;br /&gt;channel ch_1: restore complete, elapsed time: 00:00:03&lt;br /&gt;Finished restore at 20-FEB-08&lt;br /&gt;&lt;br /&gt;executing command: SET NEWNAME&lt;br /&gt;&lt;br /&gt;executing command: SET NEWNAME&lt;br /&gt;&lt;br /&gt;executing command: SET NEWNAME&lt;br /&gt;&lt;br /&gt;executing command: SET NEWNAME&lt;br /&gt;&lt;br /&gt;executing command: SET NEWNAME&lt;br /&gt;&lt;br /&gt;Starting restore at 20-FEB-08&lt;br /&gt;&lt;br /&gt;channel ch_1: starting datafile backupset restore&lt;br /&gt;channel ch_1: specifying datafile(s) to restore from backup set&lt;br /&gt;restoring datafile 00001 to /backup/restore/dbvdasm/system01.dbf&lt;br /&gt;restoring datafile 00002 to /backup/restore/dbvdasm/undotbs01.dbf&lt;br /&gt;restoring datafile 00003 to /backup/restore/dbvdasm/sysaux01.dbf&lt;br /&gt;restoring datafile 00004 to /backup/restore/dbvdasm/users01.dbf&lt;br /&gt;restoring datafile 00005 to /backup/restore/dbvdasm/test1.dbf&lt;br /&gt;channel ch_1: reading from backup piece /backup/restore/df_0lj96lbe_1_1.DBVD.bus&lt;br /&gt;channel ch_1: restored backup piece 1&lt;br /&gt;piece handle=/backup/restore/df_0lj96lbe_1_1.DBVD.bus tag=TAG20080220T145750&lt;br /&gt;channel ch_1: restore complete, elapsed time: 00:00:08&lt;br /&gt;Finished restore at 20-FEB-08&lt;br /&gt;&lt;br /&gt;executing command: SET ARCHIVELOG DESTINATION&lt;br /&gt;&lt;br /&gt;Starting restore at 20-FEB-08&lt;br /&gt;&lt;br /&gt;channel ch_1: starting archive log restore to user-specified destination&lt;br /&gt;archive log destination=/backup/restore/dbvdasm/&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=10&lt;br /&gt;channel ch_1: starting archive log restore to user-specified destination&lt;br /&gt;archive log destination=/backup/restore/dbvdasm/&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=17&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=18&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=19&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=20&lt;br /&gt;channel ch_1: starting archive log restore to user-specified destination&lt;br /&gt;archive log destination=/backup/restore/dbvdasm/&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=11&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=12&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=13&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=14&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=15&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=16&lt;br /&gt;channel ch_1: starting archive log restore to user-specified destination&lt;br /&gt;archive log destination=/backup/restore/dbvdasm/&lt;br /&gt;channel ch_1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=21&lt;br /&gt;&lt;br /&gt;RMAN&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At this point we have a restored of controlfile, datafiles and archives but remember we still don't have redolog at this moment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvdasm&gt; ls -arlt&lt;br /&gt;total 1320552&lt;br /&gt;drwxr-xr-x   4 ora10g   dba            4096 Feb 20 14:57 ..&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_31_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba          287744 Feb 20 15:05 1_30_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_29_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_28_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_27_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            6144 Feb 20 15:05 1_26_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_25_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_24_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba         3950592 Feb 20 15:05 1_23_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba          391168 Feb 20 15:05 1_22_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_32_647005853.dbf&lt;br /&gt;drwxr-xr-x   2 ora10g   dba            4096 Feb 20 15:05 .&lt;br /&gt;-rw-r-----   1 ora10g   dba         5251072 Feb 20 15:12 users01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       209723392 Feb 20 15:12 undotbs01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba        10493952 Feb 20 15:12 test1.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       314580992 Feb 20 15:12 system01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       125837312 Feb 20 15:12 sysaux01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba         5488640 Feb 20 15:12 control01.ctl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now go to sqlplus and change the location of datafiles and redologs to new location&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/home/ora10g/10.2/dbs&gt; sqlplus '/ as sysdba'&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.2.0 - Production on Wed Feb 20 15:08:02 2008&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.&lt;br /&gt;&lt;br /&gt;Connected to an idle instance.&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; startup mount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  922746880 bytes&lt;br /&gt;Fixed Size                  2075568 bytes&lt;br /&gt;Variable Size             494928976 bytes&lt;br /&gt;Database Buffers          419430400 bytes&lt;br /&gt;Redo Buffers                6311936 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;SYS@dbvd&gt; alter database rename file '/backup/restore/dbvd/sysaux01.dbf' to '/backup/restore/dbvdasm/sysaux01.dbf';&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----------------------------------some more output here-----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next we need to recover the database&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; recover database using backup controlfile until cancel;&lt;br /&gt;ORA-00279: change 214846 generated at 02/20/2008 14:57:50 needed for thread 1&lt;br /&gt;ORA-00289: suggestion : /backup/restore/dbvdasm/1_32_647005853.dbf&lt;br /&gt;ORA-00280: change 214846 for thread 1 is in sequence #32&lt;br /&gt;&lt;br /&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;br /&gt;/backup/restore/dbvdasm/1_32_647005853.dbf&lt;br /&gt;ORA-00279: change 214850 generated at 02/20/2008 14:57:52 needed for thread 1&lt;br /&gt;ORA-00289: suggestion : /backup/restore/dbvdasm/1_33_647005853.dbf&lt;br /&gt;ORA-00280: change 214850 for thread 1 is in sequence #33&lt;br /&gt;ORA-00278: log file '/backup/restore/dbvdasm/1_32_647005853.dbf' no longer needed for this recovery&lt;br /&gt;&lt;br /&gt;Specify log: {&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;br /&gt;CANCEL&lt;br /&gt;Media recovery cancelled.&lt;br /&gt;SYS@dbvd&gt; alter database open resetlogs;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; select open_mode from v$database;&lt;br /&gt;&lt;br /&gt;OPEN_MODE&lt;br /&gt;----------&lt;br /&gt;READ WRITE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Last but not least don't forget to re-create temporary tablespace&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvdasm&gt; ls -arlt&lt;br /&gt;total 1525368&lt;br /&gt;drwxr-xr-x   4 ora10g   dba            4096 Feb 20 14:57 ..&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_31_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba          287744 Feb 20 15:05 1_30_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_29_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_28_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_27_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            6144 Feb 20 15:05 1_26_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_25_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            2048 Feb 20 15:05 1_24_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba         3950592 Feb 20 15:05 1_23_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba          391168 Feb 20 15:05 1_22_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba            1024 Feb 20 15:05 1_32_647005853.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba         5251072 Feb 20 15:13 users01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       209723392 Feb 20 15:13 undotbs01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba        10493952 Feb 20 15:13 test1.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       314580992 Feb 20 15:13 system01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       125837312 Feb 20 15:13 sysaux01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:13 redo01.log&lt;br /&gt;drwxr-xr-x   2 ora10g   dba            4096 Feb 20 15:13 .&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:13 redo02.log&lt;br /&gt;-rw-r-----   1 ora10g   dba         5488640 Feb 20 15:13 control01.ctl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But how about if we did shutdown database and suddendly current redolog is corrupt or lost? For this we do not need to perform restore from backup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; shutdown immediate;&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SYS@dbvd&gt; startup mount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  922746880 bytes&lt;br /&gt;Fixed Size                  2075568 bytes&lt;br /&gt;Variable Size             494928976 bytes&lt;br /&gt;Database Buffers          419430400 bytes&lt;br /&gt;Redo Buffers                6311936 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;SYS@dbvd&gt; select status, group#, members from v$log;&lt;br /&gt;&lt;br /&gt;STATUS               GROUP#    MEMBERS&lt;br /&gt;---------------- ---------- ----------&lt;br /&gt;CURRENT                   1          1&lt;br /&gt;INACTIVE                  3          1&lt;br /&gt;INACTIVE                  2          1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvd&gt; ls -a redo01*&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:38 redo01.log&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvd&gt; mv redo01.log ../&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvd&gt; ls -arlt&lt;br /&gt;total 1680960&lt;br /&gt;drwxr-xr-x   6 ora10g   dba             256 Feb 18 11:46 dump&lt;br /&gt;-rw-r-----   1 ora10g   dba        20979712 Feb 18 12:00 temp01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 18 12:34 redo03.log&lt;br /&gt;-rw-r--r--   1 ora10g   dba             723 Feb 20 09:29 sqlnet.log&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:37 redo02.log&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:37 redo_03.log&lt;br /&gt;drwxr-xr-x   2 ora10g   dba            4096 Feb 20 15:37 arc&lt;br /&gt;-rw-r-----   1 ora10g   dba         5251072 Feb 20 15:38 users01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       209723392 Feb 20 15:38 undotbs01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba        10493952 Feb 20 15:38 test1.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       314580992 Feb 20 15:38 system01.dbf&lt;br /&gt;-rw-r-----   1 ora10g   dba       125837312 Feb 20 15:38 sysaux01.dbf&lt;br /&gt;drwxr-xr-x   4 ora10g   dba            4096 Feb 20 15:39 ..&lt;br /&gt;drwxr-xr-x   4 ora10g   dba            4096 Feb 20 15:39 .&lt;br /&gt;-rw-r-----   1 ora10g   dba         5488640 Feb 20 15:39 control03.ctl&lt;br /&gt;-rw-r-----   1 ora10g   dba         5488640 Feb 20 15:39 control02.ctl&lt;br /&gt;-rw-r-----   1 ora10g   dba         5488640 Feb 20 15:39 control01.ctl&lt;br /&gt;&lt;br /&gt;As we can see our redo01.log is gone&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; recover database;&lt;br /&gt;ORA-00283: recovery session canceled due to errors&lt;br /&gt;ORA-00264: no recovery required&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oppss we need to perform point in time recovery&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; recover database until cancel;&lt;br /&gt;Media recovery complete.&lt;br /&gt;SYS@dbvd&gt; alter database open resetlogs;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SYS@dbvd&gt; select status, group#, members from v$log;&lt;br /&gt;&lt;br /&gt;STATUS               GROUP#    MEMBERS&lt;br /&gt;---------------- ---------- ----------&lt;br /&gt;CURRENT                   1          1&lt;br /&gt;UNUSED                    2          1&lt;br /&gt;UNUSED                    3          1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ora10g@bahamut:/backup/restore/dbvd&gt; ls -a redo01*&lt;br /&gt;-rw-r-----   1 ora10g   dba        52429312 Feb 20 15:40 redo01.log&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Yes, Thanks GOD our database are back now and we can see the redologs are back too.  Moral of the story, always make sure you have a valid and good backup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have a nice day&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;FZheng&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-5633157505028580032?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/5633157505028580032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=5633157505028580032' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5633157505028580032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/5633157505028580032'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/02/how-about-if-my-current-redolog-is-lost.html' title='How about if my current redolog is lost?'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6358172729910540781.post-6693022953688279303</id><published>2008-02-15T00:14:00.000-08:00</published><updated>2008-02-15T00:23:59.957-08:00</updated><title type='text'>Rank Row</title><content type='html'>One of the developer came to me yesterday. she was asking "I have some duplicate rows in col1 but not in col2 how can i just want to display the first row?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the sample table so you can imagine it&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;me@d012band&gt; select cust_no, name1 from vd.t2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;CUST_NO          NAME1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;---------------- --------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900000377 ABC 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900000377 ABC 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900000377 ABC 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059 DEF 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059 DEF 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059 DEF 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059 BEA 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900003125 WER 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900003125 WER 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900003125 WER 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900004777 AFG 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900004777 AFG 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900004777 AFG 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;13 rows selected.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the output that she wanted to is something like this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;CUST_NO            NAME1   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;----------------   --------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900000377   ABC 1   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059   DEF 1  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900003125   WER 1  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900004777   AFG 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, what i did is run this query and bingo we got the answer she wanted to&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;me@d012band&gt; select cust_no, name1 from&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;2  (select cust_no, name1,rank() over (partition by cust_no order by rowid) rank_n  from vd.t2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;3  where rank_n = 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;CUST_NO          NAME1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;---------------- --------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900000377 ABC 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900001059 DEF 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900003125 WER 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;0000000900004777 AFG 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I used rank() function to rank every row, thanks to Oracle that build this kind function so that can make our query easier&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have a nice day&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FZheng&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6358172729910540781-6693022953688279303?l=fiedizheng.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fiedizheng.blogspot.com/feeds/6693022953688279303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6358172729910540781&amp;postID=6693022953688279303' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/6693022953688279303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6358172729910540781/posts/default/6693022953688279303'/><link rel='alternate' type='text/html' href='http://fiedizheng.blogspot.com/2008/02/rank-row.html' title='Rank Row'/><author><name>Fiedi Zheng</name><uri>http://www.blogger.com/profile/02311754433206304273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
