DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to Clone a 9i Database

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    South Carolina
    Posts
    6

    How to Clone a 9i Database

    I have an Oracle 9.2.0.7 database (Enterprise Edition) I need to copy from one HP-UX server to another one. They have different filesystem names and different database names. I'm trying to find a fast method to do this for our production go live and it seems like if I knew how to clone, that would be my best bet. We do not use RMAN in our company. I would have do perform a cold backup first. Can someone give me the steps please. Thanks in advance.
    AMH
    Last edited by amhood; 12-30-2008 at 02:45 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    The idea is to create a new database in target box as a clone of what you have in source box.

    1- Put source database in backup mode
    2- DD all source datafiles to target box.
    3- Create control file on source database.
    4- Take source database out of backup mode
    5- Copy created control file and archive logs generated since step #1 from source to target box.
    6- Edit control file on target box to match filesystems, etc. Be sure you set the new database name correctly, it should look like...

    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE SET DATABASE "YOURDBNAME" RESETLOGS ARCHIVELOG
    . . .
    rest of the control file
    . . .
    7- sqlplus /nolog
    conn sys as sysdba
    enter
    @yourcontrolfile.sql
    8- RECOVER DATABASE USING BACKUP CONTROLFILE until cancel
    9- cancel
    10- alter database open resetlogs
    11- shutdown immediate
    12- startup
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Dec 2008
    Location
    South Carolina
    Posts
    6
    Thanks for your reply. I have a question. We do cold backups (no RMAN) so, do I create the control file before I shutdown the database or after? Is is the database fully open or just mounted? Thanks.

  4. #4
    Join Date
    Dec 2008
    Location
    South Carolina
    Posts
    6
    Thanks for your reply. I have a question. We do cold backups (no RMAN) so, do I create the control file before I shutdown the database or after? Is is the database fully open or just mounted? Thanks.

  5. #5
    Join Date
    Dec 2008
    Posts
    9
    The best method I prefer is,
    rman duplicate database
    Please do a internet search "rman duplicate database".

    Regards

    Boban

  6. #6
    Join Date
    Dec 2008
    Location
    South Carolina
    Posts
    6
    We do not use RMAN at our company. I'll have to do a cold backup.

  7. #7
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Boban -

    Amhood clearly stated that they don't use RMAN. The steps PAVB mentioned are the right choice in this scenario.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  8. #8
    Join Date
    Dec 2008
    Posts
    9
    ok. I missed out that.
    What is the database size ?
    I prefer putting tablespace in backup mode one by one and scp/rcp to target instead of putting whole database in backup mode in one shot even if the feature is available.

  9. #9
    Join Date
    Dec 2008
    Location
    South Carolina
    Posts
    6
    We do not use RMAN. I would have to do a cold backup. The database is only 26g.

  10. #10
    Join Date
    Dec 2008
    Posts
    9
    If you have cold backup as backup strategy, then is is too easy. I assume archive log is disabled for your database.

    You can create controlfile script before or after cold backup, doesn't matter.
    You just want to restore the cold backup to target server. Modify control file script. Following is an example..

    ========================================
    STARTUP NOMOUNT
    CREATE CONTROLFILE
    SET DATABASE "<>" --> CHANGE "REUSE" TO "SET"
    RESETLOGS FORCE LOGGING ARCHIVELOG --> Change as per your environment
    MAXLOGFILES 32
    MAXLOGMEMBERS 5
    MAXDATAFILES 2079
    MAXINSTANCES 8
    MAXLOGHISTORY 65535
    LOGFILE --> Redo log files ...
    GROUP 1 ( --> Change path and naming convensions as per target server
    'PATH/redo11.log',
    'PATH/redo12.log'
    ) SIZE 100M,
    GROUP 2 (
    'PATH/redo21.log',
    'PATH/redo22.log'
    ) SIZE 100M,
    GROUP 3 (
    'PATH/redo31.log',
    'PATH/redo32.log'
    ) SIZE 100M,
    DATAFILE
    <<... Datafile list....>>
    <<... Change path and naming convensions as per target server >>

    ========================================


    Add temp files after that..

    ========================================

    ALTER TABLESPACE TEMP ADD TEMPFILE 'PATH/tempfileName'
    SIZE <> M REUSE AUTOEXTEND OFF;

    ========================================

    Please come back if you required any clarification.

    Regards

    Boban

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width