copy new trace file from PROD to UAT server.
[oracle@sujeet ~]$ cd /Airtel/product/12.1.0/dbhome_1/rdbms/log
[oracle@sujeet log]$ cp Airtel_ora_4547.trc /Idea/product/12.1.0/dbhome_1/rdbms/log
Rename trace file with .sql format.
[oracle@sonu ]$ cd /Idea/product/12.1.0/dbhome_1/rdbms/log
[oracle@sonu log]$ mv Airtel_ora_4547.trc Idea_c1.sql
Edit control file created scripts.
[oracle@sonu log]$ vi Idea_c1.sql
CREATE CONTROLFILE SET DATABASE "IDEA" RESETLOGS
NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP
1'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_1_cmrspqcg_.log' SIZE 50M,
GROUP 2'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_2_cmrsprnj_.log'
SIZE 50M,
GROUP 3'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_3_cmrspswy_.log'
SIZE 50M,
GROUP 4'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_1_cmrspqjb_.log'
SIZE 50M,
GROUP 5'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_2_cmrsprs3_.log'
SIZE 50M,
GROUP 6'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_3_cmrspt1y_.log'
SIZE 50M
DATAFILE
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_system_cmrsn65x_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/tfqa01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_sysaux_cmrslrt4_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_undotbs1_cmrsopm4_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/rcqa01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_users_cmrsomgs_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/icdata01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/icindx01.dbf'
CHARACTER SET WE8ISO8859P1
;
ALTER DATABASE OPEN RESETLOGS;
:wq <SAVE this file as is it>
Steps:-5
Copy Datafile, Logfile & ORACLE_HOME PROD to UAT Server.
Copy Datafile:-
[oracle@sujeet datafile]$cd /Airtel/oradata/airtel/Airtel/datafile
[oracle@sujeet datafile]$ cp * /Idea/oradata/idea/IDEA/datafile
Copy Logfile:-
[oracle@sujeet onlinelog]$ cd
/Airtel/fast_recovery_area/AIRTEL/onlinelog
[oracle@sujeet onlinelog]$ cp * /Idea/fast_recovery_area/IDEA/onlinelog
[oracle@sujeet ~]$ cd
/Airtel/oradata/airtel/AIRTEL/onlinelog
[oracle@sujeet onlinelog]$ cp * /Idea/oradata/idea/IDEA/onlinelog
Copy ORACLE_HOME:-
[oracle@sujeet ~]$ cd $ORACLE_HOME
[oracle@sujeet dbhome_1 ~]$ cp -r * /Idea/product/12.1.0/dbhome_1
Steps:-6
Set .Bash_Profile on UAT Server.
Steps:-7
[oracle@sonu ~]$ . .bash_profile
[oracle@sonu ~]$ sqlplus / as sysdba
SQL> startup nomount
pfile='/Idea/product/12.1.0/dbhome_1/dbs/initIdea.ora';
ORACLE instance started.
Total System Global Area
251658240 bytes
Fixed Size
2923096 bytes
Variable Size 192939432 bytes
Database Buffers
50331648 bytes
Redo Buffers
5464064 bytes
Steps:-8
Run the re-created control file script on IDEA clone database:
SQL> @Idea_c1.sql
Control file created.
Database altered.
Steps:-9
SQL> select INSTANCE_NAME,STATUS from v$INSTANCE;
INSTANCE_NAME
STATUS
---------------- ------------
Idea OPEN
SQL> create spfile from pfile;
File created.
Check New clone UAT server files location.
SQL> select name from v$datafile;
SQL> select member from v$logfile;
SQL> show parameter control_files;
*************************************END******************************************