<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Parm Patram &#187; DATAGUARD</title>
	<atom:link href="http://oracle.3dub.com/category/dataguard/feed/" rel="self" type="application/rss+xml" />
	<link>http://oracle.3dub.com</link>
	<description>Oracle, Linux and UNIX tips, tricks and stuff</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:14:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting logging level for LGWR</title>
		<link>http://oracle.3dub.com/2008/10/03/setting-logging-level-for-lgwr/</link>
		<comments>http://oracle.3dub.com/2008/10/03/setting-logging-level-for-lgwr/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 22:00:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DATAGUARD]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[HEADS UP]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=207</guid>
		<description><![CDATA[alter system set log_archive_trace=7935;
This will cause lgwr and archN to write a bunch of stuff to the alert log.
]]></description>
			<content:encoded><![CDATA[<p>alter system set log_archive_trace=7935;</p>
<p>This will cause lgwr and archN to write a bunch of stuff to the alert log.</p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2008/10/03/setting-logging-level-for-lgwr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dataguard step-by-step</title>
		<link>http://oracle.3dub.com/2008/10/02/dataguard-step-by-step/</link>
		<comments>http://oracle.3dub.com/2008/10/02/dataguard-step-by-step/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 15:37:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DATAGUARD]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=195</guid>
		<description><![CDATA[his process is for setting up replication to another databse on the same system.
SYSTEM
add the service names in the /etc/hosts file:
127.0.0.1       localhost.localdomain   localhost orcl klon
PRIMARY DATABASE
Enable force logging:
SYS@orcl 11:26:29&#62; select force_logging from v$database;
FOR
&#8212;
NO
SYS@orcl 11:26:54&#62; alter database force logging;
Database altered.
SYS@orcl 11:27:12&#62; select force_logging from v$database;
FOR
&#8212;
YES
Create password file (usually [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">his process is for setting up replication to another databse on the same system.</p>
<p style="text-align: center;"><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>SYSTEM</strong></span></span></p>
<p style="text-align: left;"><span style="color: #0000ff;"><em>add the service names in the /etc/hosts file:</em></span><br />
127.0.0.1       localhost.localdomain   localhost orcl klon</p>
<p style="text-align: center;"><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>PRIMARY DATABASE</strong></span></span></p>
<p><em><span style="color: #0000ff;">Enable force logging:</span></em><br />
SYS@orcl 11:26:29&gt; <span style="color: #ff0000;">select force_logging from v$database;</span></p>
<p>FOR<br />
&#8212;<br />
NO</p>
<p>SYS@orcl 11:26:54&gt; <span style="color: #ff0000;">alter database force logging;</span></p>
<p>Database altered.</p>
<p>SYS@orcl 11:27:12&gt; <span style="color: #ff0000;">select force_logging from v$database;</span></p>
<p>FOR<br />
&#8212;<br />
YES</p>
<p><span style="color: #0000ff;"><em>Create password file (usually not necessary). The SYS password must be the same for the primary and all standby databases.</em></span></p>
<p><em><span style="color: #0000ff;">Configure a standby redo log<br />
</span></em><span style="color: #0000ff;"><span style="color: #000000;">Get the number of log groups and logfile sizes from EM and then create the standy redo log groups:<br />
</span><em>Remember to increment the group numbers, add the &#8217;standby&#8217; keyword, and change the logfile names</em></span></p>
<p><span style="color: #ff0000;">ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ( &#8216;/u01/app/oracle/oradata/orcl/REDO/sb_redo01.log&#8217;) SIZE 51200K;<br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ( &#8216;/u01/app/oracle/oradata/orcl/REDO/sb_redo02.log&#8217;) SIZE 51200K;<br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 ( &#8216;/u01/app/oracle/oradata/orcl/REDO/sb_redo03.log&#8217;) SIZE 51200K;<br />
/</span></p>
<p><span style="color: #0000ff;">Verify that the standby logs have been added:</span><br />
SYS@orcl 12:07:25&gt; <span style="color: #ff0000;">SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;</span></p>
<p>GROUP#    THREAD#  SEQUENCE# ARC STATUS<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212; &#8212;&#8212;&#8212;-<br />
4       0             0 YES UNASSIGNED<br />
5       0             0 YES UNASSIGNED<br />
6       0             0 YES UNASSIGNED</p>
<pre class="oac_no_warn"><span style="color: #0000ff;"><em>Configure the Primary database (both as primary and secondary -- for switchover of roles):
</em></span><span style="color: #ff0000;"><span style="color: #008000;"><strong># Primary Role Initialization Parameters:
#
#DB_NAME=orcl
DB_UNIQUE_NAME=orcl
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,klon)'
#
# get from show parameter control_files;
#CONTROL_FILES='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl','/u01/app/oracle/oradata/orcl/control03.ctl'
#
# get from select a.dest_id,name,destination from v$archived_log a, v$archive_dest b where a.dest_id=b.dest_id;
#check the LOCATION directory to see if the db name is in a folder in lowercase or not!
LOG_ARCHIVE_DEST_1=
 'LOCATION=/u01/app/oracle/product/11.1.0/db_1/dbs/
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=ORCL'
#
LOG_ARCHIVE_DEST_2=
 'SERVICE=klon LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=klon'
#
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
#REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
#
#get from show parameter log_archive_format
# this is setup automatically when archivelog is enabled
#LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
#
LOG_ARCHIVE_MAX_PROCESSES=4
#
#
#Standby Role Initialization Parameters:
#
FAL_SERVER=klon
FAL_CLIENT=orcl
DB_FILE_NAME_CONVERT='klon','orcl'
LOG_FILE_NAME_CONVERT='/klon/','/orcl/'
STANDBY_FILE_MANAGEMENT=AUTO</strong></span>
</span>

<span style="color: #0000ff;"><em>Apply these settings to the Primary database (also make sure that the database is in archivelog mode):</em></span>
<span style="color: #ff0000;">create pfile='/home/oracle/DATAGUARD/init_orcl.ora' from spfile;</span>
Then add the above lines to what is there already. Be sure to comment out anything in your additons that are already in the pfile.
shutdown immediate;
<span style="color: #ff0000;">create spfile from pfile='/home/oracle/DATAGUARD/init_orcl.ora';
startup</span></pre>
<p style="text-align: center;"><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>SECONDARY DATABASE</strong></span></span></p>
<p><span style="color: #0000ff;"><em>Create a backup copy of the primary database datafiles.</em></span></p>
<p style="text-align: left;"><em><span style="color: #0000ff;">Configure a standby redo log</span></em></p>
<p style="text-align: left;"><span style="color: #ff0000;">ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ( &#8216;/u01/app/oracle/oradata/klon/REDO/sb_redo01.log&#8217;) SIZE 51200K;<br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ( &#8216;/u01/app/oracle/oradata/klon/REDO/sb_redo02.log&#8217;) SIZE 51200K;<br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 ( &#8216;/u01/app/oracle/oradata/klon/REDO/sb_redo03.log&#8217;) SIZE 51200K;<br />
/</span></p>
<p style="text-align: left;"><span style="color: #0000ff;"><em>Setup the parameters for the standby database:</em></span></p>
<p style="text-align: left;"><span style="color: #ff0000;">create pfile=&#8217;/home/oracle/DATAGUARD/init_klon.ora&#8217; from spfile;<br />
shutdown immediate</span></p>
<p style="text-align: left;">Add the following lines to the parameter file, then apply the changes:</p>
<p style="text-align: left;"><span style="color: #ff0000;">create spfile from pfile=&#8217;/home/oracle/DATAGUARD/init_klon.ora&#8217;;<br />
startup</span></p>
<p style="text-align: left;"><em><span style="color: #0000ff;"><strong>Make sure you give a different directory for the log_archive_dest_1 directory so that the logfiles do not clobber each other!</strong></span></em></p>
<p style="text-align: left;"><span style="color: #008080;"><strong># db_name must be the same for the primary and all standby databases<br />
DB_NAME=orcl<br />
DB_UNIQUE_NAME=klon<br />
LOG_ARCHIVE_CONFIG=&#8217;DG_CONFIG=(orcl,klon)&#8217;<br />
DB_FILE_NAME_CONVERT=(&#8217;orcl&#8217;,'klon&#8217;)<br />
LOG_FILE_NAME_CONVERT=&#8217;orcl&#8217;,'klon&#8217;<br />
#LOG_ARCHIVE_FORMAT=log%t_%s_%r.arc<br />
log_archive_trace=7935<br />
LOG_ARCHIVE_DEST_1=<br />
&#8216;LOCATION=/u01/app/oracle/product/11.1.0/db_1/dbs/klon<br />
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)<br />
DB_UNIQUE_NAME=klon&#8217;<br />
LOG_ARCHIVE_DEST_2=<br />
&#8216;SERVICE=orcl LGWR ASYNC<br />
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)<br />
DB_UNIQUE_NAME=orcl&#8217;<br />
LOG_ARCHIVE_DEST_STATE_1=ENABLE<br />
LOG_ARCHIVE_DEST_STATE_2=ENABLE<br />
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE<br />
STANDBY_FILE_MANAGEMENT=AUTO<br />
FAL_SERVER=orcl<br />
FAL_CLIENT=klon<br />
</strong></span></p>
<p style="text-align: left;">
<p style="text-align: center;"><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>HEADS-UP</strong></span></span></p>
<p style="text-align: left;">I did this on an 11g installation and kept getting error ora-1017. Finally I redid the passwords to remove case-sensitivity and it fixed the problem:</p>
<p style="text-align: left;"><span style="color: #008000;">orapwd file=/u01/app/oracle/product/11.1.0/db_1/dbs/orapw&lt;DBID&gt; password=&lt;passwd&gt; entries=10 force=y ignorecase=y</span></p>
<p style="text-align: left;">I had to enable lgwr logging in order to see the error as well. See post</p>
<p><a href="http://oracle.3dub.com/?p=207">set lgwr logging level</a></p>
<p>There was also mention that on some versions if the connect identifier had a multiple of 5 characters that the same problem would result.</p>
<p>see also <a href="http://www.colestock.com/blogs/2007/10/creating-physical-standby-using.html">http://www.colestock.com/blogs/2007/10/creating-physical-standby-using.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2008/10/02/dataguard-step-by-step/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dataguard setup</title>
		<link>http://oracle.3dub.com/2008/10/02/dataguard-setup/</link>
		<comments>http://oracle.3dub.com/2008/10/02/dataguard-setup/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 15:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DATAGUARD]]></category>

		<guid isPermaLink="false">http://oracle.3dub.com/?p=193</guid>
		<description><![CDATA[http://oracle.3dub.com/10g/server.102/b14239/create_ps.htm
]]></description>
			<content:encoded><![CDATA[<p><a href="http://oracle.3dub.com/10g/server.102/b14239/create_ps.htm">http://oracle.3dub.com/10g/server.102/b14239/create_ps.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://oracle.3dub.com/2008/10/02/dataguard-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

