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

Thread: How to Import the whole database into a new database?

  1. #1
    Join Date
    Jul 2003
    Posts
    4

    How to Import the whole database into a new database?

    I have a newly installed Oracle Database(it have nothing), and i have an old one on another machine...what i want is:
    - to perform a import operation from the older one into the new one.
    I already heve performed the dump of the database i want to import, but, how to import it into another empty database, and i mean really empty.
    does it have to be a clone of the older one?(i mean the database structure.)if yes, how can i export thewhole database structure of a database and import it on another by subscribing the old structure with the new one?
    I performed my dump by typing at C prompt:
    "exp"
    so i´ve answered every question with "yes", except by the first question.
    Both are Oracle9i version.
    That which is dreamed can never be undreamed...

  2. #2
    Join Date
    May 2002
    Posts
    2,645

  3. #3
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    Use parameter full = 'Y' for both export and import. Follow the documentation listed above.
    -- Dilip

  4. #4
    Join Date
    Feb 2001
    Posts
    203
    Hi brdarkmoon,


    1) Took full export from old database as system
    2) Create new database
    3) Import *.dmp file into new database as system
    userid=system/manager
    buffer=2097150
    file=exp.dat
    grants=y
    indexes=y
    rows=y
    ignore=y
    destroy=n
    commit=y
    full=y
    log=imp.log
    feedback=100000

    For example you have "USERS" tablespace in two databases. When you are importing from old database to new database, If will check whether users tablespace exist or not? If not it will create it. But in your case already it's exist so it will ignore it. The parameter(in imp.par) for this is "ignore=y".

    4) Run catlog and catproc and other scripts

    If you need more information then let us know.

    Sree.
    sree

  5. #5
    Join Date
    May 2002
    Posts
    2,645
    Wow, this begs many questions. Where do you come up with a buffer of 2097150? Don't the same tablespaces need to exist, since you mention USERS? Default for destroy is n, so why specify it? Indexes=y by default. If file=exp.dat, then why are you telling him to import *.dmp? Wouldn't it be better to run catalog/catproc before doing the import?

    Like you say, if you read the info at the link, you would see:

    Before Using Import
    Before you begin using Import, be sure you take care of the following items:

    Run the catexp.sql or catalog.sql script

  6. #6
    Join Date
    Feb 2001
    Posts
    203
    Hi Stecal,

    Sorry for confusion....Really I am.

    Actually I copied example imp.par file from my work document.

    Yeah I agree with you, By default destroy=n and indexes=y, You can ignore the buffer,destroy and indexes.

    Regarding *.dmp, Sorry Friday..Ready to go home--Typo---

    Regarding on catalog and catproc scripts, Normally after I created system tablespace I will run this scripts then I will create other tablespaces. But If I import data from another databases I will run this scripts again. My previous experiance told me that.
    When I exported data from one database to antoher database It screwed up some views(8.0 to 8i).

    Regarding on the same tablespaces, If you have same tablespace name in new database, Then ignore=y parameter will ignore the error and It will continue the import. For example If you are exporting from machine1(old database) to machine2(new database) then the datafile locations and dir names are different. So how can you do the full export?

    My suggestion is, Create the same name tablespaces in the new database and include ignore=y imp.par file. That will solve the problem. If I am missing any thing then let me know.

    Thanks.

    Sree.
    sree

  7. #7
    Join Date
    Jul 2003
    Posts
    4
    Thanks sree_sri

    Your explanation was great...my troubles are solved.
    That which is dreamed can never be undreamed...

  8. #8
    Join Date
    Jan 2001
    Posts
    3,134
    I do this all the time.

    I use a full export/import.
    Create the tablespaces ahaead of time, in case there is a dircetory mishap.

    MH
    I remember when this place was cool.

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