Home » RDBMS Server » Backup & Recovery » Can I run an import without drop and recreate schema ?
Can I run an import without drop and recreate schema ? [message #171708] Thu, 11 May 2006 03:22 Go to next message
**Snake**
Messages: 47
Registered: December 2005
Location: Italy
Member
Hi gyus.
On my DB I have the schema PROD001 and I need to import an export file into it without drop and recreate this schema.
Can I do this? How?
Re: Can I run an import without drop and recreate schema ? [message #171710 is a reply to message #171708] Thu, 11 May 2006 03:36 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member


Why do you need to drop and recreate the schema?

Anyway, try
ignore=y 
parameter while importing.
Re: Can I run an import without drop and recreate schema ? [message #171713 is a reply to message #171710] Thu, 11 May 2006 03:44 Go to previous messageGo to next message
**Snake**
Messages: 47
Registered: December 2005
Location: Italy
Member
mmm Confused

I have this schema:

User: PROD001
Tables of PROD001:

TABLE A
TABLE B
TABLE C

Now I want import an export file under PROD001 without drop and recreate it.
May I drop tables before import or may I truncate tables and specify IGNORE=Y ???
Re: Can I run an import without drop and recreate schema ? [message #171724 is a reply to message #171713] Thu, 11 May 2006 04:39 Go to previous message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member


No need to drop tables and you can truncate if you want.

from the docs
Quote:

IGNORE
Default: n

Specifies how object creation errors should be handled. If you accept the default, IGNORE=n, Import logs or displays object creation errors before continuing.

If you specify IGNORE=y, Import overlooks object creation errors when it attempts to create database objects, and continues without reporting the errors.

Note that only object creation errors are ignored; other errors, such as operating system, database, and SQL errors, are not ignored and may cause processing to stop.

In situations where multiple refreshes from a single export file are done with IGNORE=y, certain objects can be created multiple times (although they will have unique system-defined names). You can prevent this for certain objects (for example, constraints) by doing an import with CONSTRAINTS=n. If you do a full import with the CONSTRAINTS=n, no constraints for any tables are imported.

If a table already exists and IGNORE=y, then rows are imported into existing tables without any errors or messages being given. You might want to import data into tables that already exist in order to use new storage parameters or because you have already created the table in a cluster.

If a table already exists and IGNORE=n, then errors are reported and the table is skipped with no rows inserted. Also, objects dependent on tables, such as indexes, grants, and constraints, will not be created.


--------------------------------------------------------------------------------
Caution:
When you import into existing tables, if no column in the table is uniquely indexed, rows could be duplicated.

--------------------------------------------------------------------------------


Previous Topic: BACKUP & RECOVERY
Next Topic: export rows in to other table
Goto Forum:
  


Current Time: Wed Apr 24 15:28:42 CDT 2024