I want to copy all the objects of Scott schema to another schema.

I can not understand what the code should be. Like bellow one?

create user scott1 identified by tiger1;


It's a quite old database. Your SQL command creates new user.

You can use Export in order to copy contents of one schema to another.

exp FILE=$ORACLE_HOME/scott_export.dmp LOG= $ORACLE_HOME/scott_export.log OWNER=scott

Create new user as you have shown in your post and grant required privileges. Then import it to new schema.

imp FILE=$ORACLE_HOME/ scott_export.dmp LOG= $ORACLE_HOME/scott_import.log FROMUSER=scott TOUSER=scott2

Details are here and here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.