Results 1 to 5 of 5

Thread: Clone database

  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Unanswered: Clone database

    Hi all,

    Do you have any idea to clone a database from machine to machine, either:

    - Same platform, same OS, same Oracle version.
    - Not the same.

    I've tried export/import, but it's a hard work. My database is very big, about 50GB data so I can't export data and import to the other. I'd like to copy all datafile to the other machine and build a new database in the new machine using those data files. But HOW???

    Do you have any idea on this? Pls. give detail steps if it's possible.

    Thanx.

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    their are a couple of ways to do that task depending on your version

    with 8i ff you can use transportable tablespaces or dataguard functionality ..

    or a more native way like :

    SQL> alter database backup controlfile to trace

    at which point you will get a full "create controlfile" command dumped out to the user_dump_dest directory. It will look something like

    CREATE CONTROLFILE REUSE DATABASE "SOURCEDB" NORESETLOGS ARCHIVELOG
    ...
    LOGFILE
    GROUP 1 '/disk1/log1.dbf' SIZE 50M,
    ...
    DATAFILE
    '/disk2/system01.dbf',
    '/disk3/rbs01.dbf',
    ...
    '/diskN/last_file01.dbf'
    CHARACTER SET WE8ISO8859P15;

    For cloning this database, you will alter

    The REUSE to SET
    The SOURCEDB to NEWDB (that is, the new name of the target database)
    The NORESETLOGS to RESETLOGS
    For each file listed under the DATAFILE clause, if you will be renaming the file as part of the cloning process, then you simply update the file name to the new name in the CREATE CONTROLFILE command.

  3. #3
    Join Date
    Nov 2002
    Posts
    833
    Originally posted by osy45
    their are a couple of ways to do that task depending on your version

    with 8i ff you can use transportable tablespaces or dataguard functionality ..

    or a more native way like :

    SQL> alter database backup controlfile to trace

    at which point you will get a full "create controlfile" command dumped out to the user_dump_dest directory. It will look something like

    CREATE CONTROLFILE REUSE DATABASE "SOURCEDB" NORESETLOGS ARCHIVELOG
    ...
    LOGFILE
    GROUP 1 '/disk1/log1.dbf' SIZE 50M,
    ...
    DATAFILE
    '/disk2/system01.dbf',
    '/disk3/rbs01.dbf',
    ...
    '/diskN/last_file01.dbf'
    CHARACTER SET WE8ISO8859P15;

    For cloning this database, you will alter

    The REUSE to SET
    The SOURCEDB to NEWDB (that is, the new name of the target database)
    The NORESETLOGS to RESETLOGS
    For each file listed under the DATAFILE clause, if you will be renaming the file as part of the cloning process, then you simply update the file name to the new name in the CREATE CONTROLFILE command.
    if platforms are odd then you either must use export/import or you can build the new database on an other platfrom create links to the old db
    and create generic insert scripts insert into <table> as select ... from <table>@link

  4. #4
    Join Date
    Dec 2003
    Posts
    47
    I think if the 2 database versions are different, we can use osy45's method. After that, modify file init, change parameter COMPATIBLE to new version, startup database after recreate controlfiles. Then execute sqlscript to upgrade old version to new version
    My solution is used to copy data from version 8.1.5 to 8.1.7 and I think it works (I execute script u0801050.sql). Is there any problem with my solution ? Please tell me, thanks

  5. #5
    Join Date
    Aug 2003
    Location
    Guwahati, India
    Posts
    33

    Re: Clone database

    Hi,

    Its not easy. But Please try my method. I have tried it in Win NT 4 m/c and got a lot of success.

    1. Install the database with similar database name in your other m/c .
    2. Copy all in /ORADATA/[DATABASE NAME]/ files
    3. Copy init.ora file. Probably in ADMIN/[DATABASE NAME]/PFILE .
    4. Copy ORAHOME/NETWORK/ADMIN/ all files and folders.


    a. Log on to svrmgrl and connect as internal.
    b. shutdown the database.
    c. then copy the previously coppied files into the same location as earlier.


    Restart the system or log on to svrmgrl , connect internal and startup the database.



    Please try it. I have tried and successful with smaller database.
    G J Shankar Nath
    IT Consultant, Vedswasti Services Pvt. Ltd
    Guwahati-781007
    India

Posting Permissions

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