Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table migration

Status
Not open for further replies.

crsdev

Programmer
Sep 29, 2006
96
US
hello all,
I am trying to migrate some tables along with PK,FK and indexes form one schma to another with a script.
Can some please point me to some resources or help, or suggest something.

Thanks for the help in advance.
 
CRSDEV,

The best method to migrate one or more tables, along with PK, FK, indexes (and all other constraints) is Oracle exp/imp/DataPump. The "fromuser=<schema> touser=<schema>" parameters are the schema-migration features of the "imp" utility.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
you can also use:

alter table <table name> move tablespace <tablespace name>

you will need to rebuild indexes once table is moved:-

alter index <index name> rebuild tablespace <tablespace name>

Sy UK
 
crsdev said:
I am trying to migrate some tables along with PK,FK and indexes from one schma to another
Sy, a MOVE action cannot/does not change schemas; at most it will change tablespace.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top