-
I'm reasonably new to Database Admin and don't have anyone to ask, so appologies for the (apparent) stupidity of my question....
I am trying to perform an export / import of my production apps database and whilst doing the export is easy, I have read and read and read, but can't work out how to do the import.
Well, I understand how to execute the commands, but do I have to clear out the database before importing the same data, or will the import process overwrite the existing, cleaning up extents etc as it goes ? Or, should I create a new database to receive the import ?
-
Your export/import query
it depends upon what kind of restore you need to do. there are 4 different ways or either you can 4 type of imports you can do.
1. you can import one single table from a particular schema
2. you can import a whole schema
3. you can import whole database
4. you can list the details in export file
5. even you can prepare a index creation script from the export .
now for
1. if you need to drop table you can type
imp userid = username/password fromuser = username touser = username tables = (table1,table2 ) file = expfile.dmp
if you have the above tables already present in the schema you can add one more parameter to above command i.e. ignore = y
for 2. drop the whole schema. i.e. drop user username, and then create the user and import the whole schema . the command is same above skip the tables.
for 3. create the new database and import
and rest you can find of your own. if you really want to be a dba.
any way if you need to contact me you can on
oracle_certified_dba@hotmail.com
-
Thanks for that.
It is I presume, the ignore parameter that I'm looking for. ie if that is set to 'Y' it will overwrite the data already there.
-
Originally posted by wjackson
It is I presume, the ignore parameter that I'm looking for. ie if that is set to 'Y' it will overwrite the data already there.
No, it will not *owerwrite* the existing data - it will simply *append* new rows to the existing contents of a table
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Hi Jackson,
What objective you want to achieve by export/import?
If it is for defragmentation, you should drop and recreate (or truncate) the tables before importing the data.
If you dont do that, the rows will be appended to the existing rows as long as they do not violate any primary key or uniqure constraint. In case of any such constraint it will return error..
Sanjay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|