Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Need guidance: duplicate oracle db to another

Need guidance: duplicate oracle db to another

Scheduled Pinned Locked Moved Database
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Foothill
    wrote on last edited by
    #1

    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

    C J 2 Replies Last reply
    0
    • F Foothill

      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

      C Offline
      C Offline
      Chris Quinn
      wrote on last edited by
      #2

      Can you not just do a backup and restore?

      ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================

      J F 2 Replies Last reply
      0
      • C Chris Quinn

        Can you not just do a backup and restore?

        ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================

        J Offline
        J Offline
        Jorgen Andersson
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • F Foothill

          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

          J Offline
          J Offline
          Jorgen Andersson
          wrote on last edited by
          #4

          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

          F 1 Reply Last reply
          0
          • J Jorgen Andersson

            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

            F Offline
            F Offline
            Foothill
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • C Chris Quinn

              Can you not just do a backup and restore?

              ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================

              F Offline
              F Offline
              Foothill
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • F Foothill

                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

                J Offline
                J Offline
                Jorgen Andersson
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups