Urgent:-CONSTRAINTS [message #73582] |
Tue, 25 May 2004 20:51 |
Milind Deshpande
Messages: 93 Registered: May 2004
|
Member |
|
|
DEAR FRIENDS,
HELLO.
I want to know that if there is any way through which I can get the create or alter statments for creating constraints of my database if I do the Import using the "Constraints=N" parameter.The assignment given to me is to find out the way through which I can create all the database constraints prior to the Import of the .dmp file.
So,If you know any script or commande which can give me the create or alter statments of constraints of my database which when run will create all the constraints of my database.
If by any chance anyone knows the way out of this pls. let me know.
Milind
|
|
|
Re: Urgent:-CONSTRAINTS [message #73583 is a reply to message #73582] |
Tue, 25 May 2004 22:46 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
First run your Import as follows:
Step 1
=======
D:>imp userid=scott/tiger@dbn006 file=D:ss.DMP log=D:himan.log show=n ignore=y g
rants=n full=y indexes=N constraints=Y indexfile=himanidx.txt buffer=1024000
This will not import any table or data into your DB but will create a Complete script of Creating Table,Indexes & constraints.
Step 2
=======
Then run Import as follows:
D:>imp userid=als/fwp@dbn006 file=D:ss.DMP log=D:himan.log show=n ignore=y g
rants=n full=y indexes=N constraints=N buffer=1024000
This will import you tables,data without Indexes & Constraints.
Now you will have to extract the Script from the file (himanidx.txt) generated in Step 1 to create your Indexes & Constraints.
HTH
Regards
Himanshu
|
|
|
|