Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Db copy and restore from production to test to sync up both the env-RMAN

585321Jun 3 2011 — edited Jun 3 2011
I am a newbie and I need to copy an oracle production database onto the test server.The test environment needs to be in sync with the production database(So I guess I have to do a full back and restore.I would like to do this online(hot backup so that all users have access to the database all thoughout the process)

Can someone please provide me a reference or a write up on the process.
Both the test and production database are on MS Windows 2003 servers.I have an oracle 10g database version.
I would like to do this via command line(SQL statements) using RMAN.
Can I get a reference on a step by step basis.

My understanding is:
Log on to the production server:
Make sure that both the databases(prod and test) are in archive log mode.
1.SQL> select LOG_MODE from v$database;
LOG_MODE
------------
ARCHIVELOG
2.E:\oracle\product\10.2.0\db_1\BIN>rman
RMAN>connect target Username/password@XXXXX
connected to target database: XXXXX (DBID=123456789)
RMAN>backup database OR backup database plus archive log...Which of these should I run ?
This I believe creates an automatic backup process.Where are the backup files stored.Can I create a directory initially so that all the backup files are

stored in a single directory)If yes how I do this?

Test Server:
How do I do the restore process here?
If I have to rewrite the old database how do I do it?
If I want to create a new database (instance) and restore ..how do I do the restore process?
I read that I need to maintain a similar directory structure on the test environment.Can someone elaborate on this.Is it possible to restore without emphasizing on the directory structure?
Appreciate responses.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2011
Added on Jun 3 2011
1 comment
1,097 views