Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Import and export of database?

Re: Import and export of database?

From: Joel Garry <joelga_at_pebble.org>
Date: Thu, 25 Jun 1998 23:38:46 GMT
Message-Id: <slrn6p5nu8.2jh.joelga@pebble.org>


On 25 Jun 1998 16:56:00 +0200, Ketil Z Malde <ketil_at_ii.uib.no> wrote:
>
>Hi
>
>Using oracle 7 on Solaris 2.6:
>
>I'm still unable to use the )(&/&/% imp and exp commands to move a
>database. Why is this so hard?

Because referential integrity was hacked onto the db, rather than being there from the beginning.

>
>Making a full dump to expdat.dmp, ftping the file, and then doing an
>
> imp user/pass file=expdat.dmp full=y ignore=y
>
>doesn't do it, adding a "destroy=y" option doesn't seem to do anything,
>and setting inctype to complete etc, gives an error.

>
>The error messages I get talks of constraints being violated, here's a
>sample:
>
>IMP-00019: row rejected due to ORACLE error 1
>IMP-00003: ORACLE error 1 encountered
>ORA-00001: unique constraint (SLADMIN.XPKSL_PPRJ_TREE) violated
>
>Happens for all rows in the dump. Any suggestions, while I still have
>some hair left?

Disable all your constraints before the import. I find the cons_en script from TUSC pretty useful, just g/enable/s//disable/ and away you go! The script just builds alter table statements from sys.dba_constraints where status ENABLED and owner not in SYS or SYSTEM. I'm sure there are a gazillion similar scripts floating about.

Be careful not to import twice with your constraints disabled, though.

>
>~kzm

--
These opinions are my own and not necessarily those of Information Quest or Pebble In The Sky http://www.informationquest.com mailto:jgarry@nospameiq.com http://ourworld.compuserve.com/homepages/joel_garry Remove nospam to reply. mailto:joel_garry_at_compuserve.nospam.com "See your DBA?" I AM the @#%*& DBA! Received on Thu Jun 25 1998 - 18:38:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US