Home » Infrastructure » Unix » Export on Sun
Export on Sun [message #97719] Wed, 27 November 2002 13:22 Go to next message
Michele
Messages: 77
Registered: December 2000
Member
Hello everyone,
I haven't had much experience with exports and imports from Oracle and I am stuck. I need to export a schema and import it into another schema. However, the constraint names used in the 1st schema begin with the owners name ie: wrkx_cntrctr_pk and I want the names to change to wrk_cntrctr_pk when importing to the new schema. I executed the below export and import statements but I am getting the wrong result. Basically, is there a way to export and import without the constraint names and indexes at first and then handle them afterward. I omitted the constraints and indexes arguments but it still seems to transfer over to the new schema. Am I doing this wrong?
exp userid=username/password owner=wrkx file=wrkxExp.dmp compress=y grants=y rows=y log=wrkxExp.log
imp userid=username/password file=wrkxExp.dmp log=wrkxImp.log fromuser=wrkx touser=wrk
Re: Export on Sun [message #97720 is a reply to message #97719] Wed, 27 November 2002 20:07 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
I'd recover the DDL from the dmp file and then exit that DDL. Run the ddl in the target schema (including table DDL) and then import using ignore=y. You'll probably need to run a schema comparison after that to make sure you haven't missed anything. OEM has schema comparison tool once you have created a repository (which OEM will do for you).

imp userid=username/password file=wrkxExp.dmp log=wrkxImp.log fromuser=wrkx touser=wrk indexfile=my_ddl.sql

If you get horrible line chopping in the ddl file, try these:
strings wrkxExp.dmp > my_ddl.sql

or
imp userid=username/password file=wrkxExp.dmp log=wrkxImp.log fromuser=wrkx touser=wrk show=y
Previous Topic: Suppress Information on a new page
Next Topic: Re: 8.1.7 installation on Redhat 7.1 -help me
Goto Forum:
  


Current Time: Tue Apr 16 16:55:48 CDT 2024