<?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-5769992150345190764</id><updated>2012-02-07T11:14:21.049+02:00</updated><category term='Gateway'/><category term='EXPIRED(GRACE)'/><category term='Performance'/><category term='RMAN-06755'/><category term='Data Guard'/><category term='enq: UL – contention'/><category term='Troubleshooting'/><category term='OCM'/><category term='SQL Loader'/><category term='Oracle Text'/><category term='Presentation'/><category term='ACCOUNT_STATUS'/><category term='RMAN'/><category term='AWR'/><category term='RMAN-06094'/><category term='Streams'/><category term='ASM'/><category term='Administration'/><title type='text'>Thinus Meyer's DBA adventures</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-3824028058827982547</id><published>2012-01-26T14:58:00.003+02:00</published><updated>2012-01-26T14:59:35.094+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMAN-06094'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN-06755'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><title type='text'>Resolving Gaps in Data Guard Apply Using Incremental RMAN Backup</title><content type='html'>&lt;span style="font-family: inherit;"&gt;I found quite a few blog entries on the web and off course the Oracle Documentation also helped. The reason I want to create a post is that I encountered 2 problems that I first had to overcome before the Physical Standby was in sync again. A sort overview of the problem and the steps to overcome them are:&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="text-indent: -18pt;"&gt;On the standby get the current scn which will be used in your RMAN backup script as a starting point.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="text-indent: -18pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt;select current_scn FROM V$DATABASE;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURRENT_SCN&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;----------------&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;11133157117269&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="text-indent: -18pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="text-indent: -18pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman'; text-indent: -18pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="text-indent: -18pt;"&gt;On the primary run the RMAN script with the supplied current_scn number from the standby&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: -24px;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;run {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;allocate channel c1 type disk format '/dump/abcprd/%U.rmb';&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;backup as compressed backupset skip readonlyincremental from scn 11133157117269 database;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: inherit;"&gt;And this is were I got my first unexpected problem. The RMAN backup gave the following warning message:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;RMAN-06755: WARNING: datafile 408: incremental-start SCN is too recent;using checkpoint SCN 9733080640801 instead&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;File 408 is a Read Only Tablespace with a much older scn number.&amp;nbsp;&lt;/span&gt;V$SESSION_LONGOPS&lt;span style="font-family: inherit;"&gt;&amp;nbsp;showed that the backup will take longer than 24 hours to complete, so I&amp;nbsp;immediately&amp;nbsp;stopped it and reset the Read Only Tablespace's scn number with the aim that it will shorten the duration of the RMAN backup.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; alter tablespace SA_ORD_RO read write ;&lt;br /&gt;SQL&amp;gt; alter tablespace SA_ORD_RO read only ;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;I restarted the RMAN backup, it did not give the warning again, but still took 16 hours to complete. All files created by the backup were copied to the standby server. I also created a new standby controlfile:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; backup current controlfile for standby format'/usr/users/oracle/ForStandbyCTRL.bck';&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;On the standby server I cataloged and then restored the controlfile&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; catalog start with '&lt;span style="line-height: 14px;"&gt;/dump/backup/&lt;/span&gt;';&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; restorestandby controlfile from '/dump/backup/ForStandbyCTRL.bck';&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;And the recover script:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; catalog start with '&amp;nbsp;&lt;span style="line-height: 14px;"&gt;/dump/abcprd/&lt;/span&gt;';&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; recover database noredo;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;But the Incremental backup failed almost&amp;nbsp;immediately&amp;nbsp;with the error&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;RMAN-06094: datafile 569 must be restored&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="background-color: white;"&gt;It turns out that datafile 569 was created on the primary after the gap occured, but before the rman incremental was run. So the controlfile was aware of the datafile, but the file was not on the standby server.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white;"&gt;I also need to do a datafile backup for the newly created datafile. So b&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; font-family: inherit;"&gt;ack to Primary:&lt;/span&gt;&lt;/div&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; backup datafile 569;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-family: inherit;"&gt;scp the file to the standby server and restore it on the standby server:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; restore datafile 569;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;This time I could start the &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;RMAN&amp;gt; recover database noredo;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; again and it completed successfully.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-3824028058827982547?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/3824028058827982547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=3824028058827982547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/3824028058827982547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/3824028058827982547'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2012/01/resolving-gaps-in-data-guard-apply.html' title='Resolving Gaps in Data Guard Apply Using Incremental RMAN Backup'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-5998887260610260838</id><published>2012-01-26T14:18:00.003+02:00</published><updated>2012-01-26T14:22:21.841+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gateway'/><title type='text'>DB link from Oracle to SQL Server</title><content type='html'>&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;Wehad a need for a DB link from an Oracle database to a SQL Server database. I initially feared that this might be a huge task, but it turned out to be quite a easy setup. Thanks Oracle for making it almost&amp;nbsp;&lt;/span&gt;seamless&lt;span style="font-family: inherit;"&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;There are basically 4 steps involved&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;1.) I&lt;/span&gt;&lt;span style="font-family: inherit; text-indent: -18pt;"&gt;nstall &amp;amp; configure the Gateway&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;The Oracle Gateway can be found in theOracle Database 11g Release 2 Enterprise Edition software. Installation isstraight forward. You basically have to make 2 choices during installation. What Gateway you want to install(SQL Server in our case) and which ORACLE_HOME you want to use. You can createa separate Gateway home or just use the current ORACLE_HOME, which is what we did.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;After installation you will find a newdirectory in ORACLE_HOME called dg4msql.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;Configure the Gateway by creating a agentinit.ora file in $ORACLE_HOME/dg4msql/admin. The name of the file is important, as the name you use will be used in your listener as well.We kept it to the default initdg4msql.ora. The information you need to supplyin the agent init.ora file are SQL Server Database Server Host Name, SQL ServerDatabase Server Port number and SQL Server Database. The information all goes into one parameter called HS_FDS_CONNECT_INFO.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;Ex:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;# This is a customized agent init filethat contains the HS parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;# that are needed for the DatabaseGateway for Microsoft SQL Server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;# HS init parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;# HS_FDS_CONNECT_INFO=[server_name]:port//mssql_db&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;HS_FDS_CONNECT_INFO=[ABC02.company.co.za]:1433//MSCIM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;# alternate connect format ishostname/serverinstance/databasename&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;HS_FDS_TRACE_LEVEL=OFF&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;HS_FDS_RECOVERY_ACCOUNT=RECOVER&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;HS_FDS_RECOVERY_PWD=RECOVER&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0px;"&gt;&lt;span style="font-family: inherit; text-indent: -18pt;"&gt;&lt;b&gt;&lt;u&gt;2.) Listener &amp;amp; names lookup&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;We usedport 1524 to setup the gateway&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;LISTENER =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(ADDRESS = (PROTOCOL = tcp)(HOST = abc01.company.co.za)(PORT = 1521))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1524))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;SID_LIST_LISTENER =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;(SID_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(SID_DESC =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(SID_NAME = dg4msql)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(ORACLE_HOME = /opt/apps/oracle/product/11.2.0/dbhome_1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(PROGRAM = dg4msql)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;)&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;And Local Naming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;MSCIM =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;(DESCRIPTION =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(ADDRESS = (PROTOCOL = tcp)(HOST = localhost)(PORT = 1524))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(CONNECT_DATA =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(SID = dg4msql)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(HS = OK)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;)&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;HS=OK - indicates this connectdescriptor is using heterogeneous Service.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit; text-indent: -18pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit; text-indent: -18pt;"&gt;&lt;b&gt;&lt;u&gt;3.) DatabaseLink&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;Once the SQL Server team gave us ausername and password we could just create a DB link&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;CREATE PUBLIC DATABASE LINK MSCIM_DBLINK CONNECT TO 'mssql_username' IDENTIFIED BY 'mssql_password' USING 'MSCIM'&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit; text-indent: -18pt;"&gt;&lt;b&gt;&lt;u&gt;4.) Datadictionary translation support&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: inherit;"&gt;Oracle has also supplied a script in$ORACLE_HOME/ dg4msql/admin/&amp;nbsp;called&amp;nbsp;dg4msql_cvw.sql that must be run on the SQLServer side. The script creates views on SQL Server for usage by the Oracle DataDictionary.&amp;nbsp;4 viewscalled ALL_IND_COLUMNS, USER_IND_COLUMNS, ALL_CONS_COLUMNS, and USER_CONS_COLUMNSwill be created on the SQL Server db making it easier for someone familiar withOracle Data Dictionary views to query the SQL Server database.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;_uacct = "UA-4929679-1";urchinTracker();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-5998887260610260838?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/5998887260610260838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=5998887260610260838' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5998887260610260838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5998887260610260838'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2012/01/db-link-from-oracle-to-sql-server.html' title='DB link from Oracle to SQL Server'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-6285733686794410746</id><published>2011-09-16T14:15:00.000+02:00</published><updated>2011-09-16T14:15:16.819+02:00</updated><title type='text'>Background Managed Standby Recovery process not detected</title><content type='html'>&lt;div class="MsoNormal"&gt;We have had 2 instances where the dg broker did not start MAnaged Standby Recovery of the physical standby database. The first time was after aswitchover and the next time was after hardware maintenance. The physical standby came up successfullyand the dg broker started up, but Managed Standby Recovery never started. On both occasions Inoticed these entries in the alert.log file:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Mon Sep 1214:03:32 2011&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Starting DataGuard Broker (DMON)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;OCISessionBeginwith PasswordVerifier succeeded&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ALTER SYSTEMSET ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ALTER SYSTEMSET ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ALTER SYSTEMSET ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ALTER DATABASERECOVER MANAGED STANDBY DATABASE&lt;span&gt;&amp;nbsp; &lt;/span&gt;THROUGHALL SWITCHOVER DISCONNECT&lt;span&gt;&amp;nbsp; &lt;/span&gt;USING CURRENTLOGFILE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Mon Sep 1214:08:06 2011&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Background MRP initialization phase wait timeout &amp;nbsp; **&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Background Managed Standby Recovery process notdetected &amp;nbsp;**&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Completed:ALTER DATABASE RECOVER MANAGED STANDBY DATABASE&lt;span&gt;&amp;nbsp;&lt;/span&gt;THROUGH ALL SWITCHOVER DISCONNECT&lt;span&gt;&amp;nbsp;&lt;/span&gt;USING CURRENT LOGFILE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I bounced the database a few times but the same errorpersisted. The only way I could solve this was to “kick start” the recovery by manuallyrecovering a few archivelogs:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;SQL&amp;gt;ALTERDATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROMSESSION;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ALTER DATABASERECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ERROR at line1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-01153: anincompatible media recovery is active&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;But&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;SQL&amp;gt;ALTERDATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;onlyhangs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;shutdownimmediate also only hangs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;shutdownabort did it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;SQL&amp;gt; startupmount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;Start manual recovery before the DG Broker starts Managed Standby Recovery&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;SQL&amp;gt; RECOVERstandby DATABASE&lt;span&gt;&amp;nbsp; &lt;/span&gt;UNTIL CANCEL; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00279:change 10662691458828 generated at 09/13/2011 01:18:04 needed for thread 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00289:suggestion : +PCASDGF/abcprd/archivelog/2011_09_13/thread_1_seq_82723.528.742958295&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00280:change 10662691458828 for thread 1 is in sequence #82723&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Specify log:{&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;o:p&gt;&lt;/o:p&gt;&lt;/ret&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00279:change 10662691458829 generated at 09/13/2011 01:18:13 needed for thread 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00289:suggestion : +PCASDGF/abcprd/archivelog/2011_09_13/thread_1_seq_82724.2112.742961677&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00280:change 10662691458829 for thread 1 is in sequence #82724&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00278: logfile '+PCASDGF/abcprd/archivelog/2011_09_13/thread_1_seq_82723.528.742958295'no longer needed for this recovery&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Specify log:{&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;o:p&gt;&lt;/o:p&gt;&lt;/ret&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;Hitenter, to manually recover a few logs and then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00279:change 10663204118583 generated at 09/13/2011 07:00:27 needed for thread 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00289:suggestion : +PCASDGF/abcprd/archivelog/2011_09_13/thread_1_seq_82745.2365.742980297&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00280:change 10663204118583 for thread 1 is in sequence #82745&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;ORA-00278: logfile '+PCASDGF/abcprd/archivelog/2011_09_13/thread_1_seq_82744.2938.742978831'no longer needed for this recovery&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Specify log:{&lt;ret&gt;=suggested | filename | AUTO | CANCEL}&lt;o:p&gt;&lt;/o:p&gt;&lt;/ret&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;CANCEL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Media recoverycancelled.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;SQL&amp;gt;ALTERDATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVERDISCONNECT&lt;span&gt;&amp;nbsp; &lt;/span&gt;USING CURRENT LOGFILE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;Databasealtered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span&gt;Justto be sure I did another bounce a few minutes later and this time the DG Brokerdid everything it was supposed to and Managed Standby Recovery was started automatically.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;_uacct = "UA-4929679-1";urchinTracker();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-6285733686794410746?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/6285733686794410746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=6285733686794410746' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6285733686794410746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6285733686794410746'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2011/09/background-managed-standby-recovery.html' title='Background Managed Standby Recovery process not detected'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-3333257620036179521</id><published>2011-09-16T11:16:00.003+02:00</published><updated>2011-09-16T11:18:10.887+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><title type='text'>Logon to Active Data Guard fails with ORA-16000</title><content type='html'>&lt;div class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3;"&gt;We have a reporting user used by executives for real timereporting on one of our OLTP databases. Some of the queries were gettingresource intensive so we decided to move those queries to our Active Data Guardinstance.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;But then the reports started failing with &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORA-00604: error occurred at recursive SQL level 1&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORA-16000: database open for read-only access&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;on database logon.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I found an old bug in MOS that pointed me in the rightdirection. After a failed login on Production, the same userid will get thiserror on the Active Data Guard instance, until the “logon counter” gets resetby a successful logon on production.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;On Active Data Guard:&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL &amp;gt;select * from v$version;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;BANNER&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bitProduction&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; select OPEN_MODE, DATABASE_ROLE from v$database;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;OPEN_MODE&lt;span&gt;&amp;nbsp; &lt;/span&gt;DATABASE_ROLE&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;---------- ----------------&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;READ ONLY&lt;span&gt;&amp;nbsp; &lt;/span&gt;PHYSICAL STANDBY&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; conn infoweb/correctpwd&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Connected.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;On Production:&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL &amp;gt;select * from v$version;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;BANNER&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bitProduction&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SYS@casprd&amp;gt;select OPEN_MODE, DATABASE_ROLE from v$database;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;OPEN_MODE&lt;span&gt;&amp;nbsp; &lt;/span&gt;DATABASE_ROLE&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;---------- ----------------&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;READ WRITE PRIMARY&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;now login as infoweb with a wrong password on Production:&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt;connect infoweb/wrongpwd&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ERROR:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORA-01017: invalid username/password; logon denied&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Warning: You are no longer connected to ORACLE.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Back to Active Data Guard, logon as infoweb with the correctpassword:&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; conn infoweb/correctpwd&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ERROR:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORA-00604: error occurred at recursive SQL level 1&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ORA-16000: database open for read-only access&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Warning: You are no longer connected to ORACLE.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Back to Production, logon as infoweb with the correct password to reset the logon counter:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; conn infoweb/correctpwd&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Connected.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Back to Active Data Guard, logon as infoweb with the correctpassword:&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SQL&amp;gt; conn infoweb/correctpwd&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Connected.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This is similar to a 10.2.0.4 bug, Bug 5847453&lt;span&gt;&amp;nbsp; &lt;/span&gt;Failed logon counter with read only DB throwsORA-16000 on failed logon [ID 5847453.8]. The note states that the issue wasfixed in 10.2.0.5 and 11.1.0.6.&lt;/div&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;_uacct = "UA-4929679-1";urchinTracker();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-3333257620036179521?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/3333257620036179521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=3333257620036179521' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/3333257620036179521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/3333257620036179521'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2011/09/logon-to-active-data-guard-fails-with.html' title='Logon to Active Data Guard fails with ORA-16000'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-198725333526423144</id><published>2011-03-08T15:48:00.003+02:00</published><updated>2011-03-09T08:47:24.343+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ACCOUNT_STATUS'/><category scheme='http://www.blogger.com/atom/ns#' term='EXPIRED(GRACE)'/><title type='text'>ACCOUNT_STATUS = EXPIRED(GRACE)</title><content type='html'>&lt;p class="MsoNormal"&gt;Users are identified within the app, so all DB connections are done through 1 schema. We created a profile for this schema where the password will never expire. App support has a manual process to change the password every 60 days, but Oracle must never be allowed to expire the password automatically.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The problem is that I found the ACCOUNT_STATUS for the main schema to be EXPIRED(GRACE) and that the EXPIRY_DATE is 3 days away.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;This schemas profile was changed by accident, and rectified within a few hours. But the damage was done the ACCOUNT_STATUS still showed EXPIRED(GRACE).&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I found an excellent blog post by Robert Geier (&lt;a href="http://blog.contractoracle.com/2009/11/analysis-of-oracle-password-expiry.html"&gt;http://blog.contractoracle.com/2009/11/analysis-of-oracle-password-expiry.html&lt;/a&gt;) to explain the situation. Here’s a abbreviation of his explanation: &lt;span class="apple-style-span"&gt;&lt;span style="font-size:8.0pt;line-height:115%; font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#29303B"&gt;password expiry is controlled by the PASSWORD_LIFE_TIME profile limit, is activated at login, &lt;b style="mso-bidi-font-weight:normal"&gt;and is reset by a password change. Changing the profile will not change aud$.ASTATUS&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; select USERNAME, PROFILE, ACCOUNT_STATUS from dba_users where username = ‘QWERTY’; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;USERNAME&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/span&gt;PROFILE&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/span&gt;ACCOUNT_STATUS&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px; line-height: 14px; "&gt;------------------ ------------------ --------------------------------&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;QWERTY&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;/span&gt;QWERTY_NONEXPIRY&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;EXPIRED(GRACE)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So even though the profile was changed back to QWERTY_NONEXPIRY the ACCOUNT_STATUS was still EXPIRED(GRACE). The only way to reset the ACCOUNT_STATUS back to OPEN is to change the password, because only a password change will reset aud$.ASTATUS. But a password change will give a ORA-28007 because of the current profile limits for PASSWORD_REUSE_MAX and PASSWORD_REUSE_TIME gets violated.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; select password from sys.user$ where name='QWERTY';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;PASSWORD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;-----------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;87FE2DD49B2882B2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; alter user QWERTY identified by values '87FE2DD49B2882B2';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;alter user QWERTY identified by values '87FE2DD49B2882B2'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;ERROR at line 1:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;ORA-28007: the password cannot be reused&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So I had to create a new temporary profile with the required settings to allow me to change the password to be the same as the current password:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; create profile tmtmp limit PASSWORD_REUSE_MAX UNLIMITED PASSWORD_REUSE_TIME UNLIMITED;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; alter user QWERTY profile tmtmp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; alter user QWERTY identified by values '87FE2DD49B2882B2';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;User altered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; alter user QWERTY profile QWERTY_NONEXPIRY;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family: &amp;quot;Courier New&amp;quot;"&gt;SQL&gt; select USERNAME, PROFILE, ACCOUNT_STATUS from dba_users where username = 'QWERTY';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;USERNAME&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/span&gt;PROFILE&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/span&gt;ACCOUNT_STATUS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;------------------ ------------------ --------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"&gt;&lt;span style="font-size:10.0pt;line-height:115%;font-family:&amp;quot;Courier New&amp;quot;"&gt;QWERTY&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;/span&gt;QWERTY_NONEXPIRY&lt;span style="mso-spacerun:yes"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;OPEN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;_uacct = "UA-4929679-1";urchinTracker();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-198725333526423144?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/198725333526423144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=198725333526423144' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/198725333526423144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/198725333526423144'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2011/03/accountstatus-expiredgrace.html' title='ACCOUNT_STATUS = EXPIRED(GRACE)'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-5625130183562039229</id><published>2010-06-22T15:23:00.004+02:00</published><updated>2011-09-16T11:20:29.333+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><title type='text'>Manually Add Datafile</title><content type='html'>&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;I have a database that runs on RAW devices.  Whenever I add a datafile to a tablespace, out UNIX Sys Admins must first create the RAW device on the Primary &amp;amp; Standby Server. The other day they created the RAW device on the standby server but forgot to change the ownership of the RAW device to oracle:dba.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;The datafile was successfully added to the primary database, but I found the following error in the alert.log of the standby:&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;File #323 added to control file as 'UNNAMED00323'.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Originally created as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;'/dev/vx/rdsk/oradg1/casprd_SA_I_CMD10'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Recovery was unable to create the file as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;'/dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD10'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;MRP0: Background Media Recovery terminated with error 1119&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Mon Mar  9 23:41:44 2010&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Errors in file /opt/apps/oracle/admin/caspp/bdump/caspp_mrp0_15261.trc:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;ORA-01119: error in creating database file '/dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD10'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;ORA-27040: file create error, unable to create file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;HPUX-ia64 Error: 13: Permission denied&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Managed Standby Recovery not using Real Time Apply&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Some recovered datafiles maybe left media fuzzy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Media recovery may continue but open resetlogs may fail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Mon Mar  9 23:41:45 2010&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Errors in file /opt/apps/oracle/admin/caspp/bdump/caspp_mrp0_15261.trc:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;ORA-01119: error in creating database file '/dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD10'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;ORA-27040: file create error, unable to create file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;HPUX-ia64 Error: 13: Permission denied&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;I can only qquery some v$ views when a standby database is mounted. So to fix the problem I did the following:&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;On production get the relevant details&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;select ts# from v$tablespace where name = 'SA_I_CMD';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;       TS#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt; col name for a80;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt; select FILE#, NAME, bytes/1024/1024 MB from v$datafile where ts#=17;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;     FILE# NAME                                                  MB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;---------- ----------------------------------------------------- ----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        34 /dev/vx/rdsk/oradg/casprd_SA_I_CMD03                       32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        35 /dev/vx/rdsk/oradg/casprd_SA_I_CMD                         31144&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        36 /dev/vx/rdsk/oradg/casprd_SA_I_CMD02                       30712&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        37 /dev/vx/rdsk/oradg/casprd_SA_I_CMD01                       32360&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        38 /dev/vx/rdsk/oradg/casprd_SA_I_CMD04                       32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;        39 /dev/vx/rdsk/oradg/casprd_SA_I_CMD05                       30000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;       201 /dev/vx/rdsk/oradg/casprd_SA_I_CMD06                       20000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;       266 /dev/vx/rdsk/oradg1/casprd_SA_I_CMD07                      32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;       307 /dev/vx/rdsk/oradg1/casprd_SA_I_CMD08                      32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;       311 /dev/vx/rdsk/oradg1/casprd_SA_I_CMD09                      32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       323 /dev/vx/rdsk/oradg1/casprd_SA_I_CMD10                      32500&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;Lets look at the same query on the standby side&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt; col name for a80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt; select FILE#, NAME, bytes/1024/1024 MB from v$datafile where ts#=17;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;     &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FILE# NAME&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;                                                                                  &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;MB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;---------- ----------------------------------------------- ----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;34 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD03&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;35 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;31144&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;36 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD02&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;30712&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;37 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD01&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32360&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;38 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD04&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;39 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD05&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;30000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;201 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD06&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;            &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;20000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;266 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD07&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;            &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;307 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD08&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;            &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;311 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD09&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;            &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;323 /opt/apps/oracle/product/10.2.0.4.0/dbs/UNNAMED00323 0&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;After the UNIX admin corrected the file permissions of the RAW device I had to manually add it as a datafile to the standby database.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;alter system set STANDBY_FILE_MANAGEMENT=MANUAL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;System altered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;ALTER DATABASE CREATE DATAFILE ‘/opt/apps/oracle/product/10.2.0.4.0/dbs/UNNAMED00323' as '/dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD10';&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Database altered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;select FILE#, NAME, bytes/1024/1024 MB from v$datafile where ts#=17;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;     &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FILE# NAME &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;                                              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;MB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;---------- ----------------------------------------------------- ----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;34 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD03&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;35 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;                 &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;31144&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;36 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD02&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;30712&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;37 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD01 &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32360&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;38 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD04&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;        &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;39 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD05&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;30000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;201 /dev/vx/rdsk/oradg_dg/casprd_SA_I_CMD06&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;               &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;20000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;266 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD07&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;307 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD08&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;311 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD09&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;       &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;323 /dev/vx/rdsk/oradg1_dg/casprd_SA_I_CMD10&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;              &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;11 rows selected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;alter system set STANDBY_FILE_MANAGEMENT=AUTO;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;System altered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;SQL&amp;gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;o:p&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;Database altered.&lt;/span&gt;&lt;/div&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;_uacct = "UA-4929679-1";urchinTracker();&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-5625130183562039229?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/5625130183562039229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=5625130183562039229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5625130183562039229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5625130183562039229'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2010/06/manually-add-datafile.html' title='Manually Add Datafile'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-7569929411007423957</id><published>2010-05-07T14:00:00.004+02:00</published><updated>2010-05-07T14:25:05.702+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><title type='text'>Bug when creating a physical standby database in 11G</title><content type='html'>Creating a physical standby database in 11G became a whole lot easier with just one RMAN command – unless you run into a bug :-)&lt;br /&gt;&lt;br /&gt;My primary DB runs on Oracle Managed Files on ASM. My physical standby will also run on Oracle Managed Files on ASM on another server, &lt;strong&gt;but the ASM diskgroups are not the same&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I used Arub Nanda’s great article &lt;a href="http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/index.html"&gt;Oracle Database 11g: The Top New Features for DBAs and Developers&lt;/a&gt; as a guide. The Data Guard article is number 15 in the series and well worth a read if you want to get up and running quickly.&lt;br /&gt;The RMAN script I used:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;run {&lt;br /&gt;allocate channel c1 type disk;&lt;br /&gt;allocate auxiliary channel s1 type disk;&lt;br /&gt;&lt;br /&gt;SET NEWNAME FOR DATAFILE 1 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 2 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 3 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 4 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 5 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 6 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 7 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 8 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 9 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 10 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 11 TO NEW;&lt;br /&gt;SET NEWNAME FOR DATAFILE 12 TO NEW;&lt;br /&gt;SET NEWNAME FOR TEMPFILE 1 TO NEW;&lt;br /&gt;&lt;br /&gt;duplicate target database&lt;br /&gt;  for standby&lt;br /&gt;  from active database&lt;br /&gt;  dorecover&lt;br /&gt;  spfile&lt;br /&gt;    parameter_value_convert 'adevc','adevt'&lt;br /&gt;    set db_unique_name='adevt'&lt;br /&gt;    set control_files='/opt/apps/oracle/product/11.1.0.7.0/dbs/control01.ctl'&lt;br /&gt;    set fal_client='adevt'&lt;br /&gt;    set fal_server='adevc'&lt;br /&gt;    set standby_file_management='AUTO'&lt;br /&gt;    set log_archive_config='dg_config=(adevc,adevt)'&lt;br /&gt;    set log_archive_dest_1='location="/dump/oracle/adevt_archivelogs", valid_for=(ONLINE_LOGFILE,ALL_ROLES)'&lt;br /&gt;    set log_archive_dest_2='service=adevc LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=casdev'&lt;br /&gt;    set log_archive_dest_state_2='enable'&lt;br /&gt;    set db_create_file_dest='+TADG1'&lt;br /&gt;    set db_create_online_log_dest_1='+TADG1'&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;sql channel c1 'alter system archive log current';&lt;br /&gt;sql channel s1 'alter database recover managed standby database using current logfile disconnect';&lt;br /&gt;}&lt;br /&gt;The error found in the RMAN logfile:&lt;br /&gt;channel c1: starting datafile copy&lt;br /&gt;input datafile file number=00023 name=+CADG1/adevc/datafile/all_ts.408.688130429&lt;br /&gt;RMAN-03009: failure of backup command on c1 channel at 04/30/2010 14:54:55&lt;br /&gt;ORA-19504: failed to create file "+TADG1"&lt;br /&gt;channel c1 disabled, job failed on it will be run on another channel&lt;br /&gt;released channel: c1&lt;br /&gt;released channel: s1&lt;br /&gt;RMAN-00571: ===========================================================&lt;br /&gt;RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============&lt;br /&gt;RMAN-00571: ===========================================================&lt;br /&gt;RMAN-03002: failure of Duplicate Db command at 04/30/2010 14:54:55&lt;br /&gt;RMAN-03015: error occurred in stored script Memory Script&lt;br /&gt;&lt;br /&gt;RMAN-03009: failure of backup command on c1 channel at 04/30/2010 14:54:55&lt;br /&gt;ORA-19504: failed to create file "+TADG1"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I found the root cause of the problem on metalink - Standby DATAFILE Creation Failing with RAC / ASM / OMF [ID 787753.1] It turns out to be Bug:7462589. The workaround for the Bug is that the ASM diskgroups on the standby must also be on the primary. The note states that this will be fixed in 11GR2. So my workaround was to create a temporary ASM diskgroup called TADG1 (with only 1 disk) on the primary database server. After that the restore completed successfully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-7569929411007423957?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/7569929411007423957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=7569929411007423957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/7569929411007423957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/7569929411007423957'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2010/05/creating-physical-standby-database-in.html' title='Bug when creating a physical standby database in 11G'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-4289012970046344732</id><published>2010-04-20T14:56:00.004+02:00</published><updated>2010-04-30T10:00:19.391+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Long wait times for cursor: pin S and latch: library cache</title><content type='html'>On our OLTP db we sometimes experienced short bursts (5-15 seconds) of CPU starvation and waits for cursor: pin S or latch: library cache. Especially during busy times. CPU utilization is normally 65% so we were confident that the waits also cause the CPU starvation and not vice versa. In the past few months we have logged multiple SRs with Oracle for the issue but only made progress with 1 where bug Bug 6904068 - High CPU usage when there are "cursor: pin S" waits [ID 6904068.8] was identified. The problem with the other SRs was a case of wrong scope definition. Even though I would upload all the relevant information (ASH, AWR and OS Watcher stats) Oracle Support would look at the top wait in AWR (“db file sequenctial read”) and suggest that we solve that by doing some query tuning and hopefully the mutex/latch problem will also disappear. Even when I convinced them that the problem is not “db file sequential read” they would ask me to take 3x system state dumps when the problem appears. That was an impossible task as the first sytem state dump would kick in when the problem is already occurring, so we could never give support the info they claimed they needed to diagnose the problem.&lt;br /&gt;&lt;br /&gt;We were in the fortunate position to ask &lt;a href="http://blog.tanelpoder.com/2010/04/21/cursor-pin-s-waits-sporadic-cpu-spikes-and-systematic-troubleshooting/" &gt;Tanel Poder&lt;/a&gt; to have a look. He also posted some info about the problem and how he systematically solved it. And with the same info I always give to Oracle support, he could correctly identify the problem in a couple of minutes! Most amazing is that the solution is available in the Oracle Documentation. &lt;span style="font-family:courier new;"&gt;10g Release 2 (10.2) for UNIX-Based Operating Systems. B15658-02. Appendix B Administering Oracle Database on HP-UX. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What the documentation says:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;On HP-UX, most processes use a time-sharing scheduling policy. Time sharing can have detrimental effects on Oracle performance by descheduling an Oracle process during critical operations, for example, when it is holding a latch. HP-UX has a modified scheduling policy, referred to as SCHED_NOAGE, that specifically addresses this issue. Unlike the normal time-sharing policy, a process scheduled using SCHED_NOAGE does not increase or decrease in priority, nor is it preempted.&lt;br /&gt;This feature is suited to online transaction processing environments because online transaction processing environments can cause competition for critical resources. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So the OS scheduler may deschedule a Oracle process while it is holding a mutex/latch because the OS is not aware of what is going on inside Oracle. Now other processes which happen to use that cursor will fail to get the mutex and start spinning. If the mutex holder process has a lower priority than all the other processes who yielded CPU, then it may not get onto CPU soon enough, so it still holds that mutex and the other processes spin and use CPU trying to get that mutex.&lt;br /&gt;&lt;br /&gt;How Tanel proved it:&lt;br /&gt;Below are queries from v$event_histogram for the top 2 problem waits. Notice the number of histogram buckets where the wait time is &gt; 512ms:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;EVENT_NAME WAIT_TIME_MILLI WAIT_COUNT WAIT%&lt;br /&gt;------------------------------ --------------- -------------- ------&lt;br /&gt;latch: library cache 1 815,980 52.76&lt;br /&gt;latch: library cache 2 187,232 12.11&lt;br /&gt;latch: library cache 4 168,402 10.89&lt;br /&gt;latch: library cache 8 138,053 8.93&lt;br /&gt;latch: library cache 16 102,906 6.65&lt;br /&gt;latch: library cache 32 69,149 4.47&lt;br /&gt;latch: library cache 64 43,797 2.83&lt;br /&gt;latch: library cache 128 11,916 0.77&lt;br /&gt;latch: library cache 256 3,867 0.25&lt;br /&gt;latch: library cache 512 1,005 0.06&lt;br /&gt;latch: library cache 1,024 1,108 0.07&lt;br /&gt;latch: library cache 2,048 1,516 0.10&lt;br /&gt;latch: library cache 4,096 1,293 0.08&lt;br /&gt;latch: library cache 8,192 351 0.02&lt;br /&gt;&lt;br /&gt;EVENT_NAME WAIT_TIME_MILLI WAIT_COUNT WAIT%&lt;br /&gt;------------------------------ --------------- -------------- ------&lt;br /&gt;cursor: pin S 1 59,309,179 86.63&lt;br /&gt;cursor: pin S 2 5,988,534 8.75&lt;br /&gt;cursor: pin S 4 2,313,442 3.38&lt;br /&gt;cursor: pin S 8 675,114 0.99&lt;br /&gt;cursor: pin S 16 113,084 0.17&lt;br /&gt;cursor: pin S 32 23,804 0.03&lt;br /&gt;cursor: pin S 64 15,434 0.02&lt;br /&gt;cursor: pin S 128 9,643 0.01&lt;br /&gt;cursor: pin S 256 4,247 0.01&lt;br /&gt;cursor: pin S 512 2,912 0.00&lt;br /&gt;cursor: pin S 1,024 2,871 0.00&lt;br /&gt;cursor: pin S 2,048 2,626 0.00&lt;br /&gt;cursor: pin S 4,096 1,980 0.00&lt;br /&gt;cursor: pin S 8,192 967 0.00&lt;br /&gt;cursor: pin S 16,384 278 0.00&lt;br /&gt;cursor: pin S 32,768 32 0.00&lt;br /&gt;&lt;br /&gt;ps –efl &gt; ps.txt&lt;br /&gt;cat ps.txtgrep ".:..:.."awk '{ printf "%6d %50s\n", $7, $15 }'&gt;ps1.txt&lt;br /&gt;cat ps.txtgrep -v ".:..:.."awk '{ printf "%6d %50s\n", $7, $16 }'&gt;ps2.txt&lt;br /&gt;cat ps1.txt ps2.txtgrep ora.*abcprdsort -nuniq -csort -nbrhead -20&lt;br /&gt;&lt;br /&gt;NUM&lt;br /&gt;PROCS PRIO PROCESS_NAME&lt;br /&gt;----- ------ -------------------&lt;br /&gt;1936 154 oracleabcprd&lt;br /&gt;25 148 oracleabcprd&lt;br /&gt;4 241 oracleabcprd&lt;br /&gt;1 240 oracleabcprd&lt;br /&gt;1 235 oracleabcprd&lt;br /&gt;1 229 oracleabcprd&lt;br /&gt;1 223 oracleabcprd&lt;br /&gt;1 207 oracleabcprd&lt;br /&gt;1 195 oracleabcprd&lt;br /&gt;1 187 oracleabcprd&lt;br /&gt;1 181 oracleabcprd&lt;br /&gt;1 179 oracleabcprd&lt;br /&gt;1 154 ora_smon_abcprd&lt;br /&gt;1 154 ora_rvwr_abcprd&lt;br /&gt;1 154 ora_rsm0_abcprd&lt;br /&gt;1 154 ora_reco_abcprd&lt;br /&gt;1 154 ora_rbal_abcprd&lt;br /&gt;1 154 ora_qmnc_abcprd&lt;br /&gt;1 154 ora_q004_abcprd&lt;br /&gt;1 154 ora_q003_abcprd&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Note the different priorities of the oracle client processes. After we enabled SCHED_NOAGE for Oracle Database as described in the documentation. The output looked like this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;EVENT_NAME WAIT_TIME_MILLI WAIT_COUNT WAIT%&lt;br /&gt;------------------------------ --------------- -------------- ------&lt;br /&gt;latch: library cache 1 53,212 57.39&lt;br /&gt;latch: library cache 2 10,517 11.34&lt;br /&gt;latch: library cache 4 11,069 11.94&lt;br /&gt;latch: library cache 8 5,308 5.72&lt;br /&gt;latch: library cache 16 3,715 4.01&lt;br /&gt;latch: library cache 32 3,506 3.78&lt;br /&gt;latch: library cache 64 5,254 5.67&lt;br /&gt;latch: library cache 128 131 0.14&lt;br /&gt;latch: library cache 256 5 0.01&lt;br /&gt;latch: library cache 512 7 0.01&lt;br /&gt;latch: library cache 1,024 3 0.00&lt;br /&gt;&lt;br /&gt;EVENT_NAME WAIT_TIME_MILLI WAIT_COUNT WAIT%&lt;br /&gt;------------------------------ --------------- -------------- ------&lt;br /&gt;cursor: pin S 1 2,267 15.46&lt;br /&gt;cursor: pin S 2 0 0.00&lt;br /&gt;cursor: pin S 4 0 0.00&lt;br /&gt;cursor: pin S 8 0 0.00&lt;br /&gt;cursor: pin S 16 0 0.00&lt;br /&gt;cursor: pin S 32 0 0.00&lt;br /&gt;cursor: pin S 64 0 0.00&lt;br /&gt;cursor: pin S 128 12,380 84.45&lt;br /&gt;cursor: pin S 256 12 0.08&lt;br /&gt;&lt;br /&gt;NUM&lt;br /&gt;PROCS PRIO PROCESS_NAME&lt;br /&gt;----- ------ -------------------&lt;br /&gt;1992 178 oracleabcprd&lt;br /&gt;1 178 ora_smon_abcprd&lt;br /&gt;1 178 ora_rvwr_abcprd&lt;br /&gt;1 178 ora_rsm0_abcprd&lt;br /&gt;1 178 ora_reco_abcprd&lt;br /&gt;1 178 ora_rbal_abcprd&lt;br /&gt;1 178 ora_qmnc_abcprd&lt;br /&gt;1 178 ora_q001_abcprd&lt;br /&gt;1 178 ora_q000_abcprd&lt;br /&gt;1 178 ora_psp0_abcprd&lt;br /&gt;1 178 ora_pmon_abcprd&lt;br /&gt;1 178 ora_p009_abcprd&lt;br /&gt;1 178 ora_p008_abcprd&lt;br /&gt;1 178 ora_p007_abcprd&lt;br /&gt;1 178 ora_p006_abcprd&lt;br /&gt;1 178 ora_p005_abcprd&lt;br /&gt;1 178 ora_p004_abcprd&lt;br /&gt;1 178 ora_p003_abcprd&lt;br /&gt;1 178 ora_p002_abcprd&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Note that the number of wait buckets are less. The wait times are sort as it should be. And the process priority report shows that all oracle client processes are on the same priority.&lt;br /&gt;&lt;br /&gt;Thanks Tanel!&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-4289012970046344732?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/4289012970046344732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=4289012970046344732' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4289012970046344732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4289012970046344732'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2010/04/long-wait-times-for-cursor-pin-s-and.html' title='Long wait times for cursor: pin S and latch: library cache'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-4594270884643021272</id><published>2009-11-16T09:07:00.001+02:00</published><updated>2009-11-16T09:10:15.427+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OCM'/><title type='text'>OCM Disconnected Mode: quick setup guide</title><content type='html'>Download and move ocm-Production-HP-UX-IA64.zip to $ORACLE_HOME&lt;br /&gt;&lt;strong&gt;# unzip ocm-Production-HP-UX-IA64.zip&lt;br /&gt;#cd ccr/config&lt;br /&gt;#vi ccr.properties&lt;/strong&gt; and add the following line to disable the collection of the host IP address:&lt;br /&gt;    &lt;strong&gt;ccr.metric.host.ecm_hw_nic.inet_address=false&lt;/strong&gt;&lt;br /&gt;Add the following line to disable the Network Interface MAC address collection:&lt;br /&gt;    &lt;strong&gt;ccr.metric.host.ecm_hw_nic.mac_address=false&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Configuring Oracle Configuration Manager in Disconnected Mode (so that it does not upload info to Oracle via the internet through the proxy server&lt;br /&gt;&lt;strong&gt;$ORACLE_HOME/ccr/bin/setupCCR -s -d&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Instrument the Database for Configuration Collections. The following steps must be repeated for every database instance, including multiple instances running from the same ORACLE_HOME.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;$ORACLE_HOME/ccr/admin/scripts/installCCRSQL.sh collectconfig –s &lt;sid&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;After Oracle Configuration Manager has been configured, you must run the emCCR&lt;br /&gt;collect command to collect configuration data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;$ORACLE_HOME/ccr/bin/emCCR collect&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can find the disconnected mode collection at the following location:&lt;br /&gt;&lt;strong&gt;$ORACLE_HOME/ccr/hosts/&lt;hostname&gt;/state/upload/ocmconfig.jar&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;To upload this configuration to My Oracle Support, transfer the ocmconfig.jar to a&lt;br /&gt;system that is connected to the Internet and attach it to a Service Request (SR).&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-4594270884643021272?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/4594270884643021272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=4594270884643021272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4594270884643021272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4594270884643021272'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/11/ocm-disconnected-mode-quick-setup-guide.html' title='OCM Disconnected Mode: quick setup guide'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-964774572796039642</id><published>2009-11-13T11:18:00.000+02:00</published><updated>2009-11-13T11:19:26.781+02:00</updated><title type='text'>Last password change date</title><content type='html'>Our databases recently went through an audit and we were asked to supply a list of all database users and the date when the last password change occurred.  My first reaction was that Oracle does not keep that information, but a little research proofed that I was wrong. The information is kept in sys.user$.ptime&lt;br /&gt;The following query will show when last a password was changed:&lt;br /&gt;&lt;br /&gt;select du.username, du.profile, du.account_status, u.ptime last_pwd_change&lt;br /&gt;from dba_users du, sys.user$ u&lt;br /&gt;where du.username = u.name&lt;br /&gt;order by 2, 4&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-964774572796039642?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/964774572796039642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=964774572796039642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/964774572796039642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/964774572796039642'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/11/last-password-change-date.html' title='Last password change date'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-8810821000981744854</id><published>2009-04-06T14:10:00.002+02:00</published><updated>2009-04-06T14:20:00.863+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>DBMS_FILE_TRANSFER</title><content type='html'>Oracle recommends the use of RMAN to create a physical standby database. But in the manual and various MAA white papers they simply state that you should make the backups available to the target system and that the path to the backup files on the source and standby server must be the same.&lt;br /&gt;&lt;br /&gt;Unfortunately they do not recommend how you should do this, especially when you have a FRA configured in ASM.&lt;br /&gt;&lt;br /&gt;With the release of version 11 ASM Oracle introduced the ASMCMD cp command. I thought that solves the problem since the white paper (Oracle Database 11G Automatic Storage Management New Features Overview – published June 2007) states “The ASMCMD cp command allows you to copy files between ASM disk groups between 2 ASM servers”, but I could not get the command to copy my RMAN backupsets between ASM disk groups. I eventually logged SR 7173090.993 but even Oracle support was not sure and they wasted 2 days trying to make it work. Only after 2 days, did Oracle support say that the command does not work for copying backupsets between ASM disk groups (only data files).&lt;br /&gt;&lt;br /&gt;OK what now?&lt;br /&gt;&lt;br /&gt;I had a look around and decided that my only option is the cumbersome (but at least workable) DBMS_FILE_TRANSFER package.&lt;br /&gt;&lt;br /&gt;First step is to locate the rman backupsets on the source server:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;ASMCMD&gt; pwd&lt;br /&gt;+PCASDGF/CASOB1/BACKUPSET/2009_03_27&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now create the same directory structure on the remote server. On the standby server I first created an ASM Diskgroup with the same name as the FRA on production (+PCASDGF).&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;ASMCMD&gt; mkdir +PCASDGF/CASOB1&lt;br /&gt;ASMCMD&gt; mkdir +PCASDGF/CASOB1/BACKUPSET&lt;br /&gt;ASMCMD&gt; mkdir +PCASDGF/CASOB1/BACKUPSET/2009_03_27&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Use DBMS_FILE_TRANSFER to instantiate an ASM DataGuard database&lt;br /&gt;&lt;br /&gt;DBMS_FILE_TRANSFER.GET_FILE contacts a remote database to read a remote file and then creates a copy of the file in the local file system. But before I can use this method I need a "stage" instance on the standby server. (I used DBCA to create a stage database - it took 20 minutes to create)&lt;br /&gt;&lt;br /&gt;Prepare the newly created stage database to use DBMS_FILE_TRANSFER:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;CONNECT sys/XXX&lt;br /&gt;CREATE OR REPLACE DIRECTORY DEST_DIR AS '+PCASDGF/CASOB1/BACKUPSET/2009_03_27'&lt;br /&gt;CREATE DATABASE LINK SOURCE_DB CONNECT TO system IDENTIFIED BY XXX USING 'CASOB1.VODACOM.CO.ZA';&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;On Primary:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;CREATE OR REPLACE DIRECTORY SOURCE_DIR AS '+PCASDGF/CASOB1/BACKUPSET/2009_03_27';&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Get a list of the backupsets on the source server:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;ASMCMD&gt; pwd&lt;br /&gt;+PCASDGF/CASOB1/BACKUPSET/2009_03_27&lt;br /&gt;ASMCMD&gt; ls&lt;br /&gt;annnf0_TAG20090327T115944_0.417.682603193&lt;br /&gt;annnf0_TAG20090327T115944_0.418.682603193&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Use an editor to create a SQL command (one per backupset) which looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;execute dbms_file_transfer.get_file(source_directory_object =&gt; 'SOURCE_DIR',source_file_name =&gt; 'ncsdf0_TAG20090406T092911_0.1&lt;br /&gt;367.683458159', destination_directory_object =&gt; 'DEST_DIR',destination_file_name =&gt; 'BACKUP1',source_database =&gt; 'SOURCE_DB');&lt;br /&gt;execute dbms_file_transfer.get_file(source_directory_object =&gt; 'SOURCE_DIR',source_file_name =&gt; 'nnndf0_TAG20090406T092911_0.1&lt;br /&gt;364.683458159', destination_directory_object =&gt; 'DEST_DIR',destination_file_name =&gt; 'BACKUP2',source_database =&gt; 'SOURCE_DB');&lt;br /&gt;…&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that the destination_file_name is not the same as the source file name. You will get an ORA-15046 if they are the same, this error is the result of the backupset being an Oracle-Managed file name.&lt;br /&gt;&lt;br /&gt;So I execute these commands on the standby server from the stage instance. The progress of the command can be monitored using the V$SESSION_LONGOPS view. Once all the backupsets are copied over I was done with the stage database.&lt;br /&gt;&lt;br /&gt;The next step is to create aliases for the new names of the backuppieces, so back on the source server issue:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;ALTER DISKGROUP PCASDGF ADD ALIAS '+PCASDGF/CASOB1/BACKUPSET/2009_03_27/BACKUP1' for '+PCASDGF/CASOB1/BACKUPSET/2009_03_27/annnf0_TAG20090327T115944_0.417.682603193';&lt;br /&gt;…&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once done, I can query V$ASM_ALIAS and there are two entries per backuppiece. One for the backuppiece and one for the alias.&lt;br /&gt;&lt;br /&gt;The aim of doing this was to create a Data Guard instance, so before I can restore the backup I first have to prepare a Data Guard instance:&lt;br /&gt;&lt;br /&gt;Log onto the standby server&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;# $export ORACLE_SID=casobc&lt;br /&gt;# $orapwd=orapwcasobc password=XXX&lt;br /&gt;&lt;br /&gt;sqlplus&lt;br /&gt;SYS@casobc&gt;create spfile from pfile; (I previously created a pfile from production with a few changes necessary for DG)&lt;br /&gt;File created.&lt;br /&gt;SYS@casobc&gt;startup force nomount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;OK now I am ready to start the restore. First catalog the backuppieces in the source server/primary RMAN&lt;br /&gt;&lt;br /&gt;Connect to RMAN on the primary server&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;RMAN&gt; connect target sys/XXX@casob1.vodacom.co.za;&lt;br /&gt;&lt;br /&gt;connected to target database: CASOB1 (DBID=1215042422)&lt;br /&gt;&lt;br /&gt;RMAN&gt; connect auxiliary /&lt;br /&gt;&lt;br /&gt;connected to auxiliary database: CASOB1 (not mounted)&lt;br /&gt;&lt;br /&gt;RMAN&gt; catalog backuppiece '+PCASDGF/ CASOB1/BACKUPSET/2009_03_27/BACKUP1';&lt;br /&gt;RMAN&gt; catalog backuppiece '+PCASDGF/CASOB1/BACKUPSET/2009_03_27/BACKUP2';&lt;br /&gt;…&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once done, I could list the backup in RMAN and see two entries, one for the backuppiece and one for the alias.&lt;br /&gt;Eventually I am ready to use the RMAN backup to create a data guard instance.&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;RMAN&gt; duplicate target database for standby ;&lt;br /&gt;...&lt;br /&gt;RMAN&gt; exit&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-8810821000981744854?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/8810821000981744854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=8810821000981744854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/8810821000981744854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/8810821000981744854'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/04/dbmsfiletransfer.html' title='DBMS_FILE_TRANSFER'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-2671833854592827583</id><published>2009-03-09T11:14:00.003+02:00</published><updated>2009-03-09T11:28:53.991+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><title type='text'>RMAN restore to new host</title><content type='html'>&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;The mission:&lt;br /&gt;&lt;br /&gt;Restore a production 10.2.0.4.0 database to a new host in order to test our recoveries. The production database is part of a Data Guard configuration in Maximum Availability mode and it runs on Unix RAW devices. The restore will be to ASM.&lt;br /&gt;&lt;br /&gt;Notes by my colleague Ian Baugaard:&lt;br /&gt;&lt;br /&gt;If you perform a test restore only, then do not connect to the recovery catalog when restoring the datafiles. Otherwise, RMAN records information about the restored datafiles to the recovery catalog. This intereferes with future attempts to restore and recover the primary database. If you must use a recovery catalog because the control file is not large enough to contain the RMAN repository data on all of the backups that you need to restore, then export the catalog and import it into a different schema or database and use the copied recovery catalog for the test restore. Otherwise, the catalog considers the restored database as the current target database.&lt;br /&gt;&lt;br /&gt;Also confirm all of the following before commencing:&lt;br /&gt;&lt;br /&gt;- Ensure that the /etc/oratab file is correctly configured&lt;br /&gt;- Ensure that the following environment variable are set to the values shown&lt;br /&gt;o NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS&lt;br /&gt;o NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1&lt;br /&gt;- Ensure that the $ORACLE_BASE/admin/$ORACLE_SID/bdump directory is empty&lt;br /&gt;- Ensure that the job_queue_processes parameter is set to 0 when editing the parameter file at step 3&lt;br /&gt;- That the location specified in the log_archive_dest parameter is valid, writable and empty&lt;br /&gt;- Confirm whether or not the source database is using a change tracking file, and if so, try to ensure that the corresponding path exists on the node where the restore is being performed&lt;br /&gt;- Ensure that the tnsnames.ora file does not contain any references whatsoever to a production system&lt;br /&gt;&lt;br /&gt;1. Ensure your environment is correctly configured, i.e. ORACLE_SID is set correctly and that the Oracle software installation matches the environment of the source system. When ready, start RMAN and connect to the target without connecting to the recovery catalog.&lt;br /&gt;&lt;br /&gt;rman target / NOCATALOG&lt;br /&gt;&lt;br /&gt;2. Start the instance without mounting it, using the DBID obtained from the v$database view on the source database. RMAN will fail to find the server parameter file, which has not yet been restored, but will start the instance with a "dummy" file. &lt;br /&gt;&lt;br /&gt;RMAN&gt; set DBID  dbid  ;&lt;br /&gt;RMAN&gt; startup nomount ;&lt;br /&gt;&lt;br /&gt;3. Restore and edit the server parameter file. NB: The values for NSR Server and NSR Client will have to be adjusted accordingly, and can be derived from the values of the production script&lt;br /&gt;&lt;br /&gt;run {&lt;br /&gt;    allocate channel c1 device type SBT PARMS='ENV=(NSR_SERVER=nsr server, NSR_CLIENT=original server)';&lt;br /&gt;    restore spfile to pfile '$ORACLE_HOME/dbs/init$ORACLE_SID.ora' from autobackup;&lt;br /&gt;    shutdown abort;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;4. From a second session, edit all appropriate parameters of the restored parameter file to cater for the environment you are restoring on, i.e. to reflect new directory structures, memory differences, etc. Once done, start the instance using the new file&lt;br /&gt;&lt;br /&gt;RMAN&gt; startup force nomount pfile='$ORACLE_HOME/dbs/init$ORACLE_SID.ora' ;&lt;br /&gt;&lt;br /&gt;5. Proceed to restore the controlfile from an autobackup from your original session&lt;br /&gt;&lt;br /&gt;run {&lt;br /&gt;  allocate channel c1 device type SBT PARMS=' ENV=(NSR_SERVER=nsr server, NSR_CLIENT=original server)';&lt;br /&gt;  restore controlfile from autobackup;&lt;br /&gt;  alter database mount;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;6. Query the database filenames recorded in the control file on the new host by running the following query in SQL*Plus &lt;br /&gt;&lt;br /&gt;col name for a60&lt;br /&gt;SELECT file# AS "File/Grp#", name FROM v$datafile&lt;br /&gt;UNION&lt;br /&gt;SELECT group#, member FROM v$logfile;&lt;br /&gt;EXIT&lt;br /&gt;&lt;br /&gt;7. Write the RMAN recovery script. The script must include the following steps:&lt;br /&gt;a. For each datafile on the destination host that is restored to a different path than it had on the source host, use a SET NEWNAME command to specify the new path on the destination host. (If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host.) See an example of a dynamic SQL script to generate the commands needed below &lt;br /&gt;&lt;br /&gt;select&lt;br /&gt;   'set newname for datafile '|| file# ||' to '''|| replace( name, 'rabdg', 'rabbcv' ) ||''' ;'&lt;br /&gt;from v$datafile&lt;br /&gt;order by file#&lt;br /&gt;&lt;br /&gt;b. For each online redo log that is to be created at a different location than it had on the source host, use SQL ALTER DATABASE RENAME FILE commands to specify the pathname on the destination host. (If the file systems on the destination system are set up to have the same paths as the source host, then do not use ALTER DATABASE RENAME FILE for those files restored to the same path as on the source host.) See an example of a dynamic SQL script to generate the commands needed below&lt;br /&gt;&lt;br /&gt;select&lt;br /&gt;   'SQL "alter database rename file '''''|| member ||''''' to '''''|| replace ( member, 'rabdg', 'rabbcv' ) ||''''' " ;'&lt;br /&gt;from v$logfile&lt;br /&gt;order by member&lt;br /&gt;c. Perform a SET UNTIL to limit media recovery to the end of the archived redo logs.&lt;br /&gt;d. Run SWITCH so that the control file recognizes the new path names as the official new names of the datafiles&lt;br /&gt;e. Restore and recover the database&lt;br /&gt;NB: By default, RMAN does not restore read-only files when you issue the RESTORE DATABASE command.&lt;br /&gt;&lt;br /&gt;run {&lt;br /&gt;  # ALLOCATE A CHANNEL TO THE TAPE DEVICE&lt;br /&gt;allocate channel c1 device type SBT PARMS='ENV=(NSR_SERVER=nsr server,  NSR_CLIENT=original server)';&lt;br /&gt;allocate channel c2 device type SBT PARMS='ENV=(NSR_SERVER=nsr server, NSR_CLIENT=original server)';&lt;br /&gt;allocate channel c3 device type SBT PARMS='ENV=(NSR_SERVER=nsr server,  NSR_CLIENT=original server)';&lt;br /&gt;&lt;br /&gt;  # RENAME THE DATAFILES AND ONLINE REDO LOGS&lt;br /&gt;set newname for datafile 1 to '+TUNXDG_RESTORE/casprd/datafile/casprd_SYSTEM01' ;&lt;br /&gt;set newname for datafile 2 to '+TUNXDG_RESTORE/casprd/datafile/casprd_UNDO01' ;&lt;br /&gt;SQL "alter database rename file ''/dev/vx/rdsk/redodg/casprd_REDO1'' to ''+TUNXDG_RESTORE/casprd/onlinelog/casprd_REDO1'' ";&lt;br /&gt;&lt;br /&gt;  # DO A SET UNTIL TO PREVENT RECOVERY OF THE ONLINE LOGS&lt;br /&gt;  set until time "TO_DATE('20080310 08:33:12','YYYYMMDD HH24:MI:SS')" ;&lt;br /&gt;  # RESTORE THE DATABASE AND SWITCH THE DATAFILE NAMES&lt;br /&gt;  restore database check readonly force;&lt;br /&gt;  switch datafile all;&lt;br /&gt;&lt;br /&gt;  # RECOVER THE DATABASE&lt;br /&gt;  recover database;&lt;br /&gt;}&lt;br /&gt;EXIT&lt;br /&gt;&lt;br /&gt;8. Now perform an OPEN RESETLOGS at the restored database.&lt;br /&gt;&lt;br /&gt;RMAN&gt; alter database open resetlogs ;&lt;br /&gt;&lt;br /&gt;9. Issue a shutdown and start the restored database in mount mode, and correct the location of all tempfiles&lt;br /&gt;&lt;br /&gt;10. If this was a test restore, and it was successful, then you can shut down the test database instance, and delete the test database with all of its files.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup force mount restrict pfile='$ORACLE_HOME/dbs/init$ORACLE_SID.ora' ;&lt;br /&gt;SQL&gt; drop database ;&lt;br /&gt;&lt;br /&gt;rm $ORACLE_HOME/dbs/init$ORACLE_SID.ora&lt;br /&gt;rm log_archive_dest/* &lt;br /&gt;&lt;br /&gt;Scripts and Logfiles&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;casprd1:/opt/apps/oracle/database/10.2.0.4/rdbms/admin&gt; rman target / NOCATALOG&lt;br /&gt;&lt;br /&gt;Recovery Manager: Release 10.2.0.4.0 - Production on Wed Feb 18 14:17:28 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2007, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;connected to target database (not started)&lt;br /&gt;&lt;br /&gt;RMAN&gt; set dbid 2070848595;&lt;br /&gt;&lt;br /&gt;executing command: SET DBID&lt;br /&gt;&lt;br /&gt;RMAN&gt; startup nomount ;&lt;br /&gt;&lt;br /&gt;startup failed: ORA-01078: failure in processing system parameters&lt;br /&gt;LRM-00109: could not open parameter file '/opt/apps/oracle/database/10.2.0.4/dbs/initcasprd1.ora'&lt;br /&gt;&lt;br /&gt;starting Oracle instance without parameter file for retrival of spfile&lt;br /&gt;Oracle instance started&lt;br /&gt;&lt;br /&gt;Total System Global Area     159383552 bytes&lt;br /&gt;&lt;br /&gt;Fixed Size                     2054608 bytes&lt;br /&gt;Variable Size                 67110448 bytes&lt;br /&gt;Database Buffers              83886080 bytes&lt;br /&gt;Redo Buffers                   6332416 bytes&lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel c1 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1,NSR_CLIENT=pcapa2)';&lt;br /&gt;3&gt; restore spfile to pfile '$ORACLE_HOME/dbs/init$ORACLE_SID.ora' from autobackup;&lt;br /&gt;4&gt; shutdown abort;&lt;br /&gt;5&gt; }&lt;br /&gt;&lt;br /&gt;allocated channel: c1&lt;br /&gt;channel c1: sid=39 devtype=SBT_TAPE&lt;br /&gt;channel c1: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;Starting restore at 19-FEB-2009 12:40:16&lt;br /&gt;&lt;br /&gt;Change init.ora file to:&lt;br /&gt;*.audit_file_dest='/opt/apps/oracle/admin/casprd1/adump'&lt;br /&gt;*.background_dump_dest='/opt/apps/oracle/admin/casprd1/bdump'&lt;br /&gt;*.compatible='10.2.0'&lt;br /&gt;*.control_file_record_keep_time=21&lt;br /&gt;*.core_dump_dest='/opt/apps/oracle/admin/casprd1/cdump'&lt;br /&gt;*.db_block_size=8192&lt;br /&gt;*.db_cache_size=500000000&lt;br /&gt;*.db_files=500&lt;br /&gt;*.db_name='casprd'&lt;br /&gt;*.db_writer_processes=4&lt;br /&gt;*.instance_name='casprd1'&lt;br /&gt;*.large_pool_size=50000000&lt;br /&gt;*.log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST'&lt;br /&gt;*.log_archive_dest_state_1='ENABLE'&lt;br /&gt;*.log_archive_format='casprd_%t_%s_%r.arc'&lt;br /&gt;*.log_archive_max_processes=5&lt;br /&gt;*.log_archive_min_succeed_dest=1&lt;br /&gt;*.log_buffer=16384000&lt;br /&gt;*.os_authent_prefix='ops$'&lt;br /&gt;*.recovery_parallelism=4&lt;br /&gt;*.remote_login_passwordfile='EXCLUSIVE'&lt;br /&gt;*.service_names='casprd'&lt;br /&gt;*.sga_target=2G&lt;br /&gt;*.undo_management='AUTO'&lt;br /&gt;*.undo_retention=28800&lt;br /&gt;*.undo_tablespace='UNDO'&lt;br /&gt;*.user_dump_dest='/opt/apps/oracle/admin/casprd1/udump'&lt;br /&gt;*.workarea_size_policy='auto'&lt;br /&gt;*.db_create_file_dest='+TUNXDG_RESTORE'&lt;br /&gt;*.db_recovery_file_dest='+TUNXDG_RESTORE'&lt;br /&gt;*.DB_RECOVERY_FILE_DEST_SIZE=2G&lt;br /&gt;*.PROCESSES=200&lt;br /&gt;&lt;br /&gt;RMAN&gt; startup force nomount pfile='$ORACLE_HOME/dbs/init$ORACLE_SID.ora' ;&lt;br /&gt;&lt;br /&gt;Oracle instance started&lt;br /&gt;&lt;br /&gt;Total System Global Area    2147483648 bytes&lt;br /&gt;&lt;br /&gt;Fixed Size                     2057496 bytes&lt;br /&gt;Variable Size                503319272 bytes&lt;br /&gt;Database Buffers            1610612736 bytes&lt;br /&gt;Redo Buffers                  31494144 bytes&lt;br /&gt;&lt;br /&gt;RMAN&gt; run {&lt;br /&gt;2&gt; allocate channel c1 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1,NSR_CLIENT=pcapa2,NSR_DEBUG_FILE=/home/oracle/nsr_icap2.log)';&lt;br /&gt;3&gt; restore controlfile from autobackup;&lt;br /&gt;4&gt; alter database mount;&lt;br /&gt;5&gt; }&lt;br /&gt;&lt;br /&gt;allocated channel: c1&lt;br /&gt;channel c1: sid=33 devtype=SBT_TAPE&lt;br /&gt;channel c1: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;Starting restore at 19-FEB-2009 13:53:31&lt;br /&gt;&lt;br /&gt;channel c1: looking for autobackup on day: 20090219&lt;br /&gt;channel c1: autobackup found: c-2070848595-20090219-04&lt;br /&gt;channel c1: control file restore from autobackup complete&lt;br /&gt;output filename=+TUNXDG_RESTORE/casprd/controlfile/current.351.679240505&lt;br /&gt;output filename=+TUNXDG_RESTORE/casprd/controlfile/current.352.679240507&lt;br /&gt;Finished restore at 19-FEB-2009 13:55:17&lt;br /&gt;&lt;br /&gt;database mounted&lt;br /&gt;released channel: c1&lt;br /&gt;&lt;br /&gt;Edit init.ora file to reflect new controlfile settings:&lt;br /&gt;*.control_files='+TUNXDG_RESTORE/casprd/controlfile/current.351.679240505’,’+TUNXDG_RESTORE/casprd/controlfile/current.352.679240507'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_restore.ksh&lt;br /&gt;rman target / nocatalog log='/home/oracle/meyert/icap_restore.log' cmdfile='/home/oracle/meyert/icap_restore.par'&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_restore.par&lt;br /&gt;run {&lt;br /&gt;# ALLOCATE A CHANNEL TO THE TAPE DEVICE&lt;br /&gt;allocate channel chnl1 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl2 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl3 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;&lt;br /&gt;# RENAME THE DATAFILES AND ONLINE REDO LOGS&lt;br /&gt;set newname for datafile 1 to '+TUNXDG_RESTORE/casprd/datafile/casprd_SYSTEM01' ;&lt;br /&gt;set newname for datafile 2 to '+TUNXDG_RESTORE/casprd/datafile/casprd_UNDO01' ;&lt;br /&gt;…&lt;br /&gt;set newname for datafile 321 to '+TUNXDG_RESTORE/casprd/datafile/casprd_SA_T_CMD_PARAM_0422' ;&lt;br /&gt;&lt;br /&gt;SQL "alter database rename file ''/dev/vx/rdsk/redodg/casprd_REDO1'' to ''+TUNXDG_RESTORE/casprd/onlinelog/casprd_REDO1'' ";&lt;br /&gt;…&lt;br /&gt;&lt;br /&gt;# DO A SET UNTIL TO PREVENT RECOVERY OF THE ONLINE LOGS&lt;br /&gt;set until time "TO_DATE('20090303 06:00:00','YYYYMMDD HH24:MI:SS')" ;&lt;br /&gt;&lt;br /&gt;# RESTORE THE DATABASE AND SWITCH THE DATAFILE NAMES&lt;br /&gt;restore database check readonly force;&lt;br /&gt;switch datafile all;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;EXIT&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_restore.log&lt;br /&gt;&lt;br /&gt;Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 5 15:44:38 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2007, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;connected to target database: CASPRD (DBID=2070848595, not open)&lt;br /&gt;using target database control file instead of recovery catalog&lt;br /&gt;&lt;br /&gt;allocated channel: chnl1&lt;br /&gt;channel chnl1: sid=26 devtype=SBT_TAPE&lt;br /&gt;channel chnl1: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;allocated channel: chnl2&lt;br /&gt;channel chnl2: sid=33 devtype=SBT_TAPE&lt;br /&gt;channel chnl2: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;allocated channel: chnl3&lt;br /&gt;channel chnl3: sid=11 devtype=SBT_TAPE&lt;br /&gt;channel chnl3: NMO v4.5.0.0&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;…&lt;br /&gt;&lt;br /&gt;executing command: SET until clause&lt;br /&gt;&lt;br /&gt;Starting restore at 05-MAR-2009 15:51:58&lt;br /&gt;&lt;br /&gt;channel chnl1: starting datafile backupset restore&lt;br /&gt;channel chnl1: specifying datafile(s) to restore from backup set&lt;br /&gt;restoring datafile 00009 to +TUNXDG_RESTORE/casprd/datafile/casprd_ic_t_met2_12&lt;br /&gt;restoring datafile 00027 to +TUNXDG_RESTORE/casprd/datafile/casprd_pp_t_conf_0401&lt;br /&gt;restoring datafile 00156 to +TUNXDG_RESTORE/casprd/datafile/casprd_sa_i_ssb&lt;br /&gt;restoring datafile 00193 to +TUNXDG_RESTORE/casprd/datafile/casprd_pp_t_conf_0409&lt;br /&gt;channel chnl1: reading from backup piece /full_CASPRD_t680405445_s84501_p1/&lt;br /&gt;…&lt;br /&gt;Finished restore at 07-MAR-2009 01:19:52&lt;br /&gt;&lt;br /&gt;datafile 1 switched to datafile copy&lt;br /&gt;input datafile copy recid=665 stamp=680836812 filename=+TUNXDG_RESTORE/casprd/datafile/casprd_system01&lt;br /&gt;datafile 2 switched to datafile copy&lt;br /&gt;input datafile copy recid=666 stamp=680836813 filename=+TUNXDG_RESTORE/casprd/datafile/casprd_undo01&lt;br /&gt;…&lt;br /&gt;datafile 321 switched to datafile copy&lt;br /&gt;input datafile copy recid=985 stamp=680837070 filename=+TUNXDG_RESTORE/casprd/datafile/casprd_sa_t_cmd_param_0422&lt;br /&gt;&lt;br /&gt;Starting recover at 07-MAR-2009 01:25:06&lt;br /&gt;channel chnl1: starting incremental datafile backupset restore&lt;br /&gt;channel chnl1: specifying datafile(s) to restore from backup set&lt;br /&gt;destination for restore of datafile 00008: +TUNXDG_RESTORE/casprd/datafile/casprd_sa_t_cmd_param_0418&lt;br /&gt;destination for restore of datafile 00035: +TUNXDG_RESTORE/casprd/datafile/casprd_sa_i_cmd&lt;br /&gt;destination for restore of datafile 00042: +TUNXDG_RESTORE/casprd/datafile/casprd_sa_i_event&lt;br /&gt;destination for restore of datafile 00192: +TUNXDG_RESTORE/casprd/datafile/casprd_ic_t_met2_05&lt;br /&gt;channel chnl1: reading from backup piece /level1_CASPRD_t680504446_s84621_p1/&lt;br /&gt;…&lt;br /&gt;channel chnl3: reading from backup piece /level1_CASPRD_t680506557_s84697_p1/&lt;br /&gt;channel chnl3: restored backup piece 1&lt;br /&gt;piece handle=/level1_CASPRD_t680506557_s84697_p1/ tag=TAG20090303T050038&lt;br /&gt;channel chnl3: restore complete, elapsed time: 00:17:46&lt;br /&gt;&lt;br /&gt;starting media recovery&lt;br /&gt;&lt;br /&gt;Oracle Error:&lt;br /&gt;ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below&lt;br /&gt;ORA-01194: file 1 needs more recovery to be consistent&lt;br /&gt;ORA-01110: data file 1: '+TUNXDG_RESTORE/casprd/datafile/casprd_system01'&lt;br /&gt;&lt;br /&gt;released channel: chnl1&lt;br /&gt;released channel: chnl2&lt;br /&gt;released channel: chnl3&lt;br /&gt;RMAN-00571: ===========================================================&lt;br /&gt;RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============&lt;br /&gt;RMAN-00571: ===========================================================&lt;br /&gt;RMAN-03002: failure of recover command at 03/07/2009 08:19:08&lt;br /&gt;RMAN-06557: unable to restore archived log thread 1, sequence 12670&lt;br /&gt;RMAN-06558: archived log size of 2043389 kb is bigger than available space of 2020336 kb&lt;br /&gt;&lt;br /&gt;Recovery Manager complete.&lt;br /&gt;&lt;br /&gt;(My RECOVERY_DEST_SIZE was too small, so I increased it and simply ran a recovery – since the restore was completed)&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_recovery.ksh&lt;br /&gt;rman target / nocatalog log='/home/oracle/meyert/icap_recovery.log' cmdfile='/home/oracle/meyert/icap_recovery.par'&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_recovery.par&lt;br /&gt;run {&lt;br /&gt;# ALLOCATE A CHANNEL TO THE TAPE DEVICE&lt;br /&gt;allocate channel chnl1 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl2 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl3 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;&lt;br /&gt;# DO A SET UNTIL TO PREVENT RECOVERY OF THE ONLINE LOGS&lt;br /&gt;set until time "TO_DATE('20090303 06:00:00','YYYYMMDD HH24:MI:SS')" ;&lt;br /&gt;&lt;br /&gt;# RECOVER THE DATABASE&lt;br /&gt;recover database;&lt;br /&gt;}&lt;br /&gt;EXIT&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_recovery.par&lt;br /&gt;run {&lt;br /&gt;# ALLOCATE A CHANNEL TO THE TAPE DEVICE&lt;br /&gt;allocate channel chnl1 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl2 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;allocate channel chnl3 device type SBT PARMS='ENV=(NSR_SERVER=pbcka1, NSR_CLIENT=pcapa2)';&lt;br /&gt;&lt;br /&gt;# DO A SET UNTIL TO PREVENT RECOVERY OF THE ONLINE LOGS&lt;br /&gt;set until time "TO_DATE('20090303 06:00:00','YYYYMMDD HH24:MI:SS')" ;&lt;br /&gt;&lt;br /&gt;# RECOVER THE DATABASE&lt;br /&gt;recover database;&lt;br /&gt;}&lt;br /&gt;EXIT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;casprd1:/home/oracle/meyert&gt; cat icap_recovery.log&lt;br /&gt;&lt;br /&gt;Recovery Manager: Release 10.2.0.4.0 - Production on Mon Mar 9 07:33:00 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2007, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;connected to target database: CASPRD (DBID=2070848595, not open)&lt;br /&gt;using target database control file instead of recovery catalog&lt;br /&gt;&lt;br /&gt;allocated channel: chnl1&lt;br /&gt;channel chnl1: sid=33 devtype=SBT_TAPE&lt;br /&gt;channel chnl1: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;allocated channel: chnl2&lt;br /&gt;channel chnl2: sid=12 devtype=SBT_TAPE&lt;br /&gt;channel chnl2: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;allocated channel: chnl3&lt;br /&gt;channel chnl3: sid=27 devtype=SBT_TAPE&lt;br /&gt;channel chnl3: NMO v4.5.0.0&lt;br /&gt;&lt;br /&gt;executing command: SET until clause&lt;br /&gt;&lt;br /&gt;Starting recover at 09-MAR-2009 07:33:37&lt;br /&gt;&lt;br /&gt;starting media recovery&lt;br /&gt;&lt;br /&gt;channel chnl1: starting archive log restore to default destination&lt;br /&gt;channel chnl1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=12668&lt;br /&gt;channel chnl1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=12669&lt;br /&gt;channel chnl1: reading from backup piece /arch_CASPRD_t680507135_s84703_p1/&lt;br /&gt;channel chnl1: restored backup piece 1&lt;br /&gt;piece handle=/arch_CASPRD_t680507135_s84703_p1/ tag=TAG20090303T054533&lt;br /&gt;channel chnl1: restore complete, elapsed time: 00:01:17&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12668.354.681032213 thread=1 sequence=12668&lt;br /&gt;channel default: deleting archive log(s)&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12668.354.681032213 recid=108554 stamp=681032266&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12669.353.681032215 thread=1 sequence=12669&lt;br /&gt;channel default: deleting archive log(s)&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12669.353.681032215 recid=108553 stamp=681032231&lt;br /&gt;channel chnl1: starting archive log restore to default destination&lt;br /&gt;channel chnl1: restoring archive log&lt;br /&gt;archive log thread=1 sequence=12670&lt;br /&gt;channel chnl1: reading from backup piece /arch_CASPRD_t680515326_s84705_p1/&lt;br /&gt;channel chnl1: restored backup piece 1&lt;br /&gt;piece handle=/arch_CASPRD_t680515326_s84705_p1/ tag=TAG20090303T080205&lt;br /&gt;channel chnl1: restore complete, elapsed time: 00:02:06&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12670.353.681033147 thread=1 sequence=12670&lt;br /&gt;channel default: deleting archive log(s)&lt;br /&gt;archive log filename=+TUNXDG_RESTORE/casprd/archivelog/2009_03_09/thread_1_seq_12670.353.681033147 recid=108555 stamp=681033249&lt;br /&gt;media recovery complete, elapsed time: 00:05:01&lt;br /&gt;Finished recover at 09-MAR-2009 07:59:13&lt;br /&gt;released channel: chnl1&lt;br /&gt;released channel: chnl2&lt;br /&gt;released channel: chnl3&lt;br /&gt;&lt;br /&gt;Recovery Manager complete.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Startup fails with ORA-16072: a minimum of one standby database destination is required Instance terminated by LGWR&lt;br /&gt;I found the solution on &lt;a href="http://orasnap.blogspot.com/"&gt;Stewart F&lt;/a&gt;'s blog.&lt;br /&gt;&lt;br /&gt;Metalink note 245731.1 this was caused by that fact that there was still some kind of reference in my Primary databases data dictionary:  "The Primary Database has still the Protection Mode stored in the Data Dictionary. The Protection Mode requires a running connection to a Standby Database with LGWR SYNC as Log-Transportation Mode. Since the standby is not available anymore,LGWR of the primary terminates the instance."&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;&lt;br /&gt;SYS@casprd1&gt; startup mount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 2147483648 bytes&lt;br /&gt;Fixed Size                  2057496 bytes&lt;br /&gt;Variable Size             503319272 bytes&lt;br /&gt;Database Buffers         1610612736 bytes&lt;br /&gt;Redo Buffers               31494144 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;SYS@casprd1&gt; ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SYS@casprd1&gt; shutdown immediate&lt;br /&gt;SYS@casprd1&gt; startup mount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 2147483648 bytes&lt;br /&gt;Fixed Size                  2057496 bytes&lt;br /&gt;Variable Size             503319272 bytes&lt;br /&gt;Database Buffers         1610612736 bytes&lt;br /&gt;Redo Buffers               31494144 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;SYS@casprd1&gt; select name from v$tempfile ;&lt;br /&gt;&lt;br /&gt;NAME&lt;br /&gt;-----------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;/dev/vx/rdsk/oradg/casprd_TEMP01&lt;br /&gt;/dev/vx/rdsk/oradg/casprd_TEMP02&lt;br /&gt;/dev/vx/rdsk/oradg/casprd_TEMP04&lt;br /&gt;/dev/vx/rdsk/oradg1/casprd_TEMP05&lt;br /&gt;/dev/vx/rdsk/oradg1/casprd_TEMP06&lt;br /&gt;/dev/vx/rdsk/oradg1/casprd_TEMP07&lt;br /&gt;/dev/vx/rdsk/oradg1/casprd_TEMP08&lt;br /&gt;&lt;br /&gt;7 rows selected.&lt;br /&gt;&lt;br /&gt;SYS@casprd1&gt; alter database rename file '/dev/vx/rdsk/oradg/casprd_TEMP01' to '+TUNXDG_RESTORE/casprd/tempfile/casprd_TEMP01';&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;Etc for all 7 tempfiles.&lt;br /&gt;&lt;br /&gt;SYS@casprd1&gt; alter database open;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-2671833854592827583?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/2671833854592827583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=2671833854592827583' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/2671833854592827583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/2671833854592827583'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/03/rman-restore-to-new-host.html' title='RMAN restore to new host'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-658165484365792662</id><published>2009-01-23T14:38:00.006+02:00</published><updated>2010-04-20T15:15:26.714+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><title type='text'>Data Guard Lag Time</title><content type='html'>We use the Broker to administer our Data Guard configurations and we also use OEM to monitor our databases, we have found that every time we change the state of the Physical Standby between ONLINE and READ-ONLY (and back to ONLINE again) we start getting OEM alarms for reaching our set limits for Lag Time (the time in seconds that the Physical Standby is behind the Primary database).This Lag Time can also be found in v$dataguard_stats (in fact that is where OEM gets it from).&lt;br /&gt;&lt;br /&gt;What we have found was that we need to bounce the Physical Standby to force v$dataguard_stats to get updated with the correct values. The good news is that the Physical standby does not really have a lag time, it is just that v$dataguard_stats does not update itself when DG STATES change. The bad news is that OEM shows the faulty lag time, generates an alarm and since our alarms are visible to the whole organization we have to explain that it is not really a problem.&lt;br /&gt;&lt;br /&gt;To confirm that the problem is in v$dataguard_stats and is not a real reflection of reality, do the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;&lt;br /&gt;On Standby:&lt;br /&gt;&lt;br /&gt;SQL&gt;select TIME_COMPUTED from v$dataguard_stats;&lt;br /&gt;&lt;br /&gt;TIME_COMPUTED&lt;br /&gt;------------------------------&lt;br /&gt;09-JAN-2009 09:45:13&lt;br /&gt;09-JAN-2009 09:45:13&lt;br /&gt;09-JAN-2009 09:45:13&lt;br /&gt;09-JAN-2009 09:45:13&lt;br /&gt;09-JAN-2009 09:45:13&lt;br /&gt;&lt;br /&gt;SQL&gt;select current_scn from v$database;&lt;br /&gt;&lt;br /&gt;CURRENT_SCN&lt;br /&gt;--------------------------&lt;br /&gt;9661858803219&lt;br /&gt;&lt;br /&gt;On Primary:&lt;br /&gt;&lt;br /&gt;SQL&gt;select scn_to_timestamp(9661857384219) from dual;&lt;br /&gt;&lt;br /&gt;SCN_TO_TIMESTAMP(9661857384219)&lt;br /&gt;---------------------------------------------------------&lt;br /&gt;12-JAN-09 12.26.57.000000000 PM&lt;br /&gt;&lt;br /&gt;SQL&gt;select SCN_TO_TIMESTAMP(current_scn) from v$database;&lt;br /&gt;&lt;br /&gt;SCN_TO_TIMESTAMP(CURRENT_SCN)&lt;br /&gt;---------------------------------------------------------&lt;br /&gt;12-JAN-09 12.30.00.000000000 PM&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So we are only a few seconds behind, but v$dataguard_stats and OEM show otherwise. Bouncing the Physical Standby database fixed this.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-658165484365792662?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/658165484365792662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=658165484365792662' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/658165484365792662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/658165484365792662'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/01/data-guard-lag-time.html' title='Data Guard Lag Time'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-1605088576759087577</id><published>2009-01-21T15:47:00.003+02:00</published><updated>2009-01-21T16:04:15.665+02:00</updated><title type='text'>KeePass and Putty</title><content type='html'>KeePass and Putty are software programs that work great together, especially in an enterprise where you have a lot of passwords to remember. Autotmatic Login to a Unix server is simply a “Ctrl+U” away.&lt;br /&gt;&lt;br /&gt;First you need to setup your Putty Configuration, for example:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5293744350294968482" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 306px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_ZpThEv_QXz4/SXcocGsQCKI/AAAAAAAAAB0/Tr5hWtalh8M/s320/Putty1.bmp" border="0" /&gt; &lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;Servers are saved as sessions and Auto-login username is specified&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5293744354033139458" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 306px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_ZpThEv_QXz4/SXcocUnf_wI/AAAAAAAAAB8/7nqLPgc-XJg/s320/Putty2.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;In KeepPass you need to configure 1 entry per server. The URL entry is what makes KeePass more than a list of passwords.&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5293744360093546162" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 290px; CURSOR: hand; HEIGHT: 320px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_ZpThEv_QXz4/SXcocrMadrI/AAAAAAAAACE/mPqYYO8nUpY/s320/KP1.bmp" border="0" /&gt;&lt;br /&gt;If putty is in your $PATH then the command you typed in the URL field above (putty -load &lt;saved&gt; -pw XX) will also work from the command line. In the main KeepPass window you simply need to highlight the entry and press “Ctrl-U”. &lt;img id="BLOGGER_PHOTO_ID_5293744365090965218" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 97px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_ZpThEv_QXz4/SXcoc9z5BuI/AAAAAAAAACM/_SZ6zqM43fQ/s320/KP2.bmp" border="0" /&gt;&lt;/div&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/script&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-1605088576759087577?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/1605088576759087577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=1605088576759087577' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1605088576759087577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1605088576759087577'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2009/01/keepass-and-putty.html' title='KeePass and Putty'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ZpThEv_QXz4/SXcocGsQCKI/AAAAAAAAAB0/Tr5hWtalh8M/s72-c/Putty1.bmp' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-6936882767515671534</id><published>2008-12-23T12:16:00.010+02:00</published><updated>2008-12-23T12:41:40.431+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>Problem setting up Archive Log file management on ASM</title><content type='html'>&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;br /&gt;&lt;/script&gt;I created a ASM diskgroup for FRA and set the relevant parameters. The aim to to write Archive logs, Flashback logs and RMAN backups to this FRA.&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;select FREE_MB from v$asm_diskgroup where NAME='PRNADGF';&lt;br /&gt;&lt;br /&gt; FREE_MB&lt;br /&gt;----------&lt;br /&gt; 2,761,992&lt;br /&gt;&lt;br /&gt;SQL&gt;show parameter db_recovery_file&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;db_recovery_file_dest                string&lt;br /&gt;db_recovery_file_dest_size           big integer 0&lt;br /&gt;&lt;br /&gt;SQL&gt;alter system set db_recovery_file_dest_size=2700000M;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;alter system set db_recovery_file_dest='+PRNADGF';&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;My problems started when I changed to Archive Log Mode&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;archive log list&lt;br /&gt;Database log mode              No Archive Mode&lt;br /&gt;Automatic archival             Disabled&lt;br /&gt;Archive destination            USE_DB_RECOVERY_FILE_DEST&lt;br /&gt;Oldest online log sequence     10&lt;br /&gt;Current log sequence           12&lt;br /&gt;&lt;br /&gt;SQL&gt;shutdown immediate&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;&lt;br /&gt;SQL&gt;startup mount&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 3156803584 bytes&lt;br /&gt;Fixed Size                  2110872 bytes&lt;br /&gt;Variable Size             402655848 bytes&lt;br /&gt;Database Buffers         2734686208 bytes&lt;br /&gt;Redo Buffers               17350656 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;SQL&gt;alter database archivelog;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;alter database open;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;archive log list&lt;br /&gt;Database log mode              Archive Mode&lt;br /&gt;Automatic archival             Enabled&lt;br /&gt;Archive destination            USE_DB_RECOVERY_FILE_DEST&lt;br /&gt;Oldest online log sequence     10&lt;br /&gt;Next log sequence to archive   12&lt;br /&gt;Current log sequence           12&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So the archive log files should be written to my FRA on ASM, but when I tested it I got a unexpected error:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;alter system archive log current;&lt;br /&gt;&lt;br /&gt;alter system archive log current&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-16038: log 3 sequence# 12 cannot be archived&lt;br /&gt;ORA-19502: write error on file "", block number  (block size=)&lt;br /&gt;ORA-00312: online log 3 thread 1: '+PRNADG1/rnatst/onlinelog/group_3.278.672669129'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This error message is misleading because there is nothing wrong with the FRA on ASM. I found the real error message in the alert.log file:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;ARCH: Encountered disk I/O error 19502&lt;br /&gt;ARCH: Closing local archive destination LOG_ARCHIVE_DEST_1: '/opt/apps/oracle/product/database/11.1.0.6.0/dbs/arch1_12_672668870.dbf' (error 19502)&lt;br /&gt;(rnatst)&lt;br /&gt;Errors in file /opt/apps/oracle/diag/rdbms/rnatst/rnatst/trace/rnatst_ora_21990.trc:&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So the archiver also wants to archive to my $ORACLE_HOME/dbs directory, it cannot do that because there is not enough space on that filesystem, but the real question is why does it want to write to that destination?&lt;br /&gt;When I do a show parameter I don't get the answer:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; show parameter log_archive_dest&lt;br /&gt;&lt;br /&gt;log_archive_dest                     string&lt;br /&gt;log_archive_dest_1                   string&lt;br /&gt;log_archive_dest_10                  string&lt;br /&gt;log_archive_dest_2                   string&lt;br /&gt;log_archive_dest_3                   string&lt;br /&gt;log_archive_dest_4                   string&lt;br /&gt;log_archive_dest_5                   string&lt;br /&gt;log_archive_dest_6                   string&lt;br /&gt;log_archive_dest_7                   string&lt;br /&gt;log_archive_dest_8                   string&lt;br /&gt;log_archive_dest_9                   string&lt;br /&gt;log_archive_dest_state_1             string      enable&lt;br /&gt;log_archive_dest_state_10            string      enable&lt;br /&gt;log_archive_dest_state_2             string      enable&lt;br /&gt;log_archive_dest_state_3             string      enable&lt;br /&gt;log_archive_dest_state_4             string      enable&lt;br /&gt;log_archive_dest_state_5             string      enable&lt;br /&gt;log_archive_dest_state_6             string      enable&lt;br /&gt;log_archive_dest_state_7             string      enable&lt;br /&gt;log_archive_dest_state_8             string      enable&lt;br /&gt;log_archive_dest_state_9             string      enable&lt;br /&gt;log_archive_duplex_dest              string&lt;br /&gt;log_archive_min_succeed_dest         integer     1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Again I found the answer in the alert.log&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;Starting ORACLE instance (normal)&lt;br /&gt;Using LOG_ARCHIVE_DEST_1 parameter default value as /opt/apps/oracle/product/database/11.1.0.6.0/dbs/arch&lt;br /&gt;Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It seems to be a DEFAULT destination that does not show up when I use ARCHIVE LOG LIST or SHOW PARAMETER LOG_ARCHIVE_DEST.&lt;br /&gt;It does show up in V$ARCHIVE_DEST though:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select dest_id, destination, status from V$ARCHIVE_DEST;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; DEST_ID DESTINATION                                             STATUS&lt;br /&gt;---------- ------------------------------------------------------- ---------&lt;br /&gt;       1 /opt/apps/oracle/product/database/11.1.0.6.0/dbs/arch   VALID&lt;br /&gt;       2                                                         INACTIVE&lt;br /&gt;       3                                                         INACTIVE&lt;br /&gt;       4                                                         INACTIVE&lt;br /&gt;       5                                                         INACTIVE&lt;br /&gt;       6                                                         INACTIVE&lt;br /&gt;       7                                                         INACTIVE&lt;br /&gt;       8                                                         INACTIVE&lt;br /&gt;       9                                                         INACTIVE&lt;br /&gt;      10 USE_DB_RECOVERY_FILE_DEST                               VALID&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To solve the problem:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; alter system set log_archive_dest_state_1=DEFER;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And to test&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;alter system archive log current;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;select dest_id, name from v$archived_log;&lt;br /&gt;&lt;br /&gt; DEST_ID NAME&lt;br /&gt;---------- ----------------------------------------------------------------------&lt;br /&gt;      10 +PRNADGF/rnatst/archivelog/2008_12_22/thread_1_seq_12.256.674133347&lt;br /&gt;&lt;br /&gt;SQL&gt; select dest_id, destination, status from V$ARCHIVE_DEST;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; DEST_ID DESTINATION                                             STATUS&lt;br /&gt;---------- ------------------------------------------------------- ---------&lt;br /&gt;       1 /opt/apps/oracle/product/database/11.1.0.6.0/dbs/arch   DISABLED&lt;br /&gt;       2                                                         INACTIVE&lt;br /&gt;       3                                                         INACTIVE&lt;br /&gt;       4                                                         INACTIVE&lt;br /&gt;       5                                                         INACTIVE&lt;br /&gt;       6                                                         INACTIVE&lt;br /&gt;       7                                                         INACTIVE&lt;br /&gt;       8                                                         INACTIVE&lt;br /&gt;       9                                                         INACTIVE&lt;br /&gt;      10 USE_DB_RECOVERY_FILE_DEST                               VALID&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Lesson learned.&lt;br /&gt;Keep on looking until you can explain the error.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-6936882767515671534?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/6936882767515671534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=6936882767515671534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6936882767515671534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6936882767515671534'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/problem-setting-up-archive-log-file.html' title='Problem setting up Archive Log file management on ASM'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-5509081814490474659</id><published>2008-12-12T10:43:00.005+02:00</published><updated>2008-12-23T12:48:45.412+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>Ora-17505 using RMAN with ASM</title><content type='html'>I had to create a Data Guard instance on test, so that we can evaluate Transparent Application Failover (TAF) for the app. I wanted to test the same procedure to build Data Guard that I will use for Production, and that meant that I had to do a RMAN backup to ASM. Our Storage team loaned me LUNs of different sizes for my temporary ASM on test.&lt;br /&gt;&lt;br /&gt;But my backup command (&lt;span style="font-family:courier new;"&gt;Backup filesperset 10 database include current controlfile for standby&lt;/span&gt;) failed with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RMAN-03009: failure of backup command on ORA_DISK_13 channel at 10/30/2008 20:21:27&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ORA-19510: failed to set size of 5779210 blocks for file "+PCASDGF" (blocksize=8192)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ORA-17505: ksfdrsz:1 Failed to resize file to size 5779210 blocks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This was a surprise because the test db is 7TB and FRA is 9TB.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; SELECT sum(space), sum(bytes) FROM v$asm_file;&lt;br /&gt;and&lt;br /&gt;SQL&gt; SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;confirmed that I had more than enough space available. In fact the backup failed after using only 47% fo the available space.&lt;br /&gt;&lt;br /&gt;It turns out that the smallest disk in the diskgroup was the bottleneck.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;select group_number, disk_number, total_mb, free_mb from v$asm_disk order by 4;&lt;br /&gt;&lt;br /&gt;GROUP_NUMBER DISK_NUMBER TOTAL_MB FREE_MB&lt;br /&gt;----------------------------------------&lt;br /&gt;1         13       86315          70&lt;br /&gt;1         16       17263       17080&lt;br /&gt;1         14       17263       17080&lt;br /&gt;1        129       34522       34168&lt;br /&gt;1        130       34522       34168&lt;br /&gt;1        131       34522       34168&lt;br /&gt;1         19       34522       69052&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see disk 13 only had 70MB of space available. I removed all the disks of varying sizes and only kept the disks of 69052 MB Size. The total size of the FRA came down to 8493396 MB, but the RMAN backup completed successfully.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Lesson Learned:&lt;br /&gt;ASM spreads file extents evenly accross all the disks disks on a diskgroup. An ORA-17505 error can still be encountered due to imbalanced free space between disks. The reason for this is that one disk lacking sufficient free space makes it impossible to do any allocation in a disk group because every file must be evenly allocated across all disks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-5509081814490474659?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/5509081814490474659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=5509081814490474659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5509081814490474659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/5509081814490474659'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/ora-17505-using-rman-with-asm.html' title='Ora-17505 using RMAN with ASM'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-7853010984374646320</id><published>2008-12-12T08:32:00.008+02:00</published><updated>2008-12-23T14:50:56.893+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>Remove ASM disk</title><content type='html'>One of the big selling points of ASM is the ability to reconfigure the storage online. I had to remove 10 disks from a +ASM test system that had to be redeployed on another server. The steps seemed easy enough until I ran into a problem;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select d.MOUNT_STATUS, d.MODE_STATUS, d.STATE, d.NAME, d.PATH&lt;br /&gt;from v$asm_disk d, v$asm_diskgroup dg&lt;br /&gt;where d.GROUP_NUMBER=dg.GROUP_NUMBER&lt;br /&gt;and dg.name = 'PCASDGF'&lt;br /&gt;order by 4&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;MOUNT_S MODE_ST STATE NAME PATH HEADER_STATUS&lt;br /&gt;------- ------- -------- -------------------- --------------------------- -------------&lt;br /&gt;...&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0132 /dev/oracle/fra/c17t6d7 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0133 /dev/oracle/fra/c17t7d0 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0134 /dev/oracle/fra/c17t7d1 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0135 /dev/oracle/fra/c17t7d2 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0136 /dev/oracle/fra/c17t7d3 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0137 /dev/oracle/fra/c17t7d4 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0138 /dev/oracle/fra/c17t7d5 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0139 /dev/oracle/fra/c17t7d6 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0140 /dev/oracle/fra/c17t7d7 MEMBER&lt;br /&gt;CACHED ONLINE NORMAL PCASDGF_0141 /dev/oracle/fra/c17t8d5 MEMBER&lt;br /&gt;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0132;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0133;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0134;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0135;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0136;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0137;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0138;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0139;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0140;&lt;br /&gt;SQL&gt; alter diskgroup PCASDGF drop disk PCASDGF_0141;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can happily drop disks in a disk group and ASM will seamlessly migrate the data to the existing disks in the disk group. The prompt returns immediatly, but the job (of migrating the data) is not yet done. In order to monitor progress use the following SQL.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select * from v$asm_operation&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When the job is done the SQL will retun no rows. The status of the disks are also updated.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select MOUNT_STATUS, MODE_STATUS, STATE, NAME, PATH, header_status&lt;br /&gt;from v$asm_disk&lt;br /&gt;where name is null&lt;br /&gt;/&lt;br /&gt;MOUNT_S MODE_ST STATE NAME PATH HEADER_STATU&lt;br /&gt;------- ------- -------- ------------------------------ ------------------------------ ------------&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t6d7 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d0 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d1 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d2 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d3 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d4 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d5 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d6 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t7d7 FORMER&lt;br /&gt;CLOSED ONLINE NORMAL /dev/oracle/fra/c17t8d0 FORMER&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;BUT&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# fuser /dev/oracle/fra/c17t6d7 returns/dev/oracle/fra/c17t6d7: 2924o 18184o 18175o 4129o 618o&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The process details are&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;oracle 2924 1 0 Nov 4 ? 17:53 asm_rbal_+ASM &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;oracle 18184 1 0 Nov 17 ? 1:16 ora_rbal_casbcva &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;oracle 18175 1 0 Nov 17 ? 1:34 ora_rvwr_casbcva &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;oracle 4129 4128 0 10:49:06 ? 0:00 &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;oracle 618 1 0 Nov 25 ? 37:06 oraclecasbcva (LOCAL=NO)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Is it safe to physically remove these disks? +ASM still knows about these disks and Oracle processes are still attached to these disks. I logged a SR with Oracle Support and got the following feedback:&lt;br /&gt;&lt;br /&gt;Bug 7516653 - DROPPED ASM DISK STILL HELD BY ASM PROCESSES&lt;br /&gt;Closed as duplicate for bug:&lt;br /&gt;Bug 7225720 - ASM DOES NOT CLOSE OPEN DESCRIPTORS EVEN AFTER APPLYING THE Patch 4693355&lt;br /&gt;&lt;br /&gt;Fixed in 11.2&lt;br /&gt;&lt;br /&gt;Please perform the following workaround:&lt;br /&gt;1. create dummy diskgroup using this disk:&lt;br /&gt;SQL&gt; create diskgroup test external redundancy disk &lt;disk_name&gt;;&lt;br /&gt;2. drop this diskgroup:&lt;br /&gt;SQL&gt; drop diskgroup test;&lt;br /&gt;3. check if the disk still help by any process.&lt;br /&gt;If the disk still held then we will have to restart the ASM instance.&lt;br /&gt;&lt;br /&gt;So that's what I did&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; create diskgroup test &lt;br /&gt;external redundancy &lt;br /&gt;disk /dev/oracle/fra/c17t6d7','/dev/oracle/fra/c17t7d0',&lt;br /&gt;'/dev/oracle/fra/c17t7d1','/dev/oracle/fra/c17t7d2',&lt;br /&gt;'/dev/oracle/fra/c17t7d3','/dev/oracle/fra/c17t7d4',&lt;br /&gt;'/dev/oracle/fra/c17t7d5','/dev/oracle/fra/c17t7d6',&lt;br /&gt;'/dev/oracle/fra/c17t7d7','/dev/oracle/fra/c17t8d0'&lt;br /&gt;/&lt;br /&gt;SQL&gt; drop diskgroup test&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Fuser still showed os processes accesing the devices and I eventually had to bounce +ASM before the devices could be safely removed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-7853010984374646320?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/7853010984374646320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=7853010984374646320' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/7853010984374646320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/7853010984374646320'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/remove-asm-disk.html' title='Remove ASM disk'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-2832167316407306144</id><published>2008-12-10T13:06:00.008+02:00</published><updated>2008-12-23T14:47:08.642+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AWR'/><title type='text'>SQL workload history with DBA_HIST_SQLSTAT</title><content type='html'>Using the DBA_HIST_XXX views from the AWR (automatic workload repository), it has become easier for a DBA to track changes in workload metrics over time. Through a SR I logged with Oracle Support they have supplied me with the following sql statement to track such changes for a single SQL statement.&lt;br /&gt;&lt;br /&gt;Just substitute XXX with your SQL_ID.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;set trimspool on&lt;br /&gt;set lines 220&lt;br /&gt;set long 10000&lt;br /&gt;set longchunk 10000&lt;br /&gt;set pages 99&lt;br /&gt;set longchunk 100000&lt;br /&gt;set long 10000&lt;br /&gt;set time on&lt;br /&gt;undefine SQL_ID&lt;br /&gt;undefine PLAN_HASH_VALUE&lt;br /&gt;undefine SQL_TEXT&lt;br /&gt;&lt;br /&gt;Select distinct dbid, sql_id, plan_hash_value, timestamp&lt;br /&gt;from dba_hist_sql_plan where sql_id='XXX'&lt;br /&gt;order by dbid, timestamp&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;undefine PLAN_HASH_VALUE&lt;br /&gt;accept PLAN_HASH_VALUE prompt 'Please enter PLAN_HASH_VALUE to show Statistics for: '&lt;br /&gt;col iowait_delta format 9999999.99 heading iowaitdelta(ms)&lt;br /&gt;col iowait_total format 9999999.99 heading iowaittotal(ms)&lt;br /&gt;col ELAPSED_TIME_TOTAL format 9999999.99 heading elapsdtimetotal(ms)&lt;br /&gt;col ELAPSED_TIME_DELTA format 9999999.99 heading elapsdtimedelta(ms)&lt;br /&gt;col PLAN_HASH_VALUE heading plan_hashvalue&lt;br /&gt;col CONCURRENCY_WAIT_TOTAL format 9999999.99 heading concwaittotal(ms)&lt;br /&gt;col CONCURRENCY_WAIT_delta format 9999999.99 heading concwaitdelta(ms)&lt;br /&gt;col CLUSTER_WAIT_DELTA format 9999999.99 heading clustwaitdelta(ms)&lt;br /&gt;col CLUSTER_WAIT_TOTAL format 9999999.99 heading clustwaittotal(ms)&lt;br /&gt;col APWAIT_TOTAL format 9999 heading applwaittimetotal(micro)&lt;br /&gt;col APWAIT_DELTA format 9999 heading applwaittimedelta(micro)&lt;br /&gt;col PLSEXEC_TIME_TOTAL format 9999 heading plsqlexectimetotal(micro)&lt;br /&gt;col PLSEXEC_TIME_DELTA format 9999 heading plsqlexectimedelta(micro)&lt;br /&gt;col JAVAEXEC_TIME_DELTA format 9999 heading javaexectimedelta(micro)&lt;br /&gt;col JAVAEXEC_TIME_TOTAL format 9999 heading javaexectimetotal(micro)&lt;br /&gt;col optimizer_cost format 9999 heading optcostcol optimizer_mode format a10 heading optimmode&lt;br /&gt;col kept_versions format 999 heading keptvers&lt;br /&gt;col invalidations_total format 999 heading invalidtot&lt;br /&gt;col invalidations_delta format 999 heading invaliddlt&lt;br /&gt;col parse_calls_total format 99999 heading parsecallstotal&lt;br /&gt;col parse_calls_delta format 99999 heading parsecallsdelta&lt;br /&gt;col executions_total format 999999 heading exectotal&lt;br /&gt;col executions_delta format 999999 heading execdelta&lt;br /&gt;col fetches_total format 9999999 heading fetchestotal&lt;br /&gt;col fetches_delta format 9999999 heading fetchesdelta&lt;br /&gt;col end_of_fetch_count_total format 9999 heading endoffetchcalltotal&lt;br /&gt;col end_of_fetch_count_delta format 9999 heading endoffetchcalldelta&lt;br /&gt;col buffer_gets_total format 99999999 heading buffergetstotal&lt;br /&gt;col buffer_gets_delta format 99999999 heading buffergetsdelta&lt;br /&gt;col disk_reads_total format 999999 heading diskreadstotal&lt;br /&gt;col disk_reads_delta format 9999999 heading diskreadsdelta&lt;br /&gt;col rows_processed_total format 9999999 heading rowsprocessedtotal&lt;br /&gt;col rows_processed_delta format 9999999 heading rowsprocesseddelta&lt;br /&gt;col rows_ex format 999999 heading rowsexeccol snap_id format 99999 heading snapid&lt;br /&gt;col ela_ex format 9999999.99 heading elapsedperexecution&lt;br /&gt;col cwt_ex format 9999999.99 heading cwtperexecution&lt;br /&gt;col instance_number format 99 heading inID&lt;br /&gt;&lt;br /&gt;select sql_id, plan_hash_value,dba_hist_sqlstat.snap_id,&lt;br /&gt;to_char(dba_hist_snapshot.BEGIN_INTERVAL_TIME,'dd-mm_hh24:mi') snap_beg,dba_hist_sqlstat.instance_number,invalidations_delta,&lt;br /&gt;parse_calls_delta,executions_delta,fetches_delta,buffer_gets_delta,&lt;br /&gt;disk_reads_delta,rows_processed_delta,elapsed_time_delta/1000 elapsed_time_delta,iowait_delta/1000 iowait_delta,clwait_delta/1000 cluster_wait_delta,ccwait_delta/1000 concurrency_wait_delta,optimizer_mode, optimizer_cost,&lt;br /&gt;substr(optimizer_mode,1,3) opt,&lt;br /&gt;case when executions_delta = 0 then NULL&lt;br /&gt;when rows_processed_delta = 0 then NULL&lt;br /&gt;else(rows_processed_delta/executions_delta)end rows_ex,&lt;br /&gt;case when executions_delta = 0 then NULL&lt;br /&gt;when clwait_delta = 0 then NULL&lt;br /&gt;else(clwait_delta/executions_delta)/1000 end cwt_ex,&lt;br /&gt;case when executions_delta = 0 then NULL&lt;br /&gt;when elapsed_time_delta = 0 then NULL&lt;br /&gt;else(elapsed_time_delta/executions_delta)/1000 end ela_ex&lt;br /&gt;from dba_hist_sqlstat, dba_hist_snapshot&lt;br /&gt;where sql_id='XXX'&lt;br /&gt;and plan_hash_value='&amp;PLAN_HASH_VALUE'&lt;br /&gt;and dba_hist_sqlstat.snap_id=dba_hist_snapshot.snap_id&lt;br /&gt;and dba_hist_sqlstat.instance_number=dba_hist_snapshot.instance_number&lt;br /&gt;order by dba_hist_sqlstat.instance_number,dba_hist_sqlstat.snap_id&lt;br /&gt;/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The view DBA_HIST_SQLSTAT displays historical information about SQL statistics. Each statistic is stored in two separate columns:&lt;br /&gt;metric&lt;statistic&gt;_TOTAL for the total value of the statistic since instance startup.&lt;br /&gt;metic&lt;statistic&gt;_DELTA for the change in a statistic’s value between BEGIN_INTERVAL_TIME to the END_INTERVAL_TIME that is stored in the DBA_HIST_SNAPSHOT view.&lt;br /&gt;&lt;br /&gt;You can also query DBA_HIST_SQL_PLAN to compare the execution plans, if PLAN_HASH_VALUE has changed .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-2832167316407306144?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/2832167316407306144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=2832167316407306144' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/2832167316407306144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/2832167316407306144'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/using-dbahistxxx-views-from-awr.html' title='SQL workload history with DBA_HIST_SQLSTAT'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-6781955263842078713</id><published>2008-12-05T08:47:00.009+02:00</published><updated>2008-12-23T14:54:50.294+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><title type='text'>Delete archive logs from the standby server</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;I implemented the following script to delete archive logs from a standby server. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;You cannot just delete the archive log files because that will leave entries in the V$ARCHIVED_LOG table.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;#!/bin/ksh&lt;br /&gt;#**************************************************************&lt;br /&gt;# Here is where we loop through each SID in /etc/oratab . . .&lt;br /&gt;#**************************************************************&lt;br /&gt;cat /etc/oratab grep '^c.*:.*:[Yy]$' {&lt;br /&gt;while IFS=":" read ORACLE_SID ORACLE_HOME junk&lt;br /&gt;do&lt;br /&gt;PATH=${ORACLE_HOME}/bin:$PATH&lt;br /&gt;export ORACLE_SID ORACLE_HOME PATH&lt;br /&gt;&lt;br /&gt;# Now run the SQL script to generate a rm script&lt;br /&gt;sqlplus -s /nolog &amp;lt;&amp;lt;EOF&lt;br /&gt;connect / as sysdba&lt;br /&gt;set heading off feedback off timing off&lt;br /&gt;spool /usr/users/oracle/cronscripts/logs/rm_arch_${ORACLE_SID}.ksh&lt;br /&gt;select 'rm '||NAME from v\$archived_log &lt;br /&gt;where REGISTRAR='RFS' &lt;br /&gt;and APPLIED='YES' &lt;br /&gt;and DELETED='NO' &lt;br /&gt;and COMPLETION_TIME &lt; (SYSDATE-1);&lt;br /&gt;spool off&lt;br /&gt;exit&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Now run the generated rm script&lt;br /&gt;chmod 740 /usr/users/oracle/cronscripts/logs/rm_arch_${ORACLE_SID}.ksh&lt;br /&gt;/usr/users/oracle/cronscripts/logs/rm_arch_${ORACLE_SID}.ksh&lt;br /&gt;&lt;br /&gt;# Now use RMAN to update V$ARCHIVED_LOG.DELETED&lt;br /&gt;rman &amp;lt;&amp;lt;EOF&lt;br /&gt;connect target /&lt;br /&gt;crosscheck archivelog all;&lt;br /&gt;delete noprompt expired archivelog all;&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;done&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Notes:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;columns V$ARCHIVED_LOG.REGISTRAR and APPLIED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;If REGISTRAR='RFS' and APPLIEDis NO, then the log has arrived at the standby but has not yet been applied.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;If REGISTRAR='RFS' and APPLIED is YES, the log has arrived and been applied at the standby database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;column V$ARCHIVED_LOG.DELETED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Indicates whether an RMAN DELETE command has physically deleted the archived log file from disk (YES) or not (NO)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;RMAN EXPIRED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Removes only files whose status in the repository is EXPIRED. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;RMAN marks backups and copies as expired when you run a CROSSCHECK command and the files are absent or inaccessible. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;To determine which files are expired, run a LIST EXPIRED command. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;RMAN NOPROMPT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Beginning in Oracle9i, RMAN's default behavior is to prompt for confirmation when you run DELETE EXPIRED. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;In prior releases, RMAN did not prompt.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-6781955263842078713?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/6781955263842078713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=6781955263842078713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6781955263842078713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6781955263842078713'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/delete-archive-logs-from-standby-server.html' title='Delete archive logs from the standby server'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-4625423878154075470</id><published>2008-12-05T07:51:00.007+02:00</published><updated>2008-12-23T15:00:39.787+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Administration'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Fast Index Creation</title><content type='html'>I recently had to create a new index on a fairly large date ranged partitioned table. I tried a few permutations on test, but found the following steps to be the fastest;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;01:01:03 SQL&gt; alter session set workarea_size_policy=manual&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;01:13:44 SQL&gt; alter session set hash_area_size=1073741824&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;01:13:44 SQL&gt; alter session set sort_area_size=1073741824&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;01:13:44 SQL&gt; select force_logging from v$database&lt;br /&gt;&lt;br /&gt;FOR&lt;br /&gt;---&lt;br /&gt;YES&lt;br /&gt;&lt;br /&gt;01:13:44 SQL&gt; alter database no force logging&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;01:13:46 SQL&gt;create index imei_prod.usage_profile_idx1 on imei_prod.usage_profile(msisdn)&lt;br /&gt;01:13:46 2 nologging&lt;br /&gt;01:13:46 3 compress&lt;br /&gt;01:13:46 4 parallel 16&lt;br /&gt;01:13:46 5 local&lt;br /&gt;01:13:46 6 (&lt;br /&gt;01:13:46 7 partition USAGE_199401 tablespace indx nologging compress,&lt;br /&gt;01:13:46 8 partition USAGE_200106 tablespace indx nologging compress,&lt;br /&gt;01:13:46 9 partition USAGE_200202 tablespace indx nologging compress,&lt;br /&gt;01:13:46 10 partition USAGE_200207 tablespace indx nologging compress,&lt;br /&gt;...&lt;br /&gt;01:13:46 56 partition USAGE_200809 tablespace indx nologging compress,&lt;br /&gt;01:13:46 57 partition USAGE_200810 tablespace indx nologging compress,&lt;br /&gt;01:13:46 58 partition USAGE_200811 tablespace indx nologging compress&lt;br /&gt;01:13:46 59 )&lt;br /&gt;01:13:46 60 /&lt;br /&gt;&lt;br /&gt;Index created&lt;br /&gt;&lt;br /&gt;Elapsed: 01:58:57.99&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;03:12:44 SQL&gt; SELECT st.sid, se.username, TO_CHAR(se.logon_time,'dd-mon-yy hh24:mi')&lt;br /&gt;03:12:44 2 logtime, se.program, (value/1048576) VALUE&lt;br /&gt;03:12:44 3 FROM gv$sesstat st, gv$statname sn, gv$session se&lt;br /&gt;03:12:44 4 WHERE username = 'MEYERM'&lt;br /&gt;03:12:44 5 and sn.name = 'redo size'&lt;br /&gt;03:12:44 6 AND sn.statistic# = st.statistic#&lt;br /&gt;03:12:44 7 AND st.sid = se.sid&lt;br /&gt;03:12:44 8 /&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Redo&lt;br /&gt;Generated&lt;br /&gt;SID USERNAME Logon Time PROGRAM in MB&lt;br /&gt;--------------------------------------------------------------&lt;br /&gt;146 MEYERM 26-nov-08 01:13 sqlplus@pxxxx1 (TNS V1-V3) 116.583&lt;br /&gt;&lt;br /&gt;03:12:46 SQL&gt; alter database force logging&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;03:12:46 SQL&gt; alter index imei_prod.usage_profile_idx1 logging;&lt;br /&gt;&lt;br /&gt;Index altered.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-4625423878154075470?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/4625423878154075470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=4625423878154075470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4625423878154075470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/4625423878154075470'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/12/i-recently-had-to-create-new-index-on.html' title='Fast Index Creation'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-6330700862205486851</id><published>2008-11-19T13:06:00.007+02:00</published><updated>2008-12-23T15:50:58.673+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>Drop an unmounted ASM diskgroup</title><content type='html'>We are getting our hands dirty with ASM and will be moving all our databases from RAW devices to ASM in the next couple of months. My worst fear came to be when a Unix Sys Admin used a disk already allocated to ASM for a local filesystem (luckily this did not happen on a production server!).&lt;br /&gt;When ASM realised this is immediatly issued a &lt;span style="font-family:courier new;"&gt;ALTER DISKGROUP PCASDG1 DISMOUNT FORCE&lt;/span&gt; command.&lt;br /&gt;By the time the Unix Sys Admin returned the disk it was unrecognozable by ASM as the disk headers had been overwritten. The diskgroup was unrecoverable and unusable.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select GROUP_NUMBER, NAME, state from v$asm_diskgroup;&lt;br /&gt;GROUP_NUMBER NAME STATE&lt;br /&gt;------------ --------- ----------&lt;br /&gt;0 PCASDG1 DISMOUNTED&lt;br /&gt;2 PCASDGF MOUNTED&lt;br /&gt;3 PCASDGR MOUNTED&lt;br /&gt;3 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt;alter diskgroup PCASDG1 mount;&lt;br /&gt;alter diskgroup PCASDG1 mount&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-15032: not all alterations performed&lt;br /&gt;ORA-15040: diskgroup is incomplete&lt;br /&gt;ORA-15042: ASM disk "19" is missing&lt;br /&gt;&lt;br /&gt;SQL&gt;drop diskgroup PCASDG1 including contents;&lt;br /&gt;drop diskgroup PCASDG1 including contents&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-15039: diskgroup not dropped&lt;br /&gt;ORA-15001: diskgroup "PCASDG1" does not exist or is not mounted&lt;br /&gt;&lt;br /&gt;SQL&gt;alter diskgroup PCASDG1 check;&lt;br /&gt;alter diskgroup PCASDG1 check&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-15032: not all alterations performed&lt;br /&gt;ORA-15001: diskgroup "PCASDG1" does not exist or is not mounted&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I had to recreate the whole diskgroup from scratch. I followed Metalink Note 387103.1 to recreate the diskgroup.&lt;br /&gt;Basically you clean up the asm disk header of all the disks in the diskgroup. This will also remove the whole diskgroup from asm.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select 'dd if=/dev/zero of='PATH' bs=8192 count=100' from v$asm_disk where GROUP_NUMBER=0;&lt;br /&gt;&lt;br /&gt;$dd if=/dev/zero of=/dev/oracle/dg/c11t15d2 bs=8192 count=100&lt;br /&gt;100+0 records in&lt;br /&gt;100+0 records out&lt;br /&gt;&lt;br /&gt;$dd if=/dev/zero of=/dev/oracle/dg/c11t7d0 bs=8192 count=100&lt;br /&gt;100+0 records in&lt;br /&gt;100+0 records out&lt;br /&gt;etc ... &lt;br /&gt;&lt;br /&gt;SQL&gt; select GROUP_NUMBER, NAME, state from v$asm_diskgroup;&lt;br /&gt;GROUP_NUMBER NAME STATE&lt;br /&gt;------------ --------- ----------&lt;br /&gt;2 PCASDGF MOUNTED&lt;br /&gt;3 PCASDGR MOUNTED&lt;br /&gt;2 rows selected.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The diskgroup is now removed. I then used DBCA to recreate the ASM diskgroup, all these disks showed up as Candidate disks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-6330700862205486851?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/6330700862205486851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=6330700862205486851' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6330700862205486851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6330700862205486851'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/11/drop-unmounted-asm-diskgroup.html' title='Drop an unmounted ASM diskgroup'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-6951275033093468817</id><published>2008-11-10T11:22:00.008+02:00</published><updated>2008-11-10T12:20:54.967+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='Presentation'/><title type='text'>Oracle Data Guard Presentation</title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ZpThEv_QXz4/SRf-khe1HQI/AAAAAAAAABs/HEKtMPlY4n8/s1600-h/SA+587.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://1.bp.blogspot.com/_ZpThEv_QXz4/SRf-khe1HQI/AAAAAAAAABs/HEKtMPlY4n8/s320/SA+587.jpg" alt="" id="BLOGGER_PHOTO_ID_5266958192649510146" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ZpThEv_QXz4/SRf-kK0XjWI/AAAAAAAAABk/64pDVWfTa84/s1600-h/SA+585.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://1.bp.blogspot.com/_ZpThEv_QXz4/SRf-kK0XjWI/AAAAAAAAABk/64pDVWfTa84/s320/SA+585.jpg" alt="" id="BLOGGER_PHOTO_ID_5266958186565832034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;br /&gt;&lt;/script&gt;I had the privilege to present at the SAOUG (South African Oracle User Group) in Sun City last month. The conference was well organized, the location was great and we had close to 1000 attendees. I presented on Oracle Data Guard.&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href="http://karenmorton.blogspot.com/"&gt;Karen Morton&lt;/a&gt; (one of my favorite bloggers) for making me aware of &lt;a href="http://www.slideshare.net/"&gt;SlideShare&lt;/a&gt;. To access my presentation, just click on the slideshare image on the right side and it will take you to my presentation on slideshare. Happy viewing!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-6951275033093468817?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/6951275033093468817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=6951275033093468817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6951275033093468817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/6951275033093468817'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/11/oracle-data-guard-presentation.html' title='Oracle Data Guard Presentation'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ZpThEv_QXz4/SRf-khe1HQI/AAAAAAAAABs/HEKtMPlY4n8/s72-c/SA+587.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-1639661003886255057</id><published>2008-10-30T09:29:00.008+02:00</published><updated>2008-12-23T16:05:16.643+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Streams'/><title type='text'>Easy Streams Cookbook Example</title><content type='html'>&lt;script src="http://www.google-analytics.com/urchin.js" type="text/javascript"&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;We have Call Centres all over the country. The Call Centre’s IVR (interactive voice response, is a phone technology that allows a computer to detect voice and touch tones using a normal phone call) is used for routing calls to the correct call centre. The subscriber data is stored in 1 location and I was asked to replicate that data to 2 databases in other parts of the country. The main reasons are to have the data closer to the IVR system and also to relieve the main production system from all these queries.&lt;br /&gt;&lt;br /&gt;Decisions: Use one-directional replication. Capture the changes at the source. Do the instantiation (first copy of data) with DataPump.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt; Preperation Steps &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enable Supplemental Logging (at source)&lt;br /&gt;Use columns in PK constraints for Supplemental log group&lt;br /&gt;&lt;pre name="code" class="sql"&gt;ALTER TABLE "SCHEMA_ABC"."TABLE_ABC" ADD SUPPLEMENTAL LOG GROUP ivr_rep (XXMSISDN) ALWAYS;&lt;/pre&gt;&lt;br /&gt;This step might wait on “enq: TX – contention” on a busy production system, so it better to do it with a Change Control after hours&lt;br /&gt;&lt;br /&gt;To confirm Supplemental Log Groups:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;COLUMN LOG_GROUP_NAME HEADING 'Log Group' FORMAT A20&lt;br /&gt;COLUMN TABLE_NAME HEADING 'Table' FORMAT A15&lt;br /&gt;COLUMN ALWAYS HEADING 'Conditional or|Unconditional' FORMAT A14&lt;br /&gt;COLUMN LOG_GROUP_TYPE HEADING 'Type of Log Group' FORMAT A20&lt;br /&gt;SELECT LOG_GROUP_NAME, TABLE_NAME, DECODE(ALWAYS,'ALWAYS', 'Unconditional','CONDITIONAL', 'Conditional') ALWAYS, LOG_GROUP_TYPE&lt;br /&gt;FROM DBA_LOG_GROUPS;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Create default tablespace for the Streams Administrator Account to store the queue table. Do these steps on the source and destinations.&lt;br /&gt;&lt;pre name="code" class="sql"&gt;CREATE TABLESPACE streams_tbs DATAFILE '/data/oradata/lfivrdb/streams_tbs.dbf' SIZE 7168M;&lt;br /&gt;&lt;br /&gt;CREATE USER strmadmin IDENTIFIED BY STRMXXX &lt;br /&gt;  PROFILE VODA_COMPLIANT&lt;br /&gt;  DEFAULT TABLESPACE streams_tbs QUOTA UNLIMITED ON streams_tbs;&lt;br /&gt;GRANT CONNECT, RESOURCE, DBA to STRMADMIN;&lt;br /&gt;GRANT SELECT ANY DICTIONARY TO STRMADMIN;&lt;br /&gt;GRANT SELECT_CATALOG_ROLE TO STRMADMIN;&lt;br /&gt;EXEC DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE('STRMADMIN');&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Set specific initialization parameters at the databases participating in the Streams setup&lt;br /&gt;&lt;pre name="code" class="sql"&gt;ALTER SYSTEM SET STREAMS_POOL_SIZE=200M SCOPE=BOTH;&lt;br /&gt;ALTER SYSTEM SET AQ_TM_PROCESSES = 1 scope=both;&lt;br /&gt;ALTER SYSTEM SET JOB_QUEUE_PROCESSES=10 scope=both;&lt;br /&gt;ALTER SYSTEM SET “_job_queue_interval”=1 scope=spfile;&lt;/pre&gt; (This is not a dynamic parameter and the db will need to be bounced)&lt;br /&gt;&lt;br /&gt;Create 2 database links on the source to the 2 destinations.&lt;br /&gt;&lt;pre name="code" class="sql"&gt;CONNECT STRMADMIN/STRMXXX&lt;br /&gt;CREATE DATABASE LINK LFIVRDB.VODACOM.CO.ZA CONNECT TO STRMADMIN IDENTIFIED BY STRMXXX USING ‘LFIVRDB.VODACOM.CO.ZA’;&lt;br /&gt;CREATE DATABASE LINK BEIVRDB.VODACOM.CO.ZA CONNECT TO STRMADMIN IDENTIFIED BY STRMXXX USING ‘BEIVRDB.VODACOM.CO.ZA’;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;STEP 1 &lt;/span&gt;&lt;br /&gt;Create Streams Queues&lt;br /&gt;One Capture on the source db and one Apply on each destination:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.SET_UP_QUEUE(&lt;br /&gt;queue_table =&gt; 'STREAMS_QUEUE_TABLE',&lt;br /&gt;storage_clause =&gt; 'TABLESPACE STREAMS_TBS',&lt;br /&gt;queue_name =&gt; ' STREAMS_CAPTURE_Q', &lt;br /&gt;queue_user =&gt; 'STRMADMIN');&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;And on both dest sites:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.SET_UP_QUEUE(&lt;br /&gt;queue_table =&gt; 'STREAMS_QUEUE_TABLE',&lt;br /&gt;storage_clause =&gt; 'TABLESPACE STREAMS_TBS',&lt;br /&gt;queue_name =&gt; ' STREAMS_APPLY_Q', &lt;br /&gt;queue_user =&gt; 'STRMADMIN');&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;STEP2&lt;/span&gt;&lt;br /&gt;Create Capture Process on Source. &lt;br /&gt;This step might wait on “enq: TX – contention” on a busy production system, so it better to do it with a Change Control after hours&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;  DBMS_STREAMS_ADM.ADD_TABLE_RULES(&lt;br /&gt;    table_name         =&gt; '"SCHEMA_ABC"."TABLE_ABC"',&lt;br /&gt;    streams_type       =&gt; 'CAPTURE',&lt;br /&gt;    streams_name       =&gt; '"STREAMS_CAPTURE"',&lt;br /&gt;    queue_name         =&gt; '"STRMADMIN"."STREAMS_CAPTURE_Q"',&lt;br /&gt;    include_dml        =&gt; true,&lt;br /&gt;    include_ddl        =&gt; true,&lt;br /&gt;    source_database    =&gt; 'DESTPRD.VODACOM.CO.ZA');&lt;br /&gt;    END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;STEP3&lt;/span&gt;&lt;br /&gt;Create 2 propagation process on the Source (one per destination)&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;  DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(&lt;br /&gt;    table_name          =&gt; '"SCHEMA_ABC"."TABLE_ABC"',&lt;br /&gt;    streams_name        =&gt; '"STREAMS_PROP_LF"',&lt;br /&gt;    source_queue_name   =&gt; '"STRMADMIN"."STREAMS_CAPTURE_Q"',&lt;br /&gt;    destination_queue_name  =&gt; '"STRMADMIN"."STREAMS_APPLY_Q"@LFIVRDB.VODACOM.CO.ZA',&lt;br /&gt;    include_dml         =&gt; true,&lt;br /&gt;    include_ddl         =&gt; true,&lt;br /&gt;    source_database    =&gt; 'DESTPRD.VODACOM.CO.ZA',&lt;br /&gt;    inclusion_rule      =&gt; true);&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;And to the 2nd dest site:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;  DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(&lt;br /&gt;    table_name          =&gt; '"SCHEMA_ABC"."TABLE_ABC"',&lt;br /&gt;    streams_name        =&gt; '"STREAMS_PROP_BE"',&lt;br /&gt;    source_queue_name   =&gt; '"STRMADMIN"."STREAMS_CAPTURE_Q"',&lt;br /&gt;    destination_queue_name  =&gt; '"STRMADMIN"."STREAMS_APPLY_Q"@BEIVRDB.VODACOM.CO.ZA',&lt;br /&gt;    include_dml         =&gt; true,&lt;br /&gt;    include_ddl         =&gt; true,&lt;br /&gt;    source_database    =&gt; 'DESTPRD.VODACOM.CO.ZA',&lt;br /&gt;    inclusion_rule      =&gt; true);&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;STEP 4&lt;/span&gt;&lt;br /&gt;Create 2 Apply processes. One on each destination.&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_TABLE_RULES(&lt;br /&gt;table_name          =&gt; '"SCHEMA_ABC"."TABLE_ABC"',&lt;br /&gt;streams_type =&gt; 'APPLY', &lt;br /&gt;streams_name =&gt; 'STREAMS_APPLY', &lt;br /&gt;queue_name =&gt; 'STRMADMIN.STREAMS_APPLY_Q',&lt;br /&gt;include_dml =&gt; true, &lt;br /&gt;include_ddl =&gt; true, &lt;br /&gt;source_database    =&gt; 'DESTPRD.VODACOM.CO.ZA');&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;And 2nd site&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_TABLE_RULES(&lt;br /&gt;table_name          =&gt; '"SCHEMA_ABC"."TABLE_ABC"',&lt;br /&gt;streams_type =&gt; 'APPLY', &lt;br /&gt;streams_name =&gt; 'STREAMS_APPLY', &lt;br /&gt;queue_name =&gt; 'STRMADMIN.STREAMS_APPLY_Q',&lt;br /&gt;include_dml =&gt; true, &lt;br /&gt;include_ddl =&gt; true, &lt;br /&gt;source_database    =&gt; 'DESTPRD.VODACOM.CO.ZA');&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;Instantiation.&lt;/span&gt; This is the initial copy of the table.&lt;br /&gt;&lt;br /&gt;Set &amp; Get  SCN:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;EXEC DBMS_CAPTURE_ADM.PREPARE_TABLE_INSTANTIATION(table_name =&gt;  'SCHEMA_ABC.TABLE_ABC'); &lt;/pre&gt;&lt;br /&gt;This step might wait on “enq: TX – contention” on a busy production system, so it better to do it with a Change Control after hours&lt;br /&gt;&lt;br /&gt;To confirm the SCN number that you will need in a future step:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;col scn for 9999999999999999&lt;br /&gt;select * from dba_capture_prepared_tables &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Export table at source&lt;br /&gt;&lt;pre name="code" class="sql"&gt;expdp strmadmin/STRMXXX TABLES= SCHEMA_ABC.TABLE_ABC DUMPFILE=a%u.dmp parallel=8&lt;/pre&gt;&lt;br /&gt;compress and ftp dump files to the 2 destination servers&lt;br /&gt;&lt;br /&gt;Import table at each destination&lt;br /&gt;First create the schema owner of the table&lt;br /&gt;&lt;pre name="code" class="sql"&gt;create user SCHEMA_ABC identified by STRMXXX default tablespace streams_tbs;&lt;br /&gt;grant connect, resource to SCHEMA_ABC&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;impdp strmadmin/STRMXXX TABLES=SCHEMA_ABC.TABLE_ABC DUMPFILE=a%u.dmp remap_tablespace=TBS_ABC:streams_tbs &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Manually instantiating the objects at each destination&lt;br /&gt;&lt;pre name="code" class="sql"&gt;connect STRMADMIN/STRMXXX&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(&lt;br /&gt;source_object_name =&gt; 'SCHEMA_ABC.TABLE_ABC',&lt;br /&gt;source_database_name =&gt; 'DESTPRD.VODACOM.CO.ZA',&lt;br /&gt;instantiation_scn =&gt; &amp;iscn);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;Enter value for iscn: &lt;/pre&gt;&lt;br /&gt;&lt;Provide the value of SCN that you got from the source database&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;STEP5 &lt;/span&gt;&lt;br /&gt;Finally start the Process:  &lt;br /&gt;On source&lt;br /&gt;&lt;pre name="code" class="sql"&gt;CONNECT strmadmin/STRMXXX&lt;br /&gt;exec dbms_capture_adm.start_capture(capture_name =&gt; 'STREAMS_CAPTURE');&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;At 1st destination:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;CONNECT strmadmin/STRMXXX&lt;br /&gt;exec dbms_apply_adm.start_apply(apply_name =&gt; 'STREAMS_APPLY');&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;At 2nd destination:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;CONNECT strmadmin/STRMXXX&lt;br /&gt;exec dbms_apply_adm.start_apply(apply_name =&gt; 'STREAMS_APPLY');&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial Rounded MT Bold;"&gt;Post Installation steps&lt;/span&gt;&lt;br /&gt;On Source force Stream checkpoint (see Metalink Note:342342.1)&lt;br /&gt;&lt;pre name="code" class="sql"&gt;EXEC DBMS_CAPTURE_ADM.SET_PARAMETER('STREAMS_CAPTURE','_CHECKPOINT_FORCE','Y');&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On each destination&lt;br /&gt;&lt;pre name="code" class="sql"&gt;EXEC DBMS_APPLY_ADM.SET_PARAMETER(apply_name =&gt; 'STREAMS_APPLY', parameter =&gt; 'WRITE_ALERT_LOG', value =&gt; 'Y' );&lt;br /&gt;EXEC DBMS_APPLY_ADM.SET_PARAMETER(apply_name =&gt; 'STREAMS_APPLY',parameter =&gt; 'DISABLE_ON_ERROR',value =&gt; 'N' );&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-1639661003886255057?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/1639661003886255057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=1639661003886255057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1639661003886255057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1639661003886255057'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/10/easy-streams-cookbook-example.html' title='Easy Streams Cookbook Example'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-1363852447648891713</id><published>2008-09-15T15:47:00.003+02:00</published><updated>2008-12-23T16:07:08.157+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Loader'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>SQL*Loader direct</title><content type='html'>We had to setup SQL Server Replication to an Oracle database. The 2 tables in questions are huge. The small table has 63mill rows and the big one has 1.5bill rows. The big table has 50 date ranged partitions.&lt;br /&gt;&lt;br /&gt;I used SQL Loader direct path without any indexes in place from csv files to do the initial load.&lt;br /&gt;&lt;br /&gt;The first thing to do was to prepare the database for Direct Loading by executing the script &lt;span style="font-family:courier new;"&gt;$ORACLE_HOME/rdbms/admin/catldr.sql.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I also had to set my session’s DATE format to be the same as the format in the CSV file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To get the fastest possible load performance on the 50 partitions I followed these rules:&lt;br /&gt;There were no indexes on the table&lt;br /&gt;The table was set to NOLOGGING&lt;br /&gt;The database was put in NOARCHIVELOG mode&lt;br /&gt;&lt;br /&gt;And the following SQL Loader options were used:&lt;br /&gt;DIRECT=TRUE to invoke Direct Loading. This will effectively bypass most of the RDBMS processing&lt;br /&gt;UNRECOVERABLE to turn off database logging&lt;br /&gt;PARELLEL=TRUE and APPEND in order to run multiple load jobs concurrently for the different partitions.&lt;br /&gt;&lt;br /&gt;My Korn Shell Script looked like this:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;#!/bin/ksh&lt;br /&gt;&lt;br /&gt;export ORAENV_ASK=NO;&lt;br /&gt;export ORACLE_SID=xxprd;&lt;br /&gt;. oraenv;&lt;br /&gt;&lt;br /&gt;export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS".000"'&lt;br /&gt;&lt;br /&gt;sqlldr xx/xx control=c1.ctl DIRECT=TRUE PARALLEL=TRUE log=c1.log &amp;amp;&lt;br /&gt;sqlldr xx/xx control=c2.ctl DIRECT=TRUE PARALLEL=TRUE log=c2.log &amp;amp;&lt;br /&gt;sqlldr xx/xx control=c3.ctl DIRECT=TRUE PARALLEL=TRUE log=c3.log &amp;amp;&lt;br /&gt;&lt;/pre&gt;… etc up to 10 jobs&lt;br /&gt;&lt;br /&gt;And I created 10 control files they all looked identical except for the infile:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;UNRECOVERABLE LOAD DATA&lt;br /&gt; infile '/dump/exports/XXprd/x200512.csv'&lt;br /&gt; append into table usage_profile&lt;br /&gt; fields terminated by "," TRAILING NULLCOLS&lt;br /&gt; (MONTH_ID, MSISDN, IMSI, IMEI, START_DT, END_DT, EVENT_CNT, STREAM, SUCCESS_CALLS, UNSUCCESS, DURATION, VOLUME_UPLINK, VOLUME_DOWNLINK, VOLUME, SUBSCRIBER_TYPE, SP_CODE)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The job completed in 12 minutes and 5 jobs later all 1.5 billion records were loaded!&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-1363852447648891713?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/1363852447648891713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=1363852447648891713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1363852447648891713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/1363852447648891713'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/09/sqlloader-direct.html' title='SQL*Loader direct'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-365801402370616359</id><published>2008-09-03T10:40:00.010+02:00</published><updated>2008-12-23T16:13:04.253+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Administration'/><title type='text'>Moving Online Redo Log Files</title><content type='html'>We found a lot of sessions waiting for Log File Sync and in turn found that LGWR was waiting for Log File Parallel Write.&lt;br /&gt;&lt;br /&gt;We have 2 dedicated disks for Online redo logs. They are multiplexed, with members of the same group on different disks. When a Log Switch occurs 1 member of the Redo Logs being Archived gets READS from the ARCH process while both members of the CURRENT group are receiving WRITE requests from LGWR. We decided to add 2 more disks and split the even numbered groups from the uneven numbered groups. So that we can separate the READS and WRITES.&lt;br /&gt;&lt;br /&gt;Current layout:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt;select GROUP#, STATUS, TYPE, MEMBER from v$logfile;&lt;br /&gt;&lt;br /&gt;G# STATUS TYPE MEMBER&lt;br /&gt;-------------------------&lt;br /&gt;1 ONLINE /dev/vx/rdsk/redodg/casprd_REDO1&lt;br /&gt;1 ONLINE /dev/vx/rdsk/redodg/casprd_REDO1b&lt;br /&gt;2 ONLINE /dev/vx/rdsk/redodg/casprd_REDO2&lt;br /&gt;2 ONLINE /dev/vx/rdsk/redodg/casprd_REDO2b&lt;br /&gt;3 ONLINE /dev/vx/rdsk/redodg/casprd_REDO3&lt;br /&gt;3 ONLINE /dev/vx/rdsk/redodg/casprd_REDO3b&lt;br /&gt;4 ONLINE /dev/vx/rdsk/redodg/casprd_REDO4&lt;br /&gt;4 ONLINE /dev/vx/rdsk/redodg/casprd_REDO4b&lt;br /&gt;5 ONLINE /dev/vx/rdsk/redodg/casprd_REDO5&lt;br /&gt;5 ONLINE /dev/vx/rdsk/redodg/casprd_REDO5b&lt;br /&gt;6 ONLINE /dev/vx/rdsk/redodg/casprd_REDO6&lt;br /&gt;6 ONLINE /dev/vx/rdsk/redodg/casprd_REDO6b&lt;br /&gt;&lt;br /&gt;SQL&gt; select GROUP#,SEQUENCE#,BYTES,MEMBERS,ARC,STATUS,FIRST_TIME from v$log;&lt;br /&gt;&lt;br /&gt;G# S# BYTES MEMBERS ARC STATUS FIRST_TIME&lt;br /&gt;------------------------------------------&lt;br /&gt;1 45181 2147483648 2 YES INACTIVE 03-SEP-2008 08:00:18&lt;br /&gt;2 45182 2147483648 2 YES INACTIVE 03-SEP-2008 08:45:28&lt;br /&gt;3 45183 2147483648 2 NO CURRENT 03-SEP-2008 09:00:47&lt;br /&gt;4 45178 2147483648 2 YES INACTIVE 03-SEP-2008 06:25:02&lt;br /&gt;5 45179 2147483648 2 YES INACTIVE 03-SEP-2008 07:02:21&lt;br /&gt;6 45180 2147483648 2 YES INACTIVE 03-SEP-2008 07:48:50&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We use RAW devices, so after the Unix Admins created the new RAW volumes on the new disks I simply added the members:&lt;br /&gt;&lt;br /&gt;Creating Redo Log Members for the even groups on the 2 new disks:&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO2c' TO GROUP 2;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO2d' TO GROUP 2;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO4c' TO GROUP 4;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO4d' TO GROUP 4;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO6c' TO GROUP 6;&lt;br /&gt;ALTER DATABASE ADD LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO6d' TO GROUP 6;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The status of the new log member is shown as INVALID. This is normal and it will change to active (blank) when it is first used.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SQL&gt; select GROUP#,STATUS,TYPE,MEMBER from v$logfile order by group#, member;&lt;br /&gt;&lt;br /&gt;G STATUS TYPE MEMBER&lt;br /&gt;-----------------------------------------&lt;br /&gt;1 ONLINE /dev/vx/rdsk/redodg/casprd_REDO1&lt;br /&gt;1 ONLINE /dev/vx/rdsk/redodg/casprd_REDO1b&lt;br /&gt;2 ONLINE /dev/vx/rdsk/redodg/casprd_REDO2&lt;br /&gt;2 ONLINE /dev/vx/rdsk/redodg/casprd_REDO2b&lt;br /&gt;2 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO2c&lt;br /&gt;2 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO2d&lt;br /&gt;3 ONLINE /dev/vx/rdsk/redodg/casprd_REDO3&lt;br /&gt;3 ONLINE /dev/vx/rdsk/redodg/casprd_REDO3b&lt;br /&gt;4 ONLINE /dev/vx/rdsk/redodg/casprd_REDO4&lt;br /&gt;4 ONLINE /dev/vx/rdsk/redodg/casprd_REDO4b&lt;br /&gt;4 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO4c&lt;br /&gt;4 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO4d&lt;br /&gt;5 ONLINE /dev/vx/rdsk/redodg/casprd_REDO5&lt;br /&gt;5 ONLINE /dev/vx/rdsk/redodg/casprd_REDO5b&lt;br /&gt;6 ONLINE /dev/vx/rdsk/redodg/casprd_REDO6&lt;br /&gt;6 ONLINE /dev/vx/rdsk/redodg/casprd_REDO6b&lt;br /&gt;6 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO6c&lt;br /&gt;6 INVALID ONLINE /dev/vx/rdsk/redodg/casprd_REDO6d&lt;br /&gt;&lt;br /&gt;SQL&gt; select GROUP#,SEQUENCE#,BYTES,MEMBERS,ARC,STATUS,FIRST_TIME from v$log; &lt;br /&gt;&lt;br /&gt;G# S# BYTES MEMBERS ARC STATUS FIRST_TIME &lt;br /&gt;------------------------------------------------&lt;br /&gt;1 45181 2147483648 2 YES ACTIVE 03-SEP-2008 09:24:18&lt;br /&gt;2 45182 2147483648 4 YES ACTIVE 03-SEP-2008 09:27:28&lt;br /&gt;3 45183 2147483648 2 NO CURRENT 03-SEP-2008 09:30:47&lt;br /&gt;4 45178 2147483648 4 YES INACTIVE 03-SEP-2008 09:17:02&lt;br /&gt;5 45179 2147483648 2 YES INACTIVE 03-SEP-2008 09:19:21&lt;br /&gt;6 45180 2147483648 4 YES INACTIVE 03-SEP-2008 09:22:50&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Before dropping Redo Log Members you should be aware of the following rules:&lt;br /&gt;You can drop a redo log member only if it is not part of an active or current group.&lt;br /&gt;Make sure the group to which a redo log member belongs is archived before dropping the member.&lt;br /&gt;If the member you want to drop is the last valid member of the group, you cannot drop the member until the other members become valid.&lt;br /&gt;So after a few log switches (&lt;span style="font-family:courier new;font-size:78%;"&gt;ALTER SYSTEM SWITCH LOGFILE&lt;/span&gt;) I was ready to drop the old members.&lt;br /&gt;Note that V$LOG.STATUS show ACTIVE for group 1 and 2. This means the Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived. This was the result of all the log switches I did. Once their STATUS changed to INACTIVE I continued dropping the old member.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO2';&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO2b';&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO4';&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO4b';&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO6';&lt;br /&gt;ALTER DATABASE DROP LOGFILE MEMBER '/dev/vx/rdsk/redodg/casprd_REDO6b';&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;_uacct = "UA-4929679-1";&lt;br /&gt;urchinTracker();&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-365801402370616359?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/365801402370616359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=365801402370616359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/365801402370616359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/365801402370616359'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/09/moving-online-redo-log-files.html' title='Moving Online Redo Log Files'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5769992150345190764.post-9107975823107083607</id><published>2008-07-08T13:51:00.007+02:00</published><updated>2011-03-09T08:46:32.375+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Text'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='enq: UL – contention'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Using various tools to solve a problem</title><content type='html'>I was recently called in to take over a performance problem. I quickly determined that only a portion of the database was affected, but it was the most visible part, affecting the business ability to offer a certain feature to millions of our customers. Some queries that should take less than 5 seconds suddenly took minutes to complete.&lt;br /&gt;&lt;br /&gt;Of course the App Vendor claimed that nothing changed around that particular query in years, so it had to be a database problem.&lt;br /&gt;&lt;br /&gt;Looking at OEM’s Average Active Sessions graph on the Performance tab, I could clearly see a huge red stripe (red means the wait is Application related). Drilling down I found waits for an event called “enq: UL – contention” to be the problem. A metalink search retuned no hits and a google search retuned hundreds of forum websites with DBA’s asking “What is enq: UL – contention?”, most of them did not have any replies. The only reference to this event in the manual was found in Oracle® Database Reference 10g Release 2 (10.2) (B14237-01) Appendix E: Oracle Enqueue Names . It simply stated “UL, User-defined Locks”. To me that meant that the app could be using DBMS_LOCK, but the Vendor said they don’t and app support told me that these queries do not write to the database.&lt;br /&gt;&lt;br /&gt;I queried V$SESSION for sessions waiting for EVENT=”enq: UL – contention” to find the SID of the BLOCKING_SESSION, but the BLOCKING_SESSION kept on changing. One blocking session would have confirmed an App issue and the short term solution would have been to kill that process.&lt;br /&gt;&lt;br /&gt;Then I logged a priority 1 SR and was asked to provide system state dumps. Eventually BUG 4367986 was identified as a possibility. The patch was applied, but it made no difference!&lt;br /&gt;&lt;br /&gt;OK, I clearly had to try something else, so I decided to trace 1 session and go through the TKPROF output. I found that the app related SQL statements all executed in less than 5 second, but one statement stood out at 60 seconds elapsed time. That SQL statement was;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;begin ctxsys.drvdml.com_sync_index(:idxname, :idxmem, :partname); end;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Schema ctxsys means Oracle Text is in use and the Vendor then confirmed that Oracle Text indexes where build on an app related audit table almost 2 months ago. The TKPROF also showed INSERTs into the app audit table, so we were finally on the right track.&lt;br /&gt;&lt;br /&gt;This information was uploaded in the SR and I had to check the SYNC intervals via a select from dr$index and confirmed that the 2 audit indexes had SYNC ON COMMIT. We changed the COMMIT interval to MANUAL , just to proof if this problem is related to the SYNC ON COMMIT. Once we changed the commit interval to MANUAL, the wait event disappeared.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec CTX_DDL.REPLACE_INDEX_METADATA('XX','REPLACE METADATA SYNC (MANUAL)');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The SR engineer then supplied the following script to change the SYNC to every 5 minutes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec CTX_DDL.REPLACE_INDEX_METADATA('XX','REPLACE METADATA SYNC (every "SYSDATE+5/1440")');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So the “moral of the story” is that as a DBA you have more than one tool to solve a problem and you should use as many of them as possible until the root cause of the problem is clear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5769992150345190764-9107975823107083607?l=martinmeyer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://martinmeyer.blogspot.com/feeds/9107975823107083607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5769992150345190764&amp;postID=9107975823107083607' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/9107975823107083607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5769992150345190764/posts/default/9107975823107083607'/><link rel='alternate' type='text/html' href='http://martinmeyer.blogspot.com/2008/07/using-various-tools-to-solve-problem.html' title='Using various tools to solve a problem'/><author><name>Thinus Meyer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-SlKYsSUxnsM/AAAAAAAAAAI/AAAAAAAAAHU/6veCJ_YZWyA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry></feed>
