cancel
Showing results for 
Search instead for 
Did you mean: 

Homogeneous System Copy

Former Member
0 Kudos

Hello Experts,

I want to make a copy of production database to our test system.

For this purpose i am using a one month old Offline backup.

I am creating the script to generate the control files on production using following command

SQL:>Alter database backup control files to trace;

This will generate the script which will consist the data till today ( number of data files may be differ from actual restored and mentioned in script ), however i want the script which generate control files till my offline backup (ie 1 month old).

How can i achieve this.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sumit.

Recently I made an Homogeneus system copy and I used de ORABRCOPY tool to create de control file, in the following link https://websmp210.sap-ag.de/~sapidb/011000358700000416402008E.pdf you can found a guide, i think it´s procedure is a easier.

Regards.

stefan_koehler
Active Contributor
0 Kudos

Hello Sumit,

>For this purpose i am using a one month old Offline backup.

>However i want the script which generate control files till my offline backup (ie 1 month old).

If you restore your offline backup (from 1 month ago), you will also restore the control file from that backup.

So you have the prod control file from 1 month ago in your test environment. You can create a backup controlfile to trace from that one and use it.

So follow this way:

1) Restore the offline backup (1 month ago)

2) Open your restored database with "STARTUP MOUNT"

3) alter database backup control files to trace;

4) Shutdown your database

5) Change the trace file

6) Create a new controlfile from the modified trace file

Regards

Stefan

Former Member
0 Kudos

I guess a solution to this would be :

1. Trace the file from production

2. Using SQL query V$DATAFILE find out the data files which were newer than backup.

3. Remove these files from the script

4. Run the script on target

Sumit

former_member204746
Active Contributor
0 Kudos

here's what I do whenever I backup:

sqlplus / as sysdba

alter database backup controlfile to trace as 'd:\controlfile_PRD.txt' reuse;

exit

then, I run brbackup and I force it to back up this controlfile:

D:\usr\sap\PRD\SYS\exe\run\brbackup.exe -u / -c -m all,controlfile_PRD.txt -t online_cons

there ya go! when you restore completely, you also restore the backup controlfile trace.