07 August 2012

Step by Step Create Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -3

Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -3

Copy standby Control file from Primary to Standby :-

root@pbcibms55(/xproddata1)# scp -pr controll01.dbf root@10.130.0.15:/xproddata1/.
The authenticity of host '10.130.0.15 (10.130.0.15)' can't be established.
RSA key fingerprint is a6:ed:fe:40:e5:5a:39:93:b3:89:42:7c:d0:a4:7e:76.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.130.0.15' (RSA) to the list of known hosts.
root@10.130.0.15's password:
controll01.dbf 100% 27MB 13.7MB/s 00:02
root@pbcibms55(/xproddata1)#

Standby server Post clone Process:-


$ perl adcfgclone.pl dbTechStack

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adcfgclone Version 120.31.12010000.1

Enter the APPS password :

Running:
/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/java:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/xmlparserv2.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_1683578.lst -stage /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone -dbTechStack 2> /tmp/adcfgclone_1683578.err; echo $? > /tmp/adcfgclone_1683578.res

Log file located at /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/CloneContext_0727105230.log

Provide the values required for creation of the new Database Context file.

Target System Hostname (virtual or normal) [bcibmp15] :
Target Instance is RAC (y/n) [n] :
Target System Database SID : XPROD
Target System Base Directory : /xproddb/xproddb/XPROD
Target System utl_file_dir Directory List : /xprodtmp
Number of DATA_TOP's on the Target System [3] :
Target System DATA_TOP Directory 1 [/xproddata1/xproddata1/XPROD/data] :
Target System DATA_TOP Directory 2 [/xproddata2/xproddata2/XPROD/data] :
Target System DATA_TOP Directory 3 [/xproddata3/xproddata3/XPROD/data] :
Target System RDBMS ORACLE_HOME Directory [/xproddb/xproddb/XPROD/db/tech_st/11.1.0] :
Do you want to preserve the Display [bcibms55:0.0] (y/n) ? : n
Target System Display [bcibmp15:0.0] :
Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 50
Checking the port pool 50
done: Port Pool 50 is free
Report file located at /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/temp/portpool.lst
Complete port information available at /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/temp/portpool.lst
Creating the new Database Context file from :
/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/template/adxdbctx.tmp

The new database context file has been created :
/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/XPROD_bcibmp15.xml

Log file located at /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/CloneContext_0727105230.log
Check Clone Context logfile /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/CloneContext_0727105230.log for details.

Running Rapid Clone with command:
perl /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/adclone.pl java=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/../jre mode=apply stage=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/XPROD_bcibmp15.xml showProgress contextValidated=true
Running:
perl /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/adclone.pl java=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/../jre mode=apply stage=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/XPROD_bcibmp15.xml showProgress contextValidated=true
APPS Password :
Setting LIBPATH to /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/oui/lib/aix

Beginning rdbms home Apply - Fri Jul 27 10:53:29 2012

/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/oui -classpath /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/xmlparserv2.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/ojdbc6.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/java:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/oui/OraInstaller.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/oui/ewt3.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/oui/share.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/oui/srvm.jar:/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyDBTechStack -e /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/XPROD_bcibmp15.xml -stage /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/clone -showProgress
APPS Password : Log file located at /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/log/XPROD_bcibmp15/ApplyDBTechStack_07271053.log
| 100% completed

Completed Apply...
Fri Jul 27 10:57:32 2012

Starting database listener for XPROD:
Running:
/xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/scripts/XPROD_bcibmp15/addlnctl.sh start XPROD
You are running addlnctl.sh version 120.1.12010000.2

Logfile: /xproddb/xproddb/XPROD/db/tech_st/11.1.0/appsutil/log/XPROD_bcibmp15/addlnctl.txt

Starting listener process XPROD ...

addlnctl.sh: exiting with status 0
$ . XPROD_bcibmp15.env
$ lsnrctl stop XPROD

LSNRCTL for IBM/AIX RISC System/6000: Version 11.1.0.7.0 - Production on 27-JUL-2012 11:00:49

Copyright (c) 1991, 2008, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bcibmp15.hilbcdom.com)(PORT=1571)))
The command completed successfully

Copy Standby Control file from primary to standby


$ cp controll01.dbf /xproddata1/xproddata1/XPROD/data/.
$ cp controll01.dbf /xproddata2/xproddata2/XPROD/data/controll02.dbf
$ cp controll01.dbf /xproddata3/xproddata3/XPROD/data/controll03.dbf

Modify the database init.ora parameters on the standby server

Ifile :-


#### Entry for Data Guard From CHain-sys####
db_unique_name = XPRODDR
log_archive_dest_1 = 'LOCATION=/xprodarch/xprodarch/XPROD/archive'
LOG_ARCHIVE_DEST_2 = 'service=XPROD VALID_FOR=(online_logfile,primary_role) DB_UNIQUE_NAME=XPROD'
log_archive_dest_state_1=enable
log_archive_dest_state_2 = defer
# log_archive_dest_state_2 = enable
log_archive_min_succeed_dest = 1
standby_file_management = AUTO
#remote_archive_enable = TRUE
Remote_login_passwordfile = exclusive
log_archive_format = XPROD_%t_%s_%r.arch
db_file_name_convert = '/xproddata1/xproddata1/XPROD/data/','/xproddata1/xproddata1/XPROD/data/','/xproddata2/xproddata2/XPROD/data/','/xproddata2/xproddata2/XPROD/data/',/xproddata3/xproddata3/XPROD/data/','/xproddata3/xproddata3/XPROD/data/'
log_file_name_convert = '/xprodarch/xprodarch/BCPROD/archive/','/xprodarch/xprodarch/XPROD/archive/'
fal_server = XPRODDR
fal_client = XPROD

Pfile :-

control_files = /xproddata1/xproddata1/XPROD/data/controll01.dbf,/xproddata2/xproddata2/XPROD/data/controll02.dbf,/xproddata3/xproddata3/XPROD/data/controll03.dbf

Tnsnames.ora on ifile :-


XPRODDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = bcibms55.hilbcdom.com)(PORT = 1571))
)
(CONNECT_DATA =
(SERVICE_NAME = XPROD)
)
)

$ sqlplus

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jul 27 12:48:18 2012

Copyright (c) 1982, 2008, Oracle. All rights reserved.

Enter user-name: /as sysdba
Connected to an idle instance.

SQL> startup nomount pfile=/xproddb/xproddb/XPROD/db/tech_st/11.1.0/dbs/initXPROD.ora
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size 2155464 bytes
Variable Size 452987960 bytes
Database Buffers 1660944384 bytes
Redo Buffers 21798912 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> select thread#, sequence#-1 from v$log where status ='CURRENT';

THREAD# SEQUENCE#-1
---------- -----------
1 -1

SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/xproddata1/xproddata1/XPROD/data/system01.dbf'

SQL>


Copy all Archive log from Primary to Stand by

root@pbcibms55(/xprodarch/xprodarch/XPROD/archive)# scp -pr *.arch root@10.130.0.15:/xprodarch/xprodarch/XPROD/archive/.
root@10.130.0.15's password:
XPROD_1_100_789237530.arch 100%

On Stand by server :-


$ sqlplus

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jul 28 11:12:09 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select destination, status, recovery_mode from v$archive_dest_status where status <> 'DEFERRED' and status <> 'INACTIVE';

DESTINATION
--------------------------------------------------------------------------------
STATUS RECOVERY_MODE
--------- -----------------------
/xprodarch/xprodarch/XPROD/archive
VALID IDLE

/xprodarch/xprodarch/XPROD/archive
VALID IDLE

SQL> select thread#, sequence#-1 from v$log where status ='CURRENT';

no rows selected

SQL> shut immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL>

On Primary Server :-

xdb@pbcibms55(/home/xdb)# sqlplus
SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jul 28 11:23:36 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system set log_archive_dest_state_2 = defer;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xprodarch/xprodarch/XPROD/archive
Oldest online log sequence 170
Next log sequence to archive 172
Current log sequence 172
SQL>

Step by Step Create Business Continuity Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database Part -4 ----  Click here

No comments: