Home » RDBMS Server » Server Administration » How to move old DB data to newly modified DB?
How to move old DB data to newly modified DB? [message #50985] Thu, 18 April 2002 07:15 Go to next message
Jean
Messages: 16
Registered: September 1999
Junior Member
Hi,

I modified my old database schema by adding some new fields and removing some obsolete fields.
After that I created a new database with the updated schema.
Now I have to move the old data to the new database.
Could you tell me what I can do for this?

Thank you in advance.
Re: How to move old DB data to newly modified DB? [message #50986 is a reply to message #50985] Thu, 18 April 2002 08:00 Go to previous messageGo to next message
Mike
Messages: 417
Registered: September 1998
Senior Member
Hi,

You can do it over a database link which is the simplest way to do it (if the data quantity is small).
CREATE DATABASE LINK ...
INSERT INTO ... SELECT * FROM table_name@db_link_name ...

Another way to do it is to use the import/export tool.
For more detail about import/export look in your doc or execute a:
imp -?
exp -?

If you have a lot of data you may also have a look at the transportable tablespace feature.

Good luck
Mike
Re: How to move old DB data to newly modified DB? [message #50989 is a reply to message #50985] Thu, 18 April 2002 12:25 Go to previous messageGo to next message
Jean
Messages: 16
Registered: September 1999
Junior Member
Thanks for the reply.
But can I use imp/exp even though the schema is deferent?
Some of the old tables have different field names and different number of fields from the new database tables.
Can I directly import the database after exporting it?
Is there anything for me to do before export or import?
Thank you very much.
Re: How to move old DB data to newly modified DB? [message #50992 is a reply to message #50985] Thu, 18 April 2002 12:56 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
No import will complain of a mismatch.
Re: How to move old DB data to newly modified DB? [message #51002 is a reply to message #50989] Fri, 19 April 2002 00:59 Go to previous message
Mike
Messages: 417
Registered: September 1998
Senior Member
Have a look at the following link to see how to import tables exported by another user
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/a90192/ch02.htm#1005922

Good luck
Mike
Previous Topic: Effficeint Way of droping the database
Next Topic: Help In creating the Database
Goto Forum:
  


Current Time: Mon Sep 09 18:55:04 CDT 2024