Home » RDBMS Server » Server Utilities » how to copy table from user to another user
how to copy table from user to another user [message #70553] Fri, 28 June 2002 06:41 Go to next message
adeel
Messages: 4
Registered: June 2002
Junior Member
hello!
i want to make a copy of all tables and views, including date in that table from one user'schema to another user'schema at same server. how it is possible
Re: how to copy table from user to another user [message #70555 is a reply to message #70553] Fri, 28 June 2002 07:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
export and import
Re: how to copy table from user to another user [message #70576 is a reply to message #70553] Tue, 02 July 2002 10:13 Go to previous messageGo to next message
André ALIMBA
Messages: 16
Registered: April 2002
Junior Member
1- Create Database Link between the two schemas
- create public database link db_link
2 - Connect to the 2nd schema
- connect to rdb_username identified by rdb_passwd using 'tns_connect_db'

a) db_link is the link name
b) rdb_username is the remote database username
c) rdb_passwd is the remote database password
d) tns_connect_db is the tns connectivity alias in tnsnames.ora

3- Copy the table from database db1 to another database db2 you must :
- copy from rdb_username/rdb_passwd @tns_connect_db
create (or insert or append...) table_db2
using select * from table_db1;
ATTENTION : If the table contains many fields with the format of type LONG, it's good to use import / export utilities. Because maximum long size, using copy from command is 80.
If you use "copy from" command with "create" option, think to localise your table in the real tablespace...
Think to reindex, rebuilds constraints for this table
...
Good luck
Aurevoir et à bientôt...
André ALIMBA, Chef de Projet BEAC
Re: how to copy table from user to another user [message #70589 is a reply to message #70553] Wed, 03 July 2002 17:43 Go to previous message
wangsanjun
Messages: 13
Registered: June 2002
Junior Member
Try do like this:
exp user/password@connectionstring file=exp
imp newuser/newpassword@@connectionstring file=exp

Good luck!
Previous Topic: Very Very Very Very Very URGENT!!!!
Next Topic: How to load a text file into table?
Goto Forum:
  


Current Time: Tue May 07 04:14:16 CDT 2024