Home » RDBMS Server » Server Utilities » Import restoration to the same table
Import restoration to the same table [message #225334] Mon, 19 March 2007 13:22 Go to next message
rookiedba
Messages: 11
Registered: March 2007
Location: Montana
Junior Member
HI there all, I am a rookie DBA and need some help.

I have written a stored procedure that woudl effectivly create a shell file on the operating system containing all the export commands and their necessary parameters. That works just fine.

Now I am tring to restore some of these table's records using he import command as follows:

imp <Username/passwd@DBNAME> IGNORE=Y TABLES=(DW_CONTROLS)

and it will error out for

IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (SPVIEW.XPK_DW_CONTROLS) violated

and I can understand that since these records (that I am trying to restore) already exist in the DW_COBTROLS table they are failing for constraint violation.

But is there a way (creative way) to bypass this error. First thing I thought was to restore them into a seperate table. Is that a good strategy? If it then what is the syntax to restore them to a new table lets say DW_CONTROLS_BKP

Thanks for your help in advance
Re: Import restoration to the same table [message #225340 is a reply to message #225334] Mon, 19 March 2007 13:32 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
disable the constraints in the base table prior to import.
disable the constraints that come along with the dump using constraints=n during import.
Previous Topic: export tables only without data
Next Topic: export error
Goto Forum:
  


Current Time: Wed Dec 25 20:53:49 CST 2024