Is it possible to import only the master tables? [message #330423] |
Mon, 30 June 2008 02:57 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
Friends,
Is it possible to import only the master tables using import utility.
Because when i try to import some 70 tables i am getting the foreign key violation error.
without the child tables or referring tables can i import only the master tables?
thanks
|
|
|
|
|
|
Re: Is it possible to import only the master tables? [message #330486 is a reply to message #330423] |
Mon, 30 June 2008 05:00 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
I know that i have to include all the relevant tables.
Also, i have included all the tables.unfortunately the imp command is importing the tablenames in an ascending order.
for example.
i have tab1,tab2,tab3...
tab3 is the master table.
tab1 is the child table
when i execute the import command. first the tab1 is inserting data and its throwing the foreign key error.
my question is... can i execute the imp command using the order which im giving?
for example
imp username/password file=file.dmp log=log.dmp tables=(tab3,tab5,tab2)
|
|
|
|
Re: Is it possible to import only the master tables? [message #330504 is a reply to message #330423] |
Mon, 30 June 2008 05:42 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
yes, in my case
1. im importing all the 500 table structures.
2. after that im importing only 70 tables data.
1st part no problem....
2nd part is the problem.
can i disable all the constraints at a time and after importing the data's can i enable all the constraints?
or i have to disable/enable when ever im getting an error?
how can i disable/enable constraints?
thanks
[Updated on: Mon, 30 June 2008 05:43] Report message to a moderator
|
|
|
|
Re: Is it possible to import only the master tables? [message #330527 is a reply to message #330423] |
Mon, 30 June 2008 06:52 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
thanks a lot....
its working now.....
one more doubt......
those 70 tables will be imported with constraints...
no problem....
suppose a user want to insert some records in the 75th table(i.e., the table which i have imported without constraints)that 75th table was having a FK constraint in 80th table. In that situation as a DBA what should i do? Am i have to import the 75th and 80th table with constraints and delete the records from the table?
i hope you got my point....
thanks
|
|
|
|
Re: Is it possible to import only the master tables? [message #330551 is a reply to message #330542] |
Mon, 30 June 2008 07:34 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
this is what i want.....
1. Import all tables(nearly 500 tables) structures without data.
2. Import only 70 tables with data.
for this, i did......
1. Imported all tables(nearly 500 tables) structures without data without constraints.
2. Imported 70 tables with data with constraints.
3. Imported again those 500 tables without data and with constraints.(here im getting the error as "table already exists and constraints already exists" for the 70 tables but imported successfully with the above warnings). i think there is no harm in that. is there any harm?
at last i want to enable all the constraints.....
thanks
[Updated on: Mon, 30 June 2008 07:34] Report message to a moderator
|
|
|
|
Re: Is it possible to import only the master tables? [message #330760 is a reply to message #330552] |
Tue, 01 July 2008 02:32 |
sathyguy
Messages: 31 Registered: January 2006
|
Member |
|
|
Actually, i imported with ignore=y and indexfile=file.sql in the 3rd step.
after that i run the file.sql in the sqlplus.
so....its throwing error.
but...if i run the import directly with ignore=y and without indexfile. then its importing successfully without warnings.
so.....in the 3rd step i have to run it directly without indexfile. please correct me if i am wrong.
thanks
|
|
|
|
|
|
|