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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy schema o 1

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
How can I copy all objects from one schema to another.
Thanks.
 
Use EXP and IMP and specify the FROMUSER and TOUSER options ( Must have DBA privs to do this)..

If only a few objects, you could connect as the target schema and use the
Create table <name> as select from <otherschema>.<table_name>
method..Would need select rights on the other schema's stuff..

[profile]
 
I'm not a DBA. Can I do it in one statement?
 
ask your dba to grant you an exp_full_database and imp_full_database roles. Hope this would help
 
I want to move the Oracle Control and Data files from the current directory. How can I do this? I am working in Sun Solaris environment.
 
Hi

to modify the control file you need to follow the below steps

a. Shutdown the database
b. Move the control file to the desired location
c. Modify the init.ora to point to the desired location
d. Start the database

To modify the datafiles get the list of datafiles files associated with the tablespaces dba_data_files, dba_tablespaces

a. Bring all the related tablespaces for the datafiles offline

b. Move the datafiles to the desired location

c. Issue rename command so that it Renames the datafiles at the desired location. This will update the control file.

ALTER DATABASE RENAME DATFILE DIR_PATH/LOC1 TO DIR_PATH/LOC2;


Alternatively

Get the controlfiles to trace

ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

This will create a trace file in bdump directory in ascii format.

Modify the trace file to change the location of the datafiles say trace.sql

load the trace.sql in svrmgrl or

svrmgrl>@trace.sql

regards
khobar

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top