<?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:blogger='http://schemas.google.com/blogger/2008' 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-6673023210770662282</id><updated>2024-09-08T09:22:29.421+05:30</updated><title type='text'>Ask Sandy</title><subtitle type='html'>A complete Oracle, SQL Server &amp;amp; DB2 database solution by Sandeep</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-8797393035801510199</id><published>2013-01-17T18:11:00.000+05:30</published><updated>2013-01-17T18:11:32.848+05:30</updated><title type='text'>Step By Step Oracle Golden Gate </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;background-color: #fafcff; color: #2a2a2a; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; width: 817px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; valign=&quot;top&quot; width=&quot;817&quot;&gt;&lt;h2&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;STEP BY STEP INSTALLATION OF ORACLE GOLDEN GATE ONE WAY REPLICATION&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FOR NON RAC DATABASE( ACTIVE – PASSIVE)&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; valign=&quot;top&quot; width=&quot;817&quot;&gt;&lt;strong&gt;STEP 0&amp;nbsp;&amp;nbsp; ————— Hardware and O/S configuration&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 1&amp;nbsp;&amp;nbsp; —————&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;Database Pre requisites&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 2&amp;nbsp;&amp;nbsp; ————— GG Software Installation&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 3&amp;nbsp;&amp;nbsp; ————— Preparing source database for replication&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 3a ————— GG DDL Support Replication&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 4&amp;nbsp;&amp;nbsp; ————— Create Manager process @ Source&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 5&amp;nbsp;&amp;nbsp; ————— Create Extract process @ Source&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 6&amp;nbsp;&amp;nbsp; ————— Create Checkpoint table @ Target&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 7&amp;nbsp;&amp;nbsp; ————— Create Replicate process @ Target&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 8&amp;nbsp;&amp;nbsp; ————— Initial Data load (EXP/IMP)&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 9&amp;nbsp;&amp;nbsp; ————— Start Extract&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 10 ————— Start Replicat&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 11————— TEST CASES&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
TASK&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 0:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Hardware and O/S configuration&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;Now, let’s take a look at the Oracle database details which we&amp;nbsp;will be using for our GOLDEN GATE configuration.( I am using VMWARE nodes)&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;1&quot; style=&quot;width: 341px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SOURCE Database&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Oracle Release:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Oracle10 Release 2 – (10.2.0.5.0)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Machine Name:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Source.gg.com&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Operating System:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Red Hat Linux 5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Oracle SID:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;DBSOURCE&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Replication Schema&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;SCOTT&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
TARGET Database&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Oracle Release:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Oracle10 Release 2 – (10.2.0.5.0)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Machine Name:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Target.gg.com&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Operating System:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;Red Hat Linux 5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Oracle SID:&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;DBTARGET&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;strong&gt;Replication Schema&lt;/strong&gt;&lt;/td&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;SCOTT&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Download the oracle Golden Gate software from below URL&amp;nbsp; and copy to both source and target servers&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
we need to download the required software from the&amp;nbsp;&lt;a href=&quot;http://edelivery.oracle.com/&quot; style=&quot;color: #0a8fbc; font-weight: bold; text-decoration: initial;&quot;&gt;Oracle E-Delivery web site&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Step 1:–&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Database Pre requisites&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&lt;em&gt;Need to be carried out at both source and target&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SQL&amp;gt; create tablespace ggs_data&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; datafile ‘/oradata/&lt;dbname&gt;ggs_data01.dbf’ size 200m;&lt;/dbname&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SQL&amp;gt; create user ggs_owner identified by ggs_owner&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; default tablespace ggs_data&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; temporary tablespace temp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant connect, resource to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant select any dictionary, select any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant create table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant flashback any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant execute on dbms_flashback to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant execute on utl_file to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant create any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant insert any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant update any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant delete any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grant drop any table to ggs_owner;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INIT_ORA change&lt;/strong&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;UNDO_MANAGEMENT=AUTO&lt;/li&gt;
&lt;li&gt;UNDO_RETENTION=86400&lt;/li&gt;
&lt;/ol&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Step 2:–&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;GG Software Installation&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&lt;em&gt;Need to be carried out at both source and target&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
1 binary for SOURCE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
1 binary for TARGET REPLICAT&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SOURCE&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
n&amp;nbsp; mkdir&amp;nbsp; /oradata/gg/&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TARGET&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
n&amp;nbsp; mkdir /oradata/gg/&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;set environment variables on both SOURCE and TARGET before starting the installation on all the three locations&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;$mkdir /oradata/gg&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
$unzip V18157-01.zip&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Archive:&amp;nbsp; V18157-01.zip&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
inflating: ggs_redhatAS40_x64_ora10g_64bit_v10.4.0.19_002.tar&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
$ tar -xf ggs_redhatAS40_x64_ora10g_64bit_v10.4.0.19_002.tar&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/oradata/gg&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $&amp;nbsp; . /ggsci&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; — YOU WILL GET GG COMMAND PROMPT&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&amp;nbsp; GGSCI (hostname) 1&amp;gt; CREATE SUBDIRS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; — Issue the following command to exit GGSCI.&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/strong&gt;GGSCI (hostname) 1&amp;gt; EXIT&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 3:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Preparing source database for replication&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&lt;em&gt;Need to be carried out at&amp;nbsp; source&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;Switch the database to archivelog mode:&lt;/strong&gt;shutdown immediate&amp;nbsp;startup mount&amp;nbsp;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
alter database archivelog;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
alter database open;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;Enable minimal supplemental logging:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;SQL&amp;gt; alter database add supplemental log data;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;Prepare the database to support ddl replication.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;SQL&amp;gt; alter system set recyclebin=off scope=spfile;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;n&amp;nbsp; bounce the database&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Step3a :-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Run scripts for creating all necessary objects for support DDL replication&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&lt;em&gt;Need to be carried out at&amp;nbsp; source&lt;/em&gt;&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;Note – run the scripts as SYSDBA&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SQL&amp;gt; @/oradata/gg/marker_setup.sql&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Marker setup script&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;You will be prompted for the name of a schema for the GoldenGate database objects.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: The schema must be created prior to running this script.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: Stop all DDL replication before starting this installation.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Enter GoldenGate schema name:&lt;strong&gt;&amp;nbsp;GGS_OWNER&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Marker setup table script complete, running verification script…&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Please enter the name of a schema for the GoldenGate database objects:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Setting schema name to GGS_OWNER&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;MARKER TABLE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
——————————-&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
MARKER SEQUENCE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
——————————-&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Script complete.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;SQL&amp;gt; @/oradata/gg/ddl_setup.sql&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;GoldenGate DDL Replication setup script&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Verifying that current user has privileges to install DDL Replication…&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
You will be prompted for the name of a schema for the GoldenGate database objects.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: The schema must be created prior to running this script.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: On Oracle 10g and up, system recycle bin must be disabled.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: Stop all DDL replication before starting this installation.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Enter GoldenGate schema name&lt;strong&gt;: GGS_OWNER&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;You will be prompted for the mode of installation.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
To install or reinstall DDL replication, enter INITIALSETUP&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
To upgrade DDL replication, enter NORMAL&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Enter mode of installation:INITIALSETUP&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Working, please wait …&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Spooling to file ddl_setup_spool.txt&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Using GGS_OWNER as a GoldenGate schema name, INITIALSETUP as a mode of installation.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Working, please wait …&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;RECYCLEBIN must be empty.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
This installation will purge RECYCLEBIN for all users.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
To proceed, enter yes. To stop installation, enter no.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Enter yes or no:yes&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL replication setup script complete, running verification script…&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Please enter the name of a schema for the GoldenGate database objects:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Setting schema name to GGS_OWNER&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDLORA_GETTABLESPACESIZE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
CLEAR_TRACE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
CREATE_TRACE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
TRACE_PUT_LINE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
INITIAL_SETUP STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
DDLVERSIONSPECIFIC PACKAGE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
DDLREPLICATION PACKAGE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDLREPLICATION PACKAGE BODY STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL HISTORY TABLE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL HISTORY TABLE(1)&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL DUMP TABLES&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL DUMP COLUMNS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL DUMP LOG GROUPS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL DUMP PARTITIONS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL DUMP PRIMARY KEYS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL SEQUENCE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGS_TEMP_COLS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGS_TEMP_UK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL TRIGGER CODE STATUS:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Line/pos&amp;nbsp;&amp;nbsp; Error&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———- —————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
No errors&amp;nbsp; No errors&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL TRIGGER INSTALL STATUS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OK&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL TRIGGER RUNNING STATUS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
ENABLED&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;STAYMETADATA IN TRIGGER&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
OFF&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL TRIGGER SQL TRACING&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
0&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;DDL TRIGGER TRACE LEVEL&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
———————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
0&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;LOCATION OF DDL TRACE FILE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
——————————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
/u01/app/oracle/diag/rdbms/gavin/gavin/trace/ggs_ddl_trace.log&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Analyzing installation status…&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;STATUS OF DDL REPLICATION&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
——————————————————————————–&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SUCCESSFUL installation of DDL Replication software components&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Script complete.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SQL&amp;gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;SQL&amp;gt;&amp;nbsp;&lt;strong&gt;@/oradata/gg/role_setup.sql&lt;/strong&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGS Role setup script&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;This script will drop and recreate the role GGS_GGSUSER_ROLE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
To use a different role name, quit this script and then edit the params.sql script to change&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
the gg_role parameter to the preferred name. (Do not run the script.)&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;You will be prompted for the name of a schema for the GoldenGate database objects.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: The schema must be created prior to running this script.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NOTE: Stop all DDL replication before starting this installation.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Enter GoldenGate schema name:&lt;strong&gt;GGS_OWNER&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Wrote file role_setup_set.txt&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;PL/SQL procedure successfully completed.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Role setup script complete&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GRANT GGS_GGSUSER_ROLE TO&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;where&amp;nbsp; is the user assigned to the GoldenGate processes.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;SQL&amp;gt;&amp;nbsp;&lt;strong&gt;grant ggs_ggsuser_role to ggs_owner;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Grant succeeded.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;SQL&amp;gt;&amp;nbsp;&lt;strong&gt;@/oradata/gg/ddl_enable&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Trigger altered.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;SQL&amp;gt;&amp;nbsp;&lt;strong&gt;@/oradata/gg/ddl_pin GGS_OWNER&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;PL/SQL procedure successfully completed.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;PL/SQL procedure successfully completed.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;PL/SQL procedure successfully completed.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;Enable additional logging at the table level&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;Note- We had earlier enabled additional supplemental logging at the database level. Using the ADD TRANDATA command we now enable it at even the table level as this is required by Golden Gate for DDL support.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (soruce hostname) 5&amp;gt;&amp;nbsp;&lt;strong&gt;DBLOGIN USERID ggs_owner, PASSWORD ggs_owner&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;SQL&amp;gt; select ‘add trandata ‘||owner||’.&#39;||object_name||’;’ from dba_objects where owner=’RPD_PRC’ and object_type=’TABLE’;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;GGSCI(source hostname) 6&amp;gt;&lt;/strong&gt;&amp;nbsp;add trandata &amp;lt;&lt;strong&gt;owner&lt;/strong&gt;&amp;gt;.&amp;lt;&lt;strong&gt;tablename&lt;/strong&gt;&amp;gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 4:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;Create and start manager on the source and the destination.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&amp;nbsp;&lt;em&gt;NEED TO BE CARRIED OUT AT SOURCE&lt;/em&gt;&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
[oracle@DBSOURCE gg]$&amp;nbsp;&lt;strong&gt;./ggsci&lt;/strong&gt;&amp;nbsp;Oracle GoldenGate Command Interpreter for Oracle&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Version 11.1.1.0.0 Build 078&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Linux, x64, 64bit (optimized), Oracle 10 on Jul 28 2010 13:21:11&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 1&amp;gt;&amp;nbsp;&lt;strong&gt;DBLOGIN USERID ggs_owner, PASSWORD ggs_owner&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Successfully logged into database.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 44&amp;gt;&amp;nbsp;&lt;strong&gt;info all&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Program&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lag&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time Since Chkpt&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;MANAGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STOPPED&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 45&amp;gt;&amp;nbsp;&lt;strong&gt;edit params mgr&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;PORT 7809&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
USERID ggs_owner, PASSWORD ggs_owner&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
PURGEOLDEXTRACTS /oradata/gg/dirdat/ex, USECHECKPOINTS&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 46&amp;gt;&amp;nbsp;&lt;strong&gt;info all&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Program&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lag&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time Since Chkpt&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;MANAGER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STOPPED&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 47&amp;gt;&amp;nbsp;&lt;strong&gt;dblogin USERID ggs_owner, PASSWORD ggs_owner&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Successfully logged into database.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBSOURCE) 48&amp;gt;&amp;nbsp;&lt;strong&gt;start manager&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Manager started.&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STEP 5 :&lt;/strong&gt;&lt;strong&gt;-&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create the extract group&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&amp;nbsp;&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;NEED TO BE CARRIED OUT AT SOURCE&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBSOURCE) 49&amp;gt; add extract ext1, tranlog, begin nowEXTRACT added.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBSOURCE) 50&amp;gt; add exttrail /oradata/gg/dirdat/lt, extract ext1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
EXTTRAIL added.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBSOURCE) 51&amp;gt; edit params ext1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Add the following lines to the new parameter file for our extract:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–extract group–&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
extract ext1&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–connection to database–&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
userid ggs_owner, password ggs_owner&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–hostname and port for trail–&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
rmthost 172.168.10.108, mgrport 7810&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–path and name for trail–&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
rmttrail /oradata/gg/dirdat/lt&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–DDL support&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
DDL INCLUDE ALL&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
ddl include mapped objname SCOTT.*;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–DML&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
table SCOTT.*;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
table SCOTT.EMP;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
table SCOTT.DEPT;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
table SCOTT.SALARY;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
:wq&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 6:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;CREATE CHECKPOINT TABLE&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;NEED TO BE CARRIED OUT AT TARGET&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;[oracle@DBTARGET gg]$&amp;nbsp;&lt;strong&gt;./ggsci&lt;/strong&gt;&amp;nbsp;add checkpoint table to the destination database&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBTARGET) 1&amp;gt;&amp;nbsp;&lt;strong&gt;edit params ./GLOBAL&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;and put following lines to the global parameter file:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCHEMA ggs_owner&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;CHECKPOINTTABLE ggs_owner. Checkpoint&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBTARGET) 2&amp;gt;&amp;nbsp;&lt;strong&gt;dblogin userid ggs_owner password password&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Successfully logged into database.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;GGSCI (DBTARGET) 3&amp;gt;&amp;nbsp;&lt;strong&gt;add checkpointtable ggs_owner.checkpoint&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Successfully created checkpoint table ggs_owner.CHECKPOINT.&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 7:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;CREATE REPLICAT&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;em&gt;&lt;strong&gt;NEED TO BE CARRIED OUT AT TARGET&lt;/strong&gt;&lt;/em&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBTARGET) 4&amp;gt;&lt;strong&gt;add replicat rep1, exttrail /oradata/gg/dirdat/lt,checkpointtable ggs_owner.checkpoint&lt;/strong&gt;GGSCI (DBTARGET) 4&amp;gt;&amp;nbsp;&lt;strong&gt;EDIT PARAMS rep1&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
edit params rep1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–target database login –&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
userid ggs_owner, password ggs_owner&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–file for dicarded transaction –&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–discardfile /oradata/gg/discard/rep1_discard.txt, append, megabytes 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–ddl support&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
DDL INCLUDE ALL&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
DDLERROR DEFAULT IGNORE RETRYOP&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
–Specify table mapping —&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
MAP SCOTT.*,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TARGET SCOTT.*;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
MAP SCOTT.EMP,&amp;nbsp;&amp;nbsp; TARGET SCOTT.EMP;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
MAP SCOTT.DEPT,&amp;nbsp;&amp;nbsp; TARGET SCOTT.DEPT;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
MAP SCOTT.SALARY,&amp;nbsp;&amp;nbsp; TARGET SCOTT.SALARY;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 8:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;INITIAL DATALOAD&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;EXPORT: @ SOURCE&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;$&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;expdp directory=db_dir dumpfile=schema_gg.dmp logfile=schema_gg.log schemas=scott&amp;nbsp;&lt;strong&gt;Scp from SOURCE and TARGET&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;$&lt;/strong&gt;scp –p schema_gg.dmp&amp;nbsp;&lt;strong&gt;172.168.10.108:/oradata&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;IMPORT: @ TARGET&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;$&lt;/strong&gt;&lt;strong&gt;impdp directory=db_dir dumpfile=schema_gg.dmp logfile=schema_imp_gg.log schemas=SCOTT&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 9:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;START EXTRACT&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;em&gt;&lt;strong&gt;NEED TO BE CARRIED OUT AT &amp;nbsp;SOURCE&lt;/strong&gt;&lt;/em&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBSOURCE) 45&amp;gt;&amp;nbsp; start EXT1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Sending START request to MANAGER …&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
EXTRACT EXT2 starting&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 10:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;START REPLICAT&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;em&gt;&lt;strong&gt;NEED TO BE CARRIED OUT AT TARGET&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
GGSCI (DBTARGET) 10&amp;gt; start replicat rep1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Sending START request to MANAGER …&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
REPLICAT REP1 starting&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;301&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;STEP 11:-&lt;/strong&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TEST CASES&lt;/strong&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot; width=&quot;516&quot;&gt;&lt;strong&gt;&lt;em&gt;CASE 1: CREATE TABLE IN THE SOURCE DATABASE&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SOURCE:create table SCOTT.Employee(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(4 BYTE) ,&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
First_Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(10 BYTE),&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Last_Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(10 BYTE),&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Start_Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE,&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
End_Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE,&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Salary&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Number(8,2),&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
City&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(10 BYTE),&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VARCHAR2(15 BYTE)&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT * FROM SCOTT.EMPLOYEE;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NO ROWS SELECTED&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
TARGET:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT * FROM SCOTT.EMPLOYEE;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
NO ROWS SELECTED&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;&lt;em&gt;Case 2:CREATE TABLE AND INSERT DATA INTO IT&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SOURCE:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Create table test_gg_1(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number2(10),&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Username varchar2(20)&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Insert into test_gg_1 values(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
1, ‘USER1’);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Insert into test_gg_1 values(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
2,’USER2’);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Insert into test_gg_1 values(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
3,’USER3’);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Insert into test_gg_1 values(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
4,’USER4’);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Insert into test_gg_1 values(&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
5,’USER5’);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;COMMIT;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT * FROM SCOTT.TEST_GG_1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TARGET :&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT * FROM SCOTT.TEST_GG_1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;&lt;em&gt;CASE3: UPDATE THE RECORD&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SOURCE:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Update scott.test_gg_1 set username=’USERDBA’ where id=1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Commit;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TARGET:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;Select * from scott.test_gg_1 where id=1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
n&amp;nbsp; you will find the updated record in the target database&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;CASE4: DELETE THE RECORD&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SOURCE :&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Delete from scott.test_gg_1 where id=4;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Commit;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TARGET:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Select * from scott.test_gg_1 where id=4;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
n&amp;nbsp; you will not find the deleted record in the target database&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&lt;em&gt;CASE 5: TRUNCAT THE RECORDS&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;SOURCE:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Truncate table scott.test_gg_1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Commit;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Select * from scott.test_gg_1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;TARGET :&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
Select * from scott.test_gg_1;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
n&amp;nbsp; since the records are truncated in the source you will not find any records in the target.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;strong&gt;&lt;em&gt;CASE 6: CREATE A TRIGGER&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SOURCE:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
create or replace trigger SCOTT.emp_biu&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
BEFORE INSERT OR UPDATE&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
of salary&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
on employee&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
for each row&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
declare&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
v_error VARCHAR2(2000);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
begin&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
if :new.salary &amp;gt; 10000&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
then&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
v_error:=:old.first_name||’ cannot have that much!’;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
raise_application_error(-20999,v_error);&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
end if;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
end;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
/&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT OBJECT_NAME,OBJECT_TYPE,OWNER FROM DBA_OBJECTS WHERE OBJECT_NAME=’EMP_BIU’;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
TARGET:&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
SELECT OBJECT_NAME,OBJECT_TYPE,OWNER FROM DBA_OBJECTS WHERE OBJECT_NAME=’EMP_BIU’;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;&lt;em&gt;CASE 7: create table with primary Key&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
If you create any table with constrains, Golden gate will not replicated it automatically. We need to perform below steps:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;stop the extract&lt;/li&gt;
&lt;li&gt;stop the replicat&lt;/li&gt;
&lt;li&gt;take the export of the table which is having constrains.&lt;/li&gt;
&lt;li&gt;Copy it to target server.&lt;/li&gt;
&lt;li&gt;Import the exported dump.&lt;/li&gt;
&lt;li&gt;Map the table in the replicat parameter file&lt;/li&gt;
&lt;li&gt;Enable HANDLECOLLUSION parameter in the replicat parameter.&lt;/li&gt;
&lt;li&gt;Start the replicat&lt;/li&gt;
&lt;li&gt;Start the extract.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 15px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/8797393035801510199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2013/01/step-by-step-oracle-golden-gate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8797393035801510199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8797393035801510199'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2013/01/step-by-step-oracle-golden-gate.html' title='Step By Step Oracle Golden Gate '/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-5015293297723380065</id><published>2011-12-07T16:27:00.000+05:30</published><updated>2011-12-07T16:27:11.811+05:30</updated><title type='text'>Oracle Background Processes 10G</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle 10g Background processes &lt;br /&gt;
&lt;br /&gt;
There are a large number of new background processes in Oracle 10g, however there are just 5 that are vital for the Database to work.&lt;br /&gt;
5 Old and Vital background processes&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;SMON (System Monitor):&lt;/span&gt;&lt;/strong&gt; Performs instance recovery, cleans up temporary segments no longer in use and recovers dead transactions, coalesce free extents in the database.&lt;br /&gt;
&lt;br /&gt;
-&lt;span style=&quot;color: red;&quot;&gt;&lt;strong&gt; DBWR (Database Writer):&lt;/strong&gt;&lt;/span&gt; This process in on charge of writing to the DB files.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;CKPT (Checkpoint):&lt;/span&gt;&lt;/strong&gt; This process is on charge of executing checkpoint&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;PMON (Process Monitor):&lt;/span&gt;&lt;/strong&gt; Recovers when a user process fails, clean up cache and free resources, it also monitors dispatchers and server processes.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;LGWR (Log Writer):&lt;/span&gt;&lt;/strong&gt; This process is on charge of write to the redo log files &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;New Background processes&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;ASM:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;span style=&quot;color: red;&quot;&gt;&lt;strong&gt;ARBn : (ASM)&lt;/strong&gt;&lt;/span&gt; Rebalance working process , it rebalances extents.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORBn:&lt;/span&gt;&lt;/strong&gt; Rebalance ASM data extent movements. There can be many of this at the same time.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;RBAL :&lt;/span&gt;&lt;/strong&gt; This is the ASM Rebalance Master disk manager, open all disks under each disk group and make them available to the various clients. It also creates the rebalance plan to move extents.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;OSMB: (ASM)&lt;/span&gt;&lt;/strong&gt; Helps to manage the drive storage.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ASMB: (ASM)&lt;/span&gt;&lt;/strong&gt; Responsible to communicate the database Instance to the ASM Instance, provides the heartbeat to the ASM instance.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;Server Side Optional&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;RECO:&lt;/span&gt;&lt;/strong&gt; Helps to Recover distributed Transactions.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_CJQ0_:&lt;/span&gt;&lt;/strong&gt; Job queue coordinator , checks the log and spawn J### processed&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;QMNC: &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;AQ&lt;/span&gt;&lt;/strong&gt; Coordinator, used to manage Oracle Streams Advance Queuing.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ARCH, ARCn&lt;/span&gt;&lt;/strong&gt;: Copies redo logs to archive logs destination.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;CTWR:&lt;/span&gt;&lt;/strong&gt; Block Change Tracking Writer.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_D###_:&lt;/span&gt;&lt;/strong&gt; Oracle Dispatchers processed&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_J###_:&lt;/span&gt;&lt;/strong&gt; Job queue process&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_MMAN_:&lt;/span&gt;&lt;/strong&gt; Memory manager, used for the manage of the automatic shared memory.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_MMNL_:&lt;/span&gt;&lt;/strong&gt; Helps collecting metrics and information about sessions.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_MMON_:&lt;/span&gt;&lt;/strong&gt; On charge of collecting stats.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA###_:&lt;/span&gt;&lt;/strong&gt; Dedicated server (user process).&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_RVWR_:&lt;/span&gt;&lt;/strong&gt; Recovery Writer (Flashback Database).&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_S###_:&lt;/span&gt;&lt;/strong&gt; Oracle Shared Server Process (Multi Threaded Server)&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_P###_:&lt;/span&gt;&lt;/strong&gt; Parallel Query Slaves Process&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_LNS#_:&lt;/span&gt;&lt;/strong&gt; Network Server.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;strong&gt;Other Processes&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
-&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt; ORA_AQ_:&lt;/span&gt;&lt;/strong&gt; Sends notifications when messages arrive into the queues (Advance Queue).&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_Q###_:&lt;/span&gt;&lt;/strong&gt; Queue Process.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_DMON_:&lt;/span&gt;&lt;/strong&gt; Data Guard Broker Process.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_SNP###_:&lt;/span&gt;&lt;/strong&gt; Snapshot process (Data Guard).&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_TRWR_:&lt;/span&gt;&lt;/strong&gt; Advance Queuing Time Manager.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_WMON_:&lt;/span&gt;&lt;/strong&gt; Wakeup monitor process.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Undocumented Server Side Extra&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_FMON_:&lt;/span&gt;&lt;/strong&gt; Manage mapping information when using FILE_MAPPING&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: lime;&quot;&gt;Standby Mode&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_LSP0_:&lt;/span&gt;&lt;/strong&gt; Logical Standby&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_LSP1_:&lt;/span&gt;&lt;/strong&gt; Dictionary build process for Logical Standby&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_LSP2_:&lt;/span&gt;&lt;/strong&gt; Set Guard Standby information for logical Standby.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_DMON_:&lt;/span&gt;&lt;/strong&gt; Data Guard Broker Monitor Process.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_RSM#_:&lt;/span&gt;&lt;/strong&gt; Data Guard Broker Resource Guard process.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_INSV_:&lt;/span&gt;&lt;/strong&gt; Data Guard Broker Instance slave process&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_NSV#_:&lt;/span&gt;&lt;/strong&gt; Data Guard Broker NetSlave Process.&lt;br /&gt;
&lt;br /&gt;
- &lt;span style=&quot;color: red;&quot;&gt;&lt;strong&gt;ORA_MRP0_:&lt;/strong&gt;&lt;/span&gt; Managed Recovery process for Data Guard.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_RFS_:&lt;/span&gt;&lt;/strong&gt; Remote File Server process (Data Guard) receives archived redo from primary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: lime;&quot;&gt;Real Application Cluster&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
- The following processes are unique to a RAC environment. You will not see them otherwise.&lt;br /&gt;
&lt;br /&gt;
* &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Lock monitor (LMON) process:&lt;/span&gt;&lt;/strong&gt; The LMON process monitors all instances in a cluster to detect the failure of an instance. It then facilitates the recovery of the global locks held by the failed instance. It is also responsible for reconfiguring locks and other resources when instances leave or are added to the cluster (as they fail and come back online, or as new instances are added to the cluster in real time).&lt;br /&gt;
&lt;br /&gt;
* &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Lock manager daemon (LMD) process:&lt;/span&gt;&lt;/strong&gt; The LMD process handles lock manager service requests for the global cache service (keeping the block buffers consistent between instances). It works primarily as a broker sending requests for resources to a queue that is handled by the LMSn processes. The LMD handles global deadlock detection/resolution and monitors for lock timeouts in the global environment.&lt;br /&gt;
&lt;br /&gt;
* &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Lock manager server (LMSn) process:&lt;/span&gt;&lt;/strong&gt; As noted earlier, in a RAC environment, each instance of Oracle is running on a different machine in a cluster, and they all access, in a read-write fashion, the same exact set of database files. To achieve this, the SGA block buffer caches must be kept consistent with respect to each other. This is one of the main goals of the LMSn process In earlier releases of Oracle Parallel Server (OPS) this was accomplished via a ping. That is, if a node in the cluster needed a read-consistent view of a block that was locked in exclusive mode by another node, the exchange of data was done via a disk flush (the block was pinged). This was a very expensive operation just to read data. Now, with the LMSn, this exchange is done via very fast cache-to-cache exchange over the clusters¿ high-speed connection. You may have up to ten LMSn processes per instance.&lt;br /&gt;
&lt;br /&gt;
* &lt;span style=&quot;color: red;&quot;&gt;&lt;strong&gt;Lock (LCK0) process:&lt;/strong&gt;&lt;/span&gt; This process is very similar in functionality to the LMD process described earlier, but it handles requests for all global resources other than database block buffers.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;CM: Cluster Manager&lt;/span&gt;&lt;/strong&gt; , it maintains the status of the nodes and instances across the cluster.&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;GCS:&lt;/span&gt;&lt;/strong&gt; Global Cache Service&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;GES:&lt;/span&gt;&lt;/strong&gt; Global Enqueue Service daemon&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;GMS:&lt;/span&gt;&lt;/strong&gt; Group Membership Service&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;NM:&lt;/span&gt;&lt;/strong&gt; Node Monitor&lt;br /&gt;
&lt;br /&gt;
-&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;NPIC:&lt;/span&gt;&lt;/strong&gt; Network Inter-process communication&lt;br /&gt;
&lt;br /&gt;
-&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt; ORA_PSP0_:&lt;/span&gt;&lt;/strong&gt; Process spawner, allows Oracle PL/SQL embedded in HTML (PLUG IN)&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;CSS (Cluster Synchronization Services):&lt;/span&gt;&lt;/strong&gt; Cluster management and node monitoring, monitors ASM&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;CRS&lt;/span&gt;&lt;/strong&gt; (Cluster Register Service):&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_EMNO_:&lt;/span&gt;&lt;/strong&gt; Event Monitor Process&lt;br /&gt;
&lt;br /&gt;
- &lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;ORA_DIAG_:&lt;/span&gt;&lt;/strong&gt; Diagnosability daemon (DIAG) process: The DIAG process is used exclusively in a RAC environment. It is responsible for monitoring the overall health of the instance, and it captures information needed in the processing of instance failures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/5015293297723380065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2011/12/oracle-background-processes-10g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/5015293297723380065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/5015293297723380065'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2011/12/oracle-background-processes-10g.html' title='Oracle Background Processes 10G'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-8135243886749513851</id><published>2011-11-01T21:59:00.000+05:30</published><updated>2011-11-01T21:59:59.158+05:30</updated><title type='text'>Oracle RAC Interview Questions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is RAC?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RAC stands for Real Application cluster. It is a clustering solution from Oracle Corporation that ensures high availability of databases by providing instance failover, media failover features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Mention the Oracle RAC software components:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle RAC is composed of two or more database instances. They are composed of Memory structures and background processes same as the single instance database.Oracle RAC instances use two processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle RAC instances are composed of following background processes:&lt;br /&gt;
&lt;br /&gt;
ACMS—Atomic Controlfile to Memory Service (ACMS)&lt;br /&gt;
&lt;br /&gt;
GTX0-j—Global Transaction Process&lt;br /&gt;
&lt;br /&gt;
LMON—Global Enqueue Service Monitor&lt;br /&gt;
&lt;br /&gt;
LMD—Global Enqueue Service Daemon&lt;br /&gt;
&lt;br /&gt;
LMS—Global Cache Service Process&lt;br /&gt;
&lt;br /&gt;
LCK0—Instance Enqueue Process&lt;br /&gt;
&lt;br /&gt;
RMSn—Oracle RAC Management Processes (RMSn)&lt;br /&gt;
&lt;br /&gt;
RSMN—Remote Slave Monitor &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What is GRD?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
GRD stands for Global Resource Directory. The GES and GCS maintains records of the statuses of each datafile and each cahed block using global resource directory.This process is referred to as cache fusion and helps in data integrity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give Details on Cache Fusion:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle RAC is composed of two or more instances. When a block of data is read from datafile by an instance within the cluster and another instance is in need of the same block,it is easy to get the block image from the insatnce which has the block in its SGA rather than reading from the disk. To enable inter instance communication Oracle RAC makes use of interconnects. The Global Enqueue Service(GES) monitors and Instance enqueue process manages the cahce fusion. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give Details on ACMS:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
ACMS stands for Atomic Controlfile Memory Service.In an Oracle RAC environment ACMS is an agent that ensures a distributed SGA memory update(ie)SGA updates are globally committed on success or globally aborted in event of a failure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on GTX0-j :-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The process provides transparent support for XA global transactions in a RAC environment.The database autotunes the number of these processes based on the workload of XA global transactions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on LMON:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This process monitors global enques and resources across the cluster and performs global enqueue recovery operations.This is called as Global Enqueue Service Monitor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on LMD:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This process is called as global enqueue service daemon. This process manages incoming remote resource requests within each instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on LMS:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This process is called as Global Cache service process.This process maintains statuses of datafiles and each cahed block by recording information in a Global Resource Dectory(GRD).This process also controls the flow of messages to remote instances and manages global data block access and transmits block images between the buffer caches of different instances.This processing is a part of cache fusion feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on LCK0:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This process is called as Instance enqueue process.This process manages non-cache fusion resource requests such as libry and row cache requests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Give details on RMSn:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This process is called as Oracle RAC management process.These pocesses perform managability tasks for Oracle RAC.Tasks include creation of resources related Oracle RAC when new instances are added to the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Give details on RSMN:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This process is called as Remote Slave Monitor.This process manages background slave process creation andd communication on remote instances. This is a background slave process.This process performs tasks on behalf of a co-ordinating process running in another instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What components in RAC must reside in shared storage?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
All datafiles, controlfiles, SPFIles, redo log files must reside on cluster-aware shred storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What is the significance of using cluster-aware shared storage in an Oracle RAC environment?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
All instances of an Oracle RAC can access all the datafiles,control files, SPFILE&#39;s, redolog files when these files are hosted out of cluster-aware shared storage which are group of shared disks.&lt;br /&gt;
&lt;br /&gt;
Give few examples for solutions that support cluster storage:-&lt;br /&gt;
&lt;br /&gt;
ASM(automatic storage management),raw disk devices,network file system(NFS), OCFS2 and OCFS(Oracle Cluster Fie systems).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What is an interconnect network?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
an interconnect network is a private network that connects all of the servers in a cluster. The interconnect network uses a switch/multiple switches that only the nodes in the cluster can access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;How can we configure the cluster interconnect?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Configure User Datagram Protocol(UDP) on Gigabit ethernet for cluster interconnect. On unix and linux systems we use UDP and RDS(Reliable data socket) protocols to be used by Oracle Clusterware.Windows clusters use the TCP protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;Can we use crossover cables with Oracle Clusterware interconnects?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
No, crossover cables are not supported with Oracle Clusterware intercnects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What is the use of cluster interconnect?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Cluster interconnect is used by the Cache fusion for inter instance communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;How do users connect to database in an Oracle RAC environment?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Users can access a RAC database using a client/server configuration or through one or more middle tiers,with or without connection pooling.Users can use oracle services feature to connect to database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;What is the use of a service in Oracle RAC environemnt?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Applications should use the services feature to connect to the Oracle database.Services enable us to define rules and characteristics to control how users and applications connect to database instances.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What are the characteriscs controlled by Oracle services feature?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The charateristics include a unique name, workload balancing and failover options,and high availability characteristics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Which enable the load balancing of applications in RAC?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle Net Services enable the load balancing of application connections across all of the instances in an Oracle RAC database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is a virtual IP address or VIP?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A virtual IP address or VIP is an alternate IP address that the client connections use instead of the standard public IP address. To configure VIP address, we need to reserve a spare IP address for each node, and the IP addresses must use the same subnet as the public network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is the use of VIP?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, then the node&#39;s VIP address fails over to another node on which the VIP address can accept TCP connections but it cannot accept Oracle connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Give situations under which VIP address failover happens:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
VIP addresses failover happens when the node on which the VIP address runs fails, all interfaces for the VIP address fails, all interfaces for the VIP address are disconnected from the network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is the significance of VIP address failover?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When a VIP address failover happens, Clients that attempt to connect to the VIP address receive a rapid connection refused error .They don&#39;t have to wait for TCP connection timeout messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What are the administrative tools used for Oracle RAC environments?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle RAC cluster can be administered as a single image using OEM(Enterprise Manager),SQL*PLUS,Servercontrol(SRVCTL),clusterverificationutility(cvu),DBCA,NETCA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;How do we verify that RAC instances are running?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Issue the following query from any one node connecting through SQL*PLUS.&lt;br /&gt;
&lt;br /&gt;
$connect sys/sys as sysdba&lt;br /&gt;
&lt;br /&gt;
SQL&amp;gt;select * from V$ACTIVE_INSTANCES;&lt;br /&gt;
&lt;br /&gt;
The query gives the instance number under INST_NUMBER column,host_:instancename under INST_NAME column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is FAN?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Fast application Notification as it abbreviates to FAN relates to the events related to instances,services and nodes.This is a notification mechanism that Oracle RAc uses to notify other processes about the configuration and service level information that includes service status changes such as,UP or DOWN events.Applications can respond to FAN events and take immediate action.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Where can we apply FAN UP and DOWN events?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
FAN UP and FAN DOWN events can be applied to instances,services and nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;State the use of FAN events in case of a cluster configuration change?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
During times of cluster configuration changes Oracle RAC high availability framework publishes a FAN event immediately when a state change occurs in the cluster.So applications can receive FAN events and react immediately. This prevents applications from polling database and detecting a problem after such a state change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Why should we have seperate homes for ASM instance?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It is a good practice to have ASM home seperate from the database hom(ORACLE_HOME).This helps in upgrading and patching ASM and the Oracle database software independent of each other.Also,we can deinstall the Oracle database software independent of the ASM instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is the advantage of using ASM?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Having ASM is the Oracle recommended storage option for RAC databases as the ASM maximizes performance by managing the storage configuration across the disks.ASM does this by distributing the database file across all of the available storage within our cluster database environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is rolling upgrade?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It is a new ASM feature from Database 11g.ASM instances in Oracle database 11g release(from 11.1) can be upgraded or patched using rolling upgrade feature. This enables us to patch or upgrade ASM nodes in a clustered environment without affecting database availability.During a rolling upgrade we can maintain a functional cluster while one or more of the nodes in the cluster are running in different software versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Can rolling upgrade be used to upgrade from 10g to 11g database?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
No,it can be used only for Oracle database 11g releases(from 11.1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;State the initialization parameters that must have same value for every instance in an Oracle RAC database:-&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Some initialization parameters are critical at the database creation time and must have same values.Their value must be specified in SPFILE or PFILE for every instance.The list of parameters that must be identical on every instance are given below:&lt;br /&gt;
&lt;br /&gt;
ACTIVE_INSTANCE_COUNT&lt;br /&gt;
&lt;br /&gt;
ARCHIVE_LAG_TARGET&lt;br /&gt;
&lt;br /&gt;
COMPATIBLE&lt;br /&gt;
&lt;br /&gt;
CLUSTER_DATABASE&lt;br /&gt;
&lt;br /&gt;
CLUSTER_DATABASE_INSTANCE&lt;br /&gt;
&lt;br /&gt;
CONTROL_FILES&lt;br /&gt;
&lt;br /&gt;
DB_BLOCK_SIZE&lt;br /&gt;
&lt;br /&gt;
DB_DOMAIN&lt;br /&gt;
&lt;br /&gt;
DB_FILES&lt;br /&gt;
&lt;br /&gt;
DB_NAME&lt;br /&gt;
&lt;br /&gt;
DB_RECOVERY_FILE_DEST&lt;br /&gt;
&lt;br /&gt;
DB_RECOVERY_FILE_DEST_SIZE&lt;br /&gt;
&lt;br /&gt;
DB_UNIQUE_NAME&lt;br /&gt;
&lt;br /&gt;
INSTANCE_TYPE (RDBMS or ASM)&lt;br /&gt;
&lt;br /&gt;
PARALLEL_MAX_SERVERS&lt;br /&gt;
&lt;br /&gt;
REMOTE_LOGIN_PASSWORD_FILE&lt;br /&gt;
&lt;br /&gt;
UNDO_MANAGEMENT&lt;br /&gt;
&lt;br /&gt;
Can the DML_LOCKS and RESULT_CACHE_MAX_SIZE be identical on all instances?&lt;br /&gt;
&lt;br /&gt;
These parameters can be identical on all instances only if these parameter values are set to zero.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What two parameters must be set at the time of starting up an ASM instance in a RAC environment?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The parameters CLUSTER_DATABASE and INSTANCE_TYPE must be set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Mention the components of Oracle clusterware:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle clusterware is made up of components like voting disk and Oracle Cluster Registry(OCR). &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is a CRS resource?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle clusterware is used to manage high-availability operations in a cluster.Anything that Oracle Clusterware manages is known as a CRS resource.Some examples of CRS resources are database,an instance,a service,a listener,a VIP address,an application process etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What is the use of OCR?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle clusterware manages CRS resources based on the configuration information of CRS resources stored in OCR(Oracle Cluster Registry).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;How does a Oracle Clusterware manage CRS resources?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Oracle clusterware manages CRS resources based on the configuration information of CRS resources stored in OCR(Oracle Cluster Registry).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Name some Oracle clusterware tools and their uses?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
OIFCFG - allocating and deallocating network interfaces&lt;br /&gt;
&lt;br /&gt;
OCRCONFIG - Command-line tool for managing Oracle Cluster Registry&lt;br /&gt;
&lt;br /&gt;
OCRDUMP - Identify the interconnect being used&lt;br /&gt;
&lt;br /&gt;
CVU - Cluster verification utility to get status of CRS resources&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What are the modes of deleting instances from ORacle Real Application cluster Databases?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We can delete instances using silent mode or interactive mode using DBCA(Database Configuration Assistant).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;How do we remove ASM from a Oracle RAC environment?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We need to stop and delete the instance in the node first in interactive or silent mode.After that asm can be removed using srvctl tool as follows:&lt;br /&gt;
&lt;br /&gt;
srvctl stop asm -n node_name&lt;br /&gt;
&lt;br /&gt;
srvctl remove asm -n node_name&lt;br /&gt;
&lt;br /&gt;
We can verify if ASM has been removed by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
srvctl config asm -n node_name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;How do we verify that an instance has been removed from OCR after deleting an instance?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Issue the following srvctl command:&lt;br /&gt;
&lt;br /&gt;
srvctl config database -d database_name&lt;br /&gt;
&lt;br /&gt;
cd CRS_HOME/bin&lt;br /&gt;
&lt;br /&gt;
./crs_stat&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;How do we verify an existing current backup of OCR?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We can verify the current backup of OCR using the following command : ocrconfig -showbackup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: blue;&quot;&gt;What are the performance views in an Oracle RAC environment?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
We have v$ views that are instance specific. In addition we have GV$ views called as global views that has an INST_ID column of numeric data type.GV$ views obtain information from individual V$ views.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What are the types of connection load-balancing?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are two types of connection load-balancing:server-side load balancing and client-side load balancing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;What is the differnece between server-side and client-side connection load balancing?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Client-side balancing happens at client side where load balancing is done using listener.In case of server-side load balancing listener uses a load-balancing advisory to redirect connections to the instance providing best service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong&gt;Give the usage of srvctl:-&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
srvctl start instance -d db_name -i &quot;inst_name_list&quot; [-o start_options]srvctl stop instance -d name -i &quot;inst_name_list&quot; [-o stop_options]srvctl stop instance -d orcl -i &quot;orcl3,orcl4&quot; -o immediatesrvctl start database -d name [-o start_options]srvctl stop database -d name [-o stop_options]srvctl start database -d orcl -o mount&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/8135243886749513851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2011/11/oracle-rac-interview-questions.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8135243886749513851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8135243886749513851'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2011/11/oracle-rac-interview-questions.html' title='Oracle RAC Interview Questions'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-3913607476246363813</id><published>2011-03-22T13:16:00.000+05:30</published><updated>2011-03-22T13:16:46.054+05:30</updated><title type='text'>Dynamic Views in Oracle</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;Oracle&#39;s V$ Views&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;v$archive_dest&lt;/b&gt;Shows all archived redo log destinations. Use this view to find out to which place archived redo logs are copied: select dest_id,destination from v$archive_dest &lt;br /&gt;
These values correspond to the init parameter log_archive_dest_n. &lt;br /&gt;
&lt;b&gt;v$archive_dest_status&lt;/b&gt;This view allows to find status and errors for each of the defined &lt;br /&gt;
&lt;b&gt;v$archived_log&lt;/b&gt;Displays successfully archived redo logs. &lt;br /&gt;
shows received logs on a primary standby database. &lt;br /&gt;
&lt;b&gt;v$archive_gap&lt;/b&gt;Lists sequence numbers of the archived los that are known to be missing for each thread on a (physical?) standby database (highest gap only). &lt;br /&gt;
&lt;b&gt;v$archive_processes&lt;/b&gt;This view provides information on the archive processes. It can be used to find out if an ARCH process is active or not. &lt;br /&gt;
&lt;b&gt;v$controlfile&lt;/b&gt;Displays the location and status of each controlfile in the database. &lt;br /&gt;
v$controlfile_record_section&lt;br /&gt;
See sections in a controlfile. &lt;br /&gt;
&lt;b&gt;v$bh&lt;/b&gt;This dynamic view has an entry for each block in the database buffer cache. &lt;br /&gt;
The column status can be: &lt;br /&gt;
• free&lt;br /&gt;
This block is not in use &lt;br /&gt;
• xcur&lt;br /&gt;
Block held exclusively by this instance &lt;br /&gt;
• scur&lt;br /&gt;
Block held in cache, shared with other instance &lt;br /&gt;
• cr&lt;br /&gt;
Block for consistent read &lt;br /&gt;
• read&lt;br /&gt;
Block being read from disk &lt;br /&gt;
• mrec&lt;br /&gt;
Block in media recovery mode &lt;br /&gt;
• irec&lt;br /&gt;
Block in instance (crash) recovery mode &lt;br /&gt;
&lt;strong&gt;v$buffer_pool&lt;/strong&gt;&lt;br /&gt;
See buffer pools. &lt;br /&gt;
This view&#39;s column id can be joined with x$kcbwds.indx &lt;br /&gt;
See also x$kcbwbpd &lt;br /&gt;
&lt;strong&gt;v$buffer_pool_statistics&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;v$database&lt;/strong&gt;&lt;br /&gt;
This view lets you access database information. For example, you can check (using log_mode) whether or not the database is in archivelog mode: &lt;br /&gt;
ADPDB&amp;gt;select log_mode from v$database;&lt;br /&gt;
&lt;br /&gt;
LOG_MODE&lt;br /&gt;
------------&lt;br /&gt;
ARCHIVELOG&lt;br /&gt;
checkpoint_change# records the SCN of the last checkpoint. &lt;br /&gt;
switchover_status: can be used to determine if it is possible to perform a switchover operation Only available for physical standby databases. Can be: &lt;br /&gt;
• NOT ALLOWED, &lt;br /&gt;
• SESSIONS ACTIVE, &lt;br /&gt;
• SWITCHOVER PENDING, &lt;br /&gt;
• SWITCHOVER LATENT, &lt;br /&gt;
• TO PRIMARY, &lt;br /&gt;
• TO STANDBY or &lt;br /&gt;
• RECOVERY NEEDED. &lt;br /&gt;
See protection modes in data guard for the columns protection_mode and protection_level. &lt;br /&gt;
database_role determines if a database is a primary or a logical standby database or a physical standby database. &lt;br /&gt;
force_logging tells if a database is in force logging mode or not. &lt;br /&gt;
&lt;strong&gt;v$datafile&lt;/strong&gt;&lt;br /&gt;
This view contains an entry for each datafile of the database. &lt;br /&gt;
This view can be used to find out which datafiles must be backed up in a cold backup: select name from v$datafile &lt;br /&gt;
&lt;strong&gt;v$datafile_header&lt;/strong&gt;&lt;br /&gt;
Various information about datafile headers. For example, if you&#39;re interested in when the a file&#39;s last checkpoint was: &lt;br /&gt;
select name, checkpoint_change#, to_char(checkpoint_time, &#39;DD.MM.YYYY HH24:MI:SS&#39;) from v$datafile_header&lt;br /&gt;
&lt;strong&gt;v$dataguard_status&lt;/strong&gt;&lt;br /&gt;
Shows error messages in a data guard environment. &lt;br /&gt;
&lt;strong&gt;v$db_object_cache&lt;/strong&gt;&lt;br /&gt;
This view displays objects that are cached (pinned) in the library cache. See also dbms_shared_pool. &lt;br /&gt;
&lt;strong&gt;v$enqueue_stat&lt;/strong&gt;&lt;br /&gt;
If there are a lot of enqueue waits &quot;in&quot; v$session_event or v$system_event, v$enqueue_stat allows to break down those enqueues in enqueue classes. For each such class, the gets, waits, failures and the cumulative sum of waited time can be found. &lt;br /&gt;
For a list of enqueue types, refer to enqueue types in x$ksqst. &lt;br /&gt;
The column cum_wait_time stems from x$ksqst.ksqstwtim. &lt;br /&gt;
&lt;strong&gt;v$eventmetric&lt;/strong&gt;&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
&lt;strong&gt;v$event_name&lt;/strong&gt;&lt;br /&gt;
Contains a record for each wait event. &lt;br /&gt;
&lt;strong&gt;v$filemetric&lt;/strong&gt;&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
&lt;strong&gt;v$filestat&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;v$fixed_table&lt;/strong&gt;&lt;br /&gt;
This view contains the name of all V$, X$ and GV$ tables. In oracle 8.1.7, there are 187 different v$ tables: &lt;br /&gt;
ORA81&amp;gt; select count(*) from v where name like &#39;V$%&#39;;&lt;br /&gt;
&lt;br /&gt;
COUNT(*)&lt;br /&gt;
----------&lt;br /&gt;
185&lt;br /&gt;
If you want to know, which x$ tables there are, do a select name from v$fixed_table where name like &#39;X$%&#39;; &lt;br /&gt;
&lt;strong&gt;v$fixed_view_definition&lt;/strong&gt;&lt;br /&gt;
Contains the defintion in its attribute view_definition for the views of v$fixed_table. &lt;br /&gt;
&lt;strong&gt;v$flash_recovery_area_usage&lt;/strong&gt;&lt;br /&gt;
See also &lt;strong&gt;v$recovery_file_dest &lt;/strong&gt;&lt;br /&gt;
v$instance&lt;br /&gt;
instance_role can be used to determine if an instance is an active instance (=primary instance) or a secondary instance (in a standby environment. &lt;br /&gt;
dbms_utility.db_version can be used to retrieve the same version as the field version in v$instance. &lt;br /&gt;
&lt;strong&gt;v$instance_recovery&lt;/strong&gt;&lt;br /&gt;
Can, for example, be used to determine the optimal size of redo logs. &lt;br /&gt;
v$latch&lt;br /&gt;
Oracle collects statistics for the activity of all latches and stores these in this view. Gets is the number of successful willing to wait requests for a latch. Similarly, misses is how many times a process didn&#39;t successfully request a latch. Spin_gets: number of times a latch is obtained after spinning at least once. Sleeps indicates how many times a willing to wait process slept. Waiters_woken tells how often a sleeping process was &#39;disturbed&#39;. &lt;br /&gt;
v$librarycache&lt;br /&gt;
v$lock&lt;br /&gt;
This view stores all information relating to locks in the database. The interesting columns in this view are sid (identifying the session holding or aquiring the lock), type, and the lmode/request pair. &lt;br /&gt;
Important possible values of type are TM (DML or Table Lock), TX (Transaction), MR (Media Recovery), ST (Disk Space Transaction). &lt;br /&gt;
Exactly one of the lmode, request pair is either 0 or 1 while the other indicates the lock mode. If lmode is not 0 or 1, then the session has aquired the lock, while it waits to aquire the lock if request is other than 0 or 1. The possible values for lmode and request are: &lt;br /&gt;
• 1: null, &lt;br /&gt;
• 2: Row Share (SS), &lt;br /&gt;
• 3: Row Exclusive (SX), &lt;br /&gt;
• 4: Share (S), &lt;br /&gt;
• 5: Share Row Exclusive (SSX) and &lt;br /&gt;
• 6: Exclusive(X) &lt;br /&gt;
If the lock type is TM, the column id1 is the object&#39;s id and the name of the object can then be queried like so: select name from sys.obj$ where obj# = id1 &lt;br /&gt;
A lock type of JI indicates that a materialized view is being refreshed. &lt;br /&gt;
A more detailed example can be found here &lt;br /&gt;
See also x$kgllk. &lt;br /&gt;
v$locked_object&lt;br /&gt;
Who is locking what: &lt;br /&gt;
select &lt;br /&gt;
oracle_username&lt;br /&gt;
os_user_name,&lt;br /&gt;
locked_mode,&lt;br /&gt;
object_name,&lt;br /&gt;
object_type&lt;br /&gt;
from &lt;br /&gt;
v$locked_object a,dba_objects b&lt;br /&gt;
where &lt;br /&gt;
a.object_id = b.object_id&lt;br /&gt;
v$log&lt;br /&gt;
Contains information on each log group. See also online redo log. &lt;br /&gt;
Comman values for the status column are: &lt;br /&gt;
• UNUSED: &lt;br /&gt;
Oracle8 has never written to this group, &lt;br /&gt;
• CURRENT: &lt;br /&gt;
This is the active group. &lt;br /&gt;
• ACTIVE: &lt;br /&gt;
Oracle has written to this log before, it is needed for instance recovery.&lt;br /&gt;
The active log is the one with the current log sequence number &lt;br /&gt;
• INACTIVE:&lt;br /&gt;
Oracle has written to this log before; it is not needed for instance recovery. &lt;br /&gt;
v$logfile&lt;br /&gt;
This view can be queried to find the filenames, group numbers and states of redo log files. For example, to find all files of group 2, use select member from v$logfile where group# = 2 &lt;br /&gt;
v$logmnr_contents&lt;br /&gt;
See dbms_logmnr. &lt;br /&gt;
v$log_history&lt;br /&gt;
This view contains an entry for each Log Switch that occured. The column first_time indicates the time of the first entry??? &lt;br /&gt;
On physical standby databases, this view shows applied logs. &lt;br /&gt;
v$logstdby&lt;br /&gt;
Can be used to verify that archived redo logs are being applied to standby databases. &lt;br /&gt;
v$managed_standby&lt;br /&gt;
Monitors the progress of a standby database in managed recovery mode, more exactly, it displays information about the activities of log transport service and log apply service. &lt;br /&gt;
see here &lt;br /&gt;
select process, pid, status, client_process, group# &quot;Stdby Redo Log Gr&quot;, block# from v$managed_standby;&lt;br /&gt;
client_process: the corresponding primary database process. If lgwr log transmission is chosen, one row should have client_process=LGWR. If ARCH transmission is chosen, one row should have ARCH. &lt;br /&gt;
v$mystat&lt;br /&gt;
This view records statistical data about the session that accesses it. Join statistic# with v$statname. &lt;br /&gt;
v$sesstat is also similar to v$sysstat, except that v$sysstat accumulates the statistics as soon as a session terminates. &lt;br /&gt;
See also recording statistics with oracle. &lt;br /&gt;
v$nls_parameters&lt;br /&gt;
The NLS parameters that are in effect for the session quering this view. The view NLS_SESSION_PARAMETERS is based on v$nls_parameters. See also v$nls_valid_values. &lt;br /&gt;
v$nls_valid_values&lt;br /&gt;
This view can be used to obtain valid values for NLS parameters such as &lt;br /&gt;
• supported character sets &lt;br /&gt;
• languages &lt;br /&gt;
• territories &lt;br /&gt;
• sorting orders &lt;br /&gt;
v$object_usage&lt;br /&gt;
v$object_usage gathers information about used (accessed) indexes when an index is monitored using alter index ... monitoring usage. &lt;br /&gt;
See On verifying if an index is used. &lt;br /&gt;
v$open_cursor&lt;br /&gt;
v$option&lt;br /&gt;
This view lets you see which options are installed in the server. &lt;br /&gt;
See also dba_registry. &lt;br /&gt;
v$parameter&lt;br /&gt;
Lists the name-value pairs of the init.ora file (or their default, if not in the init.ora). For example, if you need to know what your block size is: &lt;br /&gt;
select value from v$parameter where name = &#39;db_block_size&#39;&lt;br /&gt;
The columns isses_modifiable and issys_modifiable can be used to determine if a parameter can be changed at session level using alter session or at system level using alter system. A parameter is modifiable at session level if isses_modifiable = &#39;TRUE&#39;. A parameter is modifiable at system level if issys_modifiable = &#39;DEFERRED&#39; or issys_modifiable = &#39;IMMEDIATE&#39;. However, if a parameter is changed at system level if issys_modifiable = &#39;DEFERRED&#39; it only affects sessions that are started after chaning the parameter. Additionally, the alter system set ... deferred option must be used. &lt;br /&gt;
There are also some undocumented (or hidden?) parameters. &lt;br /&gt;
v$pgastat&lt;br /&gt;
See also pga. &lt;br /&gt;
Thanks to Oleg who notified me of a typo (v$pgastat instead of v$pga_stat). &lt;br /&gt;
v$process&lt;br /&gt;
Join v$process&#39;s addr with v$session paddr. &lt;br /&gt;
The column traceid is equal to the value used in alter session set . &lt;br /&gt;
v$pwfile_users&lt;br /&gt;
Lists all users who have been granted sysdba or sysoper privileges. See adding user to a password file. &lt;br /&gt;
v$recover_file&lt;br /&gt;
Useful to find out which datafiles need recovery. &lt;br /&gt;
Join with v$datafile to see filenames instead of numbers.... &lt;br /&gt;
v$recovery_file_dest&lt;br /&gt;
See also v$flash_recovery_area_usage &lt;br /&gt;
v$reserved_words&lt;br /&gt;
This view can be consulted if one is in doubt wheter a particular word is a reserved word (for example when writing PL/SQL Code or assigning a password to a user). &lt;br /&gt;
Until 10g, the view only consist of two columns: keyword and length. From 10gR2 onwards, it has also the columns reserved, res_type, res_attr, res_semi and duplicate. Each of these new columns can only be either &#39;Y&#39; (meaning: yes) or &#39;N&#39; (meaning: no) &lt;br /&gt;
See also reserved words in SQL and reserved words in PL/SQL. &lt;br /&gt;
v$resource_limit&lt;br /&gt;
v$rollname&lt;br /&gt;
The names of online rollback segments. This view&#39;s usn field can be joined with v$rollstat&#39;s usn field and with v$transaction&#39;s xidusn field. &lt;br /&gt;
v$transaction can be used to track undo by session. &lt;br /&gt;
v$rollstat&lt;br /&gt;
Statistics for rollback segements &lt;br /&gt;
v$session&lt;br /&gt;
The column audsid can be joined with sys_context(&#39;userenv&#39;,&#39;SESSIONID&#39;) to find out which session is the &quot;own one&quot;. Alternatively, dbms_support.mysid can be used. &lt;br /&gt;
The fields module and action of v$session can be set with dbms_application_info.set_module. (See v$session_longops for an example. &lt;br /&gt;
The field client_info can be set with dbms_application_info.set_client_info &lt;br /&gt;
Join sid with v$sesstat if you want to get some statistical information for a particular sesssion. &lt;br /&gt;
A record in v$session contains sid and serial#. These numbers can be used kill a session (alter system kill session). &lt;br /&gt;
A client can set some information in client_info. For example, RMAN related sessions can be found with &lt;br /&gt;
.... where client_info like &#39;rman%&#39;;&lt;br /&gt;
What a session is waiting for can be queried with v$session_wait. However, with Oracle 10g, this is not nessessary anymore, as v$session_wait&#39;s information will be exposed within v$session as well. &lt;br /&gt;
See also sessions. &lt;br /&gt;
v$sessmetric&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
v$session_event&lt;br /&gt;
This views is similar to v$system_event. However, it breaks it down to currently connected sessions. &lt;br /&gt;
v$session_event has also the column max_wait that shows the maximum time waited for a wait event. &lt;br /&gt;
v$session_longops&lt;br /&gt;
Use v$session_longops if you have a long running pl/sql procedure and want to give feedback on how far the procedure proceeded. &lt;br /&gt;
If the following Procedure is run, it will report its progress in v$session_longops. The Procedure will also set the module attribute in v$session which makes it possible to find the sid and serial# of the session. &lt;br /&gt;
create table f(g number);&lt;br /&gt;
&lt;br /&gt;
create or replace procedure long_proc as&lt;br /&gt;
rindex pls_integer := dbms_application_info.set_session_longops_nohint;&lt;br /&gt;
slno pls_integer; &lt;br /&gt;
-- Name of task&lt;br /&gt;
op_name varchar2(64) := &#39;long_proc&#39;;&lt;br /&gt;
&lt;br /&gt;
target pls_integer := 0; -- ie. The object being worked on&lt;br /&gt;
context pls_integer; -- Any info&lt;br /&gt;
sofar number; -- how far proceeded&lt;br /&gt;
totalwork number := 1000000; -- finished when sofar=totalwork&lt;br /&gt;
&lt;br /&gt;
-- desc of target&lt;br /&gt;
target_desc varchar2(32) := &#39;A long running procedure&#39;;&lt;br /&gt;
&lt;br /&gt;
units varchar2(32) := &#39;inserts&#39;; -- unit of sofar and totalwork&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
dbms_application_info.set_module(&#39;long_proc&#39;,null);&lt;br /&gt;
&lt;br /&gt;
dbms_application_info.set_session_longops (&lt;br /&gt;
rindex,&lt;br /&gt;
slno);&lt;br /&gt;
&lt;br /&gt;
for sofar in 0..totalwork loop&lt;br /&gt;
&lt;br /&gt;
insert into f values (sofar);&lt;br /&gt;
&lt;br /&gt;
if mod(sofar,1000) = 0 then&lt;br /&gt;
dbms_application_info.set_session_longops (&lt;br /&gt;
rindex,&lt;br /&gt;
slno,&lt;br /&gt;
op_name,&lt;br /&gt;
target,&lt;br /&gt;
context,&lt;br /&gt;
sofar,&lt;br /&gt;
totalwork,&lt;br /&gt;
target_desc,&lt;br /&gt;
units);&lt;br /&gt;
&lt;br /&gt;
end if;&lt;br /&gt;
&lt;br /&gt;
end loop;&lt;br /&gt;
end long_proc;&lt;br /&gt;
If the procedure long_proc is run, you can issue the following query to get feedback on its progress: &lt;br /&gt;
select time_remaining,sofar,elapsed_seconds &lt;br /&gt;
from v$session_longops l, v$session s &lt;br /&gt;
where l.sid=s.sid and l.serial# = s.serial# and s.module=&#39;long_proc&#39;&lt;br /&gt;
v$session_wait&lt;br /&gt;
This views shows what wait event each session is waiting for, or what the last event was that it waited for. &lt;br /&gt;
In contrast, v$session_event lists the cumulative history of events waited for in a session. &lt;br /&gt;
The columns P1, P2 and P3 are parameters that are dependant on the event. With Oracle 10g, v$session_wait&#39;s information will be exposed within v$session as well. &lt;br /&gt;
Since 10g, Oracle displays the v$session_wait information also in the v$session view. &lt;br /&gt;
v$session_wait_history&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
v$sesstat&lt;br /&gt;
This view is similar to v$mystat except that it shows cumulated statistics for all sessions. &lt;br /&gt;
Join sid with v$session and join statistic# with v$statname. &lt;br /&gt;
v$sesstat is also similar to v$sysstat, except that v$sysstat accumulates the statistics as soon as a session terminates. &lt;br /&gt;
v$sga&lt;br /&gt;
Shows how much memory the shared global area uses. Selecting * from v$sga is roughly the same as typing show sga in sql plus with the exeption that the latter also show the total. &lt;br /&gt;
v$sgastat&lt;br /&gt;
Showing free space in the sga: &lt;br /&gt;
select * from v$sgastat where name = &#39;free memory&#39;&lt;br /&gt;
v$sga_dynamic_components&lt;br /&gt;
Information about SGA resize operations since startup. &lt;br /&gt;
This view can also be used to find out the granule size of SGA components. &lt;br /&gt;
v$sga_resize_ops&lt;br /&gt;
v$sort_usage&lt;br /&gt;
See temporary tablespaces &lt;br /&gt;
v$sort_segment&lt;br /&gt;
See Temporary Tablespaces &lt;br /&gt;
v$spparameter&lt;br /&gt;
Returns the values for the spfile. &lt;br /&gt;
v$sql&lt;br /&gt;
v$sql is similar to v$sqlarea, the main difference being that v$sql drills down to select * from x$kglob whereas v$sqlarea drills down to select sum from x$kglob. See also here. &lt;br /&gt;
v$sqlarea&lt;br /&gt;
Join v$sqlarea&#39;s address with v$session&#39;s sql_address. &lt;br /&gt;
Find the SQL-text of currently running SQL statements: &lt;br /&gt;
select sql_text from v$sqlarea where users_executing &amp;gt; 0;&lt;br /&gt;
The field version_count indicates how many versions an sql statement has. &lt;br /&gt;
v$sqltext&lt;br /&gt;
v$sql_plan&lt;br /&gt;
variable addr varchar2(20)&lt;br /&gt;
variable hash number&lt;br /&gt;
variable child number&lt;br /&gt;
&lt;br /&gt;
exec :addr := &#39;&amp;amp;sqladdr&#39;; :hash := &amp;amp;hashvalue; :child := &amp;amp;childno;&lt;br /&gt;
&lt;br /&gt;
select lpad(&#39; &#39;, 2*(level-1))||operation||&#39; &#39;||&lt;br /&gt;
decode(id, 0, &#39;Cost = &#39;||position) &quot;OPERATION&quot;,&lt;br /&gt;
options, object_name&lt;br /&gt;
from v$sql_plan&lt;br /&gt;
start with (address = :addr&lt;br /&gt;
and hash_value = :hash&lt;br /&gt;
and child_number = :child&lt;br /&gt;
and id=0 )&lt;br /&gt;
connect by prior id = parent_id&lt;br /&gt;
and prior address = address&lt;br /&gt;
and prior hash_value = hash_value&lt;br /&gt;
and prior child_number = child_number&lt;br /&gt;
order by id, position ;&lt;br /&gt;
In order to find valid values for sqladdr, hashvalue and childno, this SQL statement can be used: &lt;br /&gt;
select sql_text,address,hash_value,child_number from v$sql where users_executing &amp;gt; 0; &lt;br /&gt;
v$sqltext_with_newlines&lt;br /&gt;
This view can be used to construct the entire text for each session&#39;s actual SQL statement. Use the following statement to to that: &lt;br /&gt;
set serveroutput on size 1000000&lt;br /&gt;
&lt;br /&gt;
declare&lt;br /&gt;
v_stmt varchar2(16000);&lt;br /&gt;
v_sql_text v$sqltext_with_newlines.sql_text%type;&lt;br /&gt;
v_sid v$session.sid%type;&lt;br /&gt;
begin&lt;br /&gt;
for r in (&lt;br /&gt;
select &lt;br /&gt;
sql_text,s.sid&lt;br /&gt;
from &lt;br /&gt;
v$sqltext_with_newlines t, &lt;br /&gt;
v$session s &lt;br /&gt;
where &lt;br /&gt;
s.sql_address=t.address&lt;br /&gt;
order by s.sid, piece) loop&lt;br /&gt;
&lt;br /&gt;
v_sid := nvl(v_sid,r.sid);&lt;br /&gt;
&lt;br /&gt;
if v_sid &amp;lt;&amp;gt; r.sid then&lt;br /&gt;
dbms_output.put_line(v_sid);&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/oru_10028.html&quot;&gt;put_line&lt;/a&gt;(v_stmt,100);&lt;br /&gt;
v_sid := r.sid; &lt;br /&gt;
v_stmt := r.sql_text;&lt;br /&gt;
else&lt;br /&gt;
v_stmt := v_stmt || r.sql_text;&lt;br /&gt;
end if;&lt;br /&gt;
&lt;br /&gt;
end loop;&lt;br /&gt;
dbms_output.put_line(v_sid);&lt;br /&gt;
dbms_output.put_line(v_stmt,100);&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
/&lt;br /&gt;
Thanks to Sarmad Zafar who notified me of an error in this PL/SQL Block. &lt;br /&gt;
Note: the function put_line is found here and can be used to prevent ORU-10028. &lt;br /&gt;
v$sql_bind_data&lt;br /&gt;
Join cursor_num with cno of v$sql_cursor. &lt;br /&gt;
v$sql_bind_capture&lt;br /&gt;
New with Oracle 10g &lt;br /&gt;
This view captures bind variables for all sessions and is faster than setting 10046 on level 4. &lt;br /&gt;
v$sql_cursor&lt;br /&gt;
Join parent_handle with address of v$sql or v$sqlarea. &lt;br /&gt;
v$sql_workarea&lt;br /&gt;
v$sql_workarea can be joined with v$sqlarea on address and hash_value, and it can be joined with v$sql on address, hash_value and child_number. &lt;br /&gt;
v$standby_log&lt;br /&gt;
v$statname&lt;br /&gt;
Use this view to get decoded names for the statistic# field of v$mystat, v$sysstat and v$sesstat. &lt;br /&gt;
v$sysaux_occupants&lt;br /&gt;
v$sysaux_occupants doesn&#39;t exist in Oracle versions prior to Oracle 10g. &lt;br /&gt;
See occupants in the sysaux tablepsaces. &lt;br /&gt;
v$sysmetric&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
v$sysmetric_history&lt;br /&gt;
This view is new in Oracle 10g and allows improved timing and statistics. &lt;br /&gt;
v$sysstat&lt;br /&gt;
v$sysstat is similar to v$sesstat. While v$sesstat displays statitics for the current session, v$sysstat displays the cumulated statitics since startup of the database. &lt;br /&gt;
For example, it is possible to find out the CPU time (name = &#39;CPU used by this session&#39;) &lt;br /&gt;
This view is (among others) used to calculate the Hit Ratio. &lt;br /&gt;
v$system_event&lt;br /&gt;
This view displays the count (total_waits) of all wait events since startup of the instance. &lt;br /&gt;
If timed_statistics is set to true, the sum of the wait times for all events are also displayed in the column time_waited. &lt;br /&gt;
The unit of time_waited is one hundreth of a second. Since 10g, an additional column (time_waited_micro) measures wait times in millionth of a second. &lt;br /&gt;
total_waits where event=&#39;buffer busy waits&#39; is equal the sum of count in v$waitstat. &lt;br /&gt;
v$enqueue_stat can be used to break down waits on the enqueue wait event. &lt;br /&gt;
While this view totals all events in an instance, v$session_event breaks it down to all currently connected sessions. &lt;br /&gt;
v$undostat&lt;br /&gt;
undo tablespaces &lt;br /&gt;
v$tempfile&lt;br /&gt;
v$tempseg_usage&lt;br /&gt;
v$tempseg_usage is a public synonym for v$sort_usage. &lt;br /&gt;
v$tempstat&lt;br /&gt;
v$thread&lt;br /&gt;
The Oracle SID can be retrieved through select instance from v$thread &lt;br /&gt;
v$timer&lt;br /&gt;
This view has only one column (hsecs) which counts hundreths of seconds. Whenever it overflows four bytes, it starts again with 0. &lt;br /&gt;
v$transaction&lt;br /&gt;
Important fields of v$transaction are used_ublk and used_urec. They tell of how many blocks and records the undo for a transaction consists. In order to find out the name of the corresponding rollback segemnt, join the xidusn field with the usn field of v$rollname. This is demonstrated in &lt;br /&gt;
Transactions generate undo &lt;br /&gt;
v$timezone_names&lt;br /&gt;
See also timezones for some values of tzabbrev. &lt;br /&gt;
v$transportable_platform&lt;br /&gt;
Which platforms are supported for cross platform transportable tablespaces. &lt;br /&gt;
v$version&lt;br /&gt;
Use this view to find out what version you actually work on: select * from v$version; &lt;br /&gt;
BANNER&lt;br /&gt;
----------------------------------------------------------------&lt;br /&gt;
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production&lt;br /&gt;
PL/SQL Release 8.1.7.0.0 - Production&lt;br /&gt;
CORE 8.1.7.0.0 Production&lt;br /&gt;
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production&lt;br /&gt;
NLSRTL Version 3.4.1.0.0 - Production&lt;br /&gt;
v$waitstat&lt;br /&gt;
total_waits where event=&#39;buffer busy waits&#39; is equal the sum of count in v$system_event. &lt;br /&gt;
________________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/3913607476246363813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2011/03/dynamic-views-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/3913607476246363813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/3913607476246363813'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2011/03/dynamic-views-in-oracle.html' title='Dynamic Views in Oracle'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-921138686120651226</id><published>2010-07-13T12:51:00.000+05:30</published><updated>2010-07-13T12:51:55.147+05:30</updated><title type='text'>Oracle RAC and TAF to Guarantee availability</title><content type='html'>One of the most exciting new features in Oracle Database is Real Application Clusters (RAC). The Oracle RAC solution delivers 24/7 database availability, performance, and scalability. Cache Fusion is the key memory feature that enables Oracle RAC performance, and the new Transparent Application Failover (TAF) is what applications use to sync up with Oracle RAC availability. This article explores the cooperation between Oracle RAC, Cache Fusion, and TAF and offers insights into the architecture and use of these tools for continuous availability and infinite scalability. &lt;br /&gt;
&lt;br /&gt;
Oracle RAC Architecture &lt;br /&gt;
&lt;br /&gt;
Oracle has long recognized that a clustered environment is the best protection against hardware and software failure. In a clustered environment, many Oracle instances exist on separate servers, each with direct connectivity to a single Oracle database. Should any single server or instance fail, processing continues on the surviving servers. &lt;br /&gt;
&lt;br /&gt;
Cache Fusion and Oracle RAC &lt;br /&gt;
&lt;br /&gt;
The introduction of the Cache Fusion shared RAM cache for multiple Oracle instances is a breakthrough in clustered solutions. Oracle RAC fully implements Cache Fusion, which both provides high performance and enables continuous cluster availability. The high-availability capability of Oracle RAC is almost unfathomable. It&#39;s estimated that in a 12-computer configuration, any application running on Oracle RAC will not experience a catastrophic failure for well over 100,000 years. &lt;br /&gt;
&lt;br /&gt;
Cache Fusion technology changes the internal configuration of the Oracle system global area (SGA). Cache Fusion moves the RAM data buffers from local RAM storage into a shared RAM area accessible by all Oracle instances. &lt;br /&gt;
&lt;br /&gt;
Beyond high performance and high availability, Oracle RAC offers significant benefits as a scalability tool. Whenever the processing load becomes excessive in an existing Oracle RAC cluster, you can add additional processors—each with its own Oracle instance—to the Oracle RAC configuration. This allows companies to start small and scale infinitely as processing demands increase. &lt;br /&gt;
&lt;br /&gt;
Oracle RAC and Hardware Failover &lt;br /&gt;
&lt;br /&gt;
To detect a node failure, the Cluster Manager uses a background process—Global Enqueue Service Monitor (LMON)—to monitor the health of the cluster. When a node fails, the Cluster Manager reports the change in the cluster&#39;s membership to Global Cache Services (GCS) and Global Enqueue Service (GES). These services are then remastered based on the current membership of the cluster. &lt;br /&gt;
&lt;br /&gt;
To successfully remaster the cluster services, Oracle RAC keeps track of all resources and resource states on each node and then uses this information to restart these resources on a backup node. &lt;br /&gt;
&lt;br /&gt;
These processes also manage the state of in-flight transactions and work with TAF to either restart or resume the transactions on the new node. Now let&#39;s see how Oracle RAC and TAF work together to ensure that a server failure does not cause an unplanned service interruption. &lt;br /&gt;
&lt;br /&gt;
Using Transparent Application Failover &lt;br /&gt;
&lt;br /&gt;
After an Oracle RAC node crashes—usually from a hardware failure—all new application transactions are automatically rerouted to a specified backup node. The challenge in rerouting is to not lose transactions that were &quot;in flight&quot; at the exact moment of the crash. One of the requirements of continuous availability is the ability to restart in-flight application transactions, allowing a failed node to resume processing on another server without interruption. Oracle&#39;s answer to application failover is a new Oracle Net mechanism dubbed Transparent Application Failover. TAF allows the DBA to configure the type and method of failover for each Oracle Net client. &lt;br /&gt;
&lt;br /&gt;
For an application to use TAF, it must use failover-aware API calls from the Oracle Call Interface (OCI). Inside OCI are TAF callback routines that can be used to make any application failover-aware. &lt;br /&gt;
&lt;br /&gt;
While the concept of failover is simple, providing an apparent instant failover can be extremely complex, because there are many ways to restart in-flight transactions. The TAF architecture offers the ability to restart transactions at either the transaction (SELECT) or session level: &lt;br /&gt;
&lt;br /&gt;
SELECT failover. With SELECT failover, Oracle Net keeps track of all SELECT statements issued during the transaction, tracking how many rows have been fetched back to the client for each cursor associated with a SELECT statement. If the connection to the instance is lost, Oracle Net establishes a connection to another Oracle RAC node and re-executes the SELECT statements, repositioning the cursors so the client can continue fetching rows as if nothing has happened. The SELECT failover approach is best for data warehouse systems that perform complex and time-consuming transactions. &lt;br /&gt;
SESSION failover. When the connection to an instance is lost, SESSION failover results only in the establishment of a new connection to another Oracle RAC node; any work in progress is lost. SESSION failover is ideal for online transaction processing (OLTP) systems, where transactions are small. &lt;br /&gt;
Oracle TAF also offers choices on how to restart a failed transaction. The Oracle DBA may choose one of the following failover methods: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;BASIC failover&lt;/b&gt;. In this approach, the application connects to a backup node only after the primary connection fails. This approach has low overhead, but the end user experiences a delay while the new connection is created. &lt;br /&gt;
&lt;b&gt;PRECONNECT failover&lt;/b&gt;. In this approach, the application simultaneously connects to both a primary and a backup node. This offers faster failover, because a pre-spawned connection is ready to use. But the extra connection adds everyday overhead by duplicating connections. &lt;br /&gt;
Currently, TAF will fail over standard SQL SELECT statements that have been caught during a node crash in an in-flight transaction failure. In the current release of TAF, however, TAF must restart some types of transactions from the beginning of the transaction. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The following types of transactions do not automatically fail over and must be restarted by TAF: &lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;Transactional statements. Transactions involving INSERT, UPDATE, or DELETE statements are not supported by TAF. &lt;br /&gt;
ALTER SESSION statements. ALTER SESSION and SQL*Plus SET statements do not fail over. &lt;br /&gt;
The following do not fail over and cannot be restarted: &lt;br /&gt;
Temporary objects. Transactions using temporary segments in the TEMP tablespace and global temporary tables do not fail over. &lt;br /&gt;
PL/SQL package states. PL/SQL package states are lost during failover. &lt;br /&gt;
Using Oracle RAC and TAF Together &lt;br /&gt;
&lt;br /&gt;
The continuous availability features of Oracle RAC and TAF come together when these products cooperate in restarting failed transactions. Let&#39;s take a closer look at how this works. &lt;br /&gt;
&lt;br /&gt;
Within each connected Oracle Net client, tnsnames.ora file parameters define the failover types and methods for that client. The parameters direct Oracle RAC and TAF on how to restart any transactions that may be in-flight during a hardware failure on the node. &lt;br /&gt;
&lt;br /&gt;
It is important to note that TAF failover control is external to the Oracle RAC cluster, and each Oracle Net client may have unique failover types and methods, depending on processing requirements. The following is a client tnsnames.ora file entry for a node, including its current TAF failover parameters: &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
bubba.world =&lt;br /&gt;
  (DESCRIPTION_LIST =&lt;br /&gt;
    (FAILOVER = true)&lt;br /&gt;
    (LOAD_BALANCE = true)&lt;br /&gt;
    (DESCRIPTION =&lt;br /&gt;
    (ADDRESS =&lt;br /&gt;
      (PROTOCOL = TCP)&lt;br /&gt;
      (HOST = redneck)(PORT = 1521))&lt;br /&gt;
      (CONNECT_DATA =&lt;br /&gt;
        (SERVICE_NAME = bubba)&lt;br /&gt;
        (SERVER = dedicated)&lt;br /&gt;
        (FAILOVER_MODE = &lt;br /&gt;
           (BACKUP=cletus)&lt;br /&gt;
           (TYPE=select)           &lt;br /&gt;
           (METHOD=preconnect)&lt;br /&gt;
           (RETRIES=20)&lt;br /&gt;
           (DELAY=3)&lt;br /&gt;
        )&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;failover_mode &lt;/b&gt;section of the tnsnames.ora file lists the parameters and their values: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;BACKUP=cletus&lt;/b&gt;. This names the backup node that will take over failed connections when a node crashes. In this example, the primary server is bubba, and TAF will reconnect failed transactions to the cletus instance in case of server failure. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TYPE=select&lt;/b&gt;. This tells TAF to restart all in-flight transactions from the beginning of the transaction (and not to track cursor states within each transaction). &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;METHOD=preconnect&lt;/b&gt;. This directs TAF to create two connections at transaction startup time: one to the primary bubba database and a backup connection to the cletus database. In case of instance failure, the cletus database will be ready to resume the failed transaction. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;RETRIES=20&lt;/b&gt;. This directs TAF to retry a failover connection up to 20 times. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DELAY=3&lt;/b&gt;. This tells TAF to wait three seconds between connection retries. &lt;br /&gt;
&lt;br /&gt;
Remember, you must set these TAF parameters in every tnsnames.ora file on every Oracle Net client that needs transparent failover. &lt;br /&gt;
&lt;br /&gt;
Putting It All Together &lt;br /&gt;
&lt;br /&gt;
An Oracle Net client can be a single PC or a huge application server. In the architectures of giant Oracle RAC systems, each application server has a customized tnsnames.ora file that governs the failover method for all connections that are routed to that application server. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Watching TAF in Action &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The transparency of TAF operation is a tremendous advantage to application users, but DBAs need to quickly see what has happened and where failover traffic is going, and they need to be able to get the status of failover transactions. To provide this capability, the Oracle data dictionary has several new columns in the &lt;b&gt;V$SESSION &lt;/b&gt;view that give the current status of failover transactions. &lt;br /&gt;
&lt;br /&gt;
The following query calls the new &lt;b&gt;FAILOVER_TYPE, FAILOVER_METHOD,&lt;/b&gt; and &lt;b&gt;FAILED_OVER &lt;/b&gt;columns of the &lt;b&gt;V$SESSION &lt;/b&gt;view. Be sure to note that the query is restricted to nonsystem sessions, because &lt;b&gt;Oracle data definition language (DDL) and data manipulation language (DML) are not recoverable with TAF. &lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
select&lt;br /&gt;
   username, &lt;br /&gt;
   sid, &lt;br /&gt;
   serial#, &lt;br /&gt;
   failover_type, &lt;br /&gt;
   failover_method, &lt;br /&gt;
   failed_over&lt;br /&gt;
from&lt;br /&gt;
   v$session&lt;br /&gt;
where&lt;br /&gt;
   username not in (&#39;SYS&#39;,&#39;SYSTEM&#39;,&lt;br /&gt;
&#39;PERFSTAT&#39;)&lt;br /&gt;
and&lt;br /&gt;
   failed_over = &#39;YES&#39;;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
You can run this script against the backup node after an instance failure to see those transactions that have been reconnected with TAF. Remember, TAF will quickly redirect transactions, so you&#39;ll only see entries for a short period of time immediately after the failover.  A backup node can have a variety of concurrent failover transactions, because the tnsnames.ora file on each Oracle Net client specifies the backup node, the failover type, and the failover method. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion &lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Oracle RAC, TAF, and Cache Fusion work together to guarantee continuous availability and infinite scalability. To summarize, here&#39;s a short description of each component: &lt;br /&gt;
&lt;br /&gt;
Oracle RAC. The clustering component of Oracle that allows the creation of multiple, independent Oracle instances, all sharing a single database. &lt;br /&gt;
&lt;br /&gt;
Cache Fusion. The shared RAM component of Oracle RAC that provides fast interchange of Oracle data blocks between SGA regions. &lt;br /&gt;
&lt;br /&gt;
TAF. The failover method implemented on the Oracle Net client to restart in-flight transactions when a node crashes.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/921138686120651226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2010/07/oracle-rac-and-taf-to-guarantee.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/921138686120651226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/921138686120651226'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2010/07/oracle-rac-and-taf-to-guarantee.html' title='Oracle RAC and TAF to Guarantee availability'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-2966559457786934574</id><published>2010-05-31T17:34:00.000+05:30</published><updated>2010-05-31T17:34:45.539+05:30</updated><title type='text'>Convert a Single Instance Database to Oracle RAC 10g on RHEL3</title><content type='html'>Overview &lt;br /&gt;
The RAC cluster comprises two Intel x86 servers running on RHEL3 (Kernel 2.4.21-27). Each node has access to a shared storage and connectivity to the public and private network. &lt;br /&gt;
This guide is structured into the following steps: &lt;br /&gt;
Preliminary Installation &lt;br /&gt;
Migrating Your Database to ASM &lt;br /&gt;
Installing Oracle Cluster Ready Services (CRS) Software &lt;br /&gt;
Installing Oracle RAC Software &lt;br /&gt;
Post Installation &lt;br /&gt;
Testing Transparent Application Failover (TAF) &lt;br /&gt;
Unless otherwise specified, you should execute all steps on both nodes. &lt;br /&gt;
Here&#39;s an overview of our single-instance database environment before converting to RAC:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Host Name Instance Name Database Name $ORACLE_BASE Database File Storage    &lt;br /&gt;
salmon1 prod1 prod1 /u01/app/oracle ext3  &lt;br /&gt;
&lt;br /&gt;
And an overview of the RAC database environment: &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Host Name Instance Name Database Name $ORACLE_BASE Database File Storage OCR &amp; CRS Voting Disk    &lt;br /&gt;
salmon1 prod1a prod1 /u01/app/oracle ASM Raw    &lt;br /&gt;
salmon2 prod1b prod1 /u01/app/oracle ASM Raw  &lt;br /&gt;
&lt;br /&gt;
You&#39;ll install the Oracle Home on each node for redundancy.The ASM and RAC instances share the same Oracle Home on each node. &lt;br /&gt;
Step 1: Preliminary Installation &lt;br /&gt;
1a. Verify software package versions. &lt;br /&gt;
Install the required packages. Additional information can be obtained from the documentation. &lt;br /&gt;
[root@salmon1]# rpm -qa | grep -i compat&lt;br /&gt;
compat-libstdc++-7.3-2.96.128&lt;br /&gt;
compat-gcc-c++-7.3-2.96.128&lt;br /&gt;
compat-libstdc++-devel-7.3-2.96.128&lt;br /&gt;
compat-db-4.0.14-5&lt;br /&gt;
compat-glibc-7.x-2.2.4.32.6&lt;br /&gt;
compat-slang-1.4.5-5&lt;br /&gt;
compat-gcc-7.3-2.96.128&lt;br /&gt;
compat-pwdb-0.62-3&lt;br /&gt;
[root@salmon1]# &lt;br /&gt;
[root@salmon1]# rpm -qa | grep openmotif&lt;br /&gt;
openmotif-2.2.3-3.RHEL3&lt;br /&gt;
[root@salmon1]# &lt;br /&gt;
[root@salmon1]# rpm -qa | grep -i gcc&lt;br /&gt;
gcc-gnat-3.2.3-42&lt;br /&gt;
gcc-c++-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
compat-gcc-c++-7.3-2.96.128&lt;br /&gt;
libgcc-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
gcc-3.2.3-42&lt;br /&gt;
gcc-g77-3.2.3-42&lt;br /&gt;
gcc-java-3.2.3-42&lt;br /&gt;
gcc-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
gcc-g77-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
gcc-objc-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
libgcc-3.2.3-42&lt;br /&gt;
gcc-c++-3.2.3-42&lt;br /&gt;
gcc-objc-3.2.3-42&lt;br /&gt;
gcc-java-ssa-3.5ssa-0.20030801.48&lt;br /&gt;
compat-gcc-7.3-2.96.128&lt;br /&gt;
1b. Verify kernel parameters. &lt;br /&gt;
Verify the following kernel parameters. Additional information can be obtained from the documentation. &lt;br /&gt;
[root@salmon1]# sysctl -a | grep shm&lt;br /&gt;
kernel.shmmni = 4096&lt;br /&gt;
kernel.shmall = 2097152&lt;br /&gt;
kernel.shmmax = 2147483648&lt;br /&gt;
[root@salmon1]# sysctl -a | grep sem&lt;br /&gt;
kernel.sem = 250        32000   100     128&lt;br /&gt;
[root@salmon1]# sysctl -a | grep -i ip_local&lt;br /&gt;
net.ipv4.ip_local_port_range = 1024     65000&lt;br /&gt;
[root@salmon1]# sysctl -a | grep -i file-max&lt;br /&gt;
fs.file-max = 65536&lt;br /&gt;
1c. Create the Oracle Base directory, oracle user, and groups. &lt;br /&gt;
Using the information below on node 1, create the oracle user and the oinstall and dba groups on the second node. &lt;br /&gt;
[oracle@salmon1]$ hostname&lt;br /&gt;
salmon1.dbsconsult.com&lt;br /&gt;
[oracle@salmon1]$ &lt;br /&gt;
[oracle@salmon1]$ id&lt;br /&gt;
uid=500(oracle) gid=500(dba) groups=500(dba),501(oinstall)&lt;br /&gt;
[oracle@salmon1]$ &lt;br /&gt;
[oracle@salmon1]$ echo $ORACLE_BASE&lt;br /&gt;
/u01/app/oracle &lt;br /&gt;
1d. Edit the oracle user environment file. &lt;br /&gt;
[oracle@salmon1]$ more .bash_profile&lt;br /&gt;
# .bash_profile&lt;br /&gt;
&lt;br /&gt;
# Get the aliases and functions&lt;br /&gt;
if [ -f ~/.bashrc ]; then&lt;br /&gt;
        . ~/.bashrc&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:$HOME/bin&lt;br /&gt;
export ORACLE_SID=prod1&lt;br /&gt;
export ORACLE_BASE=/u01/app/oracle&lt;br /&gt;
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0&lt;br /&gt;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib&lt;br /&gt;
export PATH=$ORACLE_HOME/bin:$PATH&lt;br /&gt;
umask 022&lt;br /&gt;
1e. Configure the oracle user shell limits. &lt;br /&gt;
[root@salmon1]# more /etc/security/limits.conf&lt;br /&gt;
*                soft    nproc           2047&lt;br /&gt;
*                hard   nproc           16384&lt;br /&gt;
*                soft    nofile           1024&lt;br /&gt;
*                hard   nofile           65536&lt;br /&gt;
[root@salmon1]# grep pam_limits /etc/pam.d/login&lt;br /&gt;
session    required     /lib/security/pam_limits.so     &lt;br /&gt;
1f. Configure public and private network. &lt;br /&gt;
Using the information below, make the necessary changes to network interface devices eth0 (public) and eth1 (private). &lt;br /&gt;
[root@salmon1]# redhat-config-network&lt;br /&gt;
 &lt;br /&gt;
Host Name IP Address Type    &lt;br /&gt;
salmon1.dbsconsult.com 192.168.0.184 Public (eth0)    &lt;br /&gt;
salmon2.dbsconsult.com 192.168.0.185 Public (eth0)    &lt;br /&gt;
salmon1.dbsconsult.com 10.10.10.84 Private (eth1)    &lt;br /&gt;
salmon2.dbsconsult.com 10.10.10.85 Private (eth1)    &lt;br /&gt;
salmon1-vip.dbsconsult.com 192.168.0.186 Virtual    &lt;br /&gt;
salmon2-vip.dbsconsult.com 192.168.0.187 Virtual  &lt;br /&gt;
1g. Edit the /etc/hosts file. &lt;br /&gt;
127.0.0.1       localhost.localdomain            localhost&lt;br /&gt;
10.10.10.84     sallocal1.dbsconsult.com         sallocal1&lt;br /&gt;
10.10.10.85     sallocal2.dbsconsult.com         sallocal2&lt;br /&gt;
192.168.0.184   salmon1.dbsconsult.com           salmon1&lt;br /&gt;
192.168.0.185   salmon2.dbsconsult.com           salmon2&lt;br /&gt;
192.168.0.186   salmon1-vip.dbsconsult.com       salmon1-vip&lt;br /&gt;
192.168.0.187   salmon2-vip.dbsconsult.com       salmon2-vip&lt;br /&gt;
Verify the hostname and the configured network interface devices. &lt;br /&gt;
[root@salmon1]# hostname&lt;br /&gt;
salmon1.dbsconsult.com&lt;br /&gt;
[root@salmon1]# /sbin/ifconfig&lt;br /&gt;
1h. Establish user equivalence with SSH. &lt;br /&gt;
During the Cluster Ready Services (CRS) and RAC installation, the Oracle Universal Installer (OUI) has to be able to copy the software as oracle to all RAC nodes without being prompted for a password. In Oracle 10g, this can be accomplished using ssh instead of rsh. &lt;br /&gt;
To establish user equivalence, generate the user&#39;s public and private keys as the oracle user on both nodes. &lt;br /&gt;
[oracle@salmon1]$ ssh-keygen -t dsa&lt;br /&gt;
Generating public/private dsa key pair.&lt;br /&gt;
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):&lt;br /&gt;
Created directory &#39;/home/oracle/.ssh&#39;.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /home/oracle/.ssh/id_dsa.&lt;br /&gt;
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
5d:8c:42:97:eb:42:ae:52:52:e9:59:20:2a:d3:6f:59 oracle@salmon1.dbsconsult.com&lt;br /&gt;
Test the connection on every node. Verify that you are not prompted for password when you run the following the second time. &lt;br /&gt;
ssh salmon1 date&lt;br /&gt;
ssh salmon2 date &lt;br /&gt;
ssh sallocal1 date&lt;br /&gt;
ssh sallocal2 date&lt;br /&gt;
ssh salmon1.dbsconsult.com date&lt;br /&gt;
ssh salmon2.dbsconsult.com date&lt;br /&gt;
ssh sallocal1.dbsconsult.com date&lt;br /&gt;
ssh sallocal2.dbsconsult.com date&lt;br /&gt;
1i. Configure hangcheck timer kernel module. &lt;br /&gt;
The hangcheck timer kernel module monitors the system&#39;s health and restarts a failing RAC node. It uses two parameters, hangcheck_tick (defines the system checks frequency) and hangcheck_margin (defines the maximum hang delay before a RAC node is reset), to determine if a node is failing. &lt;br /&gt;
Add the following line in /etc/rc.d/rc.local to load the hangcheck module automatically. &lt;br /&gt;
[root@salmon1]# grep insmod /etc/rc.d/rc.local &lt;br /&gt;
insmod hangcheck-timer hangcheck_tick=30 hangcheck_margin=180&lt;br /&gt;
1j. Recreate database control file. &lt;br /&gt;
Make sure that the entries below are sized appropriately in the control file before converting to RAC. If required, recreate the database control file with the right settings. &lt;br /&gt;
MAXLOGFILES &lt;br /&gt;
MAXLOGMEMBERS &lt;br /&gt;
MAXDATAFILES &lt;br /&gt;
MAXINSTANCES &lt;br /&gt;
MAXLOGHISTORY &lt;br /&gt;
1k. Resize the database buffer cache. &lt;br /&gt;
When transitioning from a single instance database to RAC, additional memory is required for the database buffer cache. In RAC, space is allocated for the Global Cache Service (GCS) in every block buffer cache. The amount of additional memory requires depends on how the application accesses the data—that is, if the same block is cached in more than one instance. &lt;br /&gt;
I observed an increase of about 8% buffer cache usage during an experimental demonstration. Use the buffer cache advisory to determine an optimal buffer cache size or let Oracle take control by switching to Oracle Automatic Shared Memory Management (ASMM). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2: Migrate Your Database to ASM &lt;br /&gt;
The Oracle Cluster Synchronization Services (CSS) daemon is required for synchronization between the ASM instance and the database instances. The CSS daemon must be up before the ASM instance can be started. When you installed or upgraded to Oracle Database 10g, the CSS should have already been configured for the single-node version and it should start automatically when the system reboots. &lt;br /&gt;
 &lt;br /&gt;
[root@salmon1]# ps –ef | grep ocssd.bin | wc –l &lt;br /&gt;
      17&lt;br /&gt;
2a. Download ASM RPMs. &lt;br /&gt;
Download the following ASM RPMs from OTN: &lt;br /&gt;
oracleasm-support-2.0.0-1.i386.rpm &lt;br /&gt;
oracleasm-2.4.21-27.EL-1.0.4-2.i686.rpm (driver for UP kernel) or oracleasm-2.4.21-27.ELsmp-1.0.4-1.i686.rpm (driver for SMP kernel) &lt;br /&gt;
oracleasmlib-2.0.0-1.i386.rpm &lt;br /&gt;
2b. Install the ASM RPMs. &lt;br /&gt;
Install the ASM RPMs as the root user. &lt;br /&gt;
[root@salmon1]# rpm -i oracleasm-support-2.0.0-1.i386.rpm&lt;br /&gt;
[root@salmon1]# rpm -i oracleasm-2.4.21-27.EL-1.0.4-2.i686.rpm&lt;br /&gt;
Linking module oracleasm.o into the module path [  OK  ]&lt;br /&gt;
[root@salmon1]# rpm -i oracleasmlib-2.0.0-1.i386.rpm&lt;br /&gt;
[root@salmon1]# rpm -qa | grep oracleasm&lt;br /&gt;
oracleasm-2.4.21-27.EL-1.0.4-2&lt;br /&gt;
oracleasm-support-2.0.0-1&lt;br /&gt;
oracleasmlib-2.0.0-1&lt;br /&gt;
2c. Configure ASM. &lt;br /&gt;
Configure the ASMLib as the root user. &lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm configure&lt;br /&gt;
Configuring the Oracle ASM library driver.&lt;br /&gt;
&lt;br /&gt;
This will configure the on-boot properties of the Oracle ASM library&lt;br /&gt;
driver.  The following questions will determine whether the driver is&lt;br /&gt;
loaded on boot and what permissions it will have.  The current values&lt;br /&gt;
will be shown in brackets (&#39;[]&#39;).  Hitting  without typing an&lt;br /&gt;
answer will keep that current value.  Ctrl-C will abort.&lt;br /&gt;
&lt;br /&gt;
Default user to own the driver interface []: oracle&lt;br /&gt;
Default group to own the driver interface []: dba&lt;br /&gt;
Start Oracle ASM library driver on boot (y/n) [n]: y&lt;br /&gt;
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y&lt;br /&gt;
Writing Oracle ASM library driver configuration            [  OK  ]&lt;br /&gt;
Creating /dev/oracleasm mount point                        [  OK  ]&lt;br /&gt;
Loading module &quot;oracleasm&quot;                                 [  OK  ]&lt;br /&gt;
Mounting ASMlib driver filesystem                          [  OK  ]&lt;br /&gt;
Scanning system for ASM disks    &lt;br /&gt;
2d. Create ASM disks. &lt;br /&gt;
Create the ASM disks on any one node as the root user. &lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdg5&lt;br /&gt;
Marking disk &quot;/dev/sdg5&quot; as an ASM disk                      [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdg6&lt;br /&gt;
Marking disk &quot;/dev/sdg6&quot; as an ASM disk                      [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdg7&lt;br /&gt;
Marking disk &quot;/dev/sdg7&quot; as an ASM disk                      [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdg8&lt;br /&gt;
Marking disk &quot;/dev/sdg8&quot; as an ASM disk                      [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL5/dev/sdg9&lt;br /&gt;
Marking disk &quot;/dev/sdg9&quot; as an ASM disk                      [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL6 /dev/sdg10&lt;br /&gt;
Marking disk &quot;/dev/sdg10&quot; as an ASM disk                    [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL7 /dev/sdg11&lt;br /&gt;
Marking disk &quot;/dev/sdg11&quot; as an ASM disk                    [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL8 /dev/sdg12&lt;br /&gt;
Marking disk &quot;/dev/sdg12&quot; as an ASM disk                    [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL9 /dev/sdg13&lt;br /&gt;
Marking disk &quot;/dev/sdg13&quot; as an ASM disk                    [  OK  ]&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm createdisk VOL10 /dev/sdg14&lt;br /&gt;
Marking disk &quot;/dev/sdg14&quot; as an ASM disk                    [  OK  ]&lt;br /&gt;
Verify that the ASM disks are visible from every node. &lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm listdisks&lt;br /&gt;
VOL1&lt;br /&gt;
VOL2&lt;br /&gt;
VOL3&lt;br /&gt;
VOL4&lt;br /&gt;
VOL5&lt;br /&gt;
VOL6&lt;br /&gt;
VOL7&lt;br /&gt;
VOL8&lt;br /&gt;
VOL9&lt;br /&gt;
VOL10&lt;br /&gt;
[root@salmon1]# /etc/init.d/oracleasm scandisks&lt;br /&gt;
Scanning system for ASM disks                              [  OK  ]&lt;br /&gt;
2e. Create ASM init.ora. &lt;br /&gt;
On the first node, create an init+ASM1A.ora file in $ORACLE_HOME/dbs with the following parameters: &lt;br /&gt;
#asm_diskgroups=&#39;DG1&#39;, ‘DG2’, ‘RECOVERYDEST’&lt;br /&gt;
asm_diskstring=&#39;ORCL:VOL*&#39;&lt;br /&gt;
background_dump_dest=/u01/app/oracle/admin/+ASM/bdump&lt;br /&gt;
core_dump_dest=/u01/app/oracle/admin/+ASM/cdump&lt;br /&gt;
user_dump_dest=/u01/app/oracle/admin/+ASM/udump&lt;br /&gt;
instance_type=asm&lt;br /&gt;
large_pool_size=16M&lt;br /&gt;
remote_login_passwordfile=exclusive&lt;br /&gt;
+ASM1A.instance_number=1&lt;br /&gt;
+ASM1B.instance_number=2&lt;br /&gt;
2f. Create ASM password file. &lt;br /&gt;
Using the orapwd utility, create an orapw+ASM1A file in $ORACLE_HOME/dbs on the first node. &lt;br /&gt;
[oracle@salmon1]$ cd $ORACLE_HOME/dbs&lt;br /&gt;
[oracle@salmon1]$ orapwd file=orapw+ASM1A password=sys entries=5&lt;br /&gt;
2g. Create the first ASM instance. &lt;br /&gt;
Create the first ASM instance on the first node. The second ASM instance will be created in Post Installation after the CRS software is installed on the second node. &lt;br /&gt;
[oracle@salmon1]$ export ORACLE_SID=+ASM1A&lt;br /&gt;
[oracle@salmon1]$ sqlplus / as sysdba&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 10.1.0.3.0 - Production on Thu May 26 05:51:07 2005&lt;br /&gt;
 &lt;br /&gt;
Copyright (c) 1982, 2004, Oracle.  All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
Connected to an idle instance.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; startup&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area  104857600 bytes&lt;br /&gt;
Fixed Size                777616 bytes&lt;br /&gt;
Variable Size             104079964 bytes&lt;br /&gt;
Database Buffers          0 bytes&lt;br /&gt;
Redo Buffers              0 bytes&lt;br /&gt;
ORA-15110: no diskgroups mounted&lt;br /&gt;
2h. Create the ASM instance spfile. &lt;br /&gt;
Create a spfile immediately after the ASM instance starts. With spfile, any newly created disk groups are automatically added to the spfile. &lt;br /&gt;
SQL&gt; create spfile from pfile;&lt;br /&gt;
&lt;br /&gt;
File created.&lt;br /&gt;
2i. Create disk groups. &lt;br /&gt;
Create three disk groups: DG1, DG2, and RECOVERYDEST. DG1 and DG2 will be used to store Oracle data files and redo logs. RECOVERYDEST will be used as the flash recovery area. &lt;br /&gt;
SQL&gt; create diskgroup dg1 normal redundancy&lt;br /&gt;
  2  failgroup fg1a disk&lt;br /&gt;
  3  &#39;ORCL:VOL1&#39;,&#39;ORCL:VOL2&#39;&lt;br /&gt;
  4  failgroup fg1b disk&lt;br /&gt;
  5  &#39;ORCL:VOL3&#39;,&#39;ORCL:VOL4&#39;;&lt;br /&gt;
 &lt;br /&gt;
Diskgroup created.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; create diskgroup dg2 normal redundancy&lt;br /&gt;
  2  failgroup fg2a disk&lt;br /&gt;
  3  &#39;ORCL:VOL5&#39;,&#39;ORCL:VOL6&#39;&lt;br /&gt;
  4  failgroup fg2b disk&lt;br /&gt;
  5  &#39;ORCL:VOL7&#39;,&#39;ORCL:VOL8&#39;;&lt;br /&gt;
 &lt;br /&gt;
Diskgroup created.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; create diskgroup recoverydest normal redundancy&lt;br /&gt;
  2  failgroup fgrd1 disk&lt;br /&gt;
  3  &#39;ORCL:VOL9&#39;&lt;br /&gt;
  4  failgroup fgrd2 disk&lt;br /&gt;
  5  &#39;ORCL:VOL10&#39;;&lt;br /&gt;
 &lt;br /&gt;
Diskgroup created.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; show parameter diskgroup&lt;br /&gt;
 &lt;br /&gt;
NAME                           TYPE           VALUE&lt;br /&gt;
------------------------------ -----------    -----------------------------&lt;br /&gt;
asm_diskgroups                 string         DG1, DG2, RECOVERYDEST&lt;br /&gt;
&lt;br /&gt;
SQL&gt;  select name,total_mb from v$asm_diskgroup;&lt;br /&gt;
 &lt;br /&gt;
NAME                           TOTAL_MB&lt;br /&gt;
-------------------------      -------------------&lt;br /&gt;
DG1                            36864&lt;br /&gt;
DG2                            36864&lt;br /&gt;
RECOVERYDEST                   73728&lt;br /&gt;
 &lt;br /&gt;
3 rows selected.&lt;br /&gt;
&lt;br /&gt;
SQL&gt;  select name,path,failgroup from v$asm_disk;&lt;br /&gt;
 &lt;br /&gt;
NAME         PATH               FAILGROUP&lt;br /&gt;
--------     ---------------    ----------------&lt;br /&gt;
VOL1         ORCL:VOL1          FG1A&lt;br /&gt;
VOL10        ORCL:VOL10         FGRD2&lt;br /&gt;
VOL2         ORCL:VOL2          FG1A&lt;br /&gt;
VOL3         ORCL:VOL3          FG1B&lt;br /&gt;
VOL4         ORCL:VOL4          FG1B&lt;br /&gt;
VOL5         ORCL:VOL5          FG2A&lt;br /&gt;
VOL6         ORCL:VOL6          FG2A&lt;br /&gt;
VOL7         ORCL:VOL7          FG2B&lt;br /&gt;
VOL8         ORCL:VOL8          FG2B&lt;br /&gt;
VOL9         ORCL:VOL9          FGRD1&lt;br /&gt;
 &lt;br /&gt;
10 rows selected.&lt;br /&gt;
2j. Configure flash recovery area. &lt;br /&gt;
 &lt;br /&gt;
SQL&gt; connect sys/sys@prod1 as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&gt; alter database disable block change tracking;&lt;br /&gt;
&lt;br /&gt;
Database altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter system set db_recovery_file_dest_size=72G;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter system set db_recovery_file_dest=’+RECOVERYDEST’;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;br /&gt;
2k. Migrate data files to ASM. &lt;br /&gt;
You must use RMAN to migrate the data files to ASM disk groups. All data files will be migrated to the newly created disk group, DG1. The redo logs and control files are created in DG1 and DG2. In a production environment, you should store redo logs on different set of disks and disk controllers from the rest of the Oracle data files. &lt;br /&gt;
SQL&gt; connect sys/sys@prod1 as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&gt; alter system set db_create_file_dest=’+DG1’;&lt;br /&gt;
&lt;br /&gt;
System altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter system set control_files=&#39;+DG1/cf1.dbf&#39; scope=spfile;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; shutdown immediate;&lt;br /&gt;
&lt;br /&gt;
[oracle@salmon1]$ rman target /&lt;br /&gt;
&lt;br /&gt;
RMAN&gt; startup nomount;&lt;br /&gt;
 &lt;br /&gt;
Oracle instance started&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area      419430400 bytes&lt;br /&gt;
Fixed Size                    779416 bytes&lt;br /&gt;
Variable Size                 128981864 bytes&lt;br /&gt;
Database Buffers              289406976 bytes&lt;br /&gt;
Redo Buffers                  262144 bytes&lt;br /&gt;
 &lt;br /&gt;
RMAN&gt; restore controlfile from &#39;/u02/oradata/prod1/control01.ctl&#39;;&lt;br /&gt;
 &lt;br /&gt;
Starting restore at 26-MAY-05&lt;br /&gt;
using target database controlfile instead of recovery catalog&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: sid=160 devtype=DISK&lt;br /&gt;
 &lt;br /&gt;
channel ORA_DISK_1: copied controlfile copy&lt;br /&gt;
output filename=+DG1/cf1.dbf&lt;br /&gt;
Finished restore at 26-MAY-05&lt;br /&gt;
&lt;br /&gt;
RMAN&gt; alter database mount;&lt;br /&gt;
 &lt;br /&gt;
database mounted&lt;br /&gt;
released channel: ORA_DISK_1&lt;br /&gt;
 &lt;br /&gt;
RMAN&gt; backup as copy database format &#39;+DG1&#39;;&lt;br /&gt;
&lt;br /&gt;
Starting backup at 26-MAY-05&lt;br /&gt;
allocated channel: ORA_DISK_1&lt;br /&gt;
channel ORA_DISK_1: sid=160 devtype=DISK&lt;br /&gt;
channel ORA_DISK_1: starting datafile copy&lt;br /&gt;
input datafile fno=00001 name=/u02/oradata/prod1/system01.dbf&lt;br /&gt;
output filename=+DG1/prod1/datafile/system.257.1 tag=TAG20050526T073442 recid=1 stamp=559294642&lt;br /&gt;
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:49&lt;br /&gt;
channel ORA_DISK_1: starting datafile copy&lt;br /&gt;
input datafile fno=00003 name=/u02/oradata/prod1/sysaux01.dbf&lt;br /&gt;
output filename=+DG1/prod1/datafile/sysaux.258.1 tag=TAG20050526T073442 recid=2 stamp=559294735&lt;br /&gt;
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:26&lt;br /&gt;
channel ORA_DISK_1: starting datafile copy&lt;br /&gt;
input datafile fno=00002 name=/u02/oradata/prod1/undotbs01.dbf&lt;br /&gt;
output filename=+DG1/prod1/datafile/undotbs1.259.1 tag=TAG20050526T073442 recid=3 stamp=559294750&lt;br /&gt;
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15&lt;br /&gt;
channel ORA_DISK_1: starting datafile copy&lt;br /&gt;
input datafile fno=00004 name=/u02/oradata/prod1/users01.dbf&lt;br /&gt;
output filename=+DG1/prod1/datafile/users.260.1 tag=TAG20050526T073442 recid=4 stamp=559294758&lt;br /&gt;
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07&lt;br /&gt;
channel ORA_DISK_1: starting datafile copy&lt;br /&gt;
copying current controlfile&lt;br /&gt;
output filename=+DG1/prod1/controlfile/backup.261.1 tag=TAG20050526T073442 recid=5 stamp=559294767&lt;br /&gt;
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08&lt;br /&gt;
Finished backup at 26-MAY-05&lt;br /&gt;
&lt;br /&gt;
RMAN&gt; switch database to copy;&lt;br /&gt;
 &lt;br /&gt;
datafile 1 switched to datafile copy &quot;+DG1/prod1/datafile/system.257.1&quot;&lt;br /&gt;
datafile 2 switched to datafile copy &quot;+DG1/prod1/datafile/undotbs1.259.1&quot;&lt;br /&gt;
datafile 3 switched to datafile copy &quot;+DG1/prod1/datafile/sysaux.258.1&quot;&lt;br /&gt;
datafile 4 switched to datafile copy &quot;+DG1/prod1/datafile/users.260.1&quot;&lt;br /&gt;
&lt;br /&gt;
RMAN&gt; alter database open;&lt;br /&gt;
 &lt;br /&gt;
database opened&lt;br /&gt;
&lt;br /&gt;
RMAN&gt; exit&lt;br /&gt;
&lt;br /&gt;
SQL&gt; connect sys/sys@prod1 as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&gt; select tablespace_name, file_name from dba_data_files;&lt;br /&gt;
 &lt;br /&gt;
TABLESPACE               FILE_NAME                                          &lt;br /&gt;
---------------------    -----------------------------------------&lt;br /&gt;
USERS                    +DG1/prod1/datafile/users.260.1                             &lt;br /&gt;
SYSAUX                   +DG1/prod1/datafile/sysaux.258.1                          &lt;br /&gt;
UNDOTBS1                 +DG1/prod1/datafile/undotbs1.259.1                         &lt;br /&gt;
SYSTEM                   +DG1/prod1/datafile/system.257.1                          &lt;br /&gt;
2l. Migrate temp tablespace to ASM. &lt;br /&gt;
SQL&gt; alter tablespace temp add tempfile size 100M;&lt;br /&gt;
 &lt;br /&gt;
Tablespace altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select file_name from dba_temp_files;&lt;br /&gt;
 &lt;br /&gt;
FILE_NAME              &lt;br /&gt;
-------------------------------------                            &lt;br /&gt;
+DG1/prod1/tempfile/temp.264.3         &lt;br /&gt;
2m. Migrate redo logs to ASM. &lt;br /&gt;
Drop existing redo logs and recreate them in ASM disk groups, DG1 and DG2. &lt;br /&gt;
SQL&gt; alter system set db_create_online_log_dest_1=&#39;+DG1&#39;;&lt;br /&gt;
 &lt;br /&gt;
System altered.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; alter system set db_create_online_log_dest_2=&#39;+DG2&#39;;&lt;br /&gt;
 &lt;br /&gt;
System altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select group#, member from v$logfile;&lt;br /&gt;
 &lt;br /&gt;
         GROUP#     MEMBER&lt;br /&gt;
---------------     ----------------------------------&lt;br /&gt;
             1      /u03/oradata/prod1/redo01.log&lt;br /&gt;
             2      /u03/oradata/prod1/redo02.log&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database add logfile group 3 size 10M;&lt;br /&gt;
&lt;br /&gt;
Database altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter system switch logfile;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database drop logfile group 1; &lt;br /&gt;
&lt;br /&gt;
Database altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database add logfile group 1 size 100M;&lt;br /&gt;
&lt;br /&gt;
Database altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database drop logfile group 2; &lt;br /&gt;
&lt;br /&gt;
Database altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database add logfile group 2 size 100M;&lt;br /&gt;
&lt;br /&gt;
Database altered. &lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter system switch logfile;&lt;br /&gt;
&lt;br /&gt;
System altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database drop logfile group 3; &lt;br /&gt;
&lt;br /&gt;
Database altered.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select group#, member from v$logfile;&lt;br /&gt;
 &lt;br /&gt;
         GROUP#     MEMBER&lt;br /&gt;
---------------     ----------------------------------------&lt;br /&gt;
              1     +DG1/prod1/onlinelog/group_1.265.3  &lt;br /&gt;
              1     +DG2/prod1/onlinelog/group_1.257.1  &lt;br /&gt;
              2     +DG1/prod1/onlinelog/group_2.266.3  &lt;br /&gt;
              2     +DG2/prod1/onlinelog/group_2.258.1   &lt;br /&gt;
2n. Create pfile from spfile. &lt;br /&gt;
Create and retain a copy of the database pfile. You&#39;ll add more RAC specific parameters to the pfile later, in the Post Installation. &lt;br /&gt;
SQL&gt; connect sys/sys@prod1 as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&gt; create pfile=&#39;/tmp/tmppfile.ora&#39; from spfile;&lt;br /&gt;
&lt;br /&gt;
File created.&lt;br /&gt;
2o. Add additional control file. &lt;br /&gt;
If an additional control file is required for redundancy, you can create it in ASM as you would on any other filesystem. &lt;br /&gt;
SQL&gt; connect sys/sys@prod1 as sysdba&lt;br /&gt;
Connected to an idle instance.&lt;br /&gt;
SQL&gt; startup mount&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area      419430400 bytes&lt;br /&gt;
Fixed Size                    779416 bytes&lt;br /&gt;
Variable Size                 128981864 bytes&lt;br /&gt;
Database Buffers              289406976 bytes&lt;br /&gt;
Redo Buffers                  262144 bytes&lt;br /&gt;
Database mounted.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database backup controlfile to &#39;+DG2/cf2.dbf&#39;;&lt;br /&gt;
 &lt;br /&gt;
Database altered.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; alter system set control_files=&#39;+DG1/cf1.dbf &#39;,&#39;+DG2/cf2.dbf&#39; scope=spfile;&lt;br /&gt;
 &lt;br /&gt;
System altered.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; shutdown immediate; &lt;br /&gt;
ORA-01109: database not open&lt;br /&gt;
 &lt;br /&gt;
Database dismounted.&lt;br /&gt;
ORACLE instance shut down.&lt;br /&gt;
SQL&gt; startup&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area      419430400 bytes&lt;br /&gt;
Fixed Size                    779416 bytes&lt;br /&gt;
Variable Size                 128981864 bytes&lt;br /&gt;
Database Buffers              289406976 bytes&lt;br /&gt;
Redo Buffers                  262144 bytes&lt;br /&gt;
Database mounted.&lt;br /&gt;
Database opened.&lt;br /&gt;
SQL&gt; select name from v$controlfile;&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
---------------------------------------&lt;br /&gt;
+DG1/cf1.dbf&lt;br /&gt;
+DG2/cf2.dbf&lt;br /&gt;
After successfully migrating all the data files over to ASM, the old data files are no longer needed and can be removed. Your single-instance database is now running on ASM! &lt;br /&gt;
&lt;br /&gt;
Step 3: Install Cluster Ready Services (CRS) Software &lt;br /&gt;
CRS requires two files—the Oracle Cluster Registry (OCR) and the Voting Disk—on shared raw devices or Oracle Cluster File System (OCFS). These files must be accessible to all nodes in the cluster. Raw devices are used here to house both files. &lt;br /&gt;
3a. Create OCR and Voting Disk. &lt;br /&gt;
The storage size for the OCR should be at least 100MB and the storage size for the voting disk should be at least 20MB. &lt;br /&gt;
 &lt;br /&gt;
File Raw Device Disk Partition Filename Size (MB)    &lt;br /&gt;
OCR /dev/raw/raw11 /dev/sde1 /u02/oradata/prod1/ocr 100    &lt;br /&gt;
Voting Disk /dev/raw/raw12 /dev/sde2 /u02/oradata/prod1/vdisk 20  &lt;br /&gt;
[root@salmon1]# more /etc/sysconfig/rawdevices&lt;br /&gt;
/dev/raw/raw11  /dev/sde1&lt;br /&gt;
/dev/raw/raw12  /dev/sde2&lt;br /&gt;
[root@salmon1]# chown oracle:dba /dev/raw/raw11&lt;br /&gt;
[root@salmon1]# chown oracle:dba /dev/raw/raw12&lt;br /&gt;
[root@salmon1]# /sbin/service rawdevices restart&lt;br /&gt;
Assigning devices:&lt;br /&gt;
           /dev/raw/raw11  --&gt;   /dev/sde1&lt;br /&gt;
/dev/raw/raw11: bound to major 8, minor 65&lt;br /&gt;
           /dev/raw/raw12  --&gt;   /dev/sde2&lt;br /&gt;
/dev/raw/raw12: bound to major 8, minor 66&lt;br /&gt;
done&lt;br /&gt;
[root@salmon1]# su - oracle&lt;br /&gt;
[oracle@salmon1]$ ln -s /dev/raw/raw11 /u02/oradata/prod1/ocr&lt;br /&gt;
[oracle@salmon1]$ ln -s /dev/raw/raw12 /u02/oradata/prod1/vdisk&lt;br /&gt;
3b. Install CRS software. &lt;br /&gt;
Before installing the CRS software, shut down the listener, database, and ASM instance. Mount the CRS CD or download the software from OTN. The OUI should be launched on only the first node. During installation, the installer automatically copies the software to the second node. &lt;br /&gt;
[oracle@salmon1]$ export ORACLE_BASE=/u01/app/oracle&lt;br /&gt;
[oracle@salmon1]$ /mnt/cdrom/runInstaller&lt;br /&gt;
Welcome - Click on &quot;Next.&quot; &lt;br /&gt;
Specify File Locations: &lt;br /&gt;
Name: OraCr10g_home1 &lt;br /&gt;
Path: /u01/app/oracle/product/10.1.0/crs_1 &lt;br /&gt;
Language Selection - English &lt;br /&gt;
Cluster Configuration: &lt;br /&gt;
Cluster Name: crs &lt;br /&gt;
Public Node Name: salmon1, Private Node Name: sallocal1 &lt;br /&gt;
Public Node Name: salmon2, Private Node Name: sallocal2 &lt;br /&gt;
Private Interconnect Enforcement: &lt;br /&gt;
Interface Name: eth0, Subnet: 192.168.0.0, Interface Type: Public &lt;br /&gt;
Interface Name: eth1, Subnet: 10.10.10.0, Interface Type: Private &lt;br /&gt;
Oracle Cluster Registry: &lt;br /&gt;
Specify OCR Location: /u02/oradata/prod1/ocr &lt;br /&gt;
Voting Disk: &lt;br /&gt;
Enter Voting disk filename: /u02/oradata/prod1/vdisk &lt;br /&gt;
Execute /u01/app/oracle/oraInventory/orainstRoot.sh script from another window as the root user on the first node. &lt;br /&gt;
Execute /u01/app/oracle/oraInventory/orainstRoot.sh script from another window as the root user on the second node. &lt;br /&gt;
Click on &quot;Continue&quot; after the orainstRoot.sh has been run on both nodes. &lt;br /&gt;
Summary - Click on &quot;Install&quot; &lt;br /&gt;
Execute /u01/app/oracle/product/10.1.0/crs_1/root.sh script from another window as the root user on the first node. Do not run the next step until this step completes. &lt;br /&gt;
Execute /u01/app/oracle/product/10.1.0/crs_1/root.sh script from another window as the root user on the second node. &lt;br /&gt;
Click on &quot;OK&quot; after the root.sh has been run on both nodes. &lt;br /&gt;
End of Installation - Click on &quot;Exit.&quot; &lt;br /&gt;
[oracle@salmon1]$ /u01/app/oracle/product/10.1.0/crs_1/bin/olsnodes -n&lt;br /&gt;
salmon1 1&lt;br /&gt;
salmon2 2&lt;br /&gt;
[oracle@salmon1]$ ps -ef | egrep &quot;css|crs|evm&quot;&lt;br /&gt;
&lt;br /&gt;
Step 4: Install Oracle RAC Software &lt;br /&gt;
4a. Edit the oracle user environment file. &lt;br /&gt;
On node 1, set ORACLE_SID=prod1a. &lt;br /&gt;
On node 2, set ORACLE_SID=prod1b. &lt;br /&gt;
[oracle@salmon1]$ more .bash_profile&lt;br /&gt;
# .bash_profile&lt;br /&gt;
&lt;br /&gt;
# Get the aliases and functions&lt;br /&gt;
if [ -f ~/.bashrc ]; then&lt;br /&gt;
        . ~/.bashrc&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:$HOME/bin&lt;br /&gt;
export ORACLE_SID=prod1a&lt;br /&gt;
export ORACLE_BASE=/u01/app/oracle&lt;br /&gt;
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1&lt;br /&gt;
export ORA_CRS_HOME=$ORACLE_BASE/product/10.1.0/crs_1 &lt;br /&gt;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib&lt;br /&gt;
export PATH=$ORACLE_HOME/bin:$PATH&lt;br /&gt;
umask 022&lt;br /&gt;
4b. Install RAC software. &lt;br /&gt;
Mount the Oracle Database 10g Enterprise Edition CD or download the software from OTN. Launch the OUI on only the first node. During installation, the installer automatically copies the software to the second node. &lt;br /&gt;
[oracle@salmon1]$ . ~/.bash_profile&lt;br /&gt;
[oracle@salmon1]$ /mnt/cdrom/runInstaller&lt;br /&gt;
Welcome - Click on &quot;Next.&quot; &lt;br /&gt;
Specify File Locations: &lt;br /&gt;
Name: OraDB10g_home1 &lt;br /&gt;
Path: /u01/app/oracle/product/10.1.0/db_1 &lt;br /&gt;
Specify Hardware Cluster Installation Mode: &lt;br /&gt;
Select &quot;Cluster Installation&quot; &lt;br /&gt;
Click on &quot;Select All&quot; &lt;br /&gt;
Select Installation Type: &lt;br /&gt;
Select &quot;Enterprise Edition&quot; &lt;br /&gt;
Product-specific Prerequisite Checks: &lt;br /&gt;
Verify that all checks are successful before proceeding. Ignore the openmotif-2.1.30-11 warning. &lt;br /&gt;
Select Database Configuration: &lt;br /&gt;
Select &quot;Do not create a starter database&quot; &lt;br /&gt;
Summary - Click on &quot;Install&quot; &lt;br /&gt;
Execute /u01/app/oracle/product/10.1.0/db_1/root.sh script from another window as the root user on the first node. Do not run root.sh on the second node until the VIP configuration completes. &lt;br /&gt;
VIPCA Welcome - Click on &quot;Next&quot; &lt;br /&gt;
VIP Configuration Assistance, 1 of 2: Network Interfaces: &lt;br /&gt;
Select &quot;eth0&quot; &lt;br /&gt;
VIP Configuration Assistance, 2 of 2: Virtual IPs for cluster nodes: &lt;br /&gt;
Node Name: salmon1 &lt;br /&gt;
IP Alias Name: salmon1-vip &lt;br /&gt;
IP address: 192.168.0.186 &lt;br /&gt;
Subnet Mask: 255.255.255.0 &lt;br /&gt;
Node Name: salmon2 &lt;br /&gt;
IP Alias Name: salmon2-vip &lt;br /&gt;
IP address: 192.168.0.187 &lt;br /&gt;
Subnet Mask: 255.255.255.0 &lt;br /&gt;
Summary- Click on &quot;Finish&quot; &lt;br /&gt;
Configuration Assistant Progress Dialog - Click on &quot;OK&quot; &lt;br /&gt;
Configuration Results - Click on &quot;Exit&quot; &lt;br /&gt;
Execute /u01/app/oracle/product/10.1.0/db_1/root.sh script from another window as the root user on the second node. &lt;br /&gt;
Click on &quot;OK&quot; after the root.sh has run on both nodes. &lt;br /&gt;
End of Installation - Click on &quot;Exit&quot; &lt;br /&gt;
4c. Configure Oracle Listener. &lt;br /&gt;
The Network Configuration Assistant (NETCA) should only be launched and configured on one node. At the end of the configuration process, the NETCA starts up the Oracle listener on both nodes. &lt;br /&gt;
[oracle@salmon1]$ netca &lt;br /&gt;
Oracle Net Configuration Assistant: Real Application Clusters, Configuration: &lt;br /&gt;
Select &quot;Cluster configuration&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: TOPSNodes: &lt;br /&gt;
Click &quot;Select all nodes&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Welcome: &lt;br /&gt;
Select &quot;Listener configuration&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration, Listener: &lt;br /&gt;
Select &quot;Add&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration, Listener Name: &lt;br /&gt;
Listener Name: LISTENER &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration, Select Protocols &lt;br /&gt;
Selected Protocols: TCP &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration, TCP/IP Protocol: &lt;br /&gt;
Select &quot;Use the standard port number of 1521&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration, More Listeners? &lt;br /&gt;
Select &quot;No&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Listener Configuration Done: &lt;br /&gt;
Click on &quot;Next&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Welcome &lt;br /&gt;
Select &quot;Naming Methods configuration&quot; &lt;br /&gt;
Click on &quot;Next&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Naming Methods Configuration, Select Naming: &lt;br /&gt;
Select &quot;Local Naming&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Naming Methods Configuration Done: &lt;br /&gt;
Click on &quot;Next&quot; &lt;br /&gt;
Oracle Net Configuration Assistant: Welcome &lt;br /&gt;
Click on &quot;Finish&quot; &lt;br /&gt;
4d. Verify status of services. &lt;br /&gt;
On node 1: &lt;br /&gt;
[oracle@salmon1]$ srvctl status nodeapps -n salmon1&lt;br /&gt;
VIP is running on node: salmon1&lt;br /&gt;
GSD is running on node: salmon1&lt;br /&gt;
Listener is running on node: salmon1&lt;br /&gt;
ONS daemon is running on node: salmon1&lt;br /&gt;
On node 2: &lt;br /&gt;
[oracle@salmon2]$ srvctl status nodeapps -n salmon2&lt;br /&gt;
VIP is running on node: salmon2&lt;br /&gt;
GSD is running on node: salmon2&lt;br /&gt;
Listener is running on node: salmon2&lt;br /&gt;
ONS daemon is running on node: salmon2&lt;br /&gt;
4e. listener.ora file &lt;br /&gt;
On node 1: &lt;br /&gt;
[oracle@salmon1]$ more $ORACLE_HOME/network/admin/listener.ora&lt;br /&gt;
&lt;br /&gt;
LISTENER_SALMON1 =&lt;br /&gt;
  (DESCRIPTION_LIST =&lt;br /&gt;
    (DESCRIPTION =&lt;br /&gt;
      (ADDRESS_LIST =&lt;br /&gt;
          (ADDRESS = (PROTOCOL = TCP)(HOST = salmon1-vip)(PORT = 1521))&lt;br /&gt;
      )&lt;br /&gt;
      (ADDRESS_LIST =&lt;br /&gt;
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.184)(PORT = 1521))&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
SID_LIST_LISTENER_SALMON1 =&lt;br /&gt;
  (SID_LIST =&lt;br /&gt;
      (SID_DESC =&lt;br /&gt;
          (SID_NAME = PLSExtProc)&lt;br /&gt;
          (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)&lt;br /&gt;
          (PROGRAM = extproc)&lt;br /&gt;
      )&lt;br /&gt;
  )&lt;br /&gt;
On node 2: &lt;br /&gt;
[oracle@salmon2]$ more $ORACLE_HOME/network/admin/listener.ora&lt;br /&gt;
&lt;br /&gt;
LISTENER_SALMON2 =&lt;br /&gt;
  (DESCRIPTION_LIST =&lt;br /&gt;
    (DESCRIPTION =&lt;br /&gt;
      (ADDRESS_LIST =&lt;br /&gt;
          (ADDRESS = (PROTOCOL = TCP)(HOST = salmon2-vip)(PORT = 1521))&lt;br /&gt;
      )&lt;br /&gt;
      (ADDRESS_LIST =&lt;br /&gt;
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.185)(PORT = 1521))&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
SID_LIST_LISTENER_SALMON2 =&lt;br /&gt;
  (SID_LIST =&lt;br /&gt;
      (SID_DESC =&lt;br /&gt;
          (SID_NAME = PLSExtProc)&lt;br /&gt;
          (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)&lt;br /&gt;
          (PROGRAM = extproc)&lt;br /&gt;
      )&lt;br /&gt;
  )&lt;br /&gt;
4f. tnsnames.ora file &lt;br /&gt;
On both nodes: &lt;br /&gt;
[oracle@salmon1]$ more $ORACLE_HOME/network/admin/tnsnames.ora&lt;br /&gt;
LISTENERS_PROD1 =&lt;br /&gt;
  (ADDRESS_LIST =&lt;br /&gt;
      (ADDRESS = (PROTOCOL = TCP)(HOST = salmon1-vip)(PORT = 1521))&lt;br /&gt;
      (ADDRESS = (PROTOCOL = TCP)(HOST = salmon2-vip)(PORT = 1521))&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
PROD1 =&lt;br /&gt;
  (DESCRIPTION =&lt;br /&gt;
      (ADDRESS = (PROTOCOL = TCP)(HOST = salmon1-vip)(PORT = 1521))&lt;br /&gt;
      (ADDRESS = (PROTOCOL = TCP)(HOST = salmon2-vip)(PORT = 1521))&lt;br /&gt;
      (LOAD_BALANCE = yes)&lt;br /&gt;
      (CONNECT_DATA =&lt;br /&gt;
          (SERVICE_NAME = PROD1)&lt;br /&gt;
          (FAILOVER_MODE =&lt;br /&gt;
              (TYPE = SELECT)&lt;br /&gt;
              (METHOD = BASIC)&lt;br /&gt;
              (RETRIES = 200)&lt;br /&gt;
              (DELAY = 5)&lt;br /&gt;
          )&lt;br /&gt;
      )&lt;br /&gt;
  )&lt;br /&gt;
PROD1A =&lt;br /&gt;
(DESCRIPTION =&lt;br /&gt;
    (ADDRESS = (PROTOCOL = TCP)(HOST = salmon1-vip)(PORT = 1521))&lt;br /&gt;
    (CONNECT_DATA =&lt;br /&gt;
        (SERVER = DEDICATED)&lt;br /&gt;
        (SERVICE_NAME = PROD1)&lt;br /&gt;
        (INSTANCE_NAME = PROD1A)&lt;br /&gt;
    )&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
PROD1B =&lt;br /&gt;
  (DESCRIPTION =&lt;br /&gt;
      (ADDRESS = (PROTOCOL = TCP)(HOST = salmon2-vip)(PORT = 1521))&lt;br /&gt;
      (CONNECT_DATA =&lt;br /&gt;
          (SERVER = DEDICATED)&lt;br /&gt;
          (SERVICE_NAME = PROD1)&lt;br /&gt;
          (INSTANCE_NAME = PROD1B)&lt;br /&gt;
      )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
Step 5: Post Installation &lt;br /&gt;
5a. Relocate the ASM instance files on the first node. &lt;br /&gt;
Copy the ASM instance password file and spfile+ASM1A.ora to the new Oracle Home. &lt;br /&gt;
[oracle@salmon1]$ cp /u01/app/oracle/product/10.1.0/dbs/orapw+ASM1A &lt;br /&gt;
/u01/app/oracle/product/10.1.0/db_1/dbs&lt;br /&gt;
[oracle@salmon1]$ cp /u01/app/oracle/product/10.1.0/dbs/spfile+ASM1A.ora &lt;br /&gt;
/u01/app/oracle/product/10.1.0/db_1/dbs &lt;br /&gt;
5b. Create init.ora for the second ASM instance. &lt;br /&gt;
On the second node, create an init+ASM1B.ora file in $ORACLE_HOME/dbs. &lt;br /&gt;
asm_diskgroups=&#39;DG1&#39;, ‘DG2’, ‘RECOVERYDEST’&lt;br /&gt;
asm_diskstring=&#39;ORCL:VOL*&#39;&lt;br /&gt;
background_dump_dest=/u01/app/oracle/admin/+ASM/bdump&lt;br /&gt;
core_dump_dest=/u01/app/oracle/admin/+ASM/cdump&lt;br /&gt;
user_dump_dest=/u01/app/oracle/admin/+ASM/udump&lt;br /&gt;
instance_type=asm&lt;br /&gt;
large_pool_size=16M&lt;br /&gt;
remote_login_passwordfile=exclusive&lt;br /&gt;
+ASM1A.instance_number=1&lt;br /&gt;
+ASM1B.instance_number=2&lt;br /&gt;
5c. Create password file for the second ASM instance. &lt;br /&gt;
Using the orapwd utility, create an orapw+ASM1B file in $ORACLE_HOME/dbs on the second node. &lt;br /&gt;
5d. Create the second ASM instance. &lt;br /&gt;
Create the second ASM instance on the second node. &lt;br /&gt;
[oracle@salmon2]$ export ORACLE_SID=+ASM1B&lt;br /&gt;
[oracle@salmon2]$ sqlplus / as sysdba&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 10.1.0.3.0 - Production on Thu May 26 18:43:14 2005&lt;br /&gt;
 &lt;br /&gt;
Copyright (c) 1982, 2004, Oracle.  All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
Connected to an idle instance.&lt;br /&gt;
 &lt;br /&gt;
SQL&gt; startup&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area  104857600 bytes&lt;br /&gt;
Fixed Size                777616 bytes&lt;br /&gt;
Variable Size             104079964 bytes&lt;br /&gt;
Database Buffers          0 bytes&lt;br /&gt;
Redo Buffers              0 bytes&lt;br /&gt;
ASM diskgroups mounted&lt;br /&gt;
SQL&gt; create spfile from pfile;&lt;br /&gt;
&lt;br /&gt;
File created.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; shutdown immediate;&lt;br /&gt;
5e. Register the ASM instances with CRS. &lt;br /&gt;
For higher availability, register the ASM instances under the CRS framework. When registered, the CRS should detect any failed instances and automatically attempt to start up the instances. The CRS should also automatically start up the instances when the servers are rebooted. &lt;br /&gt;
On node 1: &lt;br /&gt;
&lt;br /&gt;
[oracle@salmon1]$ srvctl add asm -n salmon1 -i +ASM1A -o /u01/app/oracle/product/10.1.0/db_1&lt;br /&gt;
[oracle@salmon1]$ srvctl start asm -n salmon1 &lt;br /&gt;
[oracle@salmon1]$ srvctl status asm -n salmon1 &lt;br /&gt;
ASM instance +ASM1A is running on node salmon1. &lt;br /&gt;
On node 2: &lt;br /&gt;
[oracle@salmon2]$ srvctl add asm -n salmon2 -i +ASM1B -o /u01/app/oracle/product/10.1.0/db_1&lt;br /&gt;
[oracle@salmon2]$ srvctl start asm -n salmon2 &lt;br /&gt;
[oracle@salmon2]$ srvctl status asm -n salmon2 &lt;br /&gt;
ASM instance +ASM1B is running on node salmon2.  &lt;br /&gt;
&lt;br /&gt;
[oracle@salmon1]$ ps -ef | grep dbw | grep -v grep&lt;br /&gt;
oracle    8918     1  0   May 26 ?       00:00:01 asm_dbw0_+ASM1A&lt;br /&gt;
[oracle@salmon1]$ kill -9 8918&lt;br /&gt;
[oracle@salmon1]$ srvctl status asm –n salmon1&lt;br /&gt;
ASM instance +ASM1A is not running on node salmon1.&lt;br /&gt;
[oracle@salmon1]$ ps -ef | grep dbw | grep -v grep&lt;br /&gt;
[oracle@salmon1]$ srvctl status asm –n salmon1&lt;br /&gt;
ASM instance +ASM1A is running on node salmon1.&lt;br /&gt;
[oracle@salmon1]$ ps -ef | grep dbw | grep -v grep&lt;br /&gt;
oracle    8920     1  0   May 26 ?       00:00:01 asm_dbw0_+ASM1A&lt;br /&gt;
5f. Create password files for both RAC instances. &lt;br /&gt;
Using the orapwd utility, create an orapwprod1a file in $ORACLE_HOME/dbs on the first node and an orapwprod1b file in $ORACLE_HOME/dbs on the second node. &lt;br /&gt;
5g. Add RAC specific parameters in pfile. &lt;br /&gt;
Modify the pfile saved in Step 2n. Add and modify the following parameters: &lt;br /&gt;
*.cluster_database_instances=2&lt;br /&gt;
*.cluster_database=true&lt;br /&gt;
*.remote_listener=&#39;LISTENERS_PROD1’&lt;br /&gt;
prod1a.thread=1&lt;br /&gt;
prod1a.instance_number=1&lt;br /&gt;
prod1a.undo_tablespace=&#39;UNDOTBS1&#39;&lt;br /&gt;
prod1b.thread=2&lt;br /&gt;
prod1b.instance_number=2&lt;br /&gt;
prod1b.undo_tablespace=&#39;UNDOTBS2&#39;&lt;br /&gt;
5h. Modify init.ora of both RAC instances. &lt;br /&gt;
On node 1: &lt;br /&gt;
[oracle@salmon1]$ more $ORACLE_HOME/dbs/initprod1a.ora&lt;br /&gt;
spfile=&#39;+DG1/spfileprod1.ora&#39;&lt;br /&gt;
On node 2: &lt;br /&gt;
[oracle@salmon2]$ more $ORACLE_HOME/dbs/initprod1b.ora&lt;br /&gt;
spfile=&#39;+DG1/spfileprod1.ora&#39;&lt;br /&gt;
5i. Migrate database spfile to ASM. &lt;br /&gt;
SQL&gt; !echo $ORACLE_SID&lt;br /&gt;
prod1a&lt;br /&gt;
&lt;br /&gt;
SQL&gt; connect / as sysdba&lt;br /&gt;
Connected to an idle instance.&lt;br /&gt;
SQL&gt; startup pfile=/tmp/tmppfile.ora&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
&lt;br /&gt;
Total System Global Area     419430400 bytes&lt;br /&gt;
Fixed Size                   779416 bytes&lt;br /&gt;
Variable Size                128981864 bytes&lt;br /&gt;
Database Buffers             289406976 bytes&lt;br /&gt;
Redo Buffers                 262144 bytes&lt;br /&gt;
Database mounted.&lt;br /&gt;
Database opened.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; create spfile=&#39;+DG1/spfileprod1.ora&#39; from pfile=&#39;/tmp/tmppfile.ora&#39;;&lt;br /&gt;
&lt;br /&gt;
File created.&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;
SQL&gt; startup&lt;br /&gt;
ORACLE instance started.&lt;br /&gt;
 &lt;br /&gt;
Total System Global Area     419430400 bytes&lt;br /&gt;
Fixed Size                   779416 bytes&lt;br /&gt;
Variable Size                128981864 bytes&lt;br /&gt;
Database Buffers             289406976 bytes&lt;br /&gt;
Redo Buffers                 262144 bytes&lt;br /&gt;
Database mounted.&lt;br /&gt;
Database opened.&lt;br /&gt;
SQL&gt; show parameter spfile&lt;br /&gt;
 &lt;br /&gt;
NAME                       TYPE             VALUE&lt;br /&gt;
----------------------     ------------     ---------------------------&lt;br /&gt;
spfile                     string           +DG1/spfileprod1.ora&lt;br /&gt;
5j. Create RAC Data Dictionary Views. &lt;br /&gt;
Create the RAC data dictionary views on the first RAC instance. &lt;br /&gt;
SQL&gt; !echo $ORACLE_SID&lt;br /&gt;
prod1a&lt;br /&gt;
&lt;br /&gt;
SQL&gt; spool /tmp/catclust.log&lt;br /&gt;
SQL&gt; @$ORACLE_HOME/rdbms/admin/catclust&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
SQL&gt; spool off&lt;br /&gt;
SQL&gt; shutdown immediate;&lt;br /&gt;
5k. Register the RAC instances with CRS. &lt;br /&gt;
On node 1: &lt;br /&gt;
[oracle@salmon1]$ srvctl add database -d prod1 -o $ORACLE_HOME &lt;br /&gt;
[oracle@salmon1]$ srvctl add instance -d prod1 -i prod1a -n salmon1&lt;br /&gt;
[oracle@salmon1]$ srvctl add instance -d prod1 -i prod1b -n salmon2&lt;br /&gt;
[oracle@salmon1]$ srvctl start instance -d prod1 -i prod1a&lt;br /&gt;
5l. Create redo logs for the second RAC instance. &lt;br /&gt;
SQL&gt; connect sys/sys@prod1a as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
SQL&gt; alter database add logfile thread 2 group 3 size 100M;&lt;br /&gt;
SQL&gt; alter database add logfile thread 2 group 4 size 100M;&lt;br /&gt;
SQL&gt; select group#, member from v$logfile;&lt;br /&gt;
 &lt;br /&gt;
         GROUP#    MEMBER&lt;br /&gt;
---------------    ----------------------------------------&lt;br /&gt;
              1    +DG1/prod1/onlinelog/group_1.265.3  &lt;br /&gt;
              1    +DG2/prod1/onlinelog/group_1.257.1  &lt;br /&gt;
              2    +DG1/prod1/onlinelog/group_2.266.3  &lt;br /&gt;
              2    +DG2/prod1/onlinelog/group_2.258.1   &lt;br /&gt;
              3    +DG1/prod1/onlinelog/group_3.268.1&lt;br /&gt;
              3    +DG2/prod1/onlinelog/group_3.259.1&lt;br /&gt;
              4    +DG1/prod1/onlinelog/group_4.269.1&lt;br /&gt;
              4    +DG2/prod1/onlinelog/group_4.260.1&lt;br /&gt;
&lt;br /&gt;
8 rows selected.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; alter database enable thread 2;&lt;br /&gt;
&lt;br /&gt;
Database altered.&lt;br /&gt;
5m. Create undo tablespace for the second RAC instance. &lt;br /&gt;
SQL&gt; create undo tablespace UNDOTBS2 datafile size 200M;&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select tablespace_name, file_name from dba_data_files&lt;br /&gt;
     2    where tablespace_name=’UNDOTBS2’;&lt;br /&gt;
 &lt;br /&gt;
TABLESPACE               FILE_NAME                                          &lt;br /&gt;
---------------------    --------------------------------------&lt;br /&gt;
UNDOTBS2                 +DG1/prod1/datafile/undotbs2.270.1   &lt;br /&gt;
5n. Start up the second RAC instance. &lt;br /&gt;
[oracle@salmon1]$ srvctl start instance -d prod1 -i prod1b&lt;br /&gt;
[oracle@salmon1]$ crs_stat -t&lt;br /&gt;
Name                 Type            Target     State      Host        &lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
ora....1a.inst       application     ONLINE     ONLINE     salmon1 &lt;br /&gt;
ora....1b.inst       application     ONLINE     ONLINE     salmon2&lt;br /&gt;
ora.prod1.db         application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....M1A.asm       application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....M1B.asm       application     ONLINE     ONLINE     salmon2&lt;br /&gt;
ora....N1.lsnr       application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....on1.gsd       application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....on1.ons       application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....on1.vip       application     ONLINE     ONLINE     salmon1&lt;br /&gt;
ora....N2.lsnr       application     ONLINE     ONLINE     salmon2 &lt;br /&gt;
ora....on2.gsd       application     ONLINE     ONLINE     salmon2&lt;br /&gt;
ora....on2.ons       application     ONLINE     ONLINE     salmon2&lt;br /&gt;
ora....on2.vip       application     ONLINE     ONLINE     salmon2&lt;br /&gt;
[oracle@salmon1]$ srvctl status database -d prod1&lt;br /&gt;
Instance prod1a is running on node salmon1&lt;br /&gt;
Instance prod1b is running on node salmon2&lt;br /&gt;
[oracle@salmon1]$ srvctl stop database -d prod1&lt;br /&gt;
[oracle@salmon1]$ srvctl start database -d prod1&lt;br /&gt;
[oracle@salmon1]$ sqlplus system/system@prod1&lt;br /&gt;
&lt;br /&gt;
SQL*Plus: Release 10.1.0.3.0 - Production on Fri May 27 05:53:21 2005&lt;br /&gt;
 &lt;br /&gt;
Copyright (c) 1982, 2004, Oracle.  All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Connected to:&lt;br /&gt;
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production&lt;br /&gt;
With the Partitioning, Real Application Clusters, OLAP and Data Mining options&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select instance_number instance#, instance_name, host_name, status &lt;br /&gt;
     2    from gv$instance;&lt;br /&gt;
   &lt;br /&gt;
        INSTANCE#   INSTANCE_NAME     HOST_NAME                 STATUS&lt;br /&gt;
-----------------   ----------------- ------------------------- -----------&lt;br /&gt;
                1   prod1a            salmon1.dbsconsult.com    OPEN&lt;br /&gt;
                2   prod1b            salmon2.dbsconsult.com    OPEN&lt;br /&gt;
Congratulations, you have converted your single-instance database to RAC! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 6: Test Transparent Application Failover (TAF) &lt;br /&gt;
The failover mechanism in Oracle TAF enables any failed database connections to reconnect to another node within the cluster. The failover is transparent to the user. Oracle re-executes the query on the failed over instance and continues to display the remaining results to the user. &lt;br /&gt;
To demonstrate the failover mechanism of the TAF option, connect to two different database sessions and execute these steps: &lt;br /&gt;
6a. Connect the first session using the PROD1 service. &lt;br /&gt;
If the returned output of failover_type and failover_mode is &#39;NONE&#39;, verify that the PROD1 service is configured correctly in tnsnames.ora. &lt;br /&gt;
SQL&gt; connect system/system@prod1 as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select instance_number instance#, instance_name, host_name, status &lt;br /&gt;
     2    from v$instance;&lt;br /&gt;
   &lt;br /&gt;
         INSTANCE#   INSTANCE_NAME   HOST_NAME                 STATUS                                         &lt;br /&gt;
 -----------------   --------------  ------------------------- ----------------&lt;br /&gt;
                 1   prod1a          salmon1.dbsconsult.com    OPEN&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select failover_type, failover_method, failed_over &lt;br /&gt;
     2    from v$session where username=&#39;SYSTEM&#39;;&lt;br /&gt;
 &lt;br /&gt;
FAILOVER_TYPE              FAILOVER_MODE        FAILED_OVER&lt;br /&gt;
-------------------------  -------------------- ----------------------&lt;br /&gt;
SELECT                     BASIC                NO&lt;br /&gt;
6b. Shut down the instance from another session. &lt;br /&gt;
Connect as the sys user on prod1a instance and shut down the instance. &lt;br /&gt;
SQL&gt; connect sys/sys@prod1a as sysdba&lt;br /&gt;
Connected.&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select instance_number instance#, instance_name, host_name, status &lt;br /&gt;
     2    from v$instance;&lt;br /&gt;
   &lt;br /&gt;
        INSTANCE#   INSTANCE_NAME      HOST_NAME                 STATUS                                         &lt;br /&gt;
-----------------   ----------------   ------------------------  ----------------&lt;br /&gt;
                1   prod1a             salmon1.dbsconsult.com    OPEN&lt;br /&gt;
&lt;br /&gt;
SQL&gt; shutdown abort;    &lt;br /&gt;
ORACLE instance shut down.&lt;br /&gt;
6c. Verify that the session has failed over. &lt;br /&gt;
From the same session in Step 6a, execute the queries below to verify that the session has failed over to another instance. &lt;br /&gt;
SQL&gt; select instance_number instance#, instance_name, host_name, status &lt;br /&gt;
     2    from v$instance;&lt;br /&gt;
   &lt;br /&gt;
        INSTANCE#   INSTANCE_NAME      HOST_NAME                 STATUS                                         &lt;br /&gt;
-----------------   ----------------   ------------------------  ----------------&lt;br /&gt;
                2   prod1b             salmon2.dbsconsult.com    OPEN&lt;br /&gt;
&lt;br /&gt;
SQL&gt; select failover_type, failover_method, failed_over &lt;br /&gt;
     2    from v$session where username=&#39;SYSTEM&#39;;&lt;br /&gt;
 &lt;br /&gt;
FAILOVER_TYPE      FAILOVER_MODE   FAILED_OVER&lt;br /&gt;
-----------------  --------------  ----------------------&lt;br /&gt;
SELECT             BASIC            YES&lt;br /&gt;
&lt;br /&gt;
Conclusion &lt;br /&gt;
With proper planning and understanding of the RAC architecture, the transition from a single-instance database to a RAC configuration is not necessarily complex. ASM and RAC compliment each other to provide higher levels of availability, scalability, and business continuity. Hopefully, this guide has provided a clear and concise method of performing the conversion.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/2966559457786934574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2010/05/convert-single-instance-database-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/2966559457786934574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/2966559457786934574'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2010/05/convert-single-instance-database-to.html' title='Convert a Single Instance Database to Oracle RAC 10g on RHEL3'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-1217772919113402399</id><published>2010-01-08T12:25:00.000+05:30</published><updated>2010-01-08T12:25:03.344+05:30</updated><title type='text'>BDUMP, UDUMP, ALERT LOG FILES IN ORACLE 11G</title><content type='html'>The 11g New Features Guide notes important OFA changes, namely the removal of $ORACLE_HOME as an anchor for diagnostic and alert files:&lt;br /&gt;
&lt;br /&gt;
&quot;The database installation process has been redesigned to be based on the ORACLE_BASE environment variable. Until now, setting this variable has been optional and the only required variable has been ORACLE_HOME.&lt;br /&gt;
&lt;br /&gt;
With this feature, ORACLE_BASE is the only required input, and the ORACLE_HOME setting will be derived from ORACLE_BASE.&quot;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take a look at changes to the Oracle11g OFA standard.&lt;br /&gt;
&lt;br /&gt;
Enter new admin subdirectories&lt;br /&gt;
&lt;br /&gt;
New in Oracle 11g we see the new ADR (Automatic Diagnostic Repository) and Incident Packaging System, all designed to allow quick access to alert and diagnostic information.&lt;br /&gt;
&lt;br /&gt;
The new $ADR_HOME directory is located by default at $ORACLE_BASE/diag, with the directories for each instance at $ORACLE_HOME/diag/$ORACLE_SID, at the same level as the traditional bdump, udump and cdump directories and the initialization parameters background_dump_dest and user_dump_dest are deprecated in 11g.&lt;br /&gt;
&lt;br /&gt;
You can use the new initialization parameter diagnostic_dest to specify an alternative location for the diag directory contents.&lt;br /&gt;
&lt;br /&gt;
In 11g, each $ORACLE_HOME/diag/$ORACLE_SID directory may contain these new directories:&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
alert - A new alert directory for the plain text and XML versions of the alert log.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
incident - A new directory for the incident packaging software.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
incpkg - A directory for packaging an incident into a bundle.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
trace - A replacement for the ancient background dump (bdump) and user dump (udump) destinations.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
cdump - The old core dump directory retains it&#39;s 10g name.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s see how the 11g alert log has changed.&lt;br /&gt;
&lt;br /&gt;
Alert log changes in 11g&lt;br /&gt;
&lt;br /&gt;
Oracle now writes two alert logs, the traditional alert log in plain text plus a new XML formatted alert.log which is named as log.xml.&lt;br /&gt;
&lt;br /&gt;
&quot;Prior to Oracle 11g, the alert log resided in $ORACLE_HOME/admin/$ORACLE_SID/bdump directory, but it now resides in the $ORACLE_BASE/diag/$ORACLE_SID directory&quot;.&lt;br /&gt;
&lt;br /&gt;
Fortunately, you can re-set it to the 10g and previous location by specifying the BDUMP location for the diagnostic_dest parameter.&lt;br /&gt;
&lt;br /&gt;
But best of all, you no longer require server access to see your alert log since it is now accessible via standard SQL using the new v$diag_info view:&lt;br /&gt;
&lt;br /&gt;
select name, value from v$diag_info;&lt;br /&gt;
&lt;br /&gt;
For complete details, see MetaLink Note:438148.1 - &quot;Finding alert.log file in 11g&quot;.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/1217772919113402399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2010/01/bdump-udump-alert-log-files-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/1217772919113402399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/1217772919113402399'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2010/01/bdump-udump-alert-log-files-in-oracle.html' title='BDUMP, UDUMP, ALERT LOG FILES IN ORACLE 11G'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-4357022288941471584</id><published>2009-12-02T12:50:00.000+05:30</published><updated>2009-12-02T12:52:06.111+05:30</updated><title type='text'>Data Pump Enhancements in Oracle Database 11g Release 1</title><content type='html'>COMPRESSION&lt;br /&gt;The COMPRESSION parameter allows you to decide what, if anything, you wish to compress in your export. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;COMPRESSION={ALL | DATA_ONLY | METADATA_ONLY | NONE}The available options are:&lt;br /&gt;&lt;br /&gt;ALL: Both metadata and data are compressed. &lt;br /&gt;DATA_ONLY: Only data is compressed. &lt;br /&gt;METADATA_ONLY: Only metadata is compressed. This is the default setting. &lt;br /&gt;NONE: Nothing is compressed. &lt;br /&gt;Here is an example of the COMPRESSION parameter being used.&lt;br /&gt;&lt;br /&gt;expdp test/test schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  compression=allThe COMPATIBLE initialization parameter should be set to &quot;11.0.0&quot; or higher to use these options, except for the METADATA_ONLY option, which is available with a COMPATIBLE setting of &quot;10.2&quot;. &lt;br /&gt;Encryption Parameters&lt;br /&gt;Data pump encryption is an Enterprise Edition feature, so the parameters described below are only relevant for Enterprise Edition installations. In addition, the COMPATIBLE initialisation parameter must be set to &quot;11.0.0&quot; or higher to use these features.&lt;br /&gt;&lt;br /&gt;ENCRYPTION and ENCRYPTION_PASSWORD&lt;br /&gt;The use of encryption is controlled by a combination of the ENCRYPTION or ENCRYPTION_PASSWORD parameters. The syntax for the ENCRYPTION parameter is shown below. &lt;br /&gt;ENCRYPTION = {ALL | DATA_ONLY | ENCRYPTED_COLUMNS_ONLY | METADATA_ONLY | NONE}&lt;br /&gt;The available options are:&lt;br /&gt;&lt;br /&gt;ALL: Both metadata and data are encrypted. &lt;br /&gt;DATA_ONLY: Only data is encrypted. &lt;br /&gt;ENCRYPTED_COLUMNS_ONLY: Only encrypted columns are written to the dump file in an encrypted format. &lt;br /&gt;METADATA_ONLY: Only metadata is encrypted. &lt;br /&gt;NONE: Nothing is encrypted. &lt;br /&gt;If neither the ENCRYPTION or ENCRYPTION_PASSWORD parameters are set, it is assumed the required level of encryption is NONE. If only the ENCRYPTION_PASSWORD parameter is specified, it is assumed the required level of encryption is ALL. Here is an example of these parameters being used.&lt;br /&gt;&lt;br /&gt;expdp test/test schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  encryption=all encryption_password=passwordENCRYPTION_ALGORITHM&lt;br /&gt;The ENCRYPTION_ALGORITHM parameter specifies the encryption algorithm to be used during the export, with the default being &quot;AES128&quot;. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;ENCRYPTION_ALGORITHM = { AES128 | AES192 | AES256 }The ENCRYPTION_ALGORITHM parameter must be used in conjunction with the ENCRYPTION or ENCRYPTION_PASSWORD parameters, as shown below.&lt;br /&gt;&lt;br /&gt;expdp test/test schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  encryption=all encryption_password=password encryption_algorithm=AES256ENCRYPTION_MODE&lt;br /&gt;The ENCRYPTION_MODE parameter specifies the type of security used during export and import operations. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;ENCRYPTION_MODE = { DUAL | PASSWORD | TRANSPARENT }The allowable values and their default settings are explained below:&lt;br /&gt;&lt;br /&gt;DUAL: This mode creates a dump file that can be imported using an Oracle Encryption Wallet, or the the ENCRYPTION_PASSWORD specified during the export operation. This is the default setting if the ENCRYPTION_PASSWORD parameter is set and there is an open wallet. &lt;br /&gt;PASSWORD: This mode creates a dump file that can only be imported using the ENCRYPTION_PASSWORD specified during the export operation. This is the default setting if the ENCRYPTION_PASSWORD parameter is set and there isn&#39;t an open wallet. &lt;br /&gt;TRANSPARENT: This mode creates an encrypted dump file using and open Oracle Encryption Wallet. If the ENCRYPTION_PASSWORD is specified while using this mode and error is produced. This is the default setting of only the ENCRYPTION parameter is set. &lt;br /&gt;Wallet setup is described here.&lt;br /&gt;&lt;br /&gt;The ENCRYPTION_MODE requires either the ENCRYPTION or ENCRYPTION_PASSWORD parameter to be specified.&lt;br /&gt;&lt;br /&gt;expdp test/test schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  encryption=all encryption_password=password encryption_mode=passwordTRANSPORTABLE&lt;br /&gt;The TRANSPORTABLE parameter is similar to the TRANSPORT_TABLESPACES parameter available previously in that it only exports and imports metadata about a table, relying on you to manually transfer the relevent tablespace datafiles. The export operation lists the tablespaces that must be transfered. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;TRANSPORTABLE = {ALWAYS | NEVER}The value ALWAYS turns on the transportable mode, while the default value of NEVER indicates this is a regular export/import.&lt;br /&gt;&lt;br /&gt;The following restrictions apply during exports using the TRANSPORTABLE parameter:&lt;br /&gt;&lt;br /&gt;This parameter is only applicable during table-level exports. &lt;br /&gt;The user performing the operation must have the EXP_FULL_DATABASE privilege. &lt;br /&gt;Tablespaces containing the source objects must be read-only. &lt;br /&gt;The COMPATIBLE initialization parameter must be set to 11.0.0 or higher. &lt;br /&gt;The default tablespace of the user performing the export must not be the same as any of the tablespaces being transported. &lt;br /&gt;Some extra restictions apply during import operations:&lt;br /&gt;&lt;br /&gt;The NETWORK_LINK parameter must be specified during the import operation. This parameter is set to a valid database link to the source schema. &lt;br /&gt;The schema performing the import must have both EXP_FULL_DATABASE and IMP_FULL_DATABASE privileges. &lt;br /&gt;The TRANSPORT_DATAFILES parameter is used to identify the datafiles holding the table data. &lt;br /&gt;Examples of the export and import operations are shown below.&lt;br /&gt;&lt;br /&gt;expdp system tables=TEST1.TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  transportable=ALWAYS&lt;br /&gt;&lt;br /&gt;impdp system tables=TEST1.TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=impdpTEST.log&lt;br /&gt;  transportable=ALWAYS network_link=DB11G transport_datafiles=&#39;/u01/oradata/DB11G/test01.dbf&#39;PARTITION_OPTIONS&lt;br /&gt;The PARTITION_OPTIONS parameter determines how partitions will be handled during export and import operations. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;PARTITION_OPTIONS={none | departition | merge}The allowable values are:&lt;br /&gt;&lt;br /&gt;NONE: The partitions are created exactly as they were on the system the export was taken from. &lt;br /&gt;DEPARTITION: Each partition and sub-partition is created as a separate table, named using a combination of the table and (sub-)partition name. &lt;br /&gt;MERGE: Combines all partitions into a single table. &lt;br /&gt;The NONE and MERGE options are not possible if the export was done using the TRANSPORTABLE parameter with a partition or subpartition filter. If there are any grants on objects being departitioned, an error message is generated and the objects are not loaded.&lt;br /&gt;&lt;br /&gt;expdp test/test directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log tables=test.tab1&lt;br /&gt;  partition_options=mergeREUSE_DUMPFILES&lt;br /&gt;The REUSE_DUMPFILES parameter can be used to prevent errors being issued if the export attempts to write to a dump file that already exists.&lt;br /&gt;&lt;br /&gt;REUSE_DUMPFILES={Y | N}When set to &quot;Y&quot;, any existing dumpfiles will be overwritten. When the default values of &quot;N&quot; is used, an error is issued if the dump file already exists.&lt;br /&gt;&lt;br /&gt;expdp test/test schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  reuse_dumpfiles=yREMAP_TABLE&lt;br /&gt;This parameter allows a table to be renamed during the import operations performed using the TRANSPORTABLE method. It can also be used to alter the base table name used during PARTITION_OPTIONS imports. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablenameAn example is shown below.&lt;br /&gt;&lt;br /&gt;impdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=impdpTEST.log&lt;br /&gt;  remap_table=TEST.TAB1:TAB2Existing tables are not renamed, only tables created by the import.&lt;br /&gt;&lt;br /&gt;DATA_OPTIONS&lt;br /&gt;SKIP_CONSTRAINT_ERRORS&lt;br /&gt;During import operations using the external table acces method, setting the DATA_OPTIONS parameter to SKIP_CONSTRAINT_ERRORS allows load operations to continue through non-deferred constraint violations, with any violations logged for future reference. Without this, the default action would be to roll back the whole operation. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;DATA_OPTIONS=SKIP_CONSTRAINT_ERRORSAn example is shown below.&lt;br /&gt;&lt;br /&gt;impdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=impdpTEST.log&lt;br /&gt;  data_options=SKIP_CONSTRAINT_ERRORSThis parameter has no impact on deferred constraints, which still cause the operation to be rolled back once a violation is detected. If the object being loaded has existing unique indexes or constraints, the APPEND hint will not be used, which may adversely affect performance.&lt;br /&gt;&lt;br /&gt;XML_CLOBS&lt;br /&gt;During an export, if XMLTYPE columns are currently stored as CLOBs, they will automatically be exported as uncompressed CLOBs. If on the other hand they are currently stored as any combination of object-relational, binary or CLOB formats, they will be exported in compressed format by default. Setting the DATA_OPTIONS parameter to XML_CLOBS specifies that all XMLTYPE columns should be exported as uncompressed CLOBs, regardless of the default action. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;DATA_OPTIONS=XML_CLOBSAn example is shown below.&lt;br /&gt;&lt;br /&gt;expdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  version=11.1 data_options=XML_CLOBSBoth the export and import must use the same XML schema and the job version must be set to 11.0.0 or higher.&lt;br /&gt;&lt;br /&gt;REMAP_DATA&lt;br /&gt;During export and import operations, the REMAP_DATA parameter allows you to associate a remap packaged function that will accept the column value as a parameter and return a modified version of the data. The syntax is shown below.&lt;br /&gt;&lt;br /&gt;REMAP_DATA=[schema.]tablename.column_name:[schema.]pkg.functionThis can be used to mask sensitive data during export and import operations by replacing the original data with random alternatives. The mapping is done on a column-by-column basis, as shown below.&lt;br /&gt;&lt;br /&gt;expdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp logfile=expdpTEST.log&lt;br /&gt;  remap_data:tab1.col1:remap_pkg.remap_col1&lt;br /&gt;  remap_data:tab1.col2:remap_pkg.remap_col2The remapping function must return the same datatype as the source column and it must not perform a commit or rollback.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/4357022288941471584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/data-pump-enhancements-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/4357022288941471584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/4357022288941471584'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/data-pump-enhancements-in-oracle.html' title='Data Pump Enhancements in Oracle Database 11g Release 1'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-164254828207864804</id><published>2009-12-02T11:55:00.000+05:30</published><updated>2009-12-02T12:04:13.767+05:30</updated><title type='text'>How To: Configure Data Guard Broker</title><content type='html'>Configuring Data Guard Broker:&lt;br /&gt;NOTE: You should have your physical standby already setup.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.) Check parameter DG_BROKER_START on primary:&lt;br /&gt;SQL&gt; show parameter DG_BROKER_START&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;dg_broker_start boolean FALSE&lt;br /&gt;&lt;br /&gt;2.) Set DG_BROKER_START to true on primary:&lt;br /&gt;SQL&gt; alter system set DG_BROKER_START=true scope=both;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;3.)Check DG_BROKER_START on standby side:&lt;br /&gt;SQL&gt; show parameter DG_BROKER_START&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;dg_broker_start boolean FALSE&lt;br /&gt;&lt;br /&gt;4.) Set DG_BROKER_START to true on standby:&lt;br /&gt;SQL&gt; alter system set DG_BROKER_START=true scope=both;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;5.) Define a service for the listener that includes the db_unique_name_DGMGRL.db_domain values for the GLOBAL_DBNAME:&lt;br /&gt;Update the listener.ora file on primary and standby&lt;br /&gt;SID_LIST_LISTENER =&lt;br /&gt;(SID_LIST =&lt;br /&gt;(SID_DESC =&lt;br /&gt;(GLOBAL_DBNAME = orcl.abc.com)&lt;br /&gt;(ORACLE_HOME = /opt/app/oracle/10.2)&lt;br /&gt;(SID_NAME = orcl)&lt;br /&gt;)&lt;br /&gt;(SID_DESC =&lt;br /&gt;(GLOBAL_DBNAME = orcl_DGMGRL.abc.com) --&gt;_DGMGRL.&lt;br /&gt;(ORACLE_HOME = /opt/app/oracle/10.2)&lt;br /&gt;(SID_NAME = orcl)&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;6.) Now to create the data guard broker configurations:&lt;br /&gt;&lt;br /&gt;[oracle@APP3 admin]$ dgmgrl&lt;br /&gt;DGMGRL for Linux: Version 10.2.0.4.0 - 64bit Production&lt;br /&gt;&lt;br /&gt;Copyright (c) 2000, 2005, Oracle. All rights reserved.&lt;br /&gt;&lt;br /&gt;Welcome to DGMGRL, type &quot;help&quot; for information.&lt;br /&gt;DGMGRL&gt; connect sys/oracle&lt;br /&gt;Connected.&lt;br /&gt;DGMGRL&gt; create configuration &#39;DBTEST&#39;&lt;br /&gt;&gt; as primary database is &#39;orcl&#39;&lt;br /&gt;&gt; connect identifier is orcl;&lt;br /&gt;Configuration &quot;DBTEST&quot; created with primary database &quot;orcl&quot;&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show configuration&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: DBTEST&lt;br /&gt;Enabled: NO&lt;br /&gt;Protection Mode: MaxPerformance&lt;br /&gt;Fast-Start Failover: DISABLED&lt;br /&gt;Databases:&lt;br /&gt;orcl - Primary database&lt;br /&gt;&lt;br /&gt;Current status for &quot;DBTEST&quot;:&lt;br /&gt;DISABLED&lt;br /&gt;&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;&lt;br /&gt;7.) Now add standby DB to the data broker configuration:&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; add database &#39;orcl1&#39; as&lt;br /&gt;&gt; connect identifier is orcl1&lt;br /&gt;&gt; maintained as physical;&lt;br /&gt;Database &quot;orcl1&quot; added&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;DGMGRL&gt; show configuration&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: DBTEST&lt;br /&gt;Enabled: NO&lt;br /&gt;Protection Mode: MaxPerformance&lt;br /&gt;Fast-Start Failover: DISABLED&lt;br /&gt;Databases:&lt;br /&gt;orcl - Primary database&lt;br /&gt;orcl1 - Physical standby database&lt;br /&gt;&lt;br /&gt;Current status for &quot;DBTEST&quot;:&lt;br /&gt;DISABLED&lt;br /&gt;&lt;br /&gt;8.) Now enable the configurations:&lt;br /&gt;DGMGRL&gt; enable configuration&lt;br /&gt;Enabled.&lt;br /&gt;DGMGRL&gt; show configuration&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: DBTEST&lt;br /&gt;Enabled: YES&lt;br /&gt;Protection Mode: MaxPerformance&lt;br /&gt;Fast-Start Failover: DISABLED&lt;br /&gt;Databases:&lt;br /&gt;orcl - Primary database&lt;br /&gt;orcl1 - Physical standby database&lt;br /&gt;&lt;br /&gt;Current status for &quot;DBTEST&quot;:&lt;br /&gt;Warning: ORA-16607: one or more databases have failed&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show database verbose orcl1&lt;br /&gt;&lt;br /&gt;Database&lt;br /&gt;Name: orcl1&lt;br /&gt;Role: PHYSICAL STANDBY&lt;br /&gt;Enabled: YES&lt;br /&gt;Intended State: ONLINE&lt;br /&gt;Instance(s):&lt;br /&gt;orcl&lt;br /&gt;&lt;br /&gt;Properties:&lt;br /&gt;InitialConnectIdentifier = &#39;orcl1&#39;&lt;br /&gt;ObserverConnectIdentifier = &#39;&#39;&lt;br /&gt;LogXptMode = &#39;ARCH&#39;&lt;br /&gt;Dependency = &#39;&#39;&lt;br /&gt;DelayMins = &#39;0&#39;&lt;br /&gt;Binding = &#39;OPTIONAL&#39;&lt;br /&gt;MaxFailure = &#39;0&#39;&lt;br /&gt;MaxConnections = &#39;1&#39;&lt;br /&gt;ReopenSecs = &#39;300&#39;&lt;br /&gt;NetTimeout = &#39;180&#39;&lt;br /&gt;LogShipping = &#39;ON&#39;&lt;br /&gt;PreferredApplyInstance = &#39;&#39;&lt;br /&gt;ApplyInstanceTimeout = &#39;0&#39;&lt;br /&gt;ApplyParallel = &#39;AUTO&#39;&lt;br /&gt;StandbyFileManagement = &#39;MANUAL&#39;&lt;br /&gt;ArchiveLagTarget = &#39;0&#39;&lt;br /&gt;LogArchiveMaxProcesses = &#39;3&#39;&lt;br /&gt;LogArchiveMinSucceedDest = &#39;1&#39;&lt;br /&gt;DbFileNameConvert = &#39;/opt/app/oracle/oradata/orcl, /home/oracle/oradata/orcl&#39;&lt;br /&gt;LogFileNameConvert = &#39;/opt/app/oracle/oradata/orcl, /home/oracle/oradata/orcl, /opt/app/oracle/flash_recovery_area/orcl/onlinelog, /home/oracle/oradata/flash_recovery_area/orcl&#39;&lt;br /&gt;FastStartFailoverTarget = &#39;&#39;&lt;br /&gt;StatusReport = &#39;(monitor)&#39;&lt;br /&gt;InconsistentProperties = &#39;(monitor)&#39;&lt;br /&gt;InconsistentLogXptProps = &#39;(monitor)&#39;&lt;br /&gt;SendQEntries = &#39;(monitor)&#39;&lt;br /&gt;LogXptStatus = &#39;(monitor)&#39;&lt;br /&gt;RecvQEntries = &#39;(monitor)&#39;&lt;br /&gt;HostName = &#39;wrpws&#39;&lt;br /&gt;SidName = &#39;orcl&#39;&lt;br /&gt;LocalListenerAddress = &#39;(ADDRESS=(PROTOCOL=tcp)(HOST=wrpws)(PORT=1521))&#39;&lt;br /&gt;StandbyArchiveLocation = &#39;/home/oracle/oradata/orcl/archive&#39;&lt;br /&gt;AlternateLocation = &#39;&#39;&lt;br /&gt;LogArchiveTrace = &#39;0&#39;&lt;br /&gt;LogArchiveFormat = &#39;%t_%s_%r.arc&#39;&lt;br /&gt;LatestLog = &#39;(monitor)&#39;&lt;br /&gt;TopWaitEvents = &#39;(monitor)&#39;&lt;br /&gt;&lt;br /&gt;Current status for &quot;orcl1&quot;:&lt;br /&gt;Error: ORA-12545: Connect failed because target host or object does not exist&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;&lt;br /&gt;Well the problem in my case was that the hostname was not getting resolved. I added the hostname to the host file and it started working.&lt;br /&gt;&lt;br /&gt;After this error I got error:&lt;br /&gt;Current status for &quot;orcl1&quot;:&lt;br /&gt;Error: ORA-16664: unable to receive the result from a remote database&lt;br /&gt;&lt;br /&gt;Well same problem, communication between the 2 database. Make sure that the /etc/hosts files have entries of all other servers, with name and IP address.&lt;br /&gt;Always review the log_archive_dest_2 parameter, to have the right entries and service is accessible.&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; enable configuration&lt;br /&gt;Enabled.&lt;br /&gt;DGMGRL&gt; show configuration&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: DBTEST&lt;br /&gt;Enabled: YES&lt;br /&gt;Protection Mode: MaxPerformance&lt;br /&gt;Fast-Start Failover: DISABLED&lt;br /&gt;Databases:&lt;br /&gt;orcl - Primary database&lt;br /&gt;orcl1 - Physical standby database&lt;br /&gt;&lt;br /&gt;Current status for &quot;DBTEST&quot;:&lt;br /&gt;SUCCESS&lt;br /&gt;&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;&lt;br /&gt;This should setup Data Guard Broker.&lt;br /&gt;&lt;br /&gt;COMMANDS Available in DGMGRL:&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; help&lt;br /&gt;&lt;br /&gt;The following commands are available:&lt;br /&gt;&lt;br /&gt;add Add a standby database to the broker configuration&lt;br /&gt;connect Connect to an Oracle instance&lt;br /&gt;create Create a broker configuration&lt;br /&gt;disable Disable a configuration, a database, or Fast-Start Failover&lt;br /&gt;edit Edit a configuration, database, or instance&lt;br /&gt;enable Enable a configuration, a database, or Fast-Start Failover&lt;br /&gt;exit Exit the program&lt;br /&gt;failover Change a standby database to be the primary database&lt;br /&gt;help Display description and syntax for a command&lt;br /&gt;quit Exit the program&lt;br /&gt;reinstate Change a disabled database into a viable standby database&lt;br /&gt;rem Comment to be ignored by DGMGRL&lt;br /&gt;remove Remove a configuration, database, or instance&lt;br /&gt;show Display information about a configuration, database, or instance&lt;br /&gt;shutdown Shutdown a currently running Oracle instance&lt;br /&gt;start Start Fast-Start Failover observer&lt;br /&gt;startup Start an Oracle database instance&lt;br /&gt;stop Stop Fast-Start Failover observer&lt;br /&gt;switchover Switch roles between the primary database and a standby database&lt;br /&gt;&lt;br /&gt;Use &quot;help &quot; to see syntax for individual commands&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://joshisandeep.blogspot.com/2009/12/data-guard-setup-for-oracle-10g.html&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/164254828207864804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/how-to-configure-data-guard-broker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/164254828207864804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/164254828207864804'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/how-to-configure-data-guard-broker.html' title='How To: Configure Data Guard Broker'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-9084393710298689223</id><published>2009-12-02T11:51:00.000+05:30</published><updated>2009-12-02T11:53:58.214+05:30</updated><title type='text'>Data Guard Setup for Oracle 10g</title><content type='html'>Steps:&lt;br /&gt;1.) Make sure archive log mode is enabled on your database:&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 /opt/app/oracle/oradata/orcl/archive&lt;br /&gt;Oldest online log sequence 108&lt;br /&gt;Next log sequence to archive 109&lt;br /&gt;Current log sequence 109&lt;br /&gt;&lt;br /&gt;SQL&gt; select name, log_mode from v$database;&lt;br /&gt;&lt;br /&gt;NAME LOG_MODE&lt;br /&gt;--------- ------------&lt;br /&gt;ORCL ARCHIVELOG&lt;br /&gt;&lt;br /&gt;If archive log mode is not enabled. Please enable it using the following link.&lt;br /&gt;How to enable archivelog mode in Oracle 11g database&lt;br /&gt;&lt;br /&gt;2.) Enable force logging on the database, so that there is no problems with no logging operations in the future.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database force logging;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;3.) Create password file, if you do not have one already.&lt;br /&gt;&lt;br /&gt;[oracle@APP3 dbs]$ cd $ORACLE_HOME/dbs&lt;br /&gt;[oracle@APP3 dbs]$ orapwd file=orapworcl password=oracle force=y&lt;br /&gt;[oracle@APP3 dbs]$ ls -lrt orapworcl&lt;br /&gt;-rw-r----- 1 oracle oinstall 1536 Sep 14 08:21 orapworcl&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$pwfile_users;&lt;br /&gt;&lt;br /&gt;USERNAME SYSDB SYSOP&lt;br /&gt;------------------------------ ----- -----&lt;br /&gt;SYS TRUE TRUE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.) Create Standby Redo Logfiles on primary DB.&lt;br /&gt;&lt;br /&gt;Current logfile:&lt;br /&gt;SQL&gt; col member a40&lt;br /&gt;SQL&gt; select a.group#,a.status,a.member,b.bytes/1024/1024 from v$logfile a,v$log b&lt;br /&gt;2 where a.group#=b.group#;&lt;br /&gt;&lt;br /&gt;GROUP# STATUS MEMBER B.BYTES/1024/1024&lt;br /&gt;---------- ------- ---------------------------------------- -----------------&lt;br /&gt;1 /opt/app/oracle/oradata/orcl/redo01.log 50&lt;br /&gt;2 /opt/app/oracle/oradata/orcl/redo02.log 50&lt;br /&gt;&lt;br /&gt;Add standby redo log groups:&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database add standby logfile group 3 size 50M;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database add standby logfile group 4 size 50M;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$logfile;&lt;br /&gt;&lt;br /&gt;GROUP# STATUS TYPE MEMBER IS_&lt;br /&gt;---------- ------- ------- --------------------------------------------------------------------------- ---&lt;br /&gt;1 ONLINE /opt/app/oracle/oradata/ORCL/redo01.log NO&lt;br /&gt;2 ONLINE /opt/app/oracle/oradata/ORCL/redo02.log NO&lt;br /&gt;3 STANDBY /opt/app/oracle/flash_recovery_area/ORCL/onlinelog/o1_mf_3_5bvzkzgs_.log YES&lt;br /&gt;4 STANDBY /opt/app/oracle/flash_recovery_area/ORCL/onlinelog/o1_mf_4_5bvzl8hf_.log YES&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$standby_log;&lt;br /&gt;&lt;br /&gt;GROUP# DBID THREAD# SEQUENCE# BYTES USED ARC STATUS FIRST_CHANGE# FIRST_TIM LAST_CHANGE# LAST_TIME&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------&lt;br /&gt;3 UNASSIGNED 0 0 52428800 512 YES UNASSIGNED 0 0&lt;br /&gt;4 UNASSIGNED 0 0 52428800 512 YES UNASSIGNED 0 0&lt;br /&gt;&lt;br /&gt;5.) Check parameter db_unique_name&lt;br /&gt;SQL&gt; show parameters unique&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;db_unique_name string orcl&lt;br /&gt;&lt;br /&gt;6.) Add standby related entried to Primary database:&lt;br /&gt;SQL&gt; create pfile=&#39;/home/oracle/initprim.ora&#39; from spfile;&lt;br /&gt;&lt;br /&gt;Sample init.ora from Primary:&lt;br /&gt;orcl.__db_cache_size=2097152000&lt;br /&gt;orcl.__java_pool_size=16777216&lt;br /&gt;orcl.__large_pool_size=16777216&lt;br /&gt;orcl.__shared_pool_size=536870912&lt;br /&gt;orcl.__streams_pool_size=0&lt;br /&gt;*.audit_file_dest=&#39;/opt/app/oracle/admin/orcl/adump&#39;&lt;br /&gt;*.background_dump_dest=&#39;/opt/app/oracle/admin/orcl/bdump&#39;&lt;br /&gt;*.compatible=&#39;10.2.0.3.0&#39;&lt;br /&gt;*.control_files=&#39;/opt/app/oracle/oradata/orcl/control01.ctl&#39;,&#39;/opt/app/oracle/oradata/orcl/control02.ctl&#39;,&#39;/opt/app/oracle/oradata/orcl/control03.ctl&#39;&lt;br /&gt;*.core_dump_dest=&#39;/opt/app/oracle/admin/orcl/cdump&#39;&lt;br /&gt;*.db_block_size=8192&lt;br /&gt;*.db_domain=&#39;&#39;&lt;br /&gt;*.db_file_multiblock_read_count=16&lt;br /&gt;*.db_name=&#39;orcl&#39;&lt;br /&gt;*.db_recovery_file_dest=&#39;/opt/app/oracle/flash_recovery_area&#39;&lt;br /&gt;*.db_recovery_file_dest_size=2147483648&lt;br /&gt;*.db_unique_name=&#39;orcl&#39;&lt;br /&gt;*.dispatchers=&#39;(PROTOCOL=TCP) (SERVICE=orclXDB)&#39;&lt;br /&gt;*.job_queue_processes=10&lt;br /&gt;*.log_archive_dest_1=&#39;location=/opt/app/oracle/oradata/orcl/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl&#39;&lt;br /&gt;*.open_cursors=300&lt;br /&gt;*.pga_aggregate_target=823132160&lt;br /&gt;*.processes=500&lt;br /&gt;*.remote_login_passwordfile=&#39;EXCLUSIVE&#39;&lt;br /&gt;*.sga_target=2684354560&lt;br /&gt;*.undo_management=&#39;AUTO&#39;&lt;br /&gt;*.undo_tablespace=&#39;UNDOTBS1&#39;&lt;br /&gt;*.user_dump_dest=&#39;/opt/app/oracle/admin/orcl/udump&#39;&lt;br /&gt;db_unique_name=orcl&lt;br /&gt;LOG_ARCHIVE_CONFIG=&#39;DG_CONFIG=(orcl,orcl1)&#39;&lt;br /&gt;*.LOG_ARCHIVE_DEST_2=&#39;SERVICE=ORCL1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl1&#39;&lt;br /&gt;LOG_ARCHIVE_DEST_STATE_1=ENABLE&lt;br /&gt;LOG_ARCHIVE_DEST_STATE_2=ENABLE&lt;br /&gt;LOG_ARCHIVE_FORMAT=%t_%s_%r.arc&lt;br /&gt;LOG_ARCHIVE_MAX_PROCESSES=3&lt;br /&gt;DB_FILE_NAME_CONVERT=&#39;/u01/oradata/orcl&#39;,&#39;/opt/app/oracle/oradata/orcl&#39;&lt;br /&gt;LOG_FILE_NAME_CONVERT=&#39;/u01/oradata/orcl/archive&#39;,/opt/app/oracle/oradata/orcl/archive&#39;,&#39;/u01/oradata/flash_recovery_area/orcl&#39;,&#39;/opt/app/oracle/flash_recovery_area/orcl/onlinelog&#39;&lt;br /&gt;FAL_SERVER=orcl1&lt;br /&gt;FAL_CLIENT=orcl&lt;br /&gt;&lt;br /&gt;Copy the init.ora and make necessary changes to the file to be used at standby side. Changes like location of various files, FAL_SERVER, FAL_CLIENT etc.&lt;br /&gt;&lt;br /&gt;Sample init.ora in Standby DB:&lt;br /&gt;orcl.__db_cache_size=2097152000&lt;br /&gt;orcl.__java_pool_size=16777216&lt;br /&gt;orcl.__large_pool_size=16777216&lt;br /&gt;orcl.__shared_pool_size=536870912&lt;br /&gt;orcl.__streams_pool_size=0&lt;br /&gt;*.audit_file_dest=&#39;/u01/oradata/orcl/adump&#39;&lt;br /&gt;*.background_dump_dest=&#39;/u01/oradata/orcl/bdump&#39;&lt;br /&gt;*.compatible=&#39;10.2.0.3.0&#39;&lt;br /&gt;*.control_files=&#39;/u01/oradata/orcl/control01.ctl&#39;,&#39;/u01/oradata/orcl/control02.ctl&#39;,&#39;/u01/oradata/orcl/control03.ctl&#39;&lt;br /&gt;*.core_dump_dest=&#39;/u01/oradata/orcl/cdump&#39;&lt;br /&gt;*.db_block_size=8192&lt;br /&gt;*.db_domain=&#39;&#39;&lt;br /&gt;*.db_file_multiblock_read_count=16&lt;br /&gt;*.db_name=&#39;orcl&#39;&lt;br /&gt;*.db_recovery_file_dest=&#39;/u01/oradata/flash_recovery_area/orcl&#39;&lt;br /&gt;*.db_recovery_file_dest_size=2147483648&lt;br /&gt;*.db_unique_name=&#39;orcl1&#39;&lt;br /&gt;*.dispatchers=&#39;(PROTOCOL=TCP) (SERVICE=orclXDB)&#39;&lt;br /&gt;*.job_queue_processes=10&lt;br /&gt;*.log_archive_dest_1=&#39;location=/u01/oradata/orcl/archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl&#39;&lt;br /&gt;*.open_cursors=300&lt;br /&gt;*.pga_aggregate_target=823132160&lt;br /&gt;*.processes=500&lt;br /&gt;*.remote_login_passwordfile=&#39;EXCLUSIVE&#39;&lt;br /&gt;*.sga_target=2684354560&lt;br /&gt;*.undo_management=&#39;AUTO&#39;&lt;br /&gt;*.undo_tablespace=&#39;UNDOTBS1&#39;&lt;br /&gt;*.user_dump_dest=&#39;/u01/oradata/orcl/udump&#39;&lt;br /&gt;LOG_ARCHIVE_CONFIG=&#39;DG_CONFIG=(orcl,orcl1)&#39;&lt;br /&gt;*.LOG_ARCHIVE_DEST_2=&#39;SERVICE=ORCL LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl&#39;&lt;br /&gt;LOG_ARCHIVE_DEST_STATE_1=ENABLE&lt;br /&gt;LOG_ARCHIVE_DEST_STATE_2=ENABLE&lt;br /&gt;LOG_ARCHIVE_FORMAT=%t_%s_%r.arc&lt;br /&gt;LOG_ARCHIVE_MAX_PROCESSES=3&lt;br /&gt;DB_FILE_NAME_CONVERT=&#39;/opt/app/oracle/oradata/orcl&#39;,&#39;/u01/oradata/orcl&#39;&lt;br /&gt;LOG_FILE_NAME_CONVERT=&#39;/opt/app/oracle/oradata/orcl/archive&#39;,&#39;/u01/oradata/orcl/archive&#39;,&#39;/opt/app/oracle/flash_recovery_area/orcl/onlinelog&#39;,&#39;/u01/oradata/flash_recovery_area/orcl&#39;&lt;br /&gt;FAL_SERVER=orcl&lt;br /&gt;FAL_CLIENT=orcl1&lt;br /&gt;&lt;br /&gt;7.) Shutdown the primary database. Use the newly created pfile to startup nomount the database. Then create a spfile for the database. Mount the database and create a standby controlfile.&lt;br /&gt;Shutdown the database and take a cold back of the database, all files including the redo log files. You can also create a standby DB from hot backup.&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 nomount pfile=&#39;/home/oracle/pfileorcl.ora&#39;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 2684354560 bytes&lt;br /&gt;Fixed Size 2086352 bytes&lt;br /&gt;Variable Size 570427952 bytes&lt;br /&gt;Database Buffers 2097152000 bytes&lt;br /&gt;Redo Buffers 14688256 bytes&lt;br /&gt;SQL&gt; create spfile from pfile=&#39;/home/oracle/pfileorcl.ora&#39;;&lt;br /&gt;&lt;br /&gt;File created.&lt;br /&gt;Meanwhile I also received the error:&lt;br /&gt;create spfile from pfile=&#39;/home/oracle/pfileregdb.ora&#39;&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00600: internal error code, arguments: [kspsetpao1], [1753], [1700], [*],&lt;br /&gt;[user_dump_dest], [33], [], []&lt;br /&gt;&lt;br /&gt;Note: This error usually comes when the syntax of the pfile is wrong somewhere, please fix the pfile and try again. It worked for me.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;ORA-01507: database not mounted&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SQL&gt; startup&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 2684354560 bytes&lt;br /&gt;Fixed Size 2086352 bytes&lt;br /&gt;Variable Size 570427952 bytes&lt;br /&gt;Database Buffers 2097152000 bytes&lt;br /&gt;Redo Buffers 14688256 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;&lt;br /&gt;8.) Shutdown the database again and take a cold backup of all files.&lt;br /&gt;&lt;br /&gt;9.) Create standby control file.&lt;br /&gt;SQL&gt; startup mount&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 2684354560 bytes&lt;br /&gt;Fixed Size 2086352 bytes&lt;br /&gt;Variable Size 570427952 bytes&lt;br /&gt;Database Buffers 2097152000 bytes&lt;br /&gt;Redo Buffers 14688256 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;&lt;br /&gt;--Then mount and create a standby controlfile.&lt;br /&gt;SQL&gt; alter database create standby controlfile as &#39;standby.ctl&#39;;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;-- Open the primary read write.&lt;br /&gt;SQL&gt; alter database open;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;10.) Transfer all the file from the cold backup from Primary to Standby server. Also copy the password file from primary to standby.&lt;br /&gt;Also copy the standby controlfile created in step 9 and copy if with the right name and location on standby server.&lt;br /&gt;I use SFTP for transferring the files.&lt;br /&gt;&lt;br /&gt;11.) Add entries for the primary db and standby DB in both primary and standby servers. i.e. primary server should have its own (orcl) and standby server (orcl1) tns entry.&lt;br /&gt;&lt;br /&gt;12.) Copy the pfile from step 6 for standby DB.&lt;br /&gt;Now try to nomount the standby database with the new pfile.&lt;br /&gt;&lt;br /&gt;[oracle@dbtest dbs]$ sqlplus / as sysdba&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 15 04:57:32 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved.&lt;br /&gt;&lt;br /&gt;Connected to an idle instance.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup nomount pfile=&#39;/home/oracle/oracle/product/10.2.0/db_1/dbs/pfilestbregdb.ora&#39;;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 1694498816 bytes&lt;br /&gt;Fixed Size 1219784 bytes&lt;br /&gt;Variable Size 402654008 bytes&lt;br /&gt;Database Buffers 1275068416 bytes&lt;br /&gt;Redo Buffers 15556608 bytes&lt;br /&gt;&lt;br /&gt;13.) Create spfile from pfile.&lt;br /&gt;SQL&gt; create spfile from pfile=&#39;/home/oracle/oracle/product/10.2.0/db_1/dbs/pfilestbregdb.ora&#39;;&lt;br /&gt;&lt;br /&gt;File created.&lt;br /&gt;&lt;br /&gt;14.) Shutdown the DB and do a startup mount.&lt;br /&gt;SQL&gt;startup mount;&lt;br /&gt;&lt;br /&gt;15.) Start REDO apply process:&lt;br /&gt;SQL&gt; alter database recover managed standby database disconnect from session;&lt;br /&gt;OR&lt;br /&gt;SQL&gt; alter database recover managed standby database nodelay disconnect parallel 8;&lt;br /&gt;&lt;br /&gt;16.) Verification.&lt;br /&gt;SQL&gt; SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;&lt;br /&gt;&lt;br /&gt;To check archive gap:&lt;br /&gt;SELECT thread#, low_sequence#, high_sequence# from V$archive_gap;&lt;br /&gt;for RAC&lt;br /&gt;SELECT thread#, low_sequence#, high_sequence# from gv$archive_gap;&lt;br /&gt;&lt;br /&gt;To stop redo apply:&lt;br /&gt;alter database recover managed standby database cancel;&lt;br /&gt;&lt;br /&gt;17.) Check alert log files and verify that you did not receive any error.&lt;br /&gt;&lt;br /&gt;18.) Switch some logfiles on the Primary and check if the same are getting applied to the standby.&lt;br /&gt;on Primary:&lt;br /&gt;SQL&gt; alter system switch logfile;&lt;br /&gt;&lt;br /&gt;on standby:&lt;br /&gt;SQL&gt; SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;&lt;br /&gt;&lt;br /&gt;Thanks should be it, your Physical Standby DB should be working fine.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/9084393710298689223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/data-guard-setup-for-oracle-10g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/9084393710298689223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/9084393710298689223'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/data-guard-setup-for-oracle-10g.html' title='Data Guard Setup for Oracle 10g'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-8169270535456448492</id><published>2009-12-02T11:48:00.000+05:30</published><updated>2009-12-02T11:49:50.274+05:30</updated><title type='text'>How To: Setup up of Oracle Streams Replication</title><content type='html'>Note: I have started using TOAD now, so you wont see the statement complication output.&lt;br /&gt;&lt;br /&gt;Step 1: Create stream administration user in both databases.&lt;br /&gt;&lt;br /&gt;create user streamadmin identified by streamadmin default tablespace users;&lt;br /&gt;&lt;br /&gt;Step 2: Required grants to the user streamadmin.&lt;br /&gt;&lt;br /&gt;grant dba,select_catalog_role to streamadmin;&lt;br /&gt;exec dbms_streams_auth.grant_admin_privilege(&#39;streamadmin&#39;,true);&lt;br /&gt;&lt;br /&gt;Step 3: We will use default SCOTT schema for seting up this replication.&lt;br /&gt;&lt;br /&gt;Step 4: Check database paramters required for setting up stream replication&lt;br /&gt;&lt;br /&gt;For our example:&lt;br /&gt;DB 1:&lt;br /&gt;Name: TEST1&lt;br /&gt;Global Name should be true&lt;br /&gt;SQL&gt; show parameter global_name&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- --------------------------&lt;br /&gt;global_names boolean TRUE&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from global_name;&lt;br /&gt;GLOBAL_NAME&lt;br /&gt;-----------------------------------------------&lt;br /&gt;TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter job_queue&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------&lt;br /&gt;job_queue_processes integer 10&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter db_recovery_file_dest_size&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- -----------&lt;br /&gt;db_recovery_file_dest_size big integer 2G&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter db_recovery_file_dest&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- -------------------------------------&lt;br /&gt;db_recovery_file_dest string D:\oracle\product/flash_recovery_area&lt;br /&gt;&lt;br /&gt;DB 2:&lt;br /&gt;Name: TEST&lt;br /&gt;Global Name should be true.&lt;br /&gt;SQL&gt; show parameter global_name&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- -------&lt;br /&gt;global_names boolean TRUE&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from global_name;&lt;br /&gt;GLOBAL_NAME&lt;br /&gt;--------------------------------------&lt;br /&gt;TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter job_queue&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------&lt;br /&gt;job_queue_processes integer 10&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter db_recovery_file_dest_size&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- --------&lt;br /&gt;db_recovery_file_dest_size big integer 2G&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter db_recovery_file_dest&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;db_recovery_file_dest string D:\oracle\product\10.2.0/flash_recovery_area&lt;br /&gt;&lt;br /&gt;Step 5: Enable supplemental logging on the tables of the scott user in both the databases:&lt;br /&gt;&lt;br /&gt;Oracle has two types of supplimental logging options:&lt;br /&gt;1.) Unconditional Supplemental Logging: Logs the before images of specified columns any time the table is updated, regardless of whether the update affected any of the specified columns. This is sometimes referred to as an ALWAYS log group. &lt;br /&gt;2.) Conditional Supplemental Log Groups: Logs the before images of all specified columns only if at least one of the columns in the log group is updated.&lt;br /&gt;(From Oracle Documentation)&lt;br /&gt;&lt;br /&gt;Login to the SCOTT schema to start conditional supplemental logging:&lt;br /&gt;SQL&gt; alter table emp add supplemental log group supp_log_emp (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO);&lt;br /&gt;Table altered.&lt;br /&gt;SQL&gt; alter table dept add supplemental log group supp_log_dept (deptno,dname,loc);&lt;br /&gt;Table altered.&lt;br /&gt;SQL&gt; alter table bonus add supplemental log group supp_log_bonus (ename,job,sal,comm);&lt;br /&gt;Table altered.&lt;br /&gt;SQL&gt; alter table salgrade add supplemental log group supp_log_sal (grade,losal,hisal);&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;The same needs to be done on the other database also.&lt;br /&gt;&lt;br /&gt;SQL&gt; select log_group_name, table_name from dba_log_groups where owner=&#39;SCOTT&#39;;&lt;br /&gt;LOG_GROUP_NAME TABLE_NAME&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;SUPP_LOG_EMP EMP&lt;br /&gt;SUPP_LOG_DEPT DEPT&lt;br /&gt;SUPP_LOG_BONUS BONUS&lt;br /&gt;SUPP_LOG_SAL SALGRADE&lt;br /&gt;&lt;br /&gt;Step 6: Create Database Links between the stream administrator users in the 2 databases. &lt;br /&gt;SQL&gt; CREATE DATABASE LINK TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM CONNECT TO STREAMADMIN IDENTIFIED BY streamadmin USING &#39;TEST_REP2&#39;;&lt;br /&gt;Database link created.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE DATABASE LINK TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM CONNECT TO STREAMADMIN IDENTIFIED BY streamadmin USING &#39;TEST_REP1&#39;;&lt;br /&gt;Database link created.&lt;br /&gt;&lt;br /&gt;Step 7: Create Stream Queues under the streamadmin user to apply and capture the database changes to be replicated.&lt;br /&gt;This also needs to run on both the databases as streamadmin.&lt;br /&gt;&lt;br /&gt;SQL&gt; show user&lt;br /&gt;USER is &quot;STREAMADMIN&quot;&lt;br /&gt;SQL&gt; exec dbms_streams_adm.set_up_queue(queue_table =&gt; &#39;apply_q&#39;, queue_name =&gt; &#39;apply_q&#39;, queue_user =&gt; &#39;streamadmin&#39;);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; exec dbms_streams_adm.set_up_queue(queue_table =&gt; &#39;capture_q&#39;,queue_name =&gt; &#39;capture_q&#39;,queue_user =&gt; &#39;streamadmin&#39;);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;Step 8: Setup data capture on both the databases:&lt;br /&gt;Procedure dbms_streams_adm is the administration package for setting up capture process when using streams, like dbms_repcat when using normal replication.&lt;br /&gt;http://www.psoug.org/reference/dbms_streams_adm.html for details reference of this package.&lt;br /&gt;&lt;br /&gt;Views sys.streams$_process_params, sys.streams$_capture_process&lt;br /&gt;&lt;br /&gt;SQL&gt; BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_SCHEMA_RULES (&lt;br /&gt;SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;STREAMS_TYPE =&gt; &#39;CAPTURE&#39;,&lt;br /&gt;STREAMS_NAME =&gt; &#39;CAPTURE_STREAM&#39;,&lt;br /&gt;QUEUE_NAME =&gt; &#39;CAPTURE_Q&#39;,&lt;br /&gt;INCLUDE_DML =&gt; TRUE,&lt;br /&gt;INCLUDE_DDL =&gt; TRUE,&lt;br /&gt;INCLUSION_RULE =&gt; TRUE);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;The above procedure need to run on both the databases.&lt;br /&gt;&lt;br /&gt;Step 9: Setup data apply on both the databases:&lt;br /&gt;SQL&gt; BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_SCHEMA_RULES (&lt;br /&gt;SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;STREAMS_TYPE =&gt; &#39;APPLY&#39;,&lt;br /&gt;STREAMS_NAME =&gt; &#39;APPLY_STREAM&#39;,&lt;br /&gt;QUEUE_NAME =&gt; &#39;APPLY_Q&#39;,&lt;br /&gt;INCLUDE_DML =&gt; TRUE,&lt;br /&gt;INCLUDE_DDL =&gt; TRUE,&lt;br /&gt;SOURCE_DATABASE =&gt; &#39;TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_SCHEMA_RULES (&lt;br /&gt;SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;STREAMS_TYPE =&gt; &#39;APPLY&#39;,&lt;br /&gt;STREAMS_NAME =&gt; &#39;APPLY_STREAM&#39;,&lt;br /&gt;QUEUE_NAME =&gt; &#39;APPLY_Q&#39;,&lt;br /&gt;INCLUDE_DML =&gt; TRUE,&lt;br /&gt;INCLUDE_DDL =&gt; TRUE,&lt;br /&gt;SOURCE_DATABASE =&gt; &#39;TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;Step 10: Setup propogation process on both the databases:&lt;br /&gt;Its basically setting up related between the capture process on one database and apply process on the other database.&lt;br /&gt;Thes need to run as streamadmin user.&lt;br /&gt;DB 1:&lt;br /&gt;&lt;br /&gt;SQL&gt; BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_SCHEMA_PROPAGATION_RULES (&lt;br /&gt;SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;STREAMS_NAME =&gt; &#39;TEST1_TO_TEST&#39;,&lt;br /&gt;SOURCE_QUEUE_NAME =&gt; &#39;CAPTURE_Q&#39;,&lt;br /&gt;DESTINATION_QUEUE_NAME =&gt; &#39;APPLY_Q@TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;,&lt;br /&gt;INCLUDE_DML =&gt; TRUE,&lt;br /&gt;INCLUDE_DDL =&gt; TRUE,&lt;br /&gt;SOURCE_DATABASE =&gt; &#39;TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;DB 2:&lt;br /&gt;SQL&gt; BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_SCHEMA_PROPAGATION_RULES (&lt;br /&gt;SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;STREAMS_NAME =&gt; &#39;TEST_TO_TEST1&#39;,&lt;br /&gt;SOURCE_QUEUE_NAME =&gt; &#39;CAPTURE_Q&#39;,&lt;br /&gt;DESTINATION_QUEUE_NAME =&gt; &#39;APPLY_Q@TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;,&lt;br /&gt;INCLUDE_DML =&gt; TRUE,&lt;br /&gt;INCLUDE_DDL =&gt; TRUE,&lt;br /&gt;SOURCE_DATABASE =&gt; &#39;TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;Step 11: Setup schema instantiation SCN on DB 2 (TEST) &amp; DB 1 (TEST1):&lt;br /&gt;&lt;br /&gt;SQL&gt; DECLARE&lt;br /&gt;ISCN NUMBER;&lt;br /&gt;BEGIN&lt;br /&gt;ISCN := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();&lt;br /&gt;DBMS_APPLY_ADM.SET_SCHEMA_INSTANTIATION_SCN@TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM (&lt;br /&gt;SOURCE_SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;SOURCE_DATABASE_NAME =&gt; &#39;TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;,&lt;br /&gt;INSTANTIATION_SCN =&gt; ISCN,&lt;br /&gt;RECURSIVE =&gt; TRUE);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;ISCN NUMBER;&lt;br /&gt;BEGIN&lt;br /&gt;ISCN := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();&lt;br /&gt;DBMS_APPLY_ADM.SET_SCHEMA_INSTANTIATION_SCN@TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM (&lt;br /&gt;SOURCE_SCHEMA_NAME =&gt; &#39;SCOTT&#39;,&lt;br /&gt;SOURCE_DATABASE_NAME =&gt; &#39;TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM&#39;,&lt;br /&gt;INSTANTIATION_SCN =&gt; ISCN,&lt;br /&gt;RECURSIVE =&gt; TRUE); &lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;Step 12: Start capture and apply process:&lt;br /&gt;Setting the disable_on_error parameter to ‘N’ allows the apply process to continue applying row LCRs even when it encounters errors. The default value is ‘Y’ which disables the apply process automatically on the first error encountered. &lt;br /&gt;DB 1 (TEST1):&lt;br /&gt;&lt;br /&gt;SQL&gt; EXEC DBMS_APPLY_ADM.SET_PARAMETER (APPLY_NAME =&gt; &#39;APPLY_STREAM&#39;, PARAMETER =&gt; &#39;DISABLE_ON_ERROR&#39;, VALUE =&gt; &#39;N&#39;);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; EXEC DBMS_APPLY_ADM.START_APPLY (APPLY_NAME =&gt; &#39;APPLY_STREAM&#39;);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; EXEC DBMS_CAPTURE_ADM.START_CAPTURE (CAPTURE_NAME =&gt; &#39;CAPTURE_STREAM&#39;);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;Same steps for the other DB also.&lt;br /&gt;&lt;br /&gt;Steps 13: Test the setup. I just realized that its &quot;Step 13&quot; for testing, not good not good, not number 13.&lt;br /&gt;Actually I faced a few problems with the test.&lt;br /&gt;1.) The AQ_TM_PROCESSES parameter in my case was 0, but the data was not getting transferred.&lt;br /&gt;2.) I had not set the instantiation SCN for the second DB.&lt;br /&gt;&lt;br /&gt;I found the above errors from the below query:&lt;br /&gt;SELECT APPLY_NAME, &lt;br /&gt;SOURCE_DATABASE, &lt;br /&gt;LOCAL_TRANSACTION_ID, &lt;br /&gt;ERROR_NUMBER,&lt;br /&gt;ERROR_MESSAGE,&lt;br /&gt;MESSAGE_COUNT&lt;br /&gt;FROM DBA_APPLY_ERROR;&lt;br /&gt;&lt;br /&gt;After rectifying the error, to apply the failed transaction:&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_APPLY_ADM.EXECUTE_ERROR(&lt;br /&gt;local_transaction_id =&gt; &#39;4.30.434&#39;,&lt;br /&gt;execute_as_user =&gt; false);&lt;br /&gt;END;&lt;br /&gt;You ge the local_transaction_id from the above query.&lt;br /&gt;&lt;br /&gt;Anyway lets test the setup once again:&lt;br /&gt;Insert test:&lt;br /&gt;------------&lt;br /&gt;SQL&gt; connect scott/tiger@test_rep1&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; insert into dept values (50,&#39;RESEARCH&#39;,&#39;MEMPHIS&#39;);&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from dept@TEST.REGRESS.RDBMS.DEV.US.ORACLE.COM;&lt;br /&gt;&lt;br /&gt;DEPTNO DNAME LOC&lt;br /&gt;---------- -------------- -------------&lt;br /&gt;50 RESEARCH MEMPHIS&lt;br /&gt;10 ACCOUNTING NEW YORK&lt;br /&gt;20 RESEARCH DALLAS&lt;br /&gt;30 SALES CHICAGO&lt;br /&gt;40 OPERATIONS BOSTON&lt;br /&gt;&lt;br /&gt;Update Test:&lt;br /&gt;------------&lt;br /&gt;SQL&gt; connect scott/tiger@test_rep2&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; update dept set loc=&#39;DELHI&#39; where deptno=50;&lt;br /&gt;&lt;br /&gt;1 row updated.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from dept@TEST1.REGRESS.RDBMS.DEV.US.ORACLE.COM;&lt;br /&gt;&lt;br /&gt;DEPTNO DNAME LOC&lt;br /&gt;---------- -------------- -------------&lt;br /&gt;50 RESEARCH DELHI&lt;br /&gt;10 ACCOUNTING NEW YORK&lt;br /&gt;20 RESEARCH DALLAS&lt;br /&gt;30 SALES CHICAGO&lt;br /&gt;40 OPERATIONS BOSTON&lt;br /&gt;&lt;br /&gt;Finally u can see that basic steps of replication is working.</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/8169270535456448492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/how-to-setup-up-of-oracle-streams.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8169270535456448492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/8169270535456448492'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/how-to-setup-up-of-oracle-streams.html' title='How To: Setup up of Oracle Streams Replication'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673023210770662282.post-3352323816741376923</id><published>2009-12-02T11:31:00.001+05:30</published><updated>2009-12-02T12:39:23.665+05:30</updated><title type='text'>DBMS Solutions</title><content type='html'>Hey If you want any kind of Database related solution ...... Contact me&lt;br /&gt;Sandy&lt;br /&gt;ocpdba007@gmail.com</content><link rel='replies' type='application/atom+xml' href='http://joshisandeep.blogspot.com/feeds/3352323816741376923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/dbms-solutions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/3352323816741376923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673023210770662282/posts/default/3352323816741376923'/><link rel='alternate' type='text/html' href='http://joshisandeep.blogspot.com/2009/12/dbms-solutions.html' title='DBMS Solutions'/><author><name>Sandeep Joshi</name><uri>http://www.blogger.com/profile/09902696285902829158</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftGk1lYhLvjqok_9pFK434gDVsl6agUS3_R6Tov7xfJTquSrvwGoJ7zcMbPmfy4fb7gQFBynb6QrImk5-9mHrvGhxpQe8JntSbDEeqJAFvzKcHAvvfb7fcUdBbjyx0IY/s220/sj.JPG'/></author><thr:total>0</thr:total></entry></feed>