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

Thread: Duplicating a database

  1. #1
    Join Date
    Jan 2001
    Posts
    9

    Question

    The problem is that I am new to the field of ORACLE administration. I have an existing database with certain characteristics that I need to duplicate to be able to use ALL of its structure. The idea that I have to do it is to create a database and then do an IMPORT of the existing one but I really don't know if that would be enough.

    PLEASE I need any help I can get. Thank you for your time.

  2. #2
    Join Date
    Nov 1999
    Posts
    226
    Yes !

    That would be enough . You can create a new database and create the same users as the existing database and then take an export from the existing one and import it in this. This should sought out your problem of duplicating the databases.

  3. #3
    Join Date
    Jan 2001
    Posts
    9
    Thanx Puneet!

    I'll try that then. One more thing though, would I have to create similar control files and log files and data files, or would that be included in the export? And do you know anything about the table spaces? are they included too?

    Thanks again, I really appreciate your help.

  4. #4
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Follow this link which talks about the general steps for exp/imp

    [url]http://www.dbasupport.com/forums/showthread.php?threadid=5221[/url]

  5. #5
    Join Date
    Jun 2000
    Location
    Chennai/India
    Posts
    90
    Hi,
    I think the ideal solution, incase if you mean that U want to copy the entire database including the name sid etc, then it's better for you to just shutdown the database and copy all the control files, data files and the log files to another machine with the same location specified in the existing one. This way the copying becomes very very easy and acquires less time.

    Rgds
    Ganesh .R
    A Winner never Quits, A Quitter never Wins
    Ganesh .R

  6. #6
    Join Date
    Jan 2001
    Posts
    1

    Question difference between v$version and sm$version

    [QUOTE][i]Originally posted by aarganesh [/i]
    [B]Hi,
    I think the ideal solution, incase if you mean that U want to copy the entire database including the name sid etc, then it's better for you to just shutdown the database and copy all the control files, data files and the log files to another machine with the same location specified in the existing one. This way the copying becomes very very easy and acquires less time.

    Rgds
    Ganesh .R [/B][/QUOTE]

    Hi ganesh
    I went through your suggestion of maintaining two databases, I have a question with you can you give me the details about the colums the view sm$version give when it is queried and also what is difference between v$version and sm$version

  7. #7
    Join Date
    Jan 2001
    Posts
    9
    [QUOTE][i]Originally posted by sreddy [/i]
    [B]Follow this link which talks about the general steps for exp/imp

    [url]http://www.dbasupport.com/forums/showthread.php?threadid=5221[/url] [/B][/QUOTE]

    Hey sreddy! Thanks for yoru help. I read your steps for exp/imp and I was wondering. The thing is that I have to have two data bases with the exact same structure and everything but they're gonna hold different data. I already have one that's going to be emptied out and I need to sort of duplicate that. Should I first CREATE a new DataBase with the same characteristics for their table spaces, log files, control files and data files and then do the import?

    Thanks again for your help and sorry for any inconvenience.

  8. #8
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    You will be okey, as longs your tablespace names are not changed. No matter how import it. You can always truncate all the table and reload 'em with imp/rows=y.

    So, I don't see any problem here. If you want do it in 2 steps


    Step-1:all the object structures will be created

    rows=n

    step-2:Just loads the data

    rows=y

    Make sure you sync this link details with above options.
    [url]http://www.dbasupport.com/forums/showthread.php?threadid=5221[/url]


    Bottom Line, you need to have precreated tablespaces on the database you are trying to import. Because most of the filesystems and available freespace will not same from box to box. If you don't create and import, if fails when it tries to create that tablespace and can't find the same fileystem.
    Just for that reason you create tablespaces upfront.



    [Edited by sreddy on 01-17-2001 at 02:45 PM]

  9. #9
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    how will you be loading the data after creating the database ?

    from dump file ? using scripts ? using sqlloader ? how ?

  10. #10
    Join Date
    Jan 2001
    Posts
    9
    I don't have to load the data because all I need is the database structure. I need to have 2 databases with the same structure but they're gonna be used for different information. The records that will be registered in on table won't be the same as the other. So I need all the TRIGGERS, all the TABLES, all the STRUCTURES but not the information. Oh! and they have to reside on the same computer.

    Thanks for your help!

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