Home » RDBMS Server » Server Utilities » Can this be done with export/import ??
Can this be done with export/import ?? [message #73028] Mon, 19 January 2004 12:05 Go to next message
Henrik Bentel
Messages: 1
Registered: January 2004
Junior Member
Hi

I don't have much experience with oracle at all so I was wondering if the following is possible

Have a oracle 8i database with a table x. As part of a new release of my software, I am adding a new column to the table. The new column happens to be a primary key column which for new data will get filled out using a sequence and a trigger(before insert on x ...).

Is it possible to export the data in the existing database and import into the new database such that the trigger "executes" and inserts the new primary key values?

Hope someone can help
Henrik Bentel
Re: Can this be done with export/import ? [message #73098 is a reply to message #73028] Mon, 02 February 2004 17:13 Go to previous message
Ian Timms
Messages: 4
Registered: November 2001
Junior Member
No.

You can dump the data into a flat file using spool in sqlplus and then use SQLLoader to load the data into the new table, this will allow for trigger activation.

The better option is to simply setup a database link (if not in the same database, or rename the old table if they are) and the "insert into new as select ... from old" which is far more straight forward.

Regards, Ian.
Previous Topic: "ORA-0142" ERROR
Next Topic: sqlloader problem- needed urgent
Goto Forum:
  


Current Time: Thu Jun 27 22:00:24 CDT 2024