Re: DP v7.0 - Restore Oracle DB to different server (Production to Test) (806 Views)
Reply
Advisor
irofrank
Posts: 18
Registered: ‎09-25-2013
Message 1 of 8 (943 Views)

DP v7.0 - Restore Oracle DB to different server (Production to Test)

Yes, I know. This question has been posted several times. And yes, I've searched through the forums and read through the posts, but I still cant seem to figure out how to do this via GUI.

 

I have installed integration agents on both servers. The filesystems on both servers are identical. Oracle home path on both servers is also identical. What I don't seem to understand is how to select the destination of the backup.


Here's the procedure I'm using:

 

1.  Select the Production DB under "Source" Tab

2.  Under "Options" tab, select the Test server from "client" drop-down under general options (is this what I'm supposed to do?)

3.  Under "Devices" tab, select the tape library where the backup is stored

 

When I click restore, it just seems to restore the Test DB backup onto the Test DB server. It's like it ignores the info in the "Source" tab.

 

When I try to do a "preview restore", I get a message stating that I have selected to clients and a parallel restore is not supported, that I should select one.

 

I guess what I'm asking is, how exactly do I select a different source and destination in the GUI. Is it even possible? If not, how exactly does one restore to a different server.

 

Thanks.

HP Expert
Bob_Clark
Posts: 1,487
Registered: ‎08-14-2013
Message 2 of 8 (922 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

Most of this is taken from the Oracle Integration Guide

 

http://support.openview.hp.com/selfsolve/document/KM1363255/binary/DP7.00_Integ_ORASAP.pdf?searchIde...

 

or, by clicking Help -> Guides in the GUI

 

I especially recommend that you read pp 58-66 which discusses the Restore procedure in detail, and pp 67-68 which discusses duplicating an Oracle Database

 

Make sure that you have met these requirements

 

An instance of Oracle must be created on the system to which you want to restore or duplicate

the database.

The database must be in the Mount state if the whole database is being restored, or in the

NoMount state if the control file is being restored or a database duplication is performed.

You must be able to connect to the database.

 

If you are using the Recovery Catalog, I will need to find some further information because the Integration Guide was not specific.  However, after Oracle9, most people use the Control File.  Here is what it does say:

 

3. In the Data Protector GUI, switch to the Restore context.

4. Under Restore Objects, expand Oracle Server, expand the system on which the database, for

which you want to restore the recovery catalog, resides, and then click the database.

5. In the Restore action drop-down list, select Perform RMAN Repository Restore.

In the Results Area, select RECOVERY CATALOG.

 

So, you would create a new instance on the target machine, and restore to that

 

Next. is the Control file

 

Open the 'sqlplus' window and put the database in the nomount state

 

2. In the Data Protector GUI, switch to the Restore context.

3. Under Restore Objects, expand Oracle Server, expand the system on which the database, for

which you want to restore the control file, resides, and then click the database.

4. In the Restore Action drop-down list, select Perform RMAN Repository Restore.

In the Results area, select the control file for restore.

 

Finally, restore the Oracle Database objects

 

Before you restore Oracle database objects, ensure that you have an up-to-date version of the

recovery catalog database and the control file. They contain the database structure information

 

Put the database in the mount state.

In the Data Protector GUI, switch to the Restore context.

4. Under Restore Objects, expand Oracle Server, expand the system on which the database, for

which you restore the database objects, resides, and then click the database

 

I was not able to paste in a screenshot of the Options page that shows this

 

What I have put into this response is by no means complete, it is more of a guideline.  Please fill in the details from the Integration guide

 

Advisor
irofrank
Posts: 18
Registered: ‎09-25-2013
Message 3 of 8 (907 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

Thanks Bob,

 

Will give this a go and let you know.

Advisor
irofrank
Posts: 18
Registered: ‎09-25-2013
Message 4 of 8 (892 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

Hi Bob,

 

Need a little more help with this. I'm beginning to think that I'm missing something obvious here...

 

I've looked through the Oracle/SAP integration guide, but I can't seem to see any section that deals with restoring to a different servers, other than the option to Duplicate the server. Is this what I should be looking at doing?

 

I can select the database who's data I want to restore (Production server in this case), then select "Perform RMAN repository restore" and pick the control file from results area. Question is, how do I select the client to restore to (Test server)? Where do I make this selection in the GUI? If I select Production server in the "Source" tab, and select the Test server in the "Options" tab, it just performs a restore of backups made from the Test server, back onto the same Test server. As I'd mentioned before, it seems to ignore the info in the "Source" tab.

 

In short, how do I select the Production as my source and the Test as my destination? It seems like it should be such a simple thing to do, yet I can't seem to figure out how to do that in the UI.

 

Help!

Advisor
irofrank
Posts: 18
Registered: ‎09-25-2013
Message 5 of 8 (840 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

Sorry for reviving this, but I'm still looking for help with this. Anyone know how I can go about this?

 

 

Thanks.

Valued Contributor
nikhil_d
Posts: 122
Registered: ‎09-21-2012
Message 6 of 8 (825 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

[ Edited ]

I think for your case it would be better if you could log in RMAN on test server, set dbid to the production db and do the restore. I am not in office now but when I login tomorrow will send you a simple procedure to duplicate the DB which I have documented.

Advisor
irofrank
Posts: 18
Registered: ‎09-25-2013
Message 7 of 8 (813 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

Thanks Nikhil,

 

Appreciate it. Looking forward.

Valued Contributor
nikhil_d
Posts: 122
Registered: ‎09-21-2012
Message 8 of 8 (806 Views)

Re: DP v7.0 - Restore Oracle DB to different server (Production to Test)

[ Edited ]

On the old server (production) -

 

With SQL:

- Get current SCN and DBID  

        - select DBID, NAME, CURRENT_SCN, LOG_MODE from v$database;

- Make a log switch  

        - alter system switch logfile;

- Create pfile  

       - create pfile from spfile;

- Note down Controlfile paths

- Bring the DB in mount mode (shutdown immediate; startup mount)

 

With RMAN:

- View and save DB Schema  

       - report schema;

- Check Controlfile Autobackup setting  

       - show controlfile autobackup;  

       - show controlfile autobackup format;

 

With DP:

- Take an Offline backup

       - check if the controlfile is backed up

       - Make sure that archive logs are also included in the backup

- Install DP Oracle Integration on new server

 

---------------

 

On New Server:

- Install DB Software

- Create Oracle data directories (for Control file / Logs / Datafiles / FRA etc.)

- Install Oracle Service (create instance)  

       - oradim -NEW -SID <SID>

- Configure default listener for the newly created instance  

       - netca (or net manager from start menu on Windows)

- Copy passwrod file and pfile from old server to new server ($ORACLE_HOME/dbs or $ORACLE_HOME/database)  

       - Modify pfile for the new servers configuration, e.g. memory etc.

- Export ORACLE_SID and ORACLE_HOME

 

- Start RMAN with "rman target / nocatalog"

- Set DBID to the old DBID  

       - set DBID = <OLD_ID>

- start DB with force and pfile  

       - STARTUP NOMOUNT FORCE PFILE='$ORACLE_HOME/dbs/INIT<SID>.ORA';

- Restore Controlfile from autobackup  

       - run{    allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=OB2BARTYPE=Oracle8,OB2APPNAME=<SID>,OB2BARLIST=<BARLIST_NAME>)';

          RESTORE CONTROLFILE FROM AUTOBACKUP;

          }

- When the controlfile is restored, start instance in mount mode

        - ALTER DATABASE MOUNT;

- Restore the DB and recover it to the SCN noted earlier   

       - run{    allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=OB2BARTYPE=Oracle8,OB2APPNAME=<SID>,OB2BARLIST=<BARLIST_NAME>)';

          SET UNTIL SCN <SCN>;       

          RESTORE DATABASE;    RECOVER DATABASE;

          }

     **IMP: Provide the SCN obtained in the step 1, else during the recovery the logs will be missing.

     ** If you want to change the path to the datafiles then use set newname clause during restore   

         e.g.  ->   SET NEWNAME FOR DATAFILE 11 TO '/oradata/INSTANCE/TABLESPACE.DBF';

                   ->   SWITCH DATAFILE ALL;

 

- After the recovery is finished bring the database again in mount mode Change the DB ID so that there is no conflict in RCAT  / DP

       - this can be done with "nid"

       - nid TARGET=sys/ORACLE@TEST_DB

- When the DBID is changed, shutdown, open with resetlogs, take a full backup.

 

- If you are using recovery catalog, proceed with registering with RCAT as normal.

- All the old DB passwords / policies can be reused.

- You might need to drop em repositories and recreate those, if you use EM

 

I just gahered the information from different oracle/DP resources and modified it for my purpose....you can omit/add steps as required for your environment.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.