DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: cold backup for clone db

  1. #1
    Join Date
    Apr 2003
    Posts
    25

    cold backup for clone db

    Hi guys... I know that it is easy to clone (cold backup) whole db from HOST A to HOST B, but I wanna ask ..can I clone the db partially (exclude some of users scheme).

    for example..
    Host A:
    all system tablespaces
    10 tablespaces (users schemes)

    to

    Host B:
    all system tablespaces
    3 tablespaces (users schemes- which I want to clone for host B)


    If I do that.. I need to cold backup all the tablespace and control files (sql file for making new control files),log files. And edit the sql file and delete/comment those unwanted tablespaces).

    Right?


    thank you

  2. #2
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511

    Re: cold backup for clone db

    Originally posted by vbeer

    If I do that.. I need to cold backup all the tablespace and control files (sql file for making new control files),log files. And edit the sql file and delete/comment those unwanted tablespaces).

    Right?

    Not right.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

    Re: Re: cold backup for clone db

    Originally posted by kris109
    Not right.
    Why not? Why not just re-create the controlfiles with the files you want?
    Jeff Hunter

  4. #4
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    Two reasons:

    1. There is no need to recreate control file if the name of the database is same. Just copy the data, temp, control, pwd, parameter files and online redo logs to host B maintaining the same file structure and start the database. Drop the unnecessary tablespaces, the control file will be updated.

    2.He is talking about commenting out the TABLESPACES from 'alter database backup controlfile to trace' script.
    Last edited by kris109; 01-17-2004 at 08:49 PM.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  5. #5
    Join Date
    Apr 2003
    Posts
    25
    Hi Kris,

    I got what you mean... but I am doing that.. because HOST A has 60Gig dbf file file, I only want to copy 30Gig (exclude some user schemes) to HOST B. If I start up the cold up set in HOST B, I will get error of missing datafiles or media recovery..etc...


    so.. can I still use the method you mentioned in point 1?

    or just startup in mount mode and alter database datafile 'a/b/ab.dbf' drop' ...etc..

    thanks

  6. #6
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    Open the database. Take the tablespaces you do not need offline:

    alter tablespace tab1 offline;

    In 9i, use this command:

    drop tablespace tab1 including contents and datafiles;

    to get rid of unwanted tablespaces and their datafiles.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  7. #7
    Join Date
    Apr 2003
    Posts
    25
    Hi Chris
    Thank you for your kindness reply...

    I will copy only 30Gig dbf files out of 60 Gig from Host A to Host B

    and will try to open the DB and drop the missing datafiles....


    thank you...

  8. #8
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    The solution I suggested applies only if you copy everything. I suggested that since you do not seem to know what is inside a controlfile backup trace file.

    If you want to copy only 30G, go ahead and comment out datafiles (not tablespaces), re-create the control file and open the database with RESETLOGS.
    Last edited by kris109; 01-18-2004 at 07:25 PM.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

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