<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6084016698605356111</id><updated>2011-09-26T11:35:32.975-07:00</updated><title type='text'>Sridhar Ramireddy's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-8597656066442615093</id><published>2009-07-27T07:50:00.001-07:00</published><updated>2010-04-23T11:31:11.996-07:00</updated><title type='text'>Virtual indexes in Oracle 10g.</title><content type='html'>&lt;div&gt;Virtual indexes in Oracle 10g.&lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;07:05:15 orcl&gt;&lt;br /&gt;07:05:20 orcl&gt;&lt;br /&gt;07:05:20 orcl&gt;&lt;br /&gt;07:05:21 orcl&gt;&lt;br /&gt;07:05:21 orcl&gt;&lt;br /&gt;07:05:25 orcl&gt; Let?s describe the employees table and review the columns and datatypes.&lt;br /&gt;07:05:25 orcl&gt;&lt;br /&gt;07:05:25 orcl&gt; desc hr.employees;&lt;br /&gt;?Name??????????????????????????????? ?????????????????????????????????????Null???? Type&lt;br /&gt;?------------------------------------------------------------------------ -------- -------------------------------------------------&lt;br /&gt;?EMPLOYEE_ID??????????????????????????????????????????????????????NUMBER(6)&lt;br /&gt;?FIRST_NAME????????????????????????????????????????????????????????VARCHAR2(20)&lt;br /&gt;?LAST_NAME??????????????????????????????????????????????????????????NOT NULL VARCHAR2(25)&lt;br /&gt;?EMAIL???????????????????????????????????? ???????????????????????????????NOT NULL VARCHAR2(25)&lt;br /&gt;?PHONE_NUMBER?????????????????????????????????????????????????VARCHAR2(20)&lt;br /&gt;?HIRE_DATE???????????????????????????????????????????????????????????NOT NULL DATE&lt;br /&gt;?JOB_ID??????????? ???????????????????????????????????????????????????????NOT NULL VARCHAR2(10)&lt;br /&gt;?SALARY??????????????????????????????????????????????????????????????????NUMBER(8,2)&lt;br /&gt;?COMMISSION_PCT????????????????????????????????????????????????NUMBER(2,2)&lt;br /&gt;?MANAGER_ID?????????????????????????????????????????????????????????NUMBER(6)&lt;br /&gt;?DEPARTMENT_ID??????????????????????????????????????????????????NUMBER(4)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since I am using this table for other testing, let?s build a copy to use for our virtual index testing.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;07:34:55 orcl&gt; create table hr.employees2 as select * from hr.employees;&lt;br /&gt;&lt;br /&gt; Table created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We?ll duplicate a few rows in the table.&lt;br /&gt;&lt;br /&gt;07:35:15 orcl&gt; insert into hr.employees2 select * from hr.employees;&lt;br /&gt;107 rows created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Duplicating rows to pump up the volume in our test table.&lt;br /&gt;&lt;br /&gt;07:36:17 orcl&gt; r&lt;br /&gt;? 1* insert into hr.employees2 select * from hr.employees2&lt;br /&gt;&lt;br /&gt;178048 rows created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Activating SQL*PLUS Autotrace to produce an Explain Plan.&lt;br /&gt;   &lt;br /&gt;07:50:38 orcl&gt; set autotrace traceonly exp stat&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Building a regular B-Tree index on the EMPLOYEEES2 table.? Notice that Autotrace does not produce Explain Plans for DDL statements.&lt;br /&gt; &lt;br /&gt;07:52:19 orcl&gt; create index hr.emp2_emp_id on hr.employees2 (employee_id);&lt;br /&gt; &lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running the statement using the Autotrace option to generate the access path.? Please note&lt;br /&gt;that the optimizer has chosen the EMP2_EMP_ID index we just built.&lt;br /&gt; &lt;br /&gt;07:54:52 orcl&gt; ed&lt;br /&gt;Wrote file afiedt.buf&lt;br /&gt; &lt;br /&gt;? 1? select employee_id, a.department_id, b.department_name&lt;br /&gt;? 2? from&lt;br /&gt;? 3? hr.departments b,? hr.employees2 a&lt;br /&gt;? 4? where&lt;br /&gt;? 5? a.department_id = b.department_id&lt;br /&gt;? 6* and employee_id = 203&lt;br /&gt;07:55:14 ??7? /&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------?????????????????????????????????????????????????????????????????????????&lt;br /&gt;Plan hash value: 1466647341??????????????????????????????????????????????????????????????????????? ?????????????????????????????????&lt;br /&gt;???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------???????????????????????????????????????&lt;br /&gt;| Id? | Operation??????????????????? | Name??????? | Rows? | Bytes | Cost (%CPU)| Time???? |???????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------???????????????????????????????????????&lt;br /&gt;|?? 0 | SELECT STATEMENT???????????? |???????????? |???? 1 |??? 25 |???? 5?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|?? 1 |? NESTED LOOPS??????????????? |???????????? |???? 1 |??? 25 | ????5?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|?? 2 |?? TABLE ACCESS BY INDEX ROWID| EMPLOYEES2? |???? 1 |???? 9 |???? 4?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|*? 3 |??? INDEX RANGE SCAN????????? | EMP2_EMP_ID |???? 1 |?????? |???? 3?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|?? 4 |?? TABLE ACCESS BY INDEX ROWID| DEPARTMENTS |???? 1 |??? 16 |???? 1?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|*? 5 |??? INDEX UNIQUE SCAN???????? | DEPT_ID_PK? |???? 1 |?????? |???? 0?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------???????????????????????????????????????&lt;br /&gt;?????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dropping the original index.&lt;br /&gt;&lt;br /&gt;07:55:17 orcl&gt; drop index hr.emp2_emp_id;&lt;br /&gt; &lt;br /&gt;Index dropped.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Building our virtual index using the NOSEGMENT clause.&lt;br /&gt;&lt;br /&gt; 07:59:12 orcl&gt; create index hr.emp2_emp_id_virtual on hr.employees2(employee_id) nosegment;&lt;br /&gt; &lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting the hidden startup parameter "_use_nosegment_indexes" to TRUE so that our&lt;br /&gt;session will recognize our new virtual index.&lt;br /&gt;&lt;br /&gt;08:00:09 orcl&gt; alter session set "_use_nosegment_indexes" = true;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running our statement again to see if it will use our new virtual index.? Check outthe access path below.? The optimizer has chosen our virtual index.&lt;br /&gt;&lt;br /&gt;? 1? select employee_id, a.department_id, b.department_name&lt;br /&gt;? 2? from&lt;br /&gt;? 3? hr.departments b,? hr.employees2 a&lt;br /&gt;? 4? where&lt;br /&gt;? 5? a.department_id = b.department_id&lt;br /&gt;? 6* and employee_id = 203&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------??????????????????? ??????????????????????????????????????????????????????&lt;br /&gt;Plan hash value: 2516110069????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;??????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;| Id? | Operation??????????????????? | Name?????????????? ?| Rows? | Bytes | Cost (%CPU)| Time???? |???????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;|?? 0 | SELECT STATEMENT???????????? |????????? ???????????|???? 1 |??? 25 |???? 3?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|?? 1 |? NESTED LOOPS??????????????? |???????????????????? |???? 1 |??? 25 |???? 3?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|?? 2 |?? TABLE ACCESS BY INDEX ROWID| EMPLOYEES2????????? |???? 1 |???? 9 |???? 2?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|*? 3 |??? INDEX RANGE SCAN????????? | EMP2_EMP_ID_VIRTUAL |???? 1 |?????? |???? 1?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|?? 4 |?? TABLE ACCESS BY INDEX ROWID| DEPARTMENTS???????? |???? 1 |??? 16 |???? 1?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|*? 5 |??? INDEX UNIQUE SCAN???????? | DEPT_ID_PK????????? |???? 1 |?????? |???? 0?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;??????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting the "_use_nosegment_indexes? to FALSE.? Note that the optimizer did NOTchoose the virtual index.&lt;br /&gt; &lt;br /&gt; 08:01:09 orcl&gt; alter session set "_use_nosegment_indexes" = false;&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt; &lt;br /&gt;08:01:33 orcl&gt; select employee_id, a.department_id, b.department_name&lt;br /&gt;08:01:47?? 2? from&lt;br /&gt;08:01:47?? 3? hr.departments b,? hr.employees2 a&lt;br /&gt;08:01:47?? 4? where&lt;br /&gt;08:01:47?? 5? a.department_id = b.department_id&lt;br /&gt;08:01:47?? 6? and employee_id = 203;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------??????????????????????????????? ??????????????????????????????????????????&lt;br /&gt;Plan hash value: 2641883601????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;??????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------???????????????????????????????????????&lt;br /&gt;| Id? | Operation??????????????????? | Name??????? | Rows? | Bytes | Cost (%CPU)| Time???? |???????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------???????????????????????????????????????&lt;br /&gt;|?? 0 | SELECT STATEMENT???????????? |???????????? |???? 1 |??? 25 |?? 818?? (3)| 00:00:10 |???????????????????????????????????????&lt;br /&gt;|?? 1 |? NESTED LOOPS??????????????? |???????????? |???? 1 |??? 25 |?? 818?? (3)| 00:00:10 |???????????????????????????????????????&lt;br /&gt;|*? 2 |?? TABLE ACCESS FULL????????? | EMPLOYEES2 ?|???? 1 |???? 9 |?? 817?? (3)| 00:00:10 |???????????????????????????????????????&lt;br /&gt;|?? 3 |?? TABLE ACCESS BY INDEX ROWID| DEPARTMENTS |???? 1 |??? 16 |???? 1?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;|*? 4 |??? INDEX UNIQUE SCAN???????? | DEPT_ID_PK? |???? 1 |?????? |???? 0?? (0)| 00:00:01 |???????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Building another virtual index using the NOSEGMENT clause.? Note that Oracle returns an&lt;br /&gt;error stating that the column is already indexed.&lt;br /&gt;&lt;br /&gt;08:17:23 orcl&gt;? create index hr.emp3_emp_id_virtual on hr.employees2(employee_id) nosegment;&lt;br /&gt;create index hr.emp3_emp_id_virtual on hr.employees2(employee_id) nosegment&lt;br /&gt;????????????????????????????????????????????????????? *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01408: such column list already indexed&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reactivating our session to begin recognizing virtual indexes.?&lt;br /&gt;&lt;br /&gt;08:19:01 orcl&gt; alter session set "_use_nosegment_indexes" = true;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Building a regular B-TREE index on the same column.? Although Oracle didn?t allow us to create twovirtual indexes on the same column, it did allow us to create one standard index and one virtual indexon the same column.08:19:12 orcl&gt; create index hr.emp2_emp_id_non_virtual on hr.employees2(employee_id);Index created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running the statement again.? The optimizer chose the virtual index over the standard indexcontaining data!?? Interesting!&lt;br /&gt;1? select employee_id, a.department_id, b.department_name&lt;br /&gt;? 2? from&lt;br /&gt;? 3? hr.departments b,? hr.employees2 a&lt;br /&gt;? 4? where&lt;br /&gt;? 5? a.department_id = b.department_id&lt;br /&gt;? 6* and employee_id = 203&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------?????????????????????????????????????????????????????????????????????????&lt;br /&gt;Plan hash value: 2516110069????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;| Id? | Operation??????????????????? | Name??????????????? | Rows? | Bytes | Cost (%CPU)| Time???? |???????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;|?? 0 | SELECT STATEMENT???????????? |???????????????????? |???? 1 |??? 25 |???? 3?? (0)| 00:00:01 |????????????????????? ??????????&lt;br /&gt;|?? 1 |? NESTED LOOPS??????????????? |???????????????????? |???? 1 |??? 25 |???? 3?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|?? 2 |?? TABLE ACCESS BY INDEX ROWID| EMPLOYEES2????????? |???? 1 |???? 9 |???? 2?? (0)| 00:00:01 |??????????? ????????????????????&lt;br /&gt;|*? 3 |??? INDEX RANGE SCAN????????? | EMP2_EMP_ID_VIRTUAL |???? 1 |?????? |???? 1?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;|?? 4 |?? TABLE ACCESS BY INDEX ROWID| DEPARTMENTS???????? |???? 1 |??? 16 |???? 1?? (0)| 00:00:01 |? ??????????????????????????????&lt;br /&gt;|*? 5 |??? INDEX UNIQUE SCAN???????? | DEPT_ID_PK????????? |???? 1 |?????? |???? 0?? (0)| 00:00:01 |???????????????????????????????&lt;br /&gt;----------------------------------------------------------------------------------------------------???????????????????????????????&lt;br /&gt;?????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting the _use_nosegment_indexes parameter to false to turn it off for our session.&lt;br /&gt;&lt;br /&gt;08:20:00 orcl&gt;? alter session set "_use_nosegment_indexes" =false;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running the statement again.? The optimizer chose the standard index over the virtual index.It looks like Oracle will use the virtual index if you have the parameter set to TRUE.&lt;br /&gt;&lt;br /&gt;08:20:31 orcl&gt; select employee_id, a.department_id, b.department_name&lt;br /&gt;08:20:41?? 2? from&lt;br /&gt;08:20:41?? 3? hr.departments b,? hr.employees2 a&lt;br /&gt;08:20:41?? 4? where&lt;br /&gt;08:20:41?? 5? a.department_id = b.department_id&lt;br /&gt;08:20:41?? 6? and employee_id = 203;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------?????????????????????????????????????????????????????????????????????????&lt;br /&gt;Plan hash value: 4005350841??????????????????????????????????????????????????????????????????????????????????????????????????? ?????&lt;br /&gt;???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------------------???????????? ???????????????&lt;br /&gt;| Id? | Operation??????????????????? | Name??????????????????? | Rows? | Bytes | Cost (%CPU)| Time???? |???????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------------------?? ?????????????????????????&lt;br /&gt;|?? 0 | SELECT STATEMENT???????????? |???????????????????????? |???? 1 |??? 25 |???? 5?? (0)| 00:00:01 |???????????????????????????&lt;br /&gt;|?? 1 |? NESTED LOOPS??????????????? |???????????????????????? |???? 1 |??? 25 |???? 5?? (0)| 00:00:01 |???????????????????????????&lt;br /&gt;|?? 2 |?? TABLE ACCESS BY INDEX ROWID| EMPLOYEES2????????????? |???? 1 |???? 9 |???? 4?? (0)| 00:00:01 |???????????????????????????&lt;br /&gt;|*? 3 |??? INDEX RANGE SCAN????????? | EMP2_EMP_ID_NON_VIRTUAL |???? 1 |?????? |???? 3 ??(0)| 00:00:01 |???????????????????????????&lt;br /&gt;|?? 4 |?? TABLE ACCESS BY INDEX ROWID| DEPARTMENTS???????????? |???? 1 |??? 16 |???? 1?? (0)| 00:00:01 |???????????????????????????&lt;br /&gt;|*? 5 |??? INDEX UNIQUE SCAN???????? | DEPT_ID_PK????????????? |???? 1 |???? ??|???? 0?? (0)| 00:00:01 |???????????????????????????&lt;br /&gt;--------------------------------------------------------------------------------------------------------???????????????????????????&lt;br /&gt;?????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rebuilding the virtual index.? Notice that the error message states that&lt;br /&gt;you can not alter a ?fake? index.&lt;br /&gt;&lt;br /&gt;08:21:03 orcl&gt; alter index hr.emp2_emp_id_non_virtual rebuild;&lt;br /&gt;Index altered.&lt;br /&gt;08:21:39 orcl&gt; alter index hr.emp2_emp_id_virtual rebuild;&lt;br /&gt;alter index hr.emp2_emp_id_virtual rebuild&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-08114: can not alter a fake index&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Executing DBMS_STATS to gather statistics on both the virtual and standard index.?? I haverun tests with statistics and without and it does seem to affect virtual index access paths.&lt;br /&gt;?&lt;br /&gt;08:21:55 orcl&gt;&lt;br /&gt;08:21:57 orcl&gt;&lt;br /&gt;08:21:57 orcl&gt; exec dbms_stats.gather_index_stats('HR', 'EMP2_EMP_ID_NON_VIRTUAL');&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;08:23:10 orcl&gt; exec dbms_stats.gather_index_stats('HR', 'EMP2_EMP_ID_VIRTUAL');&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Looking for information on indexes built on the EMPLOYEES2 table.? Oracle returns a row for the standard index but not the virtual index.&lt;br /&gt;&lt;br /&gt;08:20:31 orcl&gt; select index_name, last_analyzed from dba_indexes where&lt;br /&gt;? 2* table_name = 'EMPLOYEES2'&lt;br /&gt;INDEX_NAME???????????????????? LAST_ANAL???????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;------------------------------ ---------????????????????????? ??????????????????????????????????????????????????????????????????????&lt;br /&gt;EMP2_EMP_ID_NON_VIRTUAL??????? 31-MAY-07???????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Determining f we can find the virtual index in DBA_SEGMENTS.? No success.&lt;br /&gt;&lt;br /&gt;08:26:09 orcl&gt; select segment_name, segment_type from dba_segments where segment_name like 'EMP2%';&lt;br /&gt;SEGMENT_NAME???????? SEGMENT_TYPE??????????????????????????????????????????????????????????????????????????????????????????????? ???&lt;br /&gt;-------------------- ------------------????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;EMP2_EMP_ID_NON_VIRT INDEX???????????????????????????????????????????????????????????????????????????????????????????? ?????????????&lt;br /&gt;UAL????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;???&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Looking for the the virtual index in DBA_OBJECTS.? Finally, we find some sort of evidence that the&lt;br /&gt;virtual index exists in the database!&lt;br /&gt;??????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;08:30:21 orcl&gt; col object_name for a30&lt;br /&gt;08:30:29 orcl&gt; r&lt;br /&gt;? 1? select object_name, object_type, created, status, temporary&lt;br /&gt;? 2* from dba_objects where object_name like 'EMP2%'&lt;br /&gt;OBJECT_NAME??????????????????? OBJECT_TYPE???????? CREATED?? STATUS? T??????????????????????????????? ??????????????????????????????&lt;br /&gt;------------------------------ ------------------- --------- ------- -?????????????????????????????????????????????????????????????&lt;br /&gt;EMP2_EMP_ID_NON_VIRTUAL??????? INDEX?????????????? 31-MAY-07 VALID?? N????????????????????? ????????????????????????????????????????&lt;br /&gt;EMP2_EMP_ID_VIRTUAL??????????? INDEX?????????????? 31-MAY-07 VALID?? N?????????????????????????????????????????????????????????????&lt;br /&gt;??????????????????????????????????????????????????????????????????????????????????&lt;br /&gt;08:31:01 orcl&gt; spool off&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-8597656066442615093?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/8597656066442615093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=8597656066442615093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/8597656066442615093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/8597656066442615093'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/07/virtual-indexes-in-oracle-10g.html' title='Virtual indexes in Oracle 10g.'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-5255705673818864535</id><published>2009-06-29T12:17:00.000-07:00</published><updated>2010-04-23T11:31:12.000-07:00</updated><title type='text'>Verifying Physical Standby</title><content type='html'>&lt;div&gt;Verifying physical standby:&lt;br /&gt;&lt;br /&gt;-- on Standby --&lt;br /&gt;Alter session set nls_date_format = 'DD-MON-YY HH24:MI:SS';SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME, APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;select database_role, open_mode, switchover_status from v$database ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Detailed Approach to check physical standby issues:&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt; 1. Physical standby database archivelogs&lt;br /&gt;    Count the existing archived logs in the standby database:&lt;br /&gt;        select count(*) from v$archived_log;&lt;br /&gt;    Then archive the current log on the primary database:&lt;br /&gt;        alter system archive log current;&lt;br /&gt;Then, count the archived logs on the standby database again. It should have been increased by one.&lt;br /&gt;2. Level of synchronization&lt;br /&gt;    To see if there is a problem with the archiving destinations (such as that destionation that transmits logs), quere v$archive_dest_status on primary and standby.&lt;br /&gt;     set lines 120&lt;br /&gt;     select dest_id, status, error from v$archive_dest_status;&lt;br /&gt;     select archived_thread#, archived_seq#, applied_thread#, applied_seq# from v$archive_dest_status where archived_thread# &lt;&gt; 0;&lt;br /&gt;3. Show received logs&lt;br /&gt;    On a physical standby database, the received archived redo logs can be displayed like this:&lt;br /&gt;     select registrar, creator, thread#, sequence#, first_change#, next_change# from v$archived_log;&lt;br /&gt;4. Show applied archived redo log&lt;br /&gt;    select thread#, sequence#, first_change#, next_change# from v$log_history;&lt;br /&gt;5. Show messages&lt;br /&gt;    Use v$dataguard_status to display messages. dest_id refers to what is configured with log_archive_dest_n.&lt;br /&gt;        select message from v$dataguard_status where dest_id = 2;&lt;br /&gt;    The query was executed on the primary database, and it shows that the destination 2 cannot deliver its logs.&lt;br /&gt;    ARCH: Error 12535 Creating archive log file to 'to_standby'    ARCH: Error 12535 Creating archive log file to 'to_standby'    ARCH: Error 12535 Creating archive log file to 'to_standby'&lt;br /&gt;    Broken network connections:&lt;br /&gt;        If the network connection is broken, the standby database writes RFS: Possible network disconnect with primary database. The primary&lt;br /&gt;        database writes: Network asynch I/O wait error 3114 log 3 service 'to_standby'.&lt;br /&gt;&lt;br /&gt;6. Archived logs that are not transmitted&lt;br /&gt;    The following query assumes that the archives are locally stored on destination 1 and sent to the remote server on destionation 2.&lt;br /&gt;set lines 120&lt;br /&gt;select  substr(local.name,1,50)  "Archive Name",  case when remote.sequence# is null then 'NOT TRANSMITTED'                                      else 'transmitted'  end,  local.sequence#,  local.thread#from  (select * from v$archived_log where dest_id = 1) local                                     left join   (select * from v$archived_log where dest_id = 2) remote  on local.sequence# = remote.sequence# and     local.thread#   = remote.thread#  order by local.sequence#;&lt;br /&gt;&lt;br /&gt;6. Is standby database performing managed recovery&lt;br /&gt;    select process, status from v$managed_standby;&lt;br /&gt;    If there is a MRP or a MRP0 process, then the database is performing managed recovery.&lt;br /&gt;&lt;br /&gt;7. Monitoring the recovery process&lt;br /&gt;    select process, status, thread#, sequence#, block#, blocks from v$managed_standby;&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-5255705673818864535?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/5255705673818864535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=5255705673818864535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/5255705673818864535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/5255705673818864535'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/verifying-physical-standby.html' title='Verifying Physical Standby'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-4588433525689125927</id><published>2009-06-29T12:14:00.001-07:00</published><updated>2010-04-23T11:31:12.004-07:00</updated><title type='text'>Steps to rename a RAC database</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;a id="l10q0" title="Permanent link toSteps to Rename RAC Database" href="http://orapark.wordpress.com/2008/04/16/steps-to-rename-rac-database/"&gt;Steps to Rename RAC Database&lt;/a&gt;&lt;br /&gt;Assumption:&lt;br /&gt;Two Node RAC; Database name orcl and Instance orcl1 and orcl2 running on HostA and HostB&lt;br /&gt;Name to be changed: Databse - Prod and instances prod1 and prod2&lt;br /&gt;Steps:&lt;br /&gt;a. From the instance orcl1, Backup the control file to trace. (Alter database backup controlfile to trace; )&lt;br /&gt;b. Create pfile from the spfile (Create pfile=&lt;’path/filename’&gt; from spfile; )&lt;br /&gt;c. Check the online redo-log files name, path and size on each nodes.&lt;br /&gt;d. Take the complete backup of the database (To be towards safer side ).&lt;br /&gt;———————————————————————————————&lt;br /&gt;1. ) Shutdown the database using srvctl&lt;br /&gt;$ srvctl stop database -d orcl&lt;br /&gt;2. ) On one of the nodes, say on HostA,&lt;br /&gt;Edit the pfile ( Created earlier), and change the following parameters.&lt;br /&gt;Cluster_database=False&lt;br /&gt;db_name=prod&lt;br /&gt;Also, change all the occurances of orcl to prod.., Change the path of the Control_files..etc., as required.&lt;br /&gt;Save the file as $ORACLE_HOME/dbs/initprod1.ora&lt;br /&gt;3. ) Startup the database to nomount state by using the pfile.&lt;br /&gt;4. ) Edit the Control file script , which should look as below. Make sure the script contains online redo-logs of instance orcl1 only. Run this script from SQL prompt in nomount state.&lt;br /&gt;SQL&gt; CREATE CONTROLFILE set DATABASE “PROD“ RESETLOGS NOARCHIVELOGMAXLOGFILES 192MAXLOGMEMBERS 3MAXDATAFILES 1024MAXINSTANCES 32MAXLOGHISTORY 292LOGFILEGROUP 1 ‘/u03/oradata/redo01.log’ SIZE 50M,GROUP 2 ‘/u03/oradata/redo02.log’ SIZE 50MDATAFILE‘/u03/oradata/system01.dbf’,‘/u03/oradata/undotbs01.dbf’,‘/u03/oradata/sysaux01.dbf’,‘/u03/oradata/users01.dbf’,‘/u03/oradata/example01.dbf’,‘/u03/oradata/undotbs02.dbf’CHARACTER SET WE8ISO8859P1;&lt;br /&gt;ALTER DATABASE ADD LOGFILE THREAD 2GROUP 3 ‘/u03/oradata/redo03.log’ SIZE 50M REUSE,GROUP 4 ‘/u03/oradata/redo04.log’ SIZE 50M REUSE;&lt;br /&gt;ALTER DATABASE ENABLE PUBLIC THREAD 2;&lt;br /&gt;ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;5. ) Change the init.ora parameter Cluster_database=False back to Cluster_database=True.&lt;br /&gt;6.) Create spfile from pfile and place it in the shared location as it was earlier.&lt;br /&gt;SQL&gt; Create spfile=’&lt;path&gt;/spfileprod.ora’ from pfile;&lt;br /&gt;Shutdown immediate and start the instance with spfile&lt;br /&gt;7. ) Start the second instance on on NodeB with the new spfile. (From sql prompt)&lt;br /&gt;8. ) Remove the ORCL instance from CRS.&lt;br /&gt;srvctl remove database -d orcl&lt;br /&gt;9. ) Register PROD isntance with the CRS.&lt;br /&gt;srvctl add database -d prod -o $ORACLE_HOMEsrvctl add instance -d prod -i prod1 -n NodeAsrvctl add instance -d prod -i prod2 -n NodeB&lt;br /&gt;10. ) Change the instance names in the tnsnames.ora and listener.ora files.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-4588433525689125927?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/4588433525689125927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=4588433525689125927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/4588433525689125927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/4588433525689125927'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/steps-to-rename-rac-database.html' title='Steps to rename a RAC database'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-6423024264006016166</id><published>2009-06-29T12:12:00.000-07:00</published><updated>2010-04-23T11:31:12.007-07:00</updated><title type='text'>Online Redefinition</title><content type='html'>&lt;div&gt;online redefinition:&lt;br /&gt;&lt;br /&gt;-- Table_name: DPO&lt;br /&gt;-- Step 1. Backup DDL and confirm online_redef.--    Extract table DDL and save it as a backup.--    Confirm that the table is a candidate for online reorganization.&lt;br /&gt;&lt;br /&gt;    exec dbms_redefinition.can_redef_table('CW','DPO',DBMS_REDEFINITION.CONS_USE_PK);&lt;br /&gt;&lt;br /&gt;-- Step 2. Build Interim table and make sure to "enable Row Movement". (add “_2” to the table_name)&lt;br /&gt;&lt;br /&gt;    CREATE TABLE CW.DPO_2    (      CWORDERID                 VARCHAR2(16 BYTE),      ORDER_NUMBER              VARCHAR2(30 BYTE),      ORDER_VERSION             VARCHAR2(2 BYTE),      ORDER_EXPEDITE            VARCHAR2(1 BYTE),      ORDER_TYPE_SERVICE        VARCHAR2(4 BYTE),      RELATEDORDERTYPE          VARCHAR2(4 BYTE),      BILL_NAME                 VARCHAR2(25 BYTE),      BILL_SECONDARY_NAME       VARCHAR2(25 BYTE),      ORDER_CREATION_DATE       DATE,      QCCREFLOWCOUNT            VARCHAR2(3 BYTE)    )    TABLESPACE OMS_DATA    PCTFREE 40     PARTITION BY RANGE (ORDER_CREATION_DATE)     (     PARTITION P_DPO_AUG_2007 VALUES LESS THAN (to_date('01-SEP-2007','DD-MON-YYYY')) TABLESPACE OMSE_AUG_2007_DATA,     PARTITION P_DPO_SEP_2007 VALUES LESS THAN (to_date('01-OCT-2007','DD-MON-YYYY')) TABLESPACE OMSE_SEP_2007_DATA,     PARTITION P_DPO_NOV_2008 VALUES LESS THAN (to_date('01-DEC-2008','DD-MON-YYYY')) TABLESPACE OMSE_NOV_2008_DATA,    PARTITION P_DPO_DEC_2008 VALUES LESS THAN (to_date('01-JAN-2009','DD-MON-YYYY')) TABLESPACE OMSE_DEC_2008_DATA,    PARTITION P_OVERFLOW VALUES LESS THAN (MAXVALUE) TABLESPACE OMSE_OVERFLOW_DATA    )    NOCOMPRESS     NOCACHE    NOPARALLEL    MONITORING    ENABLE ROW MOVEMENT;&lt;br /&gt;&lt;br /&gt;-- Step 3. Start Redefinition&lt;br /&gt;&lt;br /&gt;    begin     dbms_redefinition.start_redef_table('CW','DPO','DPO_2');    end;    /&lt;br /&gt;&lt;br /&gt;-- Step 4. Automatically rebuild all table dependencies (indexes, triggers and so forth)&lt;br /&gt;&lt;br /&gt;    exec dbms_redefinition.copy_table_dependents('CW','DPO','DPO_2', TRUE, TRUE, TRUE, FALSE );&lt;br /&gt;-- Step 5. Sync Interim table &lt;br /&gt;&lt;br /&gt;    exec dbms_redefinition.sync_interim_table('CW','DPO','DPO_2');&lt;br /&gt;&lt;br /&gt;-- Step 6. Complete the online re-organization and make sure the grants are given to users/Roles.&lt;br /&gt;&lt;br /&gt;    begin       dbms_redefinition.finish_redef_table('CW','DPO','DPO_2');    end;    /&lt;br /&gt;&lt;br /&gt;    GRANT SELECT ON CW.DPO TO E073813;    GRANT SELECT ON CW.DPO TO OMSE_RO;    GRANT SELECT ON CW.DPO TO OMSE_EVM_READ;&lt;br /&gt;-- Step 7. Drop the interim table&lt;br /&gt;&lt;br /&gt;    drop table CW.DPO_2;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-6423024264006016166?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/6423024264006016166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=6423024264006016166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/6423024264006016166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/6423024264006016166'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/online-redefinition.html' title='Online Redefinition'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-7534100810802590785</id><published>2009-06-29T12:11:00.001-07:00</published><updated>2009-07-10T12:19:55.860-07:00</updated><title type='text'>Moving datafiles between ASM Diskgroups - Version 10g.</title><content type='html'>&lt;span style="font-size:85%;"&gt;RMAN is the prefered tool to move datafiles from one Diskgroup to another, or, to move files from traditional mount points(filesystem) to ASM diskgroups. Alternatively, DBMS_FILE_TRANSFER can also be used for this purpose.&lt;br /&gt;&lt;br /&gt;RMAN is critical to Automatic Storage Management and is responsible for tracking the ASM filenames and for deleting obsolete ASM files. Since ASM files cannot be accessed through normal operating system interfaces, RMAN is the preferred means of copying ASM files.&lt;br /&gt;&lt;br /&gt;Lets take 2 different scenarioes, 1. move a datafile from one diskgroup to another and second one is to move the datafile from filesystem mount point to ASM diskgroup.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Note: The steps provided here assume that the database is open and in Archivelog mode and not for system or sysaux datafiles.&lt;br /&gt;For SYSTEM and SYSAUX datafiles, please see my next post.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:85%;"&gt;Steps:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;1) Identify the data file to be moved.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT FILE_NAME FROM DBA_DATA_FILES:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;FILE_NAME&lt;br /&gt;-------------------&lt;br /&gt;+DATA/orcl/datafile/sysaux01.dbf &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;+DATA/orcl/datafile/undotbs01.dbf &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;+DATA/orcl/datafile/system01.dbf &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#ff0000;"&gt;/oradb/u0001/orcl/test_tbsp.dbf&lt;/span&gt; &lt;=== Move to DATA Diskgroup.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#ff0000;"&gt;+REDO/orcl/datafile/users.256.565313879&lt;/span&gt; &lt;=== Move to DATA Diskgroup.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) Identify the diskgroup on to which the file has to be moved.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&gt; SELECT GROUP_NUMBER, NAME FROM V$ASM_DISKGROUP;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;GROUP_NUMBER NAME&lt;br /&gt;------------ ---------&lt;br /&gt;1 DATA&lt;br /&gt;2 REDO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span &gt;3) Take the datafiles offline.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;ALTER DATABASE DATAFILE '+REDO/orcl/datafile/users.256.565313879' OFFLINE;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;SQL&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;ALTER DATABASE DATAFILE '/oradb/u0001/orcl/test_tbsp.dbf' OFFLINE;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span &gt;4) Now Copy the files to ASM Diskgroup DATA using RMAN.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;$ &lt;span style="color:#000099;"&gt;rman target /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;connected to target database: ORCL (DBID=1089529226)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;RMAN&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;COPY DATAFILE '+REDO/orcl/datafile/users.256.565313879' TO '+DATA';&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Starting backup at 03-AUG-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=146 devtype=DISK&lt;br /&gt;channel ORA_DISK_1: starting datafile copy&lt;br /&gt;input datafile fno=00004 name=+REDO/orcl/datafile/users.256.565313879&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;output filename&lt;span style="color:#ff0000;"&gt;=+&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;DATA/orcl/datafile/users.259.565359071&lt;/span&gt; tag=TAG20050803T121109 recid=2 stamp=565359071&lt;br /&gt;channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03&lt;br /&gt;Finished backup at 03-AUG-05&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;RMAN&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;COPY DATAFILE '/oradb/u0001/orcl/test_tbsp.dbf' TO '+DATA';&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;Starting backup at 03-AUG-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=146 devtype=DISK&lt;br /&gt;channel ORA_DISK_1: starting datafile copy&lt;br /&gt;input datafile fno=00005 name=/oradb/u0001/orcl/test_tbsp.dbf&lt;br /&gt;output filename&lt;span style="color:#ff0000;"&gt;=+DATA/orcl/datafile/test_tbsp.260.675369081&lt;/span&gt; tag=TAG20050803T121109 recid=2 stamp=675369081&lt;br /&gt;channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03&lt;br /&gt;Finished backup at 03-AUG-05&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;5) Rename the file to point to new location.&lt;br /&gt;&lt;br /&gt;RMAN&gt; &lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;run&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;{&lt;br /&gt;set newname for datafile '+REDO/orcl/datafile/users.256.565313879' to '+DATA/orcl/datafile/users.259.565359071' ; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;color:#000099;"&gt;set newname for datafile '/oradb/u0001/orcl/test_tbsp.dbf' to '+DATA/orcl/datafile/test_tbsp.260.675369081' ;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;color:#000099;"&gt;switch datafile all;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;OR use alter database and then switch datafile.&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;alter database rename file '+REDO/orcl/datafile/users.256.565313879' to '+DATA/orcl/datafile/users.259.565359071' ;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;SQL&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;alter database rename file '/oradb/u0001/orcl/test_tbsp.dbf' to '+DATA/orcl/datafile/test_tbsp.260.675369081' ;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6) If needed, recover the files.&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;span style="color:#000099;"&gt;&lt;span style="font-size:78%;"&gt;RECOVER DATAFILE '+DATA/orcl/datafile/users.259.565359071' ;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="color:#000000;"&gt;SQL&gt;&lt;/span&gt; &lt;span style="font-size:78%;"&gt;RECOVER DATAFILE '+DATA/orcl/datafile/test_tbsp.260.675369081' ;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;7) Bring the files online.&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="font-size:78%;"&gt;ALTER DATABASE DATAFILE '+DATA/orcl/datafile/users.259.565359071' ONLINE&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;SQL&gt; &lt;span style="font-size:78%;"&gt;&lt;span style="color:#000099;"&gt;ALTER DATABASE DATAFILE '+DATA/orcl/datafile/test_tbsp.260.675369081' ONLINE;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;8) Verify the newlocation of the files.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&gt; SELECT FILE_NAME FROM DBA_DATA_FILES;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;FILE_NAME&lt;br /&gt;-------------------&lt;br /&gt;+DATA/orcl/datafile/users.259.565359071&lt;br /&gt;+DATA/orcl/datafile/sysaux01.dbf&lt;br /&gt;+DATA/orcl/datafile/undotbs01.dbf&lt;br /&gt;+DATA/orcl/datafile/system01.dbf&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span &gt;&lt;span style="font-family:courier new;"&gt;+DATA/orcl/datafile/test_tbsp.260.675369081'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;9) Delete the file from its original location&lt;br /&gt;&lt;br /&gt;ASM:SQL&gt; &lt;span style="font-size:78%;color:#000099;"&gt;ALTER DISKGROUP REDO DROP FILE '+REDO/orcl/datafile/users.256.565313879 ' ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;color:#ff6600;"&gt;&lt;strong&gt;For System and Sysaux an approach similar to the one given below can be used.&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;A. Create a Copy of datafile in target Diskgroup:&lt;br /&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;backup as copy tablespace system format '+DATA';&lt;/span&gt;&lt;br /&gt;RMAN&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;backup as copy tablespace sysaux format '+DATA';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;B. Then shutdown the database on all nodes and restart one instance to a mounted state&lt;br /&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;shutdown immediate;&lt;/span&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;startup mount;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C. switch the datafiles to the copy&lt;br /&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;switch tablespace system to copy;&lt;/span&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;switch tablespace sysaux to copy;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3. Recover the changes made to these tablespaces;&lt;br /&gt;&lt;br /&gt;RMAN&gt; &lt;span style="color:#000099;"&gt;recover database;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;-------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;Moving/Multiplexing control files when ASM is involved.&lt;/strong&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Assume there is only one controlfile: +DATA_01/db_name/controlfile/current.256.636907509, and you want to move and multiplex this to other diskgroups (DATA_01, DATA-03 and DATA_04), then an approach similar to one given below can be used.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First Backup spfile or create a pfile and do a show parameters control_file on sqlplus.&lt;br /&gt;&lt;br /&gt;1) shutdown database on all nodes; ensure no instance is mounting the database.&lt;br /&gt;&lt;br /&gt;2) startup nomount one instance&lt;br /&gt;&lt;br /&gt;3) &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="font-family:courier new;"&gt;alter system set control_files=&lt;br /&gt;'+DATA_02/db_name/controlfile/control01.ctl',&lt;br /&gt;'+DATA_03/db_name/controlfile/control02.ctl',&lt;br /&gt;'+DATA_04/db_name/controlfile/control03.ctl' scope=spfile sid='*';&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;4) &lt;span style="color:#000099;"&gt;rman target /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;color:#000099;"&gt;restore controlfile from '+DATA_01/db_name/controlfile/current.256.636907509';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;color:#000099;"&gt;restore controlfile to '+DATA_02/db_name/controlfile/control01.ctl' from '+DATA_01/db_name/controlfile/current.256.636907509';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Repeat for other controlfiles&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="font-size:78%;"&gt;restore controlfile to '+DATA_03/db_name/controlfile/control02.ctl' from '+DATA_01/db_name/controlfile/current.256.636907509';&lt;br /&gt;restore controlfile to '+DATA_04/db_name/controlfile/control03.ctl' from '+DATA_01/db_name/controlfile/current.256.636907509';&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;6) shutdown (immediate)&lt;br /&gt;&lt;br /&gt;7) srvctl start database -d &lt;database&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-7534100810802590785?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/7534100810802590785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=7534100810802590785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/7534100810802590785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/7534100810802590785'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/moving-datafiles-between-asm-diskgroups.html' title='Moving datafiles between ASM Diskgroups - Version 10g.'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-6216886179322362883</id><published>2009-06-29T12:10:00.000-07:00</published><updated>2010-04-23T11:31:12.010-07:00</updated><title type='text'>DataGaurd configuration</title><content type='html'>&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="3"&gt;&lt;strong&gt;Data Guard Configuration Steps.&lt;br /&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;Here are the steps on how to configure Dataguard for an existing Primary - Physical Standby. Assume you have a healthy Primary and Standy databases running on 2 different servers. &lt;/font&gt;&lt;/div&gt;&lt;font face="verdana"&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;font size="2"&gt;Primary host name : primary_server,   ORACLE_SID on Primary : PRIM&lt;br /&gt;Standby host name : secondary_server, ORACLE_SID on Standby host: STBY&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Prerequisites:&lt;/u&gt; &lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;/font&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="2"&gt;1. Both primary and Standby exists and working fine without issues.&lt;br /&gt;2. DB_BROKER_START init.ora parameter&lt;br /&gt;&lt;br /&gt;On both primary and standby sites, change the initialization parameter, dg_broker_start to enable the Data guard broker.&lt;br /&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;font face="courier new"&gt;SQL&gt; alter system set dg_broker_start=TRUE scope=both ;&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;3. SPFILE. Make sure both the instances are started with SPFILE. &lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="2"&gt;4. TNS/Net parameters: Please have the TNS entries of primary, Standby databases on both the servers, we assume they are PRIM, STBY for Primary and Standby respectively.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;u&gt;Creating the configuration:&lt;br /&gt;&lt;/u&gt;&lt;br /&gt;On primary site, start command line interface of the Dataguard Broker.(dgmgrl)&lt;br /&gt;&lt;br /&gt;&gt;dgmgrl&lt;br /&gt;&lt;/font&gt;&lt;font face="courier new" size="1"&gt;DGMGRL&gt; connect &lt;/font&gt;&lt;/font&gt;&lt;a id="f5hl4" href="mailto:sys/passwd@PRIM"&gt;&lt;font face="courier new" size="1"&gt;sys/passwd@PRIM&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana" size="2"&gt;&lt;font face="courier new"&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;font size="1"&gt;DGMGRL&gt; create configuration 'prim_dg_config' as primary database is 'PRIM' connect identifier is PRIM ;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Configuration "prim_dg_config" created with primary database "PRIM"&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; add database 'STBY' as connect identifier is STBY maintained as physical ;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Database "TDL2Y" added&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show configuration ;&lt;br /&gt;&lt;br /&gt;Configuration Name: prim_dg_config &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Enabled: NO &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Protection Mode: MaxPerformance &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Fast-Start Failover: DISABLED &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Databases: PRIM - Primary database &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;                 STBY - Physical standby database&lt;br /&gt;Current status for "prim_dg_config":DISABLED&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; enable configuration ;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Enabled.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;DGMGRL&gt; show configuration&lt;br /&gt;&lt;br /&gt;Configuration Name: prim_dg_config&lt;br /&gt;Enabled: NO&lt;br /&gt;Protection Mode: MaxPerformance&lt;br /&gt;Fast-Start Failover: DISABLED&lt;br /&gt;Databases: PRIM - Primary database&lt;br /&gt;                 STBY - Physical standby database Current status for "prim_dg_config":DISABLED &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Current status for "prim_dg_config":&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Warning: ORA-16607: one or more databases have failed&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show database 'PRIM' ;&lt;br /&gt;&lt;br /&gt;Database Name: TDL2P &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Role: PRIMARY &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Enabled: YES &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Intended State: ONLINE &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&lt;font size="1"&gt;Instance(s): TDL2P&lt;br /&gt;Current status for "TDL2P":&lt;br /&gt;Error: ORA-16778: redo transport error for one or more databases&lt;br /&gt;&lt;br /&gt;-- SET the LOCAL_LISTENER='' on both primary and standby fixed.&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show database 'TDL2P' ;&lt;br /&gt;&lt;br /&gt;Database Name: TDL2P Role: PRIMARY Enabled: YES Intended State: ONLINE Instance(s): TDL2P&lt;br /&gt;Current status for "TDL2P":&lt;br /&gt;Warning: ORA-16610: command 'EDIT DATABASE TDL1Y SET PROPERTY' in progress&lt;br /&gt;&lt;br /&gt;-- wait, for 2 min&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;DGMGRL&gt; show database 'TDL2P' ;&lt;br /&gt;&lt;br /&gt;Database Name: TDL2P Role: PRIMARY Enabled: YES Intended State: ONLINE Instance(s): TDL2P&lt;br /&gt;Current status for "TDL2P":&lt;br /&gt;SUCCESS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;alter system set log_archive_dest_2 = 'SERVICE=TDL2Y ARCH DELAY=5' scope=both ;alter system set log_archive_dest_state_2='enable' scope=both ;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#000099"&gt;Switchover:&lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;Primary is PRIM and standby STBY. &lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;Connect to primary_server.&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;&gt; dgmgl&lt;br /&gt;DGMGRL&gt; switchover to 'STBY' ;&lt;br /&gt;Performing switchover NOW, &lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;please wait...&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;Operation requires shutdown of instance "PRIM" on database "PRIM"&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;font face="verdana" size="2"&gt;Shutting down instance "TDL1P"...ORA-01109: database not open&lt;br /&gt;&lt;br /&gt;Database dismounted.ORACLE instance shut down.Operation requires shutdown of instance "TDL1Y" on database "TDL1Y"Shutting down instance "TDL1Y"...ORA-01109: database not open&lt;br /&gt;&lt;br /&gt;Database dismounted.ORACLE instance shut down.Operation requires startup of instance "TDL1P" on database "TDL1P"Starting instance "TDL1P"...Unable to connect to databaseORA-12514: TNS:listener does not currently know of service requested in connect descriptor&lt;br /&gt;&lt;br /&gt;Failed.You are no longer connected to ORACLEPlease connect again.Unable to start instance "TDL1P"You must start instance "TDL1P" manuallyOperation requires startup of instance "TDL1Y" on database "TDL1Y"You must start instance "TDL1Y" manuallySwitchover succeeded, new primary is "TDL1Y"&lt;br /&gt;DGMGRL&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#000099"&gt;&lt;strong&gt;Failover:&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;check the configuration on 2 nodes.&lt;br /&gt;&lt;br /&gt;tidlprdb01cdc(TDL1P) /tidl01/u0001/oracle/admin/TDL1P/bdump&gt;dgmgrlDGMGRL for Solaris: Version 10.2.0.3.0 - 64bit Production&lt;br /&gt;Copyright (c) 2000, 2005, Oracle. All rights reserved.&lt;br /&gt;Welcome to DGMGRL, type "help" for information.DGMGRL&gt; connect &lt;/font&gt;&lt;a href="mailto:sys@TDL1P"&gt;&lt;font face="verdana" size="2"&gt;sys@TDL1P&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana" size="2"&gt;Password:Connected.DGMGRL&gt;DGMGRL&gt;DGMGRL&gt;DGMGRL&gt; show configuration ;&lt;br /&gt;Configuration Name: tdb1p_dg_config Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: TDL1P - Primary database TDL1Y - Physical standby database&lt;br /&gt;Current status for "tdb1p_dg_config":SUCCESS&lt;br /&gt;&lt;br /&gt;tidlprdb02cdp(TDL1Y) /tidl02/u0002/oracle/admin/TDL1Y/bdump&gt;dgmgrlDGMGRL for Solaris: Version 10.2.0.3.0 - 64bit Production&lt;br /&gt;Copyright (c) 2000, 2005, Oracle. All rights reserved.&lt;br /&gt;Welcome to DGMGRL, type "help" for information.DGMGRL&gt; connect &lt;/font&gt;&lt;a href="mailto:sys@TDL1Y"&gt;&lt;font face="verdana" size="2"&gt;sys@TDL1Y&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana" size="2"&gt;Password:Connected.DGMGRL&gt; show configuration ;&lt;br /&gt;Configuration Name: tdb1p_dg_config Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: TDL1P - Primary database TDL1Y - Physical standby database&lt;br /&gt;Current status for "tdb1p_dg_config":SUCCESS&lt;br /&gt;Primary is TDLP and standby TDL1Y. Connect to TDL1P server.&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; failover to 'TDL1Y' ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issue #1:&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;If the TCP port numbers are different from default (1521), then set the LOCAL_LISTENER parameter on each database (primary and Standby to the respective listeners)&lt;br /&gt;&lt;br /&gt;Other wise you get an error as&lt;br /&gt;--&lt;br /&gt;ORA-12541: TNS:no listenerPING[ARC0]: Heartbeat failed to connect to standby '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=ddtdrdb01cdc)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=SLAB_XPT.TWCABLE.COM)(INSTANCE_NAME=SLAB)(SERVER=dedicated)))'. Error is 12541.&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;Issue #2:&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; connect &lt;/font&gt;&lt;a href="mailto:sys@TDL1Y"&gt;&lt;font face="verdana" size="2"&gt;sys@TDL1Y&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana" size="2"&gt;Password:Connected.DGMGRL&gt;DGMGRL&gt;DGMGRL&gt; show configuration ;&lt;br /&gt;Configuration Name: tdl1p_dg_config Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: TDL1P - Physical standby database TDL1Y - Primary database&lt;br /&gt;Current status for "tdl1p_dg_config":Warning: ORA-16608: one or more databases have warnings&lt;br /&gt;&lt;br /&gt;&gt;oerr ora 1660816608, 00000, "one or more databases have warnings"// *Cause: The Data Guard broker detected a warning status for one or// more databases.// *Action: Locate the database(s) with a warning status and correct it.&lt;br /&gt;&lt;br /&gt;How to check -&gt;&lt;br /&gt;DGMGRL&gt; show database "TDL1Y" ;&lt;br /&gt;Database Name: TDL1Y Role: PRIMARY Enabled: YES Intended State: ONLINE Instance(s): TDL1Y&lt;br /&gt;Current status for "TDL1Y":SUCCESS&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show database "TDL1P" ;&lt;br /&gt;Database Name: TDL1P Role: PHYSICAL STANDBY Enabled: YES Intended State: ONLINE Instance(s): TDL1P&lt;br /&gt;Current status for "TDL1P":Warning: ORA-16826: apply service state is inconsistent with the DelayMins property&lt;br /&gt;&lt;br /&gt;RESOLUTION: Remove the standby database and re-add to the configuration.&lt;br /&gt;DGMGRL&gt; remove database "TDL1P" ;Removed database "TDL1P" from the configuration&lt;br /&gt;DGMGRL&gt; add database 'TDL1P' as connect identifier is TDL1P maintained as physical ;Database "TDL1P" added&lt;br /&gt;DGMGRL&gt;DGMGRL&gt; show configuration ;&lt;br /&gt;Configuration Name: tdl1p_dg_config Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: TDL1Y - Primary database TDL1P - Physical standby database (disabled)&lt;br /&gt;Current status for "tdl1p_dg_config":SUCCESS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issue #3:&lt;br /&gt;&lt;br /&gt;ORA-16047: DGID mismatch between destination setting and standby&lt;br /&gt;&lt;br /&gt;Resolution:&lt;br /&gt;&lt;br /&gt;Check log_archive_config.&lt;br /&gt;on Primary: it should be set to Standby as&lt;br /&gt;alter system set log_archive_config = 'dg_config=(TDL1Y)' scope=both ;&lt;br /&gt;&lt;br /&gt;On Standby:&lt;br /&gt;alter system set log_archive_config='dg_config=(TDL1P)' scope=both ;&lt;br /&gt;&lt;br /&gt;check local_listener&lt;br /&gt;As Mentioned in Issue#1, if the port numbers are not the default 1521, then, the local_listener need to be set to the correct names.&lt;/font&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-6216886179322362883?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/6216886179322362883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=6216886179322362883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/6216886179322362883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/6216886179322362883'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/datagaurd-configuration.html' title='DataGaurd configuration'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-3775420842730043787</id><published>2009-06-29T12:09:00.000-07:00</published><updated>2010-04-23T11:31:12.014-07:00</updated><title type='text'>Activate a Physical Standby database</title><content type='html'>Activate Standby database:&lt;br /&gt;&lt;br /&gt;1. Stop redo log transport and redo apply.&lt;br /&gt;&lt;br /&gt;On Primary,&lt;br /&gt;&lt;br /&gt;alter system set log_archive_dest_stat1_&lt;x&gt; ='DEFER' scope=both ;&lt;br /&gt;&lt;br /&gt;on Standby:&lt;br /&gt;&lt;br /&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;&lt;br /&gt;&lt;br /&gt;2. Activate the standby database.&lt;br /&gt;&lt;br /&gt;SQL&gt; select open_mode, database_role from v$database ;&lt;br /&gt;&lt;br /&gt;OPEN_MODE  DATABASE_ROLE---------- ----------------MOUNTED    PHYSICAL STANDBY &lt;br /&gt;&lt;br /&gt;SQL&gt;SQL&gt;SQL&gt; alter database activate standby database ;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup mount force ;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area  524288000 bytesFixed Size                  2031352 bytesVariable Size             188743944 bytesDatabase Buffers          327155712 bytesRedo Buffers                6356992 bytesDatabase mounted.&lt;br /&gt;SQL&gt; alter database set standby database to maximize performance ;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database open ;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;     , database_role from v$database ;&lt;br /&gt;&lt;br /&gt;OPEN_MODE  DATABASE_ROLE---------- ----------------READ WRITE PRIMARY&lt;br /&gt;&lt;br /&gt;Change the DBID and/or DBNAME using utility "nid".&lt;br /&gt;&lt;br /&gt;startup mount&lt;br /&gt;nid &lt;a href="mailto:target=sys/password@OLD_DB_NAME"&gt;target=sys/password@OLD_DB_NAME&lt;/a&gt; dbname=NEW_DB_NAME&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&gt;nid &lt;a href="mailto:target=sys/password@TDL2P"&gt;target=sys/password@TDL2P&lt;/a&gt; dbname=TDL2P&lt;br /&gt;&lt;br /&gt;DBNEWID: Release 10.2.0.3.0 - Production on Tue Nov 11 14:14:13 2008&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;Connected to database ADMQA (DBID=345737326)&lt;br /&gt;Connected to server version 10.2.0&lt;br /&gt;Control Files in database:    +TDL2P_REDO_01/tdl2p/controlfile/current.257.669824119    +TDL2P_REDO_02/tdl2p/controlfile/current.256.669824119    +TDL2P_REDO_01/tdl2p/controlfile/current.263.669824121&lt;br /&gt;Change database ID and database name ADMQA to TDL2P? (Y/[N]) =&gt; Y&lt;br /&gt;Proceeding with operationChanging database ID from 345737326 to 1974265142Changing database name from ADMQA to TDL2P    Control File +TDL2P_REDO_01/tdl2p/controlfile/current.257.669824119 - modified    Control File +TDL2P_REDO_02/tdl2p/controlfile/current.256.669824119 - modified    Control File +TDL2P_REDO_01/tdl2p/controlfile/current.263.669824121 - modified    Datafile +TDL2P_DATA_01/tdl2p/datafile/system.259.669824149 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/undots1.258.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/undots1.262.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/users.261.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/admiral_data.260.669824149 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/admiral_index.256.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/hp_dbspi.264.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/datafile/sysaux.257.669824141 - dbid changed, wrote new name    Datafile +TDL2P_DATA_01/tdl2p/tempfile/temp.263.670514641 - dbid changed, wrote new name    Control File +TDL2P_REDO_01/tdl2p/controlfile/current.257.669824119 - dbid changed, wrote new name    Control File +TDL2P_REDO_02/tdl2p/controlfile/current.256.669824119 - dbid changed, wrote new name    Control File +TDL2P_REDO_01/tdl2p/controlfile/current.263.669824121 - dbid changed, wrote new name    Instance shut down&lt;br /&gt;Database name changed to TDL2P.Modify parameter file and generate a new password file before restarting.Database ID for database TDL2P changed to 1974265142.All previous backups and archived redo logs for this database are unusable.Database is not aware of previous backups and archived logs in Recovery Area.Database has been shutdown, open database with RESETLOGS option.Succesfully changed database name and ID.DBNEWID - Completed succesfully.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Modify init.ora with the new_database_parameters like db_name, dump destinations, instance_name, db_unique_name etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Mount the database.&lt;br /&gt;&lt;br /&gt;&gt;r sqlsqlplus&lt;br /&gt;SQL*Plus: Release 10.2.0.3.0 - Production on Sun Dec 14 07:29:29 2008&lt;br /&gt;Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.&lt;br /&gt;Enter user-name: / as sysdbaConnected to an idle instance.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup mountORACLE instance started.&lt;br /&gt;Total System Global Area  629145600 bytesFixed Size                  2032160 bytesVariable Size             352329184 bytesDatabase Buffers          268435456 bytesRedo Buffers                6348800 bytesORA-01103: database name 'TDL1P' in control file is not 'ADMIRAL'&lt;br /&gt;&lt;br /&gt;Ignore the above error, as it is due to db_name is not being modified after "nid" command.&lt;br /&gt;SQL&gt; alter system set db_name='TDL2P' scope=spfile ;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediateORA-01507: database not mounted&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SQL&gt; startup mountORACLE instance started.&lt;br /&gt;Total System Global Area  629145600 bytesFixed Size                  2032160 bytesVariable Size             352329184 bytesDatabase Buffers          268435456 bytesRedo Buffers                6348800 bytesDatabase mounted.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database open resetlogs ;&lt;br /&gt;Database altered.&lt;br /&gt;  &lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-3775420842730043787?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/3775420842730043787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=3775420842730043787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/3775420842730043787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/3775420842730043787'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/activate-physical-standby-database.html' title='Activate a Physical Standby database'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-791794338281654387</id><published>2009-06-29T12:08:00.000-07:00</published><updated>2010-04-23T11:31:12.018-07:00</updated><title type='text'>Rebuilding a Corrupted OCR.</title><content type='html'>&lt;div&gt;STEPS:&lt;br /&gt;&lt;br /&gt;Shutdown the Oracle Clusterware stack on all the nodes using command crsctl stop crs as root user.&lt;br /&gt;Backup the entire Oracle Clusterware home.&lt;br /&gt;Execute &lt;crs_home&gt;/install/rootdelete.sh on all nodes&lt;br /&gt;Execute &lt;crs_home&gt;/install/rootdeinstall.sh on the node which is supposed to be the first node&lt;br /&gt;The following commands should return nothing&lt;br /&gt;ps -e | grep -i 'ocs[s]d'&lt;br /&gt;ps -e | grep -i 'cr[s]d.bin'&lt;br /&gt;ps -e | grep -i 'ev[m]d.bin'&lt;br /&gt;Execute &lt;crs_home&gt;/root.sh on first node&lt;br /&gt;After successful root.sh execution on first node Execute root.sh on the rest of the nodes of the cluster&lt;br /&gt;Run vipca --&lt;br /&gt;backup listener.ora and tnsnames.ora from asm_home and db_home and remove the original files.&lt;br /&gt;From asm_home, Add the listener using netca. This may give errors if the listener.ora contains the entries already. If this is the case, move the listener.ora to /tmp from the $ORACLE_HOME/network/admin or from the $TNS_ADMIN directory if the TNS_ADMIN environmental is defined and then run netca. Add all the listeners that were added earlier.&lt;br /&gt;Add the database to the OCR using the appropriate srvctl add database command as the user who owns the database. Please ensure that this is not run as root user&lt;br /&gt;Add ASM, DB, Instance using approproate srvctl add commands. &lt;br /&gt;using dbca, create the services or use srvctl add commands.&lt;br /&gt;execute cluvfy stage -post crsinst -n node1,node2    ### Please ensure to replace node1,node2 with the node names of the cluster&lt;br /&gt;&lt;br /&gt;1. Rebuilding OCR&lt;br /&gt;&lt;br /&gt;node1(CRS)  /home/oracle/cronnode1 &gt;sudo su -&lt;a id="bb7c28" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] ls /esb02/u0001/oracle/product/crs/install/root*.sh/esb02/u0001/oracle/product/crs/install/rootdeinstall.sh  &lt;br /&gt;/esb02/u0001/oracle/product/crs/install/rootdeletenode.sh/esb02/u0001/oracle/product/crs/install/rootdelete.sh&lt;br /&gt;&lt;a id="bb7c34" href="mailto:root@node1:/"&gt;root@node1:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/install/rootdelete.shShutting down Oracle Cluster Ready Services (CRS):Stopping resources.Error while stopping resources. Possible cause: CRSD is down. &lt;&lt; issue with CRSStopping CSSD.Unable to communicate with the CSS daemon.Shutdown has begun. The daemons should exit soon.Checking to see if Oracle CRS stack is down...Oracle CRS stack is not running.Oracle CRS stack is down now.Removing script for Oracle Cluster Ready servicesUpdating ocr file for downgradeCleaning up SCR settings in '/etc/oracle/scls_scr'&lt;br /&gt;&lt;br /&gt;&lt;a id="r1jz4" href="mailto:root@node2:/"&gt;root@node2:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/install/rootdelete.shShutting down Oracle Cluster Ready Services (CRS):Stopping resources.Error while stopping resources. Possible cause: CRSD is down.Stopping CSSD.Unable to communicate with the CSS daemon.Shutdown has begun. The daemons should exit soon.Checking to see if Oracle CRS stack is down...Oracle CRS stack is not running.Oracle CRS stack is down now.Removing script for Oracle Cluster Ready servicesUpdating ocr file for downgradeCleaning up SCR settings in '/etc/oracle/scls_scr'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a id="bb7c50" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/install/rootdeinstall.shRemoving contents from OCR mirror device2560+0 records in.2560+0 records out.Removing contents from OCR device2560+0 records in.2560+0 records out.&lt;br /&gt;&lt;br /&gt;&lt;a id="bb7c89" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] ls /esb02/u0001/oracle/product/crs/root.sh/esb02/u0001/oracle/product/crs/root.sh&lt;a id="bb7c94" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ]&lt;a id="bb7c98" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ]&lt;a id="bb7c102" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/root.shWARNING: directory '/esb02/u0001/oracle/product' is not owned by rootWARNING: directory '/esb02/u0001/oracle' is not owned by rootWARNING: directory '/esb02/u0001' is not owned by rootChecking to see if Oracle CRS stack is already configured&lt;br /&gt;Setting the permissions on OCR backup directorySetting up NS directoriesOracle Cluster Registry configuration upgraded successfullyWARNING: directory '/esb02/u0001/oracle/product' is not owned by rootWARNING: directory '/esb02/u0001/oracle' is not owned by rootWARNING: directory '/esb02/u0001' is not owned by rootSuccessfully accumulated necessary OCR keys.Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.node &lt;nodenumber&gt;: &lt;nodename&gt; &lt;private&gt; &lt;hostname&gt;node 1: node1 node1-priv node1node 2: node2 node2-priv node2Creating OCR keys for user 'root', privgrp 'system'..Operation successful.Now formatting voting device: /dev/oracle/vote_disk_01Now formatting voting device: /dev/oracle/vote_disk_02Now formatting voting device: /dev/oracle/vote_disk_03Format of 3 voting devices complete.Startup will be queued to init within 30 seconds.Adding daemons to inittabAdding daemons to inittabExpecting the CRS daemons to be up within 600 seconds.CSS is active on these nodes.        node1CSS is inactive on these nodes.        node2Local node checking complete.Run root.sh on remaining nodes to start CRS daemons.&lt;br /&gt;&lt;a id="bb7c138" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] ps -eaf| grep d.bin  oracle 1532014       1   0 21:39:14      -  0:00 /esb02/u0001/oracle/product/crs/bin/evmd.bin    root 1556588       1   0 21:39:14      -  0:00 /esb02/u0001/oracle/product/crs/bin/crsd.bin reboot  oracle 1564836 1675454   0 21:39:18      -  0:00 /esb02/u0001/oracle/product/crs/bin/ocssd.bin    root 1622160 1704014   0 21:39:34  pts/1  0:00 grep d.bin&lt;br /&gt;&lt;br /&gt;&lt;a id="va_.0" href="mailto:root@node2:/"&gt;root@node2:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/root.shWARNING: directory '/esb02/u0001/oracle/product' is not owned by rootWARNING: directory '/esb02/u0001/oracle' is not owned by rootWARNING: directory '/esb02/u0001' is not owned by rootChecking to see if Oracle CRS stack is already configured&lt;br /&gt;Setting the permissions on OCR backup directorySetting up NS directoriesOracle Cluster Registry configuration upgraded successfullyWARNING: directory '/esb02/u0001/oracle/product' is not owned by rootWARNING: directory '/esb02/u0001/oracle' is not owned by rootWARNING: directory '/esb02/u0001' is not owned by rootclscfg: EXISTING configuration version 3 detected.clscfg: version 3 is 10G Release 2.Successfully accumulated necessary OCR keys.Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.node &lt;nodenumber&gt;: &lt;nodename&gt; &lt;private&gt; &lt;hostname&gt;node 1: esbprdb01cdc esbprdb01cdc-priv esbprdb01cdcnode 2: node2 node2-priv node2clscfg: Arguments check out successfully.&lt;br /&gt;NO KEYS WERE WRITTEN. Supply -force parameter to override.-force is destructive and will destroy any previous clusterconfiguration.Oracle Cluster Registry for cluster has already been initializedStartup will be queued to init within 30 seconds.Adding daemons to inittabAdding daemons to inittabExpecting the CRS daemons to be up within 600 seconds.CSS is active on these nodes.        esbprdb01cdc        node2CSS is active on all nodes.Waiting for the Oracle CRSD and EVMD to startOracle CRS stack installed and running under init(1M)Running vipca(silent) for configuring nodeappsThe given interface(s), "en6" is not public. Public interfaces should be used to configure virtual IPs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a id="bb7c172" href="mailto:root@node1:/"&gt;root@node1:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/bin/vipca&lt;a id="bb7c184" href="mailto:root@esbprdb01cdc:/"&gt;root@node1:/&lt;/a&gt; ] /esb02/u0001/oracle/product/crs/bin/crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;Backups listener.ora and tnsnames.ora from both ASM and ORACLE_HOME locations.&lt;br /&gt;node1(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/asm/network/adminnode1(+ASM1)&gt; mv listener.ora listener.ora.bkpnode1(+ASM1)&gt; mv tnsnames.ora tnsnames.ora.bkpnode1(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/db_1/network/admin&lt;br /&gt;node1(+ASM1)&gt; mv listener.ora listener.ora.bkpnode1(+ASM1)&gt; mv tnsnames.ora tnsnames.ora.bkpnode1(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/db_1node2(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/asm/network/adminnode2(+ASM1)&gt; mv listener.ora listener.ora.bkpnode2(+ASM1)&gt; mv tnsnames.ora tnsnames.ora.bkpnode2(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/db_1/network/admin&lt;br /&gt;node2(+ASM1)&gt; mv listener.ora listener.ora.bkpnode2(+ASM1)&gt; mv tnsnames.ora tnsnames.ora.bkpnode2(+ASM1)&gt; cd /esb02/u0001/oracle/product/10.2.0/db_1&lt;br /&gt;&lt;br /&gt;&gt;ps -eaf| grep tnslsnr&lt;br /&gt;  oracle  549064       1   0 21:28:41      -  0:00 /esb02/u0001/oracle/product/10.2.0/asm/bin/tnslsnr LISTENER_node1 -inherit  oracle 1036452 1507512   0 21:56:25  pts/1  0:00 grep tnslsnr&lt;br /&gt;&gt;kill -9 549064&lt;br /&gt;     &lt;br /&gt;node1(+ASM1)&gt; /esb02/u0001/oracle/product/10.2.0/asm/bin/netca&lt;br /&gt;&lt;br /&gt;Oracle Net Services Configuration:Configuring Listener:LISTENERDefault local naming configuration complete.node1...node2...Listener configuration complete.node1...    Deleted listener: LISTENER_node1node2...    Deleted listener: LISTENER_node2Oracle Net Services configuration successful. The exit code is 0&lt;br /&gt;&lt;br /&gt;&gt;crs_srat -t&lt;br /&gt;Name           Type           Target    State     Host------------------------------------------------------------ora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;ADD ASM, DB and OTHER SERVICES&lt;br /&gt;&gt;srvctl add asm -n node1 -i +ASM1 -o /esb02/u0001/oracle/product/10.2.0/asm&gt;srvctl add asm -n node2 -i +ASM2 -o /esb02/u0001/oracle/product/10.2.0/asm&lt;br /&gt;&lt;br /&gt;&gt;srvctl add database -d BPELP -o /esb02/u0001/oracle/product/10.2.0/db_1&gt;srvctl add database -d UDDIP -o /esb02/u0001/oracle/product/10.2.0/db_1&gt;srvctl add database -d DPWRP -o /esb02/u0001/oracle/product/10.2.0/db_1&lt;br /&gt;&gt;srvctl add instance -d BPELP -i BPELP1 -n node1&gt;srvctl add instance -d BPELP -i BPELP2 -n node2&lt;br /&gt;&gt;srvctl add instance -d UDDIP -i UDDIP1 -n node1&gt;srvctl add instance -d UDDIP -i UDDIP2 -n node2&lt;br /&gt;&gt;srvctl add instance -d DPWRP -i DPWRP1 -n node1&gt;srvctl add instance -d DPWRP -i DPWRP2 -n node2&lt;br /&gt;&lt;br /&gt;&gt;cluvfy stage -post crsinst -n node1,node2&lt;br /&gt;&lt;br /&gt;Performing post-checks for cluster services setup&lt;br /&gt;Checking node reachability...Node reachability check passed from node "node1".&lt;br /&gt;Checking user equivalence...User equivalence check passed for user "oracle".&lt;br /&gt;Checking Cluster manager integrity...&lt;br /&gt;Checking CSS daemon...Daemon status check passed for "CSS daemon".&lt;br /&gt;Cluster manager integrity check passed.&lt;br /&gt;Checking cluster integrity...&lt;br /&gt;Cluster integrity check passed&lt;br /&gt;Checking OCR integrity...&lt;br /&gt;Checking the absence of a non-clustered configuration...All nodes free of non-clustered, local-only configurations.&lt;br /&gt;Uniqueness check for OCR device passed.&lt;br /&gt;Checking the version of OCR...OCR of correct Version "2" exists.&lt;br /&gt;Checking data integrity of OCR...Data integrity check for OCR passed.&lt;br /&gt;OCR integrity check passed.&lt;br /&gt;Checking CRS integrity...&lt;br /&gt;Checking daemon liveness...Liveness check passed for "CRS daemon".&lt;br /&gt;Checking daemon liveness...Liveness check passed for "CSS daemon".&lt;br /&gt;Checking daemon liveness...Liveness check passed for "EVM daemon".&lt;br /&gt;Checking CRS health...CRS health check passed.&lt;br /&gt;CRS integrity check passed.&lt;br /&gt;Checking node application existence...&lt;br /&gt;Checking existence of VIP node application (required)Check passed.&lt;br /&gt;Checking existence of ONS node application (optional)Check passed.&lt;br /&gt;Checking existence of GSD node application (optional)Check passed.&lt;br /&gt;Post-check for cluster services setup was successful.&lt;br /&gt;&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    OFFLINE   OFFLINEora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    OFFLINE   OFFLINEora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc &gt;srvctl start asm -n node1&gt;crs_stat -t &lt;&lt;- ASM came online.Name           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    OFFLINE   OFFLINEora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&gt;srvctl start asm -n node2&lt;br /&gt;&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;&lt;br /&gt;&gt;srvctl start database -d BPELPPRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.PRKP-1001 : Error starting instance BPELP2 on node node2CRS-0215: Could not start resource 'ora.BPELP.BPELP2.inst'.&lt;br /&gt;&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    ONLINE    OFFLINEora....P2.inst application    ONLINE    OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;&gt;srvctl modify instance -d BPELP -i BPELP1 -s +ASM1&gt;srvctl modify instance -d BPELP -i BPELP2 -s +ASM2&lt;br /&gt;&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    ONLINE    OFFLINEora....P2.inst application    ONLINE    OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&gt;srvctl start database -d BPELPPRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.PRKP-1001 : Error starting instance BPELP2 on node node2CRS-0215: Could not start resource 'ora.BPELP.BPELP2.inst'.&gt;srvctl start instance -d BPELP -i BPELP1PRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.&gt;crs_stop ora.BPELP.BPELP1.instTarget set to OFFLINE for `ora.BPELP.BPELP1.inst`&gt;crs_stop ora.BPELP.BPELP2.instTarget set to OFFLINE for `ora.BPELP.BPELP2.inst`&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&gt;srvctl start instance -d BPELP -i BPELP1PRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.&lt;br /&gt;&gt;crs_stop ora.BPELP.BPELP1.instTarget set to OFFLINE for `ora.BPELP.BPELP1.inst`&lt;br /&gt;---&gt;srvctl start database -d BPELPPRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.PRKP-1001 : Error starting instance BPELP2 on node node2CRS-0215: Could not start resource 'ora.BPELP.BPELP2.inst'.&lt;br /&gt;&lt;br /&gt;&gt;srvctl start instance -d BPELP -i BPELP1PRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.&lt;br /&gt;&lt;br /&gt;&gt;crs_stop ora.BPELP.BPELP1.instTarget set to OFFLINE for `ora.BPELP.BPELP1.inst`&lt;br /&gt;&lt;br /&gt;&gt;crs_stop ora.BPELP.BPELP2.instTarget set to OFFLINE for `ora.BPELP.BPELP2.inst`&lt;br /&gt;&lt;br /&gt;&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.BPELP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;&lt;br /&gt;&gt;srvctl start instance -d BPELP -i BPELP1PRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.&lt;br /&gt;&lt;br /&gt;&gt;crs_stop ora.BPELP.BPELP1.instTarget set to OFFLINE for `ora.BPELP.BPELP1.inst`&lt;br /&gt;&lt;br /&gt;&gt;srvctl modify database -d BPELP -p '+ESBPCDC_DATA_01/BPELP/spfileBPELP.ora' -s open&lt;br /&gt;&gt;srvctl start database -d BPELPPRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.PRKP-1001 : Error starting instance BPELP2 on node node2CRS-0215: Could not start resource 'ora.BPELP.BPELP2.inst'.&lt;br /&gt;&lt;br /&gt;&gt;vi  /esb02/u0001/oracle/product/10.2.0/db_1/log/node1/racg/ora.BPELP.BPELP1.inst.log&lt;br /&gt;2008-06-17 22:21:30.960: [ COMMCRS][258]clsc_connect: (1106f0ff0) no listener at (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=9011))&lt;br /&gt;2008-06-17 22:21:33.352: [    RACG][1] [1233034][1][ora.BPELP.BPELP1.inst]: clsrcremaction: clsrcrpcreq message returned: 1 'SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 17 22:21:32 2008&lt;br /&gt;Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.&lt;br /&gt;Enter user-name: Connected to an idle instance.&lt;br /&gt;SQL&gt; ORA-00119: invalid specification for system parameter REMOTE_LISTENERORA'&lt;br /&gt;2008-06-17 22:21:33.352: [    RACG][1] [1233034][1][ora.BPELP.BPELP1.inst]: end for resource = ora.BPELP.BPELP1.inst, action = start, status = 1, time = 2.430s&lt;br /&gt;2008-06-17 22:34:11.683: [ COMMCRS][258]clsc_connect: (1106f0ff0) no listener at (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=9011))&lt;br /&gt;2008-06-17 22:34:14.080: [    RACG][1] [991310][1][ora.BPELP.BPELP1.inst]: clsrcremaction: clsrcrpcreq message returned: 1 'SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 17 22:34:12 2008&lt;br /&gt;Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.&lt;br /&gt;Enter user-name: Connected to an idle instance.&lt;br /&gt;SQL&gt; ORA-00119: invalid specification for system parameter REMOTE_LISTENERORA'&lt;br /&gt;2008-06-17 22:34:14.080: [    RACG][1] [991310][1][ora.BPELP.BPELP1.inst]: end for resource = ora.BPELP.BPELP1.inst, action = start, status = 1, time = 2.435s&lt;br /&gt;&lt;br /&gt;&gt;srvctl setenv database -d BPELP -t TNS_ADMIN=/esb02/u0001/oracle/product/10.2.0/asm/network/admin&lt;br /&gt;&gt;srvctl start database -d BPELPPRKP-1001 : Error starting instance BPELP1 on node node1CRS-0215: Could not start resource 'ora.BPELP.BPELP1.inst'.PRKP-1001 : Error starting instance BPELP2 on node node2CRS-0215: Could not start resource 'ora.BPELP.BPELP2.inst'.&lt;br /&gt;&lt;br /&gt;&gt;srvctl setenv database -d BPELP -t TNS_ADMIN=/esb02/u0001/oracle/product/10.2.0/db_1/network/admin&lt;br /&gt;&gt;srvctl start instance  -d BPELP -i BPELP1&lt;br /&gt;&gt;srvctl start instance  -d BPELP -i BPELP2&gt;crs_stat -tName           Type           Target    State     Host------------------------------------------------------------ora....P1.inst application    ONLINE    ONLINE    esbp...1cdcora....P2.inst application    ONLINE    ONLINE    esbp...2cdcora.BPELP.db   application    ONLINE    ONLINE    esbp...2cdcora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.DPWRP.db   application    OFFLINE   OFFLINEora....P1.inst application    OFFLINE   OFFLINEora....P2.inst application    OFFLINE   OFFLINEora.UDDIP.db   application    OFFLINE   OFFLINEora....SM1.asm application    ONLINE    ONLINE    esbp...1cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...1cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...1cdcora....cdc.ons application    ONLINE    ONLINE    esbp...1cdcora....cdc.vip application    ONLINE    ONLINE    esbp...1cdcora....SM2.asm application    ONLINE    ONLINE    esbp...2cdcora....DC.lsnr application    ONLINE    ONLINE    esbp...2cdcora....cdc.gsd application    ONLINE    ONLINE    esbp...2cdcora....cdc.ons application    ONLINE    ONLINE    esbp...2cdcora....cdc.vip application    ONLINE    ONLINE    esbp...2cdc&lt;br /&gt;&lt;br /&gt;&gt; mv listner.ora.bkp listener.ora&lt;br /&gt;&gt; mv tnsnames.ora.bkp tnsnames.ora&lt;br /&gt;&gt;srvctl start database -d UDDIP&gt;srvctl start database -d DPWRP&lt;br /&gt;--&lt;br /&gt;&gt;chkcrs.shHA Resource                                   Target     State-----------                                   ------     -----ora.BPELP.BPELP1.inst                         ONLINE     ONLINE on node1ora.BPELP.BPELP2.inst                         ONLINE     ONLINE on node2ora.BPELP.BPELP_APPS.TWCABLE.COM.BPELP1.srv   ONLINE     ONLINE on node1ora.BPELP.BPELP_APPS.TWCABLE.COM.BPELP2.srv   ONLINE     ONLINE on node2ora.BPELP.BPELP_APPS.TWCABLE.COM.cs           ONLINE     ONLINE on node2ora.BPELP.db                                  ONLINE     ONLINE on node2ora.DPWRP.DPWRP1.inst                         ONLINE     ONLINE on node1ora.DPWRP.DPWRP2.inst                         ONLINE     ONLINE on node2ora.DPWRP.DPWRP_APPS.TWCABLE.COM.DPWRP1.srv   ONLINE     ONLINE on node1ora.DPWRP.DPWRP_APPS.TWCABLE.COM.DPWRP2.srv   ONLINE     ONLINE on node2ora.DPWRP.DPWRP_APPS.TWCABLE.COM.cs           ONLINE     ONLINE on node2ora.DPWRP.db                                  ONLINE     ONLINE on node2ora.UDDIP.UDDIP1.inst                         ONLINE     ONLINE on node1ora.UDDIP.UDDIP2.inst                         ONLINE     ONLINE on node2ora.UDDIP.UDDIP_APPS.TWCABLE.COM.UDDIP1.srv   ONLINE     ONLINE on node1ora.UDDIP.UDDIP_APPS.TWCABLE.COM.UDDIP2.srv   ONLINE     ONLINE on node2ora.UDDIP.UDDIP_APPS.TWCABLE.COM.cs           ONLINE     ONLINE on node2ora.UDDIP.db                                  ONLINE     ONLINE on node2ora.node1.ASM1.asm                     ONLINE     ONLINE on node1ora.node1.LISTENER_node1.lsnr   ONLINE     ONLINE on node1ora.node1.gsd                          ONLINE     ONLINE on node1ora.node1.ons                          ONLINE     ONLINE on node1ora.node1.vip                          ONLINE     ONLINE on node1ora.node2.ASM2.asm                     ONLINE     ONLINE on node2ora.node2.LISTENER_node2.lsnr   ONLINE     ONLINE on node2ora.node2.gsd                          ONLINE     ONLINE on node2ora.node2.ons                          ONLINE     ONLINE on node2ora.node2.vip                          ONLINE     ONLINE on node2&lt;br /&gt;--&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-791794338281654387?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/791794338281654387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=791794338281654387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/791794338281654387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/791794338281654387'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/rebuilding-corrupted-ocr.html' title='Rebuilding a Corrupted OCR.'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-7769948296492973657</id><published>2009-06-17T19:35:00.000-07:00</published><updated>2009-06-18T06:17:22.800-07:00</updated><title type='text'>ORACLE Installation - Record and Play</title><content type='html'>If you are doing too many ORACLE installatons and having issues in bringing up Installer of GUI, tired of sowness of Oracle GUI install, here is an option you can try. Record a dry run of "oracle install" to a XML file and then edit the XML file and run the install in silent mode. This method is extremely helpful if you are installaing ORACLE into 2 different homes ( say, ORACLE_HOME for ASM and ORACLE_HOME for RDBMS), all you need to do is run ORACLE Univeral Installer upto the last page with record option and exit out without actuall install and then do a Silent mode installation.&lt;br /&gt;Ex:&lt;br /&gt;1. runInstaller -record -destinationFile /home/oracle/sridhar/install_db_10201&lt;br /&gt;which brings up ORACLE Universal Installer and records the selections, actions like ORACLE_HOME, Database components to be e installd etc. Make sure you exit out the installer at the last step without actually installing.&lt;br /&gt;&lt;br /&gt;2. Then run the runInstalle in Silent mode as&lt;br /&gt;runInstaller -silent -responseFile /home/oracle/sridhar/install_db_10201&lt;br /&gt;&lt;br /&gt;You can even ftp the file to another server and oracle can be installed there after modifying the .xml file with appropriate values.&lt;br /&gt;--&lt;br /&gt;For 10.2.0.4&lt;br /&gt;runInstaller -record -destinationFile /home/oracle/sridhar/install_db_10204&lt;br /&gt;runInstaller -silent -responseFile /home/oracle/sridhar/install_db_10204&lt;br /&gt;--&lt;br /&gt;PS: Careful though in modifying the file..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-7769948296492973657?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/7769948296492973657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=7769948296492973657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/7769948296492973657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/7769948296492973657'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2009/06/oracle-installation-command-lineno-gui.html' title='ORACLE Installation - Record and Play'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6084016698605356111.post-2770754461177847419</id><published>2008-12-06T16:24:00.000-08:00</published><updated>2009-07-10T09:02:43.195-07:00</updated><title type='text'>Build a Physical Standby in 10 Simple Steps.</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;u&gt;Overview: &lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;Standby database feature is started with a release of Oracle 8.0.4 and synonyms to “Data Guard”. If needed, the standby database can assume the role of primary database and take over production in case of a Disaster. A standby database can be one of two types: a physical standby database or a logical standby database.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Physical Standby:&lt;/em&gt;&lt;br /&gt;&lt;/u&gt;&lt;br /&gt;A physical standby database is physically identical to the primary database, with on disk database structures that are identical to the primary database on a block-for-block basis. The database schema, including indexes, are identical.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Logical Standby:&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;A logical standby database is initially created as an identical copy of the primary database, but it later can be altered to have a different structure. The logical standby database is updated by executing SQL statements. This allows users to access the standby database for queries and reporting at any time.&lt;br /&gt;&lt;br /&gt;Now let us see, how we can create a physical standby database, STBY, for a primary database, PRIM. For this standby build, here are few assumptions.&lt;br /&gt;&lt;br /&gt;1. OS Architecture is same between primary and standby servers.&lt;br /&gt;2. Oracle version is same primary and standby servers and Oracle is installed on both the servers.&lt;br /&gt;3. Primary database is running on ARCIVELOG mode.&lt;br /&gt;4. Automatic Storage Management (ASM) is deployed on both primary and standy servers, and ASM instance is running on both PRIMARY and STANDBY servers.&lt;br /&gt;5. ASM Disk group are created on both primary and standby ASM instances and their information is as –&lt;br /&gt;&lt;br /&gt;Primary: &lt;span style="color:#000099;"&gt;PRIM_DATA, PRIM_REDO, PRIM_FRA&lt;/span&gt;.&lt;br /&gt;Standby: &lt;span style="color:#cc0000;"&gt;STBY_DATA, STBY_REDO, STBY_FRA&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Steps&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;br /&gt;Step 1. Preparation of primary database:&lt;br /&gt;&lt;br /&gt;Before you create a standby database you must first ensure that primary database (PRIM) is properly configured.&lt;br /&gt;&lt;br /&gt;1.1 Enable Force logging.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;ALTER DATABASE FORCE LOGGING;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To Verify, &lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;select FORCE_LOGGING from v$database ;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1.2 Enable Archivelog mode on Primary database, define a local archive destination.&lt;br /&gt;Ex:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;alter system set LOG_ARCHIVE_DEST_1='LOCATION=/oradb/u0001/archive' scope=both ;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;If you are using FRA as your archive destination -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;alter system set LOG_ARCHIVE_DEST_1='LOCATION=use_db_recovery_file_dest' scope=both ;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To verify,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;show parameters log_archive_dest_1&lt;br /&gt;archive log list ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 2. Preparation of Standby database:&lt;br /&gt;&lt;br /&gt;2.1 Create directories for dump destinations using OFA.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;mkdir –p /oradb/u0009/oracle/admin/STBY/adump&lt;br /&gt;mkdir –p /oradb/u0009/oracle/admin/STBY/bdump&lt;br /&gt;mkdir –p /oradb/u0009/oracle/admin/STBY/cdump&lt;br /&gt;mkdir –p /oradb/u0009/oracle/admin/STBY/udump&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;2.2 Create Password file with the same password of Primary database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;cd $ORACLE_HOME/dbs&lt;br /&gt;orapwd password=sys_password_PRIM_database file=orapwSTBY entries=30&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Step 3. Backup primary database.&lt;br /&gt;&lt;br /&gt;3.1 Perform a Full backup to DISK or TAPE using RMAN.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;RMAN&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;"&gt;connect target &lt;a href="mailto:sys/password@PRIM"&gt;sys/password@PRIM&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;connect catalog &lt;a href="mailto:user/password@CATALOG_DB"&gt;user/password@CATALOG_DB&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;run { &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;allocate channel ch01 type tape/disk …. ;&lt;br /&gt;allocate channel ch02 type tape/disk …. ; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;backup database; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;sql 'alter system archive log current' ; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;backup archivelog all ;&lt;br /&gt;backup current controlfile for standby ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;3.2 Generate a pfile to be copied to standby system.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Create pfile = ‘/export/home/oracle/Sridhar/pfile_STBY.ora’ from spfile ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 4. Copy Files from Primary server to Standby server.&lt;br /&gt;&lt;br /&gt;From Primary system, using either ftp or scp, copy the files (backupsets and pfile) created in step 3.&lt;br /&gt;&lt;br /&gt;Step 5. Set init.ora parameters. Modify the pfile_STBY.ora for standby database.&lt;br /&gt;&lt;br /&gt;1. Keep the same or change the memory related init.ora parameters like db_cache_size, sga_*, pga_*, etc.&lt;br /&gt;&lt;br /&gt;2. Control_files = ** comment this parameter, RMAN will restore to the default locations. **&lt;br /&gt;&lt;br /&gt;3. Standby_archive_dest: Specify the location of the archived redo logs that will be received from the primary database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;standby_archive_dest = '/oradb/u0009/oracle/arch‘ &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;4. Dump Directories.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;audit_file_dest ='/oradb/u0009/oracle/admin/STBY/adump’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;background_dump_dest ='/oradb/u0009/oracle/admin/STBY/bdump' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;user_dump_dest ='/oradb/u0009/oracle/admin/STBY/udump' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;core_dump_dest ='/oradb/u0009/oracle/admin/STBY/cdump' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;5. DBNAME&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Db_name = PRIM&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Db_unique_name =&lt;/span&gt; &lt;span style="font-family:courier new;font-size:78%;"&gt;STBY&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6. &lt;span style="font-family:courier new;font-size:78%;"&gt;standby_file_management = AUTO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7. Listener/Net parameters&lt;br /&gt;# set FAL_CLIENT to standby service name&lt;br /&gt;# set FAL_SERVER to primary service name&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;fal_client = ‘STBY’&lt;br /&gt;Fal_server = ‘PRIM’&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7. File Destination parameters&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;db_create_file_dest = '+STBY_DATA' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;db_create_online_log_dest_1 = '+STBY_REDO' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;db_create_online_log_dest_2 = '+STBY_REDO' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;db_recovery_file_dest = '+STBY_FRA' &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;db_recovery_file_dest_size = 100G&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;8. Archiving. (Optional, needed if the STANDBY is activated as PRIMARY and generating archive logs.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;log_archive_dest_1 = 'LOCATION=use_db_recovery_file_dest'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;db_recovery_file_dest = '+STBY_FRA'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;db_recovery_file_dest_size = 100G &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 6. Configuring remote connections.&lt;br /&gt;&lt;br /&gt;On both primary and standby systems, create a network service name for both primary and standby databases and test the remote connectivity.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;PRIM =&lt;br /&gt;(DESCRIPTION =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(Host = primary_server)(Port = 1531))&lt;br /&gt;(CONNECT_DATA = (SID = DBNAMEP))&lt;br /&gt;) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;STBY =&lt;br /&gt;(DESCRIPTION =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(Host = standby_server)(Port = 1532))&lt;br /&gt;(CONNECT_DATA = (SID = DBNAMEY))&lt;br /&gt;)&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;Step 7. DEAD CONNECTION DETECTION&lt;br /&gt;&lt;br /&gt;Enable dead connection detection by setting SQLNET.EXPIRE_TIME parameter in sqlnet.ora file on standby system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQLNET.EXPIRE_TIME = 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 8. Restore Standby database from Backups.&lt;br /&gt;&lt;br /&gt;8.1 Start the standby database in NOMOUNT mode.&lt;br /&gt;&lt;br /&gt;$ sqlplus / as sysdba&lt;br /&gt;SQL&gt; create spfile from pfile=‘/export/home/oracle/sridhar/pfile_STBY.ora’ ;&lt;br /&gt;SQL&gt; Startup nomount&lt;br /&gt;&lt;br /&gt;8.2 On standby system, run the following RMAN script to create a duplicate database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;RMAN&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;connect target &lt;/span&gt;&lt;a href="mailto:sys/password@PRIM"&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;sys/password@PRIM&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;connect catalog user/password@CATALOG_DB&lt;br /&gt;connect auxiliary &lt;/span&gt;&lt;a href="mailto:sys/password@STBY"&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;sys/password@STBY&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;run { &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;allocate auxiliary channel ch01;&lt;br /&gt;allocate auxiliary channel ch02;&lt;br /&gt;duplicate target database for standby nofilenamecheck ;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8.3 Update Control_files parameter&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Alter system set control_files = ** as per RMAN restore log from step above** scope=spfile ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Step 9. Configure Log Apply Services.&lt;br /&gt;&lt;br /&gt;9.1 On standby database, start the log apply services using -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;alter database recover managed standby database disconnect from session ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;9.2 On Primary database, enable Archiving to physical standby database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Alter system set log_archive_dest_2=‘SERVICE=STBY ARCH DELAY=60’ scope=both; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Alter system set log_archive_dest_state_2=enable scope=both;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;9.3 On Primary database, start remote archiving.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Alter system archive log current ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;Step 10. Verifying physical standby&lt;br /&gt;&lt;br /&gt;10.1 Identify the existing archived log on standby.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Alter session set nls_date_format= ‘DD-MON-YY HH24:MI:SS’ ; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Select sequence#, first_time, next_time, applied from v$archived_log order by 1 ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;10.2 Archive the current log on Primary database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Alter system archive log current ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;10.3 Verify that the new archive redo log was received on standby.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:78%;"&gt;Select sequence#, first_time, next_time, applied from v$archived_log order by 1 ;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6084016698605356111-2770754461177847419?l=sridharramireddy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sridharramireddy.blogspot.com/feeds/2770754461177847419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6084016698605356111&amp;postID=2770754461177847419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/2770754461177847419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6084016698605356111/posts/default/2770754461177847419'/><link rel='alternate' type='text/html' href='http://sridharramireddy.blogspot.com/2008/12/build-physical-standby-in-10-simple.html' title='Build a Physical Standby in 10 Simple Steps.'/><author><name>Sridhar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/-4wSwmuQ-e48/Tb9fAvIdJtI/AAAAAAAAA3Y/JkelGZwWrvo/s220/1010170993_3NQBS-Ti.jpg'/></author><thr:total>0</thr:total></entry></feed>
