Need guidance: duplicate oracle db to another
-
I am having serious difficulties in my attempt to duplicate a production db to a test instance on the same server. Using these examples has not helped: Duplicate a database Duplicate Duplicating a database Duplicating a database using RMAN and there's more. All attempts with all these materials still end in failure. Additionally, the lack of in-depth examples for Oracle administration available on the internet (indexed by Google/Bing) is concerning. Okay, here's the closest that I have been able to get 1. Create test database with the Database Configuration Assistant 2. Create minimal SPFile {DB_Name=XXXX} 3. Shutdown test database 4. Start test database with NOMOUNT and minimal SPFile 5. With RMAN, connect to prod db (target) - connect to test db (auxiliary) - ran this command RMAN> duplicate target database to XXXX 2> from active database 3> password file 4> DB_FILE_NAME_CONVERT '/oracle/oradata/prod/','/oracle/oradata/test/'; 6. It ran for a minute then died with a lot of these errors RMAN-05001: auxiliary file name D:\ORACLE\ORADATA\DCDI\CATALOGTBS.DBF conflicts with a file used by the target database I have found some info with a 'you need to add this: CONFIGURE AUXNAME ....' but I have no clue where to add these lines and no example was provided. By this point, the SPFile and Control file are in an invalid state. No clue how to get them back to try again. I've dropped and recreated the test database several times. I have no clue what I am doing and I cannot find any example on how to do this properly. I've been working on this for about a day and a half and getting nowhere fast. Can somebody help walk me through this or point me to a good example. I have no experience with Oracle admin and I'm reaching the end of my wits here. X|
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
I am having serious difficulties in my attempt to duplicate a production db to a test instance on the same server. Using these examples has not helped: Duplicate a database Duplicate Duplicating a database Duplicating a database using RMAN and there's more. All attempts with all these materials still end in failure. Additionally, the lack of in-depth examples for Oracle administration available on the internet (indexed by Google/Bing) is concerning. Okay, here's the closest that I have been able to get 1. Create test database with the Database Configuration Assistant 2. Create minimal SPFile {DB_Name=XXXX} 3. Shutdown test database 4. Start test database with NOMOUNT and minimal SPFile 5. With RMAN, connect to prod db (target) - connect to test db (auxiliary) - ran this command RMAN> duplicate target database to XXXX 2> from active database 3> password file 4> DB_FILE_NAME_CONVERT '/oracle/oradata/prod/','/oracle/oradata/test/'; 6. It ran for a minute then died with a lot of these errors RMAN-05001: auxiliary file name D:\ORACLE\ORADATA\DCDI\CATALOGTBS.DBF conflicts with a file used by the target database I have found some info with a 'you need to add this: CONFIGURE AUXNAME ....' but I have no clue where to add these lines and no example was provided. By this point, the SPFile and Control file are in an invalid state. No clue how to get them back to try again. I've dropped and recreated the test database several times. I have no clue what I am doing and I cannot find any example on how to do this properly. I've been working on this for about a day and a half and getting nowhere fast. Can somebody help walk me through this or point me to a good example. I have no experience with Oracle admin and I'm reaching the end of my wits here. X|
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
Can you not just do a backup and restore?
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
-
Can you not just do a backup and restore?
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
This is Oracle. However much I prefer Oracle to SQL Server this is an area where Oracle sucks.
Wrong is evil and must be defeated. - Jeff Ello
-
I am having serious difficulties in my attempt to duplicate a production db to a test instance on the same server. Using these examples has not helped: Duplicate a database Duplicate Duplicating a database Duplicating a database using RMAN and there's more. All attempts with all these materials still end in failure. Additionally, the lack of in-depth examples for Oracle administration available on the internet (indexed by Google/Bing) is concerning. Okay, here's the closest that I have been able to get 1. Create test database with the Database Configuration Assistant 2. Create minimal SPFile {DB_Name=XXXX} 3. Shutdown test database 4. Start test database with NOMOUNT and minimal SPFile 5. With RMAN, connect to prod db (target) - connect to test db (auxiliary) - ran this command RMAN> duplicate target database to XXXX 2> from active database 3> password file 4> DB_FILE_NAME_CONVERT '/oracle/oradata/prod/','/oracle/oradata/test/'; 6. It ran for a minute then died with a lot of these errors RMAN-05001: auxiliary file name D:\ORACLE\ORADATA\DCDI\CATALOGTBS.DBF conflicts with a file used by the target database I have found some info with a 'you need to add this: CONFIGURE AUXNAME ....' but I have no clue where to add these lines and no example was provided. By this point, the SPFile and Control file are in an invalid state. No clue how to get them back to try again. I've dropped and recreated the test database several times. I have no clue what I am doing and I cannot find any example on how to do this properly. I've been working on this for about a day and a half and getting nowhere fast. Can somebody help walk me through this or point me to a good example. I have no experience with Oracle admin and I'm reaching the end of my wits here. X|
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
I would use Export/Import[^] instead. The Enterprise Manager has a graphical UI that's quite helpful. If you export only tablespaces from the database you'll need to setup the users on the new database BEFORE importing.
Wrong is evil and must be defeated. - Jeff Ello
-
I would use Export/Import[^] instead. The Enterprise Manager has a graphical UI that's quite helpful. If you export only tablespaces from the database you'll need to setup the users on the new database BEFORE importing.
Wrong is evil and must be defeated. - Jeff Ello
While the export/import track is an option, it is necessary to get a complete copy of the database (users, tables, procedures, everything). Using RMAN's replicate feature appears to be the logical choice to accomplish this in one easy to reproduce procedure that can be run whenever it's needed. The trouble is getting it to run correctly the first time. Once I have the correct procedure to replicate this production database to the test database, I can write up documentation. I'm having difficulty in getting it right.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
Can you not just do a backup and restore?
========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
Would that copy everything? I need to copy not just tables and data, but procedures, users/passwords, links to other databases, etc...
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
While the export/import track is an option, it is necessary to get a complete copy of the database (users, tables, procedures, everything). Using RMAN's replicate feature appears to be the logical choice to accomplish this in one easy to reproduce procedure that can be run whenever it's needed. The trouble is getting it to run correctly the first time. Once I have the correct procedure to replicate this production database to the test database, I can write up documentation. I'm having difficulty in getting it right.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
No, you can choose whether you want to export schemas, tablespaces, tables or the whole database. Data Pump Export[^]
Wrong is evil and must be defeated. - Jeff Ello