Version Details :
=============
OS Version : OEL 5 Update 4
DB Version : 9.2.0.5
1. Adpreclone Step in Source DB:
==========================
[oracln@test cln_test]$ pwd
/test/oracle/uatdb/9.2.0/appsutil/scripts/cln_test
[oracln@test cln_test]$ perl adpreclone.pl dbTier
Running Rapid Clone with command...
perl /test/oracle/uatdb/9.2.0/appsutil/bin/adclone.pl java=/test/oracle/uatdb/9.2.0/appsoui/jre/1.3.1 mode=stage stage=/test/oracle/uatdb/9.2.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/test/oracle/uatdb/9.2.0/appsutil/cln_test.xml showProgress
Beginning database tier Stage - Fri Jan 3 16:42:04 2014
APPS Password : apps
Log file located at /test/oracle/uatdb/9.2.0/appsutil/log/cln_test/StageDBTier_01030442.log
| 50% completed Logfile: /test/oracle/uatdb/9.2.0/appsutil/log/cln_test/StageDBTier_01030442.log
Completed Stage...
Fri Jan 3 16:44:14 2014
[oracln@test cln_test]$
2. Run the Backup Script in Source Database:
==================================
[oracln@test script]$ cat fullbkp.sh
rman target / catalog=rman/rman@cln cmdfile=/u01/rman/script/fullbkp.rcv log=/u01/rman/script/fullbkp.log trace=/u01/rman/script/fullbkp.trc
[oracln@test script]$ cat fullbkp.rcv
run
{
crosscheck backup;
crosscheck archivelog all;
backup full database format '/u01/rman/backup/db_%U'
plus archivelog format '/u01/rman/backup/arch_%U';
backup current controlfile format '/u01/rman/backup/ctrl_%U';
crosscheck backup;
crosscheck archivelog all;
}
[oracln@test script]$
[oracln@test script]$ sh fullbkp.sh
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
Recovery Manager complete.
3. Check Pre-requirement for 9i Support in Target :
======================================
[root@db ~]# groupadd dba
[root@db ~]# useradd -g dba oraprod
[root@db rpms]# ls -ltr
total 7884
-rwxr-xr-x 1 root root 1014759 Jan 3 17:06 openmotif21-2.1.30-11.RHEL4.6.i386.rpm
-rwxr-xr-x 1 root root 3692 Jan 3 17:06 compat-oracle-rhel4-1.0-5.i386.rpm
-rw-r--r-- 1 root root 3172139 Jan 3 17:26 compat-gcc-32-3.2.3-47.3.i386.rpm
-rw-r--r-- 1 root root 3863540 Jan 3 17:26 compat-gcc-32-c++-3.2.3-47.3.i386.rpm
[root@db rpms]# rpm -ivh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
warning: openmotif21-2.1.30-11.RHEL4.6.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:openmotif21 ########################################### [100%]
[root@db rpms]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm
error: Failed dependencies:
compat-gcc-32 is needed by compat-oracle-rhel4-1.0-5.i386
compat-gcc-32-c++ is needed by compat-oracle-rhel4-1.0-5.i386
[root@db rpms]# rpm -ivh compat-gcc-32-3.2.3-47.3.i386.rpm
warning: compat-gcc-32-3.2.3-47.3.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:compat-gcc-32 ########################################### [100%]
[root@db rpms]# rpm -ivh compat-gcc-32-c++-3.2.3-47.3.i386.rpm
warning: compat-gcc-32-c++-3.2.3-47.3.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:compat-gcc-32-c++ ########################################### [100%]
[root@db rpms]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm
Preparing... ########################################### [100%]
1:compat-oracle-rhel4 ########################################### [100%]
[root@db rpms]#
4. Create the Directories for Target DBTier :
==================================
[root@db ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 30G 5.0G 23G 18% /
/dev/sda5 61G 188M 57G 1% /u01
/dev/sda2 194G 188M 184G 1% /d01
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@db ~]# cd /d01/
[root@db d01]# ls -ltr
total 16
drwx------ 2 root root 16384 Jan 3 15:19 lost+found
[root@db d01]# mkdir oraprod
[root@db d01]# cd oraprod/
[root@db oraprod]# mkdir tech_st apps_st
[root@db oraprod]# ls -ltr
total 8
drwxr-xr-x 2 root root 4096 Jan 3 17:40 tech_st
drwxr-xr-x 2 root root 4096 Jan 3 17:40 apps_st
[root@db oraprod]# cd ../../
[root@db /]# cd d01/
[root@db d01]# chown -R oraprod:dba oraprod/
[root@db d01]# chmod -R 777 oraprod/
[root@db d01]#
5. Tar and untar the DB Home and RMAN Backup from Source to Target :
========================================================
[oracln@test uatdb]$ tar cvf - 9.2.0 |ssh -l root 192.168.1.61 "cd /d01/oraprod/tech_st; tar xvf -"
9.2.0/
9.2.0/oracore/
9.2.0/oracore/zoneinfo/
9.2.0/oracore/zoneinfo/timezlrg.dat
root@192.168.1.61's password:
6. Adcfgclone.pl in Targer DBTier :
==========================
[oraprod@db ~]$ id
uid=54322(oraprod) gid=54322(dba) groups=54322(dba)
[oraprod@db ~]$ hostname
db.sapcle.com
[oraprod@db ~]$ cd /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/
[oraprod@db bin]$ ls -ltr
total 156
-rwxrwxrwx 1 500 dba 80663 Oct 28 15:54 adclone.pl
-rwxrwxrwx 1 500 dba 29224 Oct 28 15:54 adclonectx.pl
-rwxrwxrwx 1 500 dba 1226 Oct 28 15:54 adchkutl.sh
-rwxrwxrwx 1 500 dba 33888 Oct 28 15:54 adcfgclone.pl
*********
Error 1 :
*********
[oraprod@db bin]$ perl adcfgclone.pl dbTechStack
Enter the APPS password [APPS]:
apps
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:
ERROR: context creation not completed successfully.
Please check /tmp/adcfgclone.err file for errors
[oraprod@db bin]$ vi /tmp/adcfgclone.err
[oraprod@db bin]$ cat /tmp/adcfgclone.err
/d01/oraprod/tech_st/9.2.0/appsutil/clone/jre/1.3.1/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
***********
Solution :
***********
[oraprod@db lib]$ su - root
Password:
[root@db ~]# cd /usr/lib
[root@db lib]# ls -ltr libstdc++-libc6.2-2.so.3
lrwxrwxrwx 1 root root 31 Jan 3 16:14 libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so
[root@db lib]# ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2
[root@db lib]#
*********
Error 2 :
*********
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [1]:
Target system DATA_TOP 1 [/test/oracle/uatdata]:/d01/oraprod/apps_st
RC-50004: Error occurred in CloneContext:
/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../data/stage/addbhomtgt.xml (Permission denied)
Check logfile CloneContext_01030621.log for details.
ERROR: context creation not completed successfully.
Please check /tmp/adcfgclone.err file for errors
***********
Solution :
***********
Cause : The 9.2.0 home directory don't have owner and full permission. So the reason we got the above error.
[root@db tech_st]# chown -R oraprod:dba 9.2.0
[root@db tech_st]# chmod -R 777 9.2.0
[root@db tech_st]#
*********
Error 3 :
*********
Enter the port pool number [0-99]:
4
Checking the port pool 4
done: Port Pool 4 is free
Database port is 1525
Creating the new Database Context file from :
/d01/oraprod/tech_st/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/CloneContext_01030627.log
Running Rapid Clone with command:
perl /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl java=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../jre/1.3.1 mode=apply stage=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/.. component=dbTechStack method=CUSTOM dbctxtg=/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml showProgress contextValidated=true
Rapid Clone will use the oraInst.loc file.
The file oraInst.loc needs to exist at:
/etc/oraInst.loc
The 806 installer uses the oratab file.
The file oratab needs to exist at:
/etc/oratab
Please run the script /tmp/orainstRoot.sh as root
Restart adclone.pl after performing required corrections.
ERROR: Failed to execute /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl
Please check logfile.
***********
Solution :
***********
1. [oraprod@db /]$ cd /tmp/
[oraprod@db tmp]$ ls -ltr
total 36
drwx--x--x 17 root root 4096 Jan 3 16:28 cim_schema.21848
drwx------ 2 root root 4096 Jan 3 16:44 ssh-QeBtbI3764
drwx------ 2 root root 4096 Jan 3 16:44 keyring-lbuFZ0
drwx------ 3 root root 4096 Jan 3 16:44 gconfd-root
drwx------ 2 root root 4096 Jan 3 16:44 virtual-root.MKMEmz
srwxr-xr-x 1 root root 0 Jan 3 16:44 mapping-root
drwx------ 2 root root 4096 Jan 3 16:44 orbit-root
-rwxrwxrwx 1 oraprod dba 253 Jan 3 18:30 orainstRoot.sh
[oraprod@db tmp]$ sh orainstRoot.sh
touch: cannot touch `/etc/oraInst.loc': Permission denied
orainstRoot.sh: line 4: /etc/oraInst.loc: Permission denied
touch: cannot touch `/etc/oratab': Permission denied
chmod: cannot access `/etc/oratab': No such file or directory
[oraprod@db tmp]$
2. [root@db /]# chmod -R 777 etc/
[root@db /]# su - oraprod
[oraprod@db ~]$ cd /tmp/
[oraprod@db tmp]$ sh orainstRoot.sh
[oraprod@db tmp]$
7. Successful Adcfgclone.pl in Target DBTier :
===================================
[oraprod@db bin]$ perl adcfgclone.pl dbTechStack
Enter the APPS password [APPS]:
apps
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:
Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target System database name [cln]:prod
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [sapcle.com]:
Target system RDBMS ORACLE_HOME directory [/test/oracle/uatdb/9.2.0]:/d01/oraprod/tech_st/9.2.0
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [1]:
Target system DATA_TOP 1 [/test/oracle/uatdata]:/d01/oraprod/apps_st
Do you want to preserve the Display set to test:0.0 (y/n) [y] ?:n
Target system Display [db:0.0]:db:1.0
Target system JAVA_TOP location [null]:/d01/oraprod
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n
Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.
Enter the port pool number [0-99]:
4
Checking the port pool 4
done: Port Pool 4 is free
Database port is 1525
Backing up /d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml to /d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml.bak
Creating the new Database Context file from :
/d01/oraprod/tech_st/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/CloneContext_01030635.log
Running Rapid Clone with command:
perl /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl java=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../jre/1.3.1 mode=apply stage=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/.. component=dbTechStack method=CUSTOM dbctxtg=/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml showProgress contextValidated=true
Beginning rdbms home Apply - Fri Jan 3 18:35:54 2014
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/log/prod_db/ApplyDBTechStack_01030635.log
Completed Apply...
Fri Jan 3 18:36:43 2014
Beginning APPSDB_prod registration to central inventory...
ORACLE_HOME NAME : APPSDB_prod
ORACLE_HOME PATH : /d01/oraprod/tech_st/9.2.0
INVENTORY LOCATION : /etc/oraInst.loc
Log file located at /home/oraprod/oraInventory/logs/OracleHomeCloner_01030636.log
ORACLE_HOME /d01/oraprod/tech_st/9.2.0 was registered successfully.
Starting database listener for prod:
Running:
/d01/oraprod/tech_st/9.2.0/appsutil/scripts/prod_db/addlnctl.sh start prod
You are running addlnctl.sh version 115.6
Logfile: /d01/oraprod/tech_st/9.2.0/appsutil/log/prod_db/addlnctl.txt
Starting listener process prod ...
addlnctl.sh: exiting with status 0
[oraprod@db bin]$
8. Try to Connect sqlplus using ENV file in Target DB :
=========================================
[oraprod@db 9.2.0]$ pwd
/d01/oraprod/tech_st/9.2.0
[oraprod@db 9.2.0]$ ls -ltr *.env
-rw-r--r-- 1 oraprod dba 3731 Jan 3 18:36 prod_db.env
[oraprod@db 9.2.0]$ . ./prod_db.env
[oraprod@db 9.2.0]$ echo $ORACLE_SID
prod
[oraprod@db 9.2.0]$ echo $ORACLE_HOME
/d01/oraprod/tech_st/9.2.0
[oraprod@db 9.2.0]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 18:52:14 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL>
9. Password File Creation :
====================
[oraprod@db 9.2.0]$ . ./prod_db.env
[oraprod@db 9.2.0]$ echo $ORACLE_SID
prod
[oraprod@db 9.2.0]$ cd /d01/oraprod/tech_st/9.2.0/dbs/
[oraprod@db dbs]$ orapwd file=orapwPROD password=sys
[oraprod@db dbs]$
10. Modify the Pfile with Target Details :
===============================
*._b_tree_bitmap_plans=FALSE
*._fast_full_scan_enabled=FALSE
*._index_join_enabled=FALSE
*._like_with_bind_as_equality=TRUE
*._shared_pool_reserved_min_alloc=4100
*._sort_elimination_cost_ratio=5
*._sqlexec_progression_cost=2147483647
*._system_trig_enabled=true
*._trace_files_public=TRUE
*.aq_tm_processes=1
*.background_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/bdump'
*.compatible='9.2.0'
*.control_files='/d01/oraprod/apps_st/control01.dbf', '/d01/oraprod/apps_st/control02.dbf', '/d01/oraprod/apps_st/control03.dbf'
*.core_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/cdump'
*.cursor_sharing='EXACT'# Required 11i settting
*.db_block_checking=FALSE
*.db_block_checksum=TRUE
*.db_block_size=8192
*.db_cache_size=163577856
*.db_file_multiblock_read_count=8
*.db_file_name_convert='/a01/oracle/uatdata/','/d01/oraprod/apps_st/'
*.db_files=512# Max. no. of database files
*.db_name='prod'
*.dml_locks=10000
*.enqueue_resources=32000# Max. no of concurrent database locks.
*.java_pool_size=52428800
*.job_queue_processes=2
#*.log_archive_dest='/a01/oracle/uatdb/9.2.0/dbs/archive'
*.log_archive_start=true
*.log_buffer=10485760
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200# Checkpoint at least every 20 mins.
*.log_checkpoints_to_alert=TRUE
*.log_file_name_convert='/a01/oracle/uatdata/','/d01/oraprod/apps_st/'
*.max_dump_file_size='20480'# trace file size
*.max_enabled_roles=100# Some modules depend on
*.nls_comp='binary'# Required 11i setting
*.nls_date_format='DD-MON-RR'
*.nls_language='american'
*.nls_length_semantics='BYTE'# Required 11i setting
*.nls_numeric_characters='.,'
*.nls_sort='binary'# Required 11i setting
*.nls_territory='america'
*.O7_DICTIONARY_ACCESSIBILITY=FALSE
*.olap_page_pool_size=4194304
*.open_cursors=600# Consumes process memory, unless using MTS.
*.optimizer_features_enable='9.2.0'
*.optimizer_max_permutations=2000# Required for 11i setting
*.parallel_max_servers=8
*.parallel_min_servers=0
*.pga_aggregate_target=1G
*.processes=200# Max. no. of users x 2
*.query_rewrite_enabled='true'
*.row_locking='always'
*.session_cached_cursors=200
*.sessions=400# 2 X processes
*.shared_pool_reserved_size=30000000
*.shared_pool_size=300000000
*.sql_trace=FALSE
*.timed_statistics=true
*.undo_management='AUTO'
*.undo_retention=1800
*.undo_suppress_errors=FALSE
*.undo_tablespace='APPS_UNDOTS1'
*.user_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/udump'
*.utl_file_dir='/usr/tmp','/d01/oraprod/tech_st/9.2.0/appsutil/outbound/prod_db'
*.workarea_size_policy='AUTO'
*.remote_login_passwordfile=EXCLUSIVE
11. Open the Database in nomount state using Pfile:
=======================================
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:04:23 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=initprod.ora;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL> create spfile from pfile;
File created.
SQL>
12. Keep both tns entry in both Source nad Target :
======================================
Source TNS :
=========
cln = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1522))
(CONNECT_DATA=(SID=cln))
)
Target TNS :
=========
prod = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=db)(PORT=1525))
(CONNECT_DATA=(SID=prod))
)
13 : Check the TNSPing in both node :
=============================
[oraprod@db prod_db]$ tnsping cln
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1522)) (CONNECT_DATA=(SID=cln)))
TNS-12545: Connect failed because target host or object does not exist
**********
Solution :
**********
Note : We have to change the host name as IP address in the TNSEntry file in both Source and Target server.
[oraprod@db prod_db]$ tnsping cln
TNS Ping Utility for Linux: Version 9.2.0.5.0 - Production on 03-JAN-2014 19:14:51
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/igold/oracle/product/920/network/admin/IGOLD_plebiz-cc2/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.123)(PORT=1522)) (CONNECT_DATA=(SID=cln)))
OK (0 msec)
[oraprod@db prod_db]$
[oracln@test cln_test]$ tnsping prod
TNS Ping Utility for Linux: Version 9.2.0.5.0 - Production on 03-JAN-2014 19:14:44
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/igold/oracle/product/920/network/admin/IGOLD_plebiz-cc2/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.61)(PORT=1525)) (CONNECT_DATA=(SID=prod)))
OK (40 msec)
[oracln@test cln_test]$
14. Recover the Controlfile in nomount state :
==================================
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:28:19 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL> exit
[oraprod@db backup]$ rman target /
Recovery Manager: Release 9.2.0.5.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: prod (not mounted)
RMAN> restore controlfile from '/u01/rman/backup/ctrl_05ot5ho9_1_1';
Starting restore at 03-JAN-14
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=8 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=/d01/oraprod/apps_st/control01.dbf
output filename=/d01/oraprod/apps_st/control02.dbf
output filename=/d01/oraprod/apps_st/control03.dbf
Finished restore at 03-JAN-14
RMAN> alter database mount;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 19:39:50
ORA-01103: database name 'CLN' in controlfile is not 'PROD'
RMAN> exit
***********
Solution :
***********
Chnage the db_name in pfile file as source db_name.
RMAN> alter database mount;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 19:43:20
ORA-01990: error opening password file '/d01/oraprod/tech_st/9.2.0/dbs/orapw'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
[oraprod@db dbs]$ !sq
sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:46:39 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> select status from v$instance;
STATUS
------------
MOUNTED
Note : Database opened in mount mode so we can ignore the above RMAN-03002,ORA-01990,ORA-27037 errors.
15. Restore and Recover the Database using Backup:
========================================
run
{
set newname for datafile 7 to '/d01/oraprod/apps_st/sys7.dbf';
set newname for datafile 6 to '/d01/oraprod/apps_st/sys6.dbf';
set newname for datafile 5 to '/d01/oraprod/apps_st/sys5.dbf';
set newname for datafile 4 to '/d01/oraprod/apps_st/sys4.dbf';
set newname for datafile 3 to '/d01/oraprod/apps_st/sys3.dbf';
set newname for datafile 2 to '/d01/oraprod/apps_st/sys2.dbf';
set newname for datafile 1 to '/d01/oraprod/apps_st/sys1.dbf';
set newname for datafile 8 to '/d01/oraprod/apps_st/undo01.dbf';
set newname for datafile 9 to '/d01/oraprod/apps_st/undo02.dbf';
set newname for datafile 10 to '/d01/oraprod/apps_st/undo03.dbf';
set newname for datafile 11 to '/d01/oraprod/apps_st/undo04.dbf';
set newname for datafile 12 to '/d01/oraprod/apps_st/archive1.dbf';
set newname for datafile 13 to '/d01/oraprod/apps_st/archive2.dbf';
set newname for datafile 14 to '/d01/oraprod/apps_st/media1.dbf';
set newname for datafile 15 to '/d01/oraprod/apps_st/media2.dbf';
set newname for datafile 16 to '/d01/oraprod/apps_st/media3.dbf';
set newname for datafile 17 to '/d01/oraprod/apps_st/nologging1.dbf';
set newname for datafile 18 to '/d01/oraprod/apps_st/queues1.dbf';
set newname for datafile 19 to '/d01/oraprod/apps_st/queues2.dbf';
set newname for datafile 20 to '/d01/oraprod/apps_st/reference1.dbf';
set newname for datafile 21 to '/d01/oraprod/apps_st/reference2.dbf';
set newname for datafile 22 to '/d01/oraprod/apps_st/summary1.dbf';
set newname for datafile 23 to '/d01/oraprod/apps_st/summary2.dbf';
set newname for datafile 24 to '/d01/oraprod/apps_st/summary3.dbf';
set newname for datafile 25 to '/d01/oraprod/apps_st/summary4.dbf';
set newname for datafile 26 to '/d01/oraprod/apps_st/summary5.dbf';
set newname for datafile 27 to '/d01/oraprod/apps_st/tx_data1.dbf';
set newname for datafile 28 to '/d01/oraprod/apps_st/tx_data2.dbf';
set newname for datafile 29 to '/d01/oraprod/apps_st/tx_data3.dbf';
set newname for datafile 30 to '/d01/oraprod/apps_st/tx_data4.dbf';
set newname for datafile 31 to '/d01/oraprod/apps_st/tx_data5.dbf';
set newname for datafile 32 to '/d01/oraprod/apps_st/tx_data6.dbf';
set newname for datafile 33 to '/d01/oraprod/apps_st/tx_data7.dbf';
set newname for datafile 34 to '/d01/oraprod/apps_st/tx_data8.dbf';
set newname for datafile 35 to '/d01/oraprod/apps_st/tx_data9.dbf';
set newname for datafile 36 to '/d01/oraprod/apps_st/tx_data10.dbf';
set newname for datafile 37 to '/d01/oraprod/apps_st/tx_data11.dbf';
set newname for datafile 38 to '/d01/oraprod/apps_st/tx_idx1.dbf';
set newname for datafile 39 to '/d01/oraprod/apps_st/tx_idx2.dbf';
set newname for datafile 40 to '/d01/oraprod/apps_st/tx_idx3.dbf';
set newname for datafile 41 to '/d01/oraprod/apps_st/tx_idx4.dbf';
set newname for datafile 42 to '/d01/oraprod/apps_st/tx_idx5.dbf';
set newname for datafile 43 to '/d01/oraprod/apps_st/tx_idx6.dbf';
set newname for datafile 44 to '/d01/oraprod/apps_st/tx_idx7.dbf';
set newname for datafile 45 to '/d01/oraprod/apps_st/tx_idx8.dbf';
set newname for datafile 46 to '/d01/oraprod/apps_st/tx_idx9.dbf';
set newname for datafile 47 to '/d01/oraprod/apps_st/tx_idx10.dbf';
set newname for datafile 48 to '/d01/oraprod/apps_st/tx_idx11.dbf';
set newname for datafile 49 to '/d01/oraprod/apps_st/apps_ts_tx_interface.dbf';
set newname for datafile 50 to '/d01/oraprod/apps_st/ctx1.dbf';
set newname for datafile 51 to '/d01/oraprod/apps_st/rman1.dbf';
set newname for datafile 53 to '/d01/oraprod/apps_st/odm.dbf';
set newname for datafile 55 to '/d01/oraprod/apps_st/olap.dbf';
set newname for datafile 56 to '/d01/oraprod/apps_st/owa1.dbf';
set newname for datafile 57 to '/d01/oraprod/apps_st/portal.dbf';
set newname for datafile 58 to '/d01/oraprod/apps_st/mobile01.dbf';
restore database;
switch datafile all;
recover database;
}
executing command: SET NEWNAME
using target database controlfile instead of recovery catalog
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 03-JAN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /d01/oraprod/apps_st/sys1.dbf
restoring datafile 00002 to /d01/oraprod/apps_st/sys2.dbf
restoring datafile 00003 to /d01/oraprod/apps_st/sys3.dbf
restoring datafile 00004 to /d01/oraprod/apps_st/sys4.dbf
restoring datafile 00005 to /d01/oraprod/apps_st/sys5.dbf
restoring datafile 00006 to /d01/oraprod/apps_st/sys6.dbf
restoring datafile 00007 to /d01/oraprod/apps_st/sys7.dbf
restoring datafile 00008 to /d01/oraprod/apps_st/undo01.dbf
restoring datafile 00009 to /d01/oraprod/apps_st/undo02.dbf
restoring datafile 00010 to /d01/oraprod/apps_st/undo03.dbf
restoring datafile 00011 to /d01/oraprod/apps_st/undo04.dbf
restoring datafile 00012 to /d01/oraprod/apps_st/archive1.dbf
restoring datafile 00013 to /d01/oraprod/apps_st/archive2.dbf
restoring datafile 00014 to /d01/oraprod/apps_st/media1.dbf
restoring datafile 00015 to /d01/oraprod/apps_st/media2.dbf
restoring datafile 00016 to /d01/oraprod/apps_st/media3.dbf
restoring datafile 00017 to /d01/oraprod/apps_st/nologging1.dbf
restoring datafile 00018 to /d01/oraprod/apps_st/queues1.dbf
restoring datafile 00019 to /d01/oraprod/apps_st/queues2.dbf
restoring datafile 00020 to /d01/oraprod/apps_st/reference1.dbf
restoring datafile 00021 to /d01/oraprod/apps_st/reference2.dbf
restoring datafile 00022 to /d01/oraprod/apps_st/summary1.dbf
restoring datafile 00023 to /d01/oraprod/apps_st/summary2.dbf
restoring datafile 00024 to /d01/oraprod/apps_st/summary3.dbf
restoring datafile 00025 to /d01/oraprod/apps_st/summary4.dbf
restoring datafile 00026 to /d01/oraprod/apps_st/summary5.dbf
restoring datafile 00027 to /d01/oraprod/apps_st/tx_data1.dbf
restoring datafile 00028 to /d01/oraprod/apps_st/tx_data2.dbf
restoring datafile 00029 to /d01/oraprod/apps_st/tx_data3.dbf
restoring datafile 00030 to /d01/oraprod/apps_st/tx_data4.dbf
restoring datafile 00031 to /d01/oraprod/apps_st/tx_data5.dbf
restoring datafile 00032 to /d01/oraprod/apps_st/tx_data6.dbf
restoring datafile 00033 to /d01/oraprod/apps_st/tx_data7.dbf
restoring datafile 00034 to /d01/oraprod/apps_st/tx_data8.dbf
restoring datafile 00035 to /d01/oraprod/apps_st/tx_data9.dbf
restoring datafile 00036 to /d01/oraprod/apps_st/tx_data10.dbf
restoring datafile 00037 to /d01/oraprod/apps_st/tx_data11.dbf
restoring datafile 00038 to /d01/oraprod/apps_st/tx_idx1.dbf
restoring datafile 00039 to /d01/oraprod/apps_st/tx_idx2.dbf
restoring datafile 00040 to /d01/oraprod/apps_st/tx_idx3.dbf
restoring datafile 00041 to /d01/oraprod/apps_st/tx_idx4.dbf
restoring datafile 00042 to /d01/oraprod/apps_st/tx_idx5.dbf
restoring datafile 00043 to /d01/oraprod/apps_st/tx_idx6.dbf
restoring datafile 00044 to /d01/oraprod/apps_st/tx_idx7.dbf
restoring datafile 00045 to /d01/oraprod/apps_st/tx_idx8.dbf
restoring datafile 00046 to /d01/oraprod/apps_st/tx_idx9.dbf
restoring datafile 00047 to /d01/oraprod/apps_st/tx_idx10.dbf
restoring datafile 00048 to /d01/oraprod/apps_st/tx_idx11.dbf
restoring datafile 00049 to /d01/oraprod/apps_st/apps_ts_tx_interface.dbf
restoring datafile 00050 to /d01/oraprod/apps_st/ctx1.dbf
restoring datafile 00051 to /d01/oraprod/apps_st/rman1.dbf
restoring datafile 00053 to /d01/oraprod/apps_st/odm.dbf
restoring datafile 00055 to /d01/oraprod/apps_st/olap.dbf
restoring datafile 00056 to /d01/oraprod/apps_st/owa1.dbf
restoring datafile 00057 to /d01/oraprod/apps_st/portal.dbf
restoring datafile 00058 to /d01/oraprod/apps_st/mobile01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/backup/db_02ot5god_1_1 tag=TAG20140103T172117 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 03-JAN-14
datafile 7 switched to datafile copy
input datafilecopy recid=57 stamp=835905881 filename=/d01/oraprod/apps_st/sys7.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=58 stamp=835905881 filename=/d01/oraprod/apps_st/sys6.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=59 stamp=835905881 filename=/d01/oraprod/apps_st/sys5.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=60 stamp=835905881 filename=/d01/oraprod/apps_st/sys4.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=61 stamp=835905881 filename=/d01/oraprod/apps_st/sys3.dbf
datafile 2 switched to datafile copy
input datafilecopy recid=62 stamp=835905881 filename=/d01/oraprod/apps_st/sys2.dbf
datafile 1 switched to datafile copy
input datafilecopy recid=63 stamp=835905881 filename=/d01/oraprod/apps_st/sys1.dbf
datafile 8 switched to datafile copy
input datafilecopy recid=64 stamp=835905881 filename=/d01/oraprod/apps_st/undo01.dbf
datafile 9 switched to datafile copy
input datafilecopy recid=65 stamp=835905881 filename=/d01/oraprod/apps_st/undo02.dbf
datafile 10 switched to datafile copy
input datafilecopy recid=66 stamp=835905881 filename=/d01/oraprod/apps_st/undo03.dbf
datafile 11 switched to datafile copy
input datafilecopy recid=67 stamp=835905881 filename=/d01/oraprod/apps_st/undo04.dbf
datafile 12 switched to datafile copy
input datafilecopy recid=68 stamp=835905881 filename=/d01/oraprod/apps_st/archive1.dbf
datafile 13 switched to datafile copy
input datafilecopy recid=69 stamp=835905881 filename=/d01/oraprod/apps_st/archive2.dbf
datafile 14 switched to datafile copy
input datafilecopy recid=70 stamp=835905881 filename=/d01/oraprod/apps_st/media1.dbf
datafile 15 switched to datafile copy
input datafilecopy recid=71 stamp=835905881 filename=/d01/oraprod/apps_st/media2.dbf
datafile 16 switched to datafile copy
input datafilecopy recid=72 stamp=835905881 filename=/d01/oraprod/apps_st/media3.dbf
datafile 17 switched to datafile copy
input datafilecopy recid=73 stamp=835905881 filename=/d01/oraprod/apps_st/nologging1.dbf
datafile 18 switched to datafile copy
input datafilecopy recid=74 stamp=835905881 filename=/d01/oraprod/apps_st/queues1.dbf
datafile 19 switched to datafile copy
input datafilecopy recid=75 stamp=835905881 filename=/d01/oraprod/apps_st/queues2.dbf
datafile 20 switched to datafile copy
input datafilecopy recid=76 stamp=835905881 filename=/d01/oraprod/apps_st/reference1.dbf
datafile 21 switched to datafile copy
input datafilecopy recid=77 stamp=835905881 filename=/d01/oraprod/apps_st/reference2.dbf
datafile 22 switched to datafile copy
input datafilecopy recid=78 stamp=835905881 filename=/d01/oraprod/apps_st/summary1.dbf
datafile 23 switched to datafile copy
input datafilecopy recid=79 stamp=835905881 filename=/d01/oraprod/apps_st/summary2.dbf
datafile 24 switched to datafile copy
input datafilecopy recid=80 stamp=835905881 filename=/d01/oraprod/apps_st/summary3.dbf
datafile 25 switched to datafile copy
input datafilecopy recid=81 stamp=835905881 filename=/d01/oraprod/apps_st/summary4.dbf
datafile 26 switched to datafile copy
input datafilecopy recid=82 stamp=835905881 filename=/d01/oraprod/apps_st/summary5.dbf
datafile 27 switched to datafile copy
input datafilecopy recid=83 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data1.dbf
datafile 28 switched to datafile copy
input datafilecopy recid=84 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data2.dbf
datafile 29 switched to datafile copy
input datafilecopy recid=85 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data3.dbf
datafile 30 switched to datafile copy
input datafilecopy recid=86 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data4.dbf
datafile 31 switched to datafile copy
input datafilecopy recid=87 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data5.dbf
datafile 32 switched to datafile copy
input datafilecopy recid=88 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data6.dbf
datafile 33 switched to datafile copy
input datafilecopy recid=89 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data7.dbf
datafile 34 switched to datafile copy
input datafilecopy recid=90 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data8.dbf
datafile 35 switched to datafile copy
input datafilecopy recid=91 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data9.dbf
datafile 36 switched to datafile copy
input datafilecopy recid=92 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data10.dbf
datafile 37 switched to datafile copy
input datafilecopy recid=93 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data11.dbf
datafile 38 switched to datafile copy
input datafilecopy recid=94 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx1.dbf
datafile 39 switched to datafile copy
input datafilecopy recid=95 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx2.dbf
datafile 40 switched to datafile copy
input datafilecopy recid=96 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx3.dbf
datafile 41 switched to datafile copy
input datafilecopy recid=97 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx4.dbf
datafile 42 switched to datafile copy
input datafilecopy recid=98 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx5.dbf
datafile 43 switched to datafile copy
input datafilecopy recid=99 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx6.dbf
datafile 44 switched to datafile copy
input datafilecopy recid=100 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx7.dbf
datafile 45 switched to datafile copy
input datafilecopy recid=101 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx8.dbf
datafile 46 switched to datafile copy
input datafilecopy recid=102 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx9.dbf
datafile 47 switched to datafile copy
input datafilecopy recid=103 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx10.dbf
datafile 48 switched to datafile copy
input datafilecopy recid=104 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx11.dbf
datafile 49 switched to datafile copy
input datafilecopy recid=105 stamp=835905881 filename=/d01/oraprod/apps_st/apps_ts_tx_interface.dbf
datafile 50 switched to datafile copy
input datafilecopy recid=106 stamp=835905881 filename=/d01/oraprod/apps_st/ctx1.dbf
datafile 51 switched to datafile copy
input datafilecopy recid=107 stamp=835905881 filename=/d01/oraprod/apps_st/rman1.dbf
datafile 53 switched to datafile copy
input datafilecopy recid=108 stamp=835905881 filename=/d01/oraprod/apps_st/odm.dbf
datafile 55 switched to datafile copy
input datafilecopy recid=109 stamp=835905881 filename=/d01/oraprod/apps_st/olap.dbf
datafile 56 switched to datafile copy
input datafilecopy recid=110 stamp=835905881 filename=/d01/oraprod/apps_st/owa1.dbf
datafile 57 switched to datafile copy
input datafilecopy recid=111 stamp=835905881 filename=/d01/oraprod/apps_st/portal.dbf
datafile 58 switched to datafile copy
input datafilecopy recid=112 stamp=835905881 filename=/d01/oraprod/apps_st/mobile01.dbf
Starting recover at 03-JAN-14
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=28
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/backup/arch_03ot5ho5_1_1 tag=TAG20140103T173813 params=NULL
channel ORA_DISK_1: restore complete
archive log filename=/d01/oraprod/tech_st/9.2.0/dbs/arch1_28.dbf thread=1 sequence=28
unable to find archive log
archive log thread=1 sequence=29
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/03/2014 20:04:45
RMAN-06054: media recovery requesting unknown log: thread 1 scn 8173900876329
*********
Reason :
*********
The cause of this RMAN-06054 error is because RMAN cannot find the online redo log files. So we can open the database in resetlogs and rename the
online redo log files for the target database.
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 20:14:07
ORA-00344: unable to re-create online log '/test/oracle/uatdata/log3.dbf'
ORA-27040: skgfrcre: create error, unable to create file
Linux Error: 2: No such file or directory
RMAN> exit
Recovery Manager complete.
**********
Solution :
**********
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 20:15:30 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> select status from v$instance;
STATUS
------------
MOUNTED
***********After renamed the logfile the we opened the database with resetlogs successfully.Please check the below for detail.*************
SQL> alter database rename file '/test/oracle/uatdata/log1.dbf' TO '/d01/oraprod/apps_st/log1.dbf';
Database altered.
SQL> alter database rename file '/test/oracle/uatdata/log2.dbf' TO '/d01/oraprod/apps_st/log2.dbf';
Database altered.
SQL> alter database rename file '/test/oracle/uatdata/log3.dbf' TO '/d01/oraprod/apps_st/log3.dbf';
Database altered.
SQL> alter database open resetlogs;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
CLN READ WRITE
16. Changing the DB Name to prod:
===========================
SQL> alter database backup controlfile to trace as '/d01/oraprod/control.txt';
Database altered.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
******
Note : Modify the db_name to prod in pfile.
******
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 20:31:57 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=initprod.ora;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL>
SQL> CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 32
3 MAXLOGMEMBERS 5
4 MAXDATAFILES 512
5 MAXINSTANCES 8
6 MAXLOGHISTORY 3630
7 LOGFILE
8 GROUP 1 '/d01/oraprod/apps_st/log3.dbf' SIZE 50M,
9 GROUP 2 '/d01/oraprod/apps_st/log2.dbf' SIZE 50M,
10 GROUP 3 '/d01/oraprod/apps_st/log1.dbf' SIZE 50M
11 DATAFILE
12 '/d01/oraprod/apps_st/sys1.dbf',
13 '/d01/oraprod/apps_st/sys2.dbf',
14 '/d01/oraprod/apps_st/sys3.dbf',
15 '/d01/oraprod/apps_st/sys4.dbf',
16 '/d01/oraprod/apps_st/sys5.dbf',
17 '/d01/oraprod/apps_st/sys6.dbf',
18 '/d01/oraprod/apps_st/sys7.dbf',
19 '/d01/oraprod/apps_st/undo01.dbf',
20 '/d01/oraprod/apps_st/undo02.dbf',
21 '/d01/oraprod/apps_st/undo03.dbf',
22 '/d01/oraprod/apps_st/undo04.dbf',
23 '/d01/oraprod/apps_st/archive1.dbf',
24 '/d01/oraprod/apps_st/archive2.dbf',
25 '/d01/oraprod/apps_st/media1.dbf',
26 '/d01/oraprod/apps_st/media2.dbf',
27 '/d01/oraprod/apps_st/media3.dbf',
28 '/d01/oraprod/apps_st/nologging1.dbf',
29 '/d01/oraprod/apps_st/queues1.dbf',
30 '/d01/oraprod/apps_st/queues2.dbf',
31 '/d01/oraprod/apps_st/reference1.dbf',
32 '/d01/oraprod/apps_st/reference2.dbf',
33 '/d01/oraprod/apps_st/summary1.dbf',
34 '/d01/oraprod/apps_st/summary2.dbf',
35 '/d01/oraprod/apps_st/summary3.dbf',
36 '/d01/oraprod/apps_st/summary4.dbf',
37 '/d01/oraprod/apps_st/summary5.dbf',
38 '/d01/oraprod/apps_st/tx_data1.dbf',
39 '/d01/oraprod/apps_st/tx_data2.dbf',
40 '/d01/oraprod/apps_st/tx_data3.dbf',
41 '/d01/oraprod/apps_st/tx_data4.dbf',
42 '/d01/oraprod/apps_st/tx_data5.dbf',
43 '/d01/oraprod/apps_st/tx_data6.dbf',
44 '/d01/oraprod/apps_st/tx_data7.dbf',
45 '/d01/oraprod/apps_st/tx_data8.dbf',
46 '/d01/oraprod/apps_st/tx_data9.dbf',
47 '/d01/oraprod/apps_st/tx_data10.dbf',
48 '/d01/oraprod/apps_st/tx_data11.dbf',
49 '/d01/oraprod/apps_st/tx_idx1.dbf',
50 '/d01/oraprod/apps_st/tx_idx2.dbf',
51 '/d01/oraprod/apps_st/tx_idx3.dbf',
52 '/d01/oraprod/apps_st/tx_idx4.dbf',
53 '/d01/oraprod/apps_st/tx_idx5.dbf',
54 '/d01/oraprod/apps_st/tx_idx6.dbf',
55 '/d01/oraprod/apps_st/tx_idx7.dbf',
56 '/d01/oraprod/apps_st/tx_idx8.dbf',
57 '/d01/oraprod/apps_st/tx_idx9.dbf',
58 '/d01/oraprod/apps_st/tx_idx10.dbf',
59 '/d01/oraprod/apps_st/tx_idx11.dbf',
60 '/d01/oraprod/apps_st/apps_ts_tx_interface.dbf',
61 '/d01/oraprod/apps_st/ctx1.dbf',
62 '/d01/oraprod/apps_st/rman1.dbf',
63 '/d01/oraprod/apps_st/odm.dbf',
64 '/d01/oraprod/apps_st/olap.dbf',
65 '/d01/oraprod/apps_st/owa1.dbf',
66 '/d01/oraprod/apps_st/portal.dbf',
67 '/d01/oraprod/apps_st/mobile01.dbf'
68 CHARACTER SET UTF8
69 ;
CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/d01/oraprod/apps_st/control01.dbf'
ORA-27038: skgfrcre: file exists
***********
Solution :
***********
Remove the old control file from location and run the control file re creation script again.
[oraprod@db dbs]$ cd /d01/oraprod/apps_st/
[oraprod@db apps_st]$ ls -ltr cont*
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control03.dbf
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control02.dbf
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control01.dbf
[oraprod@db apps_st]$ rm -fr cont*
[oraprod@db apps_st]$ ls -ltr cont*
ls: cont*: No such file or directory
**********
ERROR 2:
**********
CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01990: error opening password file '/d01/oraprod/tech_st/9.2.0/dbs/orapw'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
************
Solution 2 :
************
We need to change the remote_login_passwordfile parameter value to NONE.
SQL> show parameter remote_login
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string NONE
After Changed this parameter value in pfile the control file got created successfully.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
PROD MOUNTED
SQL> alter database open resetlogs;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
PROD READ WRITE
Database Name has been Changed Successfully.
17. Post Clone Steps :
======================
1. Create temporary Tablespace for the Target :
SQL> alter tablespace TEMP add tempfile '/d01/oraprod/apps_st/temp1.dbf' size 1024M;
Tablespace altered.
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/d01/oraprod/apps_st/temp1.dbf
2. Check the Default Temporary Tablespace :
SQL> select property_value from database_properties where property_name = 'DEFAULT_TEMP_TABLESPACE';
PROPERTY_VALUE
--------------------------------------------------------------------------------
TEMP
3. Run the Concurrent Clean Script :
SQL> conn apps/apps
Connected.
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL>
DBTIER Cloning has been Completed Successfully.
Regards,
Vijay.
=============
OS Version : OEL 5 Update 4
DB Version : 9.2.0.5
1. Adpreclone Step in Source DB:
==========================
[oracln@test cln_test]$ pwd
/test/oracle/uatdb/9.2.0/appsutil/scripts/cln_test
[oracln@test cln_test]$ perl adpreclone.pl dbTier
Running Rapid Clone with command...
perl /test/oracle/uatdb/9.2.0/appsutil/bin/adclone.pl java=/test/oracle/uatdb/9.2.0/appsoui/jre/1.3.1 mode=stage stage=/test/oracle/uatdb/9.2.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/test/oracle/uatdb/9.2.0/appsutil/cln_test.xml showProgress
Beginning database tier Stage - Fri Jan 3 16:42:04 2014
APPS Password : apps
Log file located at /test/oracle/uatdb/9.2.0/appsutil/log/cln_test/StageDBTier_01030442.log
| 50% completed Logfile: /test/oracle/uatdb/9.2.0/appsutil/log/cln_test/StageDBTier_01030442.log
Completed Stage...
Fri Jan 3 16:44:14 2014
[oracln@test cln_test]$
2. Run the Backup Script in Source Database:
==================================
[oracln@test script]$ cat fullbkp.sh
rman target / catalog=rman/rman@cln cmdfile=/u01/rman/script/fullbkp.rcv log=/u01/rman/script/fullbkp.log trace=/u01/rman/script/fullbkp.trc
[oracln@test script]$ cat fullbkp.rcv
run
{
crosscheck backup;
crosscheck archivelog all;
backup full database format '/u01/rman/backup/db_%U'
plus archivelog format '/u01/rman/backup/arch_%U';
backup current controlfile format '/u01/rman/backup/ctrl_%U';
crosscheck backup;
crosscheck archivelog all;
}
[oracln@test script]$
[oracln@test script]$ sh fullbkp.sh
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
Recovery Manager complete.
3. Check Pre-requirement for 9i Support in Target :
======================================
[root@db ~]# groupadd dba
[root@db ~]# useradd -g dba oraprod
[root@db rpms]# ls -ltr
total 7884
-rwxr-xr-x 1 root root 1014759 Jan 3 17:06 openmotif21-2.1.30-11.RHEL4.6.i386.rpm
-rwxr-xr-x 1 root root 3692 Jan 3 17:06 compat-oracle-rhel4-1.0-5.i386.rpm
-rw-r--r-- 1 root root 3172139 Jan 3 17:26 compat-gcc-32-3.2.3-47.3.i386.rpm
-rw-r--r-- 1 root root 3863540 Jan 3 17:26 compat-gcc-32-c++-3.2.3-47.3.i386.rpm
[root@db rpms]# rpm -ivh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
warning: openmotif21-2.1.30-11.RHEL4.6.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:openmotif21 ########################################### [100%]
[root@db rpms]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm
error: Failed dependencies:
compat-gcc-32 is needed by compat-oracle-rhel4-1.0-5.i386
compat-gcc-32-c++ is needed by compat-oracle-rhel4-1.0-5.i386
[root@db rpms]# rpm -ivh compat-gcc-32-3.2.3-47.3.i386.rpm
warning: compat-gcc-32-3.2.3-47.3.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:compat-gcc-32 ########################################### [100%]
[root@db rpms]# rpm -ivh compat-gcc-32-c++-3.2.3-47.3.i386.rpm
warning: compat-gcc-32-c++-3.2.3-47.3.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:compat-gcc-32-c++ ########################################### [100%]
[root@db rpms]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm
Preparing... ########################################### [100%]
1:compat-oracle-rhel4 ########################################### [100%]
[root@db rpms]#
4. Create the Directories for Target DBTier :
==================================
[root@db ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 30G 5.0G 23G 18% /
/dev/sda5 61G 188M 57G 1% /u01
/dev/sda2 194G 188M 184G 1% /d01
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@db ~]# cd /d01/
[root@db d01]# ls -ltr
total 16
drwx------ 2 root root 16384 Jan 3 15:19 lost+found
[root@db d01]# mkdir oraprod
[root@db d01]# cd oraprod/
[root@db oraprod]# mkdir tech_st apps_st
[root@db oraprod]# ls -ltr
total 8
drwxr-xr-x 2 root root 4096 Jan 3 17:40 tech_st
drwxr-xr-x 2 root root 4096 Jan 3 17:40 apps_st
[root@db oraprod]# cd ../../
[root@db /]# cd d01/
[root@db d01]# chown -R oraprod:dba oraprod/
[root@db d01]# chmod -R 777 oraprod/
[root@db d01]#
5. Tar and untar the DB Home and RMAN Backup from Source to Target :
========================================================
[oracln@test uatdb]$ tar cvf - 9.2.0 |ssh -l root 192.168.1.61 "cd /d01/oraprod/tech_st; tar xvf -"
9.2.0/
9.2.0/oracore/
9.2.0/oracore/zoneinfo/
9.2.0/oracore/zoneinfo/timezlrg.dat
root@192.168.1.61's password:
6. Adcfgclone.pl in Targer DBTier :
==========================
[oraprod@db ~]$ id
uid=54322(oraprod) gid=54322(dba) groups=54322(dba)
[oraprod@db ~]$ hostname
db.sapcle.com
[oraprod@db ~]$ cd /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/
[oraprod@db bin]$ ls -ltr
total 156
-rwxrwxrwx 1 500 dba 80663 Oct 28 15:54 adclone.pl
-rwxrwxrwx 1 500 dba 29224 Oct 28 15:54 adclonectx.pl
-rwxrwxrwx 1 500 dba 1226 Oct 28 15:54 adchkutl.sh
-rwxrwxrwx 1 500 dba 33888 Oct 28 15:54 adcfgclone.pl
*********
Error 1 :
*********
[oraprod@db bin]$ perl adcfgclone.pl dbTechStack
Enter the APPS password [APPS]:
apps
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:
ERROR: context creation not completed successfully.
Please check /tmp/adcfgclone.err file for errors
[oraprod@db bin]$ vi /tmp/adcfgclone.err
[oraprod@db bin]$ cat /tmp/adcfgclone.err
/d01/oraprod/tech_st/9.2.0/appsutil/clone/jre/1.3.1/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
***********
Solution :
***********
[oraprod@db lib]$ su - root
Password:
[root@db ~]# cd /usr/lib
[root@db lib]# ls -ltr libstdc++-libc6.2-2.so.3
lrwxrwxrwx 1 root root 31 Jan 3 16:14 libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so
[root@db lib]# ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2
[root@db lib]#
*********
Error 2 :
*********
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [1]:
Target system DATA_TOP 1 [/test/oracle/uatdata]:/d01/oraprod/apps_st
RC-50004: Error occurred in CloneContext:
/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../data/stage/addbhomtgt.xml (Permission denied)
Check logfile CloneContext_01030621.log for details.
ERROR: context creation not completed successfully.
Please check /tmp/adcfgclone.err file for errors
***********
Solution :
***********
Cause : The 9.2.0 home directory don't have owner and full permission. So the reason we got the above error.
[root@db tech_st]# chown -R oraprod:dba 9.2.0
[root@db tech_st]# chmod -R 777 9.2.0
[root@db tech_st]#
*********
Error 3 :
*********
Enter the port pool number [0-99]:
4
Checking the port pool 4
done: Port Pool 4 is free
Database port is 1525
Creating the new Database Context file from :
/d01/oraprod/tech_st/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/CloneContext_01030627.log
Running Rapid Clone with command:
perl /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl java=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../jre/1.3.1 mode=apply stage=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/.. component=dbTechStack method=CUSTOM dbctxtg=/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml showProgress contextValidated=true
Rapid Clone will use the oraInst.loc file.
The file oraInst.loc needs to exist at:
/etc/oraInst.loc
The 806 installer uses the oratab file.
The file oratab needs to exist at:
/etc/oratab
Please run the script /tmp/orainstRoot.sh as root
Restart adclone.pl after performing required corrections.
ERROR: Failed to execute /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl
Please check logfile.
***********
Solution :
***********
1. [oraprod@db /]$ cd /tmp/
[oraprod@db tmp]$ ls -ltr
total 36
drwx--x--x 17 root root 4096 Jan 3 16:28 cim_schema.21848
drwx------ 2 root root 4096 Jan 3 16:44 ssh-QeBtbI3764
drwx------ 2 root root 4096 Jan 3 16:44 keyring-lbuFZ0
drwx------ 3 root root 4096 Jan 3 16:44 gconfd-root
drwx------ 2 root root 4096 Jan 3 16:44 virtual-root.MKMEmz
srwxr-xr-x 1 root root 0 Jan 3 16:44 mapping-root
drwx------ 2 root root 4096 Jan 3 16:44 orbit-root
-rwxrwxrwx 1 oraprod dba 253 Jan 3 18:30 orainstRoot.sh
[oraprod@db tmp]$ sh orainstRoot.sh
touch: cannot touch `/etc/oraInst.loc': Permission denied
orainstRoot.sh: line 4: /etc/oraInst.loc: Permission denied
touch: cannot touch `/etc/oratab': Permission denied
chmod: cannot access `/etc/oratab': No such file or directory
[oraprod@db tmp]$
2. [root@db /]# chmod -R 777 etc/
[root@db /]# su - oraprod
[oraprod@db ~]$ cd /tmp/
[oraprod@db tmp]$ sh orainstRoot.sh
[oraprod@db tmp]$
7. Successful Adcfgclone.pl in Target DBTier :
===================================
[oraprod@db bin]$ perl adcfgclone.pl dbTechStack
Enter the APPS password [APPS]:
apps
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:
Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target System database name [cln]:prod
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target system domain name [sapcle.com]:
Target system RDBMS ORACLE_HOME directory [/test/oracle/uatdb/9.2.0]:/d01/oraprod/tech_st/9.2.0
Target system utl_file accessible directories list [/usr/tmp]:
Number of DATA_TOP's on the target system [1]:
Target system DATA_TOP 1 [/test/oracle/uatdata]:/d01/oraprod/apps_st
Do you want to preserve the Display set to test:0.0 (y/n) [y] ?:n
Target system Display [db:0.0]:db:1.0
Target system JAVA_TOP location [null]:/d01/oraprod
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n
Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.
Enter the port pool number [0-99]:
4
Checking the port pool 4
done: Port Pool 4 is free
Database port is 1525
Backing up /d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml to /d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml.bak
Creating the new Database Context file from :
/d01/oraprod/tech_st/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/CloneContext_01030635.log
Running Rapid Clone with command:
perl /d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/adclone.pl java=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/../jre/1.3.1 mode=apply stage=/d01/oraprod/tech_st/9.2.0/appsutil/clone/bin/.. component=dbTechStack method=CUSTOM dbctxtg=/d01/oraprod/tech_st/9.2.0/appsutil/prod_db.xml showProgress contextValidated=true
Beginning rdbms home Apply - Fri Jan 3 18:35:54 2014
Log file located at /d01/oraprod/tech_st/9.2.0/appsutil/log/prod_db/ApplyDBTechStack_01030635.log
Completed Apply...
Fri Jan 3 18:36:43 2014
Beginning APPSDB_prod registration to central inventory...
ORACLE_HOME NAME : APPSDB_prod
ORACLE_HOME PATH : /d01/oraprod/tech_st/9.2.0
INVENTORY LOCATION : /etc/oraInst.loc
Log file located at /home/oraprod/oraInventory/logs/OracleHomeCloner_01030636.log
ORACLE_HOME /d01/oraprod/tech_st/9.2.0 was registered successfully.
Starting database listener for prod:
Running:
/d01/oraprod/tech_st/9.2.0/appsutil/scripts/prod_db/addlnctl.sh start prod
You are running addlnctl.sh version 115.6
Logfile: /d01/oraprod/tech_st/9.2.0/appsutil/log/prod_db/addlnctl.txt
Starting listener process prod ...
addlnctl.sh: exiting with status 0
[oraprod@db bin]$
8. Try to Connect sqlplus using ENV file in Target DB :
=========================================
[oraprod@db 9.2.0]$ pwd
/d01/oraprod/tech_st/9.2.0
[oraprod@db 9.2.0]$ ls -ltr *.env
-rw-r--r-- 1 oraprod dba 3731 Jan 3 18:36 prod_db.env
[oraprod@db 9.2.0]$ . ./prod_db.env
[oraprod@db 9.2.0]$ echo $ORACLE_SID
prod
[oraprod@db 9.2.0]$ echo $ORACLE_HOME
/d01/oraprod/tech_st/9.2.0
[oraprod@db 9.2.0]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 18:52:14 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL>
9. Password File Creation :
====================
[oraprod@db 9.2.0]$ . ./prod_db.env
[oraprod@db 9.2.0]$ echo $ORACLE_SID
prod
[oraprod@db 9.2.0]$ cd /d01/oraprod/tech_st/9.2.0/dbs/
[oraprod@db dbs]$ orapwd file=orapwPROD password=sys
[oraprod@db dbs]$
10. Modify the Pfile with Target Details :
===============================
*._b_tree_bitmap_plans=FALSE
*._fast_full_scan_enabled=FALSE
*._index_join_enabled=FALSE
*._like_with_bind_as_equality=TRUE
*._shared_pool_reserved_min_alloc=4100
*._sort_elimination_cost_ratio=5
*._sqlexec_progression_cost=2147483647
*._system_trig_enabled=true
*._trace_files_public=TRUE
*.aq_tm_processes=1
*.background_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/bdump'
*.compatible='9.2.0'
*.control_files='/d01/oraprod/apps_st/control01.dbf', '/d01/oraprod/apps_st/control02.dbf', '/d01/oraprod/apps_st/control03.dbf'
*.core_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/cdump'
*.cursor_sharing='EXACT'# Required 11i settting
*.db_block_checking=FALSE
*.db_block_checksum=TRUE
*.db_block_size=8192
*.db_cache_size=163577856
*.db_file_multiblock_read_count=8
*.db_file_name_convert='/a01/oracle/uatdata/','/d01/oraprod/apps_st/'
*.db_files=512# Max. no. of database files
*.db_name='prod'
*.dml_locks=10000
*.enqueue_resources=32000# Max. no of concurrent database locks.
*.java_pool_size=52428800
*.job_queue_processes=2
#*.log_archive_dest='/a01/oracle/uatdb/9.2.0/dbs/archive'
*.log_archive_start=true
*.log_buffer=10485760
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200# Checkpoint at least every 20 mins.
*.log_checkpoints_to_alert=TRUE
*.log_file_name_convert='/a01/oracle/uatdata/','/d01/oraprod/apps_st/'
*.max_dump_file_size='20480'# trace file size
*.max_enabled_roles=100# Some modules depend on
*.nls_comp='binary'# Required 11i setting
*.nls_date_format='DD-MON-RR'
*.nls_language='american'
*.nls_length_semantics='BYTE'# Required 11i setting
*.nls_numeric_characters='.,'
*.nls_sort='binary'# Required 11i setting
*.nls_territory='america'
*.O7_DICTIONARY_ACCESSIBILITY=FALSE
*.olap_page_pool_size=4194304
*.open_cursors=600# Consumes process memory, unless using MTS.
*.optimizer_features_enable='9.2.0'
*.optimizer_max_permutations=2000# Required for 11i setting
*.parallel_max_servers=8
*.parallel_min_servers=0
*.pga_aggregate_target=1G
*.processes=200# Max. no. of users x 2
*.query_rewrite_enabled='true'
*.row_locking='always'
*.session_cached_cursors=200
*.sessions=400# 2 X processes
*.shared_pool_reserved_size=30000000
*.shared_pool_size=300000000
*.sql_trace=FALSE
*.timed_statistics=true
*.undo_management='AUTO'
*.undo_retention=1800
*.undo_suppress_errors=FALSE
*.undo_tablespace='APPS_UNDOTS1'
*.user_dump_dest='/d01/oraprod/tech_st/9.2.0/admin/prod_db/udump'
*.utl_file_dir='/usr/tmp','/d01/oraprod/tech_st/9.2.0/appsutil/outbound/prod_db'
*.workarea_size_policy='AUTO'
*.remote_login_passwordfile=EXCLUSIVE
11. Open the Database in nomount state using Pfile:
=======================================
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:04:23 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=initprod.ora;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL> create spfile from pfile;
File created.
SQL>
12. Keep both tns entry in both Source nad Target :
======================================
Source TNS :
=========
cln = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1522))
(CONNECT_DATA=(SID=cln))
)
Target TNS :
=========
prod = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=db)(PORT=1525))
(CONNECT_DATA=(SID=prod))
)
13 : Check the TNSPing in both node :
=============================
[oraprod@db prod_db]$ tnsping cln
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=test)(PORT=1522)) (CONNECT_DATA=(SID=cln)))
TNS-12545: Connect failed because target host or object does not exist
**********
Solution :
**********
Note : We have to change the host name as IP address in the TNSEntry file in both Source and Target server.
[oraprod@db prod_db]$ tnsping cln
TNS Ping Utility for Linux: Version 9.2.0.5.0 - Production on 03-JAN-2014 19:14:51
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/igold/oracle/product/920/network/admin/IGOLD_plebiz-cc2/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.123)(PORT=1522)) (CONNECT_DATA=(SID=cln)))
OK (0 msec)
[oraprod@db prod_db]$
[oracln@test cln_test]$ tnsping prod
TNS Ping Utility for Linux: Version 9.2.0.5.0 - Production on 03-JAN-2014 19:14:44
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/igold/oracle/product/920/network/admin/IGOLD_plebiz-cc2/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.61)(PORT=1525)) (CONNECT_DATA=(SID=prod)))
OK (40 msec)
[oracln@test cln_test]$
14. Recover the Controlfile in nomount state :
==================================
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:28:19 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL> exit
[oraprod@db backup]$ rman target /
Recovery Manager: Release 9.2.0.5.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: prod (not mounted)
RMAN> restore controlfile from '/u01/rman/backup/ctrl_05ot5ho9_1_1';
Starting restore at 03-JAN-14
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=8 devtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=/d01/oraprod/apps_st/control01.dbf
output filename=/d01/oraprod/apps_st/control02.dbf
output filename=/d01/oraprod/apps_st/control03.dbf
Finished restore at 03-JAN-14
RMAN> alter database mount;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 19:39:50
ORA-01103: database name 'CLN' in controlfile is not 'PROD'
RMAN> exit
***********
Solution :
***********
Chnage the db_name in pfile file as source db_name.
RMAN> alter database mount;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 19:43:20
ORA-01990: error opening password file '/d01/oraprod/tech_st/9.2.0/dbs/orapw'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
[oraprod@db dbs]$ !sq
sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 19:46:39 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> select status from v$instance;
STATUS
------------
MOUNTED
Note : Database opened in mount mode so we can ignore the above RMAN-03002,ORA-01990,ORA-27037 errors.
15. Restore and Recover the Database using Backup:
========================================
run
{
set newname for datafile 7 to '/d01/oraprod/apps_st/sys7.dbf';
set newname for datafile 6 to '/d01/oraprod/apps_st/sys6.dbf';
set newname for datafile 5 to '/d01/oraprod/apps_st/sys5.dbf';
set newname for datafile 4 to '/d01/oraprod/apps_st/sys4.dbf';
set newname for datafile 3 to '/d01/oraprod/apps_st/sys3.dbf';
set newname for datafile 2 to '/d01/oraprod/apps_st/sys2.dbf';
set newname for datafile 1 to '/d01/oraprod/apps_st/sys1.dbf';
set newname for datafile 8 to '/d01/oraprod/apps_st/undo01.dbf';
set newname for datafile 9 to '/d01/oraprod/apps_st/undo02.dbf';
set newname for datafile 10 to '/d01/oraprod/apps_st/undo03.dbf';
set newname for datafile 11 to '/d01/oraprod/apps_st/undo04.dbf';
set newname for datafile 12 to '/d01/oraprod/apps_st/archive1.dbf';
set newname for datafile 13 to '/d01/oraprod/apps_st/archive2.dbf';
set newname for datafile 14 to '/d01/oraprod/apps_st/media1.dbf';
set newname for datafile 15 to '/d01/oraprod/apps_st/media2.dbf';
set newname for datafile 16 to '/d01/oraprod/apps_st/media3.dbf';
set newname for datafile 17 to '/d01/oraprod/apps_st/nologging1.dbf';
set newname for datafile 18 to '/d01/oraprod/apps_st/queues1.dbf';
set newname for datafile 19 to '/d01/oraprod/apps_st/queues2.dbf';
set newname for datafile 20 to '/d01/oraprod/apps_st/reference1.dbf';
set newname for datafile 21 to '/d01/oraprod/apps_st/reference2.dbf';
set newname for datafile 22 to '/d01/oraprod/apps_st/summary1.dbf';
set newname for datafile 23 to '/d01/oraprod/apps_st/summary2.dbf';
set newname for datafile 24 to '/d01/oraprod/apps_st/summary3.dbf';
set newname for datafile 25 to '/d01/oraprod/apps_st/summary4.dbf';
set newname for datafile 26 to '/d01/oraprod/apps_st/summary5.dbf';
set newname for datafile 27 to '/d01/oraprod/apps_st/tx_data1.dbf';
set newname for datafile 28 to '/d01/oraprod/apps_st/tx_data2.dbf';
set newname for datafile 29 to '/d01/oraprod/apps_st/tx_data3.dbf';
set newname for datafile 30 to '/d01/oraprod/apps_st/tx_data4.dbf';
set newname for datafile 31 to '/d01/oraprod/apps_st/tx_data5.dbf';
set newname for datafile 32 to '/d01/oraprod/apps_st/tx_data6.dbf';
set newname for datafile 33 to '/d01/oraprod/apps_st/tx_data7.dbf';
set newname for datafile 34 to '/d01/oraprod/apps_st/tx_data8.dbf';
set newname for datafile 35 to '/d01/oraprod/apps_st/tx_data9.dbf';
set newname for datafile 36 to '/d01/oraprod/apps_st/tx_data10.dbf';
set newname for datafile 37 to '/d01/oraprod/apps_st/tx_data11.dbf';
set newname for datafile 38 to '/d01/oraprod/apps_st/tx_idx1.dbf';
set newname for datafile 39 to '/d01/oraprod/apps_st/tx_idx2.dbf';
set newname for datafile 40 to '/d01/oraprod/apps_st/tx_idx3.dbf';
set newname for datafile 41 to '/d01/oraprod/apps_st/tx_idx4.dbf';
set newname for datafile 42 to '/d01/oraprod/apps_st/tx_idx5.dbf';
set newname for datafile 43 to '/d01/oraprod/apps_st/tx_idx6.dbf';
set newname for datafile 44 to '/d01/oraprod/apps_st/tx_idx7.dbf';
set newname for datafile 45 to '/d01/oraprod/apps_st/tx_idx8.dbf';
set newname for datafile 46 to '/d01/oraprod/apps_st/tx_idx9.dbf';
set newname for datafile 47 to '/d01/oraprod/apps_st/tx_idx10.dbf';
set newname for datafile 48 to '/d01/oraprod/apps_st/tx_idx11.dbf';
set newname for datafile 49 to '/d01/oraprod/apps_st/apps_ts_tx_interface.dbf';
set newname for datafile 50 to '/d01/oraprod/apps_st/ctx1.dbf';
set newname for datafile 51 to '/d01/oraprod/apps_st/rman1.dbf';
set newname for datafile 53 to '/d01/oraprod/apps_st/odm.dbf';
set newname for datafile 55 to '/d01/oraprod/apps_st/olap.dbf';
set newname for datafile 56 to '/d01/oraprod/apps_st/owa1.dbf';
set newname for datafile 57 to '/d01/oraprod/apps_st/portal.dbf';
set newname for datafile 58 to '/d01/oraprod/apps_st/mobile01.dbf';
restore database;
switch datafile all;
recover database;
}
executing command: SET NEWNAME
using target database controlfile instead of recovery catalog
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 03-JAN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /d01/oraprod/apps_st/sys1.dbf
restoring datafile 00002 to /d01/oraprod/apps_st/sys2.dbf
restoring datafile 00003 to /d01/oraprod/apps_st/sys3.dbf
restoring datafile 00004 to /d01/oraprod/apps_st/sys4.dbf
restoring datafile 00005 to /d01/oraprod/apps_st/sys5.dbf
restoring datafile 00006 to /d01/oraprod/apps_st/sys6.dbf
restoring datafile 00007 to /d01/oraprod/apps_st/sys7.dbf
restoring datafile 00008 to /d01/oraprod/apps_st/undo01.dbf
restoring datafile 00009 to /d01/oraprod/apps_st/undo02.dbf
restoring datafile 00010 to /d01/oraprod/apps_st/undo03.dbf
restoring datafile 00011 to /d01/oraprod/apps_st/undo04.dbf
restoring datafile 00012 to /d01/oraprod/apps_st/archive1.dbf
restoring datafile 00013 to /d01/oraprod/apps_st/archive2.dbf
restoring datafile 00014 to /d01/oraprod/apps_st/media1.dbf
restoring datafile 00015 to /d01/oraprod/apps_st/media2.dbf
restoring datafile 00016 to /d01/oraprod/apps_st/media3.dbf
restoring datafile 00017 to /d01/oraprod/apps_st/nologging1.dbf
restoring datafile 00018 to /d01/oraprod/apps_st/queues1.dbf
restoring datafile 00019 to /d01/oraprod/apps_st/queues2.dbf
restoring datafile 00020 to /d01/oraprod/apps_st/reference1.dbf
restoring datafile 00021 to /d01/oraprod/apps_st/reference2.dbf
restoring datafile 00022 to /d01/oraprod/apps_st/summary1.dbf
restoring datafile 00023 to /d01/oraprod/apps_st/summary2.dbf
restoring datafile 00024 to /d01/oraprod/apps_st/summary3.dbf
restoring datafile 00025 to /d01/oraprod/apps_st/summary4.dbf
restoring datafile 00026 to /d01/oraprod/apps_st/summary5.dbf
restoring datafile 00027 to /d01/oraprod/apps_st/tx_data1.dbf
restoring datafile 00028 to /d01/oraprod/apps_st/tx_data2.dbf
restoring datafile 00029 to /d01/oraprod/apps_st/tx_data3.dbf
restoring datafile 00030 to /d01/oraprod/apps_st/tx_data4.dbf
restoring datafile 00031 to /d01/oraprod/apps_st/tx_data5.dbf
restoring datafile 00032 to /d01/oraprod/apps_st/tx_data6.dbf
restoring datafile 00033 to /d01/oraprod/apps_st/tx_data7.dbf
restoring datafile 00034 to /d01/oraprod/apps_st/tx_data8.dbf
restoring datafile 00035 to /d01/oraprod/apps_st/tx_data9.dbf
restoring datafile 00036 to /d01/oraprod/apps_st/tx_data10.dbf
restoring datafile 00037 to /d01/oraprod/apps_st/tx_data11.dbf
restoring datafile 00038 to /d01/oraprod/apps_st/tx_idx1.dbf
restoring datafile 00039 to /d01/oraprod/apps_st/tx_idx2.dbf
restoring datafile 00040 to /d01/oraprod/apps_st/tx_idx3.dbf
restoring datafile 00041 to /d01/oraprod/apps_st/tx_idx4.dbf
restoring datafile 00042 to /d01/oraprod/apps_st/tx_idx5.dbf
restoring datafile 00043 to /d01/oraprod/apps_st/tx_idx6.dbf
restoring datafile 00044 to /d01/oraprod/apps_st/tx_idx7.dbf
restoring datafile 00045 to /d01/oraprod/apps_st/tx_idx8.dbf
restoring datafile 00046 to /d01/oraprod/apps_st/tx_idx9.dbf
restoring datafile 00047 to /d01/oraprod/apps_st/tx_idx10.dbf
restoring datafile 00048 to /d01/oraprod/apps_st/tx_idx11.dbf
restoring datafile 00049 to /d01/oraprod/apps_st/apps_ts_tx_interface.dbf
restoring datafile 00050 to /d01/oraprod/apps_st/ctx1.dbf
restoring datafile 00051 to /d01/oraprod/apps_st/rman1.dbf
restoring datafile 00053 to /d01/oraprod/apps_st/odm.dbf
restoring datafile 00055 to /d01/oraprod/apps_st/olap.dbf
restoring datafile 00056 to /d01/oraprod/apps_st/owa1.dbf
restoring datafile 00057 to /d01/oraprod/apps_st/portal.dbf
restoring datafile 00058 to /d01/oraprod/apps_st/mobile01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/backup/db_02ot5god_1_1 tag=TAG20140103T172117 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 03-JAN-14
datafile 7 switched to datafile copy
input datafilecopy recid=57 stamp=835905881 filename=/d01/oraprod/apps_st/sys7.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=58 stamp=835905881 filename=/d01/oraprod/apps_st/sys6.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=59 stamp=835905881 filename=/d01/oraprod/apps_st/sys5.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=60 stamp=835905881 filename=/d01/oraprod/apps_st/sys4.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=61 stamp=835905881 filename=/d01/oraprod/apps_st/sys3.dbf
datafile 2 switched to datafile copy
input datafilecopy recid=62 stamp=835905881 filename=/d01/oraprod/apps_st/sys2.dbf
datafile 1 switched to datafile copy
input datafilecopy recid=63 stamp=835905881 filename=/d01/oraprod/apps_st/sys1.dbf
datafile 8 switched to datafile copy
input datafilecopy recid=64 stamp=835905881 filename=/d01/oraprod/apps_st/undo01.dbf
datafile 9 switched to datafile copy
input datafilecopy recid=65 stamp=835905881 filename=/d01/oraprod/apps_st/undo02.dbf
datafile 10 switched to datafile copy
input datafilecopy recid=66 stamp=835905881 filename=/d01/oraprod/apps_st/undo03.dbf
datafile 11 switched to datafile copy
input datafilecopy recid=67 stamp=835905881 filename=/d01/oraprod/apps_st/undo04.dbf
datafile 12 switched to datafile copy
input datafilecopy recid=68 stamp=835905881 filename=/d01/oraprod/apps_st/archive1.dbf
datafile 13 switched to datafile copy
input datafilecopy recid=69 stamp=835905881 filename=/d01/oraprod/apps_st/archive2.dbf
datafile 14 switched to datafile copy
input datafilecopy recid=70 stamp=835905881 filename=/d01/oraprod/apps_st/media1.dbf
datafile 15 switched to datafile copy
input datafilecopy recid=71 stamp=835905881 filename=/d01/oraprod/apps_st/media2.dbf
datafile 16 switched to datafile copy
input datafilecopy recid=72 stamp=835905881 filename=/d01/oraprod/apps_st/media3.dbf
datafile 17 switched to datafile copy
input datafilecopy recid=73 stamp=835905881 filename=/d01/oraprod/apps_st/nologging1.dbf
datafile 18 switched to datafile copy
input datafilecopy recid=74 stamp=835905881 filename=/d01/oraprod/apps_st/queues1.dbf
datafile 19 switched to datafile copy
input datafilecopy recid=75 stamp=835905881 filename=/d01/oraprod/apps_st/queues2.dbf
datafile 20 switched to datafile copy
input datafilecopy recid=76 stamp=835905881 filename=/d01/oraprod/apps_st/reference1.dbf
datafile 21 switched to datafile copy
input datafilecopy recid=77 stamp=835905881 filename=/d01/oraprod/apps_st/reference2.dbf
datafile 22 switched to datafile copy
input datafilecopy recid=78 stamp=835905881 filename=/d01/oraprod/apps_st/summary1.dbf
datafile 23 switched to datafile copy
input datafilecopy recid=79 stamp=835905881 filename=/d01/oraprod/apps_st/summary2.dbf
datafile 24 switched to datafile copy
input datafilecopy recid=80 stamp=835905881 filename=/d01/oraprod/apps_st/summary3.dbf
datafile 25 switched to datafile copy
input datafilecopy recid=81 stamp=835905881 filename=/d01/oraprod/apps_st/summary4.dbf
datafile 26 switched to datafile copy
input datafilecopy recid=82 stamp=835905881 filename=/d01/oraprod/apps_st/summary5.dbf
datafile 27 switched to datafile copy
input datafilecopy recid=83 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data1.dbf
datafile 28 switched to datafile copy
input datafilecopy recid=84 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data2.dbf
datafile 29 switched to datafile copy
input datafilecopy recid=85 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data3.dbf
datafile 30 switched to datafile copy
input datafilecopy recid=86 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data4.dbf
datafile 31 switched to datafile copy
input datafilecopy recid=87 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data5.dbf
datafile 32 switched to datafile copy
input datafilecopy recid=88 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data6.dbf
datafile 33 switched to datafile copy
input datafilecopy recid=89 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data7.dbf
datafile 34 switched to datafile copy
input datafilecopy recid=90 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data8.dbf
datafile 35 switched to datafile copy
input datafilecopy recid=91 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data9.dbf
datafile 36 switched to datafile copy
input datafilecopy recid=92 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data10.dbf
datafile 37 switched to datafile copy
input datafilecopy recid=93 stamp=835905881 filename=/d01/oraprod/apps_st/tx_data11.dbf
datafile 38 switched to datafile copy
input datafilecopy recid=94 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx1.dbf
datafile 39 switched to datafile copy
input datafilecopy recid=95 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx2.dbf
datafile 40 switched to datafile copy
input datafilecopy recid=96 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx3.dbf
datafile 41 switched to datafile copy
input datafilecopy recid=97 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx4.dbf
datafile 42 switched to datafile copy
input datafilecopy recid=98 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx5.dbf
datafile 43 switched to datafile copy
input datafilecopy recid=99 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx6.dbf
datafile 44 switched to datafile copy
input datafilecopy recid=100 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx7.dbf
datafile 45 switched to datafile copy
input datafilecopy recid=101 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx8.dbf
datafile 46 switched to datafile copy
input datafilecopy recid=102 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx9.dbf
datafile 47 switched to datafile copy
input datafilecopy recid=103 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx10.dbf
datafile 48 switched to datafile copy
input datafilecopy recid=104 stamp=835905881 filename=/d01/oraprod/apps_st/tx_idx11.dbf
datafile 49 switched to datafile copy
input datafilecopy recid=105 stamp=835905881 filename=/d01/oraprod/apps_st/apps_ts_tx_interface.dbf
datafile 50 switched to datafile copy
input datafilecopy recid=106 stamp=835905881 filename=/d01/oraprod/apps_st/ctx1.dbf
datafile 51 switched to datafile copy
input datafilecopy recid=107 stamp=835905881 filename=/d01/oraprod/apps_st/rman1.dbf
datafile 53 switched to datafile copy
input datafilecopy recid=108 stamp=835905881 filename=/d01/oraprod/apps_st/odm.dbf
datafile 55 switched to datafile copy
input datafilecopy recid=109 stamp=835905881 filename=/d01/oraprod/apps_st/olap.dbf
datafile 56 switched to datafile copy
input datafilecopy recid=110 stamp=835905881 filename=/d01/oraprod/apps_st/owa1.dbf
datafile 57 switched to datafile copy
input datafilecopy recid=111 stamp=835905881 filename=/d01/oraprod/apps_st/portal.dbf
datafile 58 switched to datafile copy
input datafilecopy recid=112 stamp=835905881 filename=/d01/oraprod/apps_st/mobile01.dbf
Starting recover at 03-JAN-14
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=28
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/rman/backup/arch_03ot5ho5_1_1 tag=TAG20140103T173813 params=NULL
channel ORA_DISK_1: restore complete
archive log filename=/d01/oraprod/tech_st/9.2.0/dbs/arch1_28.dbf thread=1 sequence=28
unable to find archive log
archive log thread=1 sequence=29
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/03/2014 20:04:45
RMAN-06054: media recovery requesting unknown log: thread 1 scn 8173900876329
*********
Reason :
*********
The cause of this RMAN-06054 error is because RMAN cannot find the online redo log files. So we can open the database in resetlogs and rename the
online redo log files for the target database.
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 01/03/2014 20:14:07
ORA-00344: unable to re-create online log '/test/oracle/uatdata/log3.dbf'
ORA-27040: skgfrcre: create error, unable to create file
Linux Error: 2: No such file or directory
RMAN> exit
Recovery Manager complete.
**********
Solution :
**********
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 20:15:30 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> select status from v$instance;
STATUS
------------
MOUNTED
***********After renamed the logfile the we opened the database with resetlogs successfully.Please check the below for detail.*************
SQL> alter database rename file '/test/oracle/uatdata/log1.dbf' TO '/d01/oraprod/apps_st/log1.dbf';
Database altered.
SQL> alter database rename file '/test/oracle/uatdata/log2.dbf' TO '/d01/oraprod/apps_st/log2.dbf';
Database altered.
SQL> alter database rename file '/test/oracle/uatdata/log3.dbf' TO '/d01/oraprod/apps_st/log3.dbf';
Database altered.
SQL> alter database open resetlogs;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
CLN READ WRITE
16. Changing the DB Name to prod:
===========================
SQL> alter database backup controlfile to trace as '/d01/oraprod/control.txt';
Database altered.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
******
Note : Modify the db_name to prod in pfile.
******
[oraprod@db dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jan 3 20:31:57 2014
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile=initprod.ora;
ORACLE instance started.
Total System Global Area 581506616 bytes
Fixed Size 452152 bytes
Variable Size 402653184 bytes
Database Buffers 167772160 bytes
Redo Buffers 10629120 bytes
SQL>
SQL> CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 32
3 MAXLOGMEMBERS 5
4 MAXDATAFILES 512
5 MAXINSTANCES 8
6 MAXLOGHISTORY 3630
7 LOGFILE
8 GROUP 1 '/d01/oraprod/apps_st/log3.dbf' SIZE 50M,
9 GROUP 2 '/d01/oraprod/apps_st/log2.dbf' SIZE 50M,
10 GROUP 3 '/d01/oraprod/apps_st/log1.dbf' SIZE 50M
11 DATAFILE
12 '/d01/oraprod/apps_st/sys1.dbf',
13 '/d01/oraprod/apps_st/sys2.dbf',
14 '/d01/oraprod/apps_st/sys3.dbf',
15 '/d01/oraprod/apps_st/sys4.dbf',
16 '/d01/oraprod/apps_st/sys5.dbf',
17 '/d01/oraprod/apps_st/sys6.dbf',
18 '/d01/oraprod/apps_st/sys7.dbf',
19 '/d01/oraprod/apps_st/undo01.dbf',
20 '/d01/oraprod/apps_st/undo02.dbf',
21 '/d01/oraprod/apps_st/undo03.dbf',
22 '/d01/oraprod/apps_st/undo04.dbf',
23 '/d01/oraprod/apps_st/archive1.dbf',
24 '/d01/oraprod/apps_st/archive2.dbf',
25 '/d01/oraprod/apps_st/media1.dbf',
26 '/d01/oraprod/apps_st/media2.dbf',
27 '/d01/oraprod/apps_st/media3.dbf',
28 '/d01/oraprod/apps_st/nologging1.dbf',
29 '/d01/oraprod/apps_st/queues1.dbf',
30 '/d01/oraprod/apps_st/queues2.dbf',
31 '/d01/oraprod/apps_st/reference1.dbf',
32 '/d01/oraprod/apps_st/reference2.dbf',
33 '/d01/oraprod/apps_st/summary1.dbf',
34 '/d01/oraprod/apps_st/summary2.dbf',
35 '/d01/oraprod/apps_st/summary3.dbf',
36 '/d01/oraprod/apps_st/summary4.dbf',
37 '/d01/oraprod/apps_st/summary5.dbf',
38 '/d01/oraprod/apps_st/tx_data1.dbf',
39 '/d01/oraprod/apps_st/tx_data2.dbf',
40 '/d01/oraprod/apps_st/tx_data3.dbf',
41 '/d01/oraprod/apps_st/tx_data4.dbf',
42 '/d01/oraprod/apps_st/tx_data5.dbf',
43 '/d01/oraprod/apps_st/tx_data6.dbf',
44 '/d01/oraprod/apps_st/tx_data7.dbf',
45 '/d01/oraprod/apps_st/tx_data8.dbf',
46 '/d01/oraprod/apps_st/tx_data9.dbf',
47 '/d01/oraprod/apps_st/tx_data10.dbf',
48 '/d01/oraprod/apps_st/tx_data11.dbf',
49 '/d01/oraprod/apps_st/tx_idx1.dbf',
50 '/d01/oraprod/apps_st/tx_idx2.dbf',
51 '/d01/oraprod/apps_st/tx_idx3.dbf',
52 '/d01/oraprod/apps_st/tx_idx4.dbf',
53 '/d01/oraprod/apps_st/tx_idx5.dbf',
54 '/d01/oraprod/apps_st/tx_idx6.dbf',
55 '/d01/oraprod/apps_st/tx_idx7.dbf',
56 '/d01/oraprod/apps_st/tx_idx8.dbf',
57 '/d01/oraprod/apps_st/tx_idx9.dbf',
58 '/d01/oraprod/apps_st/tx_idx10.dbf',
59 '/d01/oraprod/apps_st/tx_idx11.dbf',
60 '/d01/oraprod/apps_st/apps_ts_tx_interface.dbf',
61 '/d01/oraprod/apps_st/ctx1.dbf',
62 '/d01/oraprod/apps_st/rman1.dbf',
63 '/d01/oraprod/apps_st/odm.dbf',
64 '/d01/oraprod/apps_st/olap.dbf',
65 '/d01/oraprod/apps_st/owa1.dbf',
66 '/d01/oraprod/apps_st/portal.dbf',
67 '/d01/oraprod/apps_st/mobile01.dbf'
68 CHARACTER SET UTF8
69 ;
CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/d01/oraprod/apps_st/control01.dbf'
ORA-27038: skgfrcre: file exists
***********
Solution :
***********
Remove the old control file from location and run the control file re creation script again.
[oraprod@db dbs]$ cd /d01/oraprod/apps_st/
[oraprod@db apps_st]$ ls -ltr cont*
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control03.dbf
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control02.dbf
-rw-r----- 1 oraprod dba 11083776 Jan 3 20:27 control01.dbf
[oraprod@db apps_st]$ rm -fr cont*
[oraprod@db apps_st]$ ls -ltr cont*
ls: cont*: No such file or directory
**********
ERROR 2:
**********
CREATE CONTROLFILE SET DATABASE "prod" RESETLOGS ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01990: error opening password file '/d01/oraprod/tech_st/9.2.0/dbs/orapw'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
************
Solution 2 :
************
We need to change the remote_login_passwordfile parameter value to NONE.
SQL> show parameter remote_login
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string NONE
After Changed this parameter value in pfile the control file got created successfully.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
PROD MOUNTED
SQL> alter database open resetlogs;
Database altered.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- ----------
PROD READ WRITE
Database Name has been Changed Successfully.
17. Post Clone Steps :
======================
1. Create temporary Tablespace for the Target :
SQL> alter tablespace TEMP add tempfile '/d01/oraprod/apps_st/temp1.dbf' size 1024M;
Tablespace altered.
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/d01/oraprod/apps_st/temp1.dbf
2. Check the Default Temporary Tablespace :
SQL> select property_value from database_properties where property_name = 'DEFAULT_TEMP_TABLESPACE';
PROPERTY_VALUE
--------------------------------------------------------------------------------
TEMP
3. Run the Concurrent Clean Script :
SQL> conn apps/apps
Connected.
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL>
DBTIER Cloning has been Completed Successfully.
Regards,
Vijay.
No comments:
Post a Comment