Home » RDBMS Server » Server Administration » database copy
database copy [message #304771] Thu, 06 March 2008 09:52 Go to next message
caprikar
Messages: 226
Registered: March 2007
Senior Member
Hi,
I have a database DB1(2 GB) and I want to create another database DB2 on the same server for which I follow the following steps:

1. Create new database DB2
2. Create all the tablespaces that are in DB1 in DB2.
3. Take full export dump of DB1 with full=y option after exporting ORACLE_SID=DB1
4. set the ORACLE_SID=DB2 and import with option full=y.

-will this method work?

Thanks,
GK
Re: database copy [message #304774 is a reply to message #304771] Thu, 06 March 2008 09:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Database Duplication with RMAN

Regards
Michel
Re: database copy [message #305105 is a reply to message #304771] Sat, 08 March 2008 09:07 Go to previous messageGo to next message
harshkumar
Messages: 34
Registered: February 2008
Location: Delhi
Member
You can create template using dbca and then create a new database based on the template.
Re: database copy [message #305107 is a reply to message #305105] Sat, 08 March 2008 09:56 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
That would create just an "empty" database (without the custom objects/data).
>>1. Create new database DB2
Seems OP is aware about how to do it.
Re: database copy [message #305111 is a reply to message #304771] Sat, 08 March 2008 10:16 Go to previous message
martijn
Messages: 283
Registered: December 2006
Location: Netherlands
Senior Member
If you are a little experienced you can consider following step:
(probably some steps forgotten but....at our shop we use it all the time)
1 - alter system backup controlfile to trace
1 - Stop DB1
2 - Copy all relevant files (datafiles/redolog/(s)pfile/...)
3 - find the tracefile generated at step 1
4 - edit the tracefile to reflect the new database
5 - edit copied pfile to reflect new database
6 - run sql command as in generated tracefile

(Don't forget to startup DB1 again Smile)

If you google a little you will find a lot of material describing this aproach.

(why do it like this....it's very fast if you script it Very Happy)
Previous Topic: another ORA-01591: lock held by in-doubt distributed transaction xx problem
Next Topic: can't determine ORACLE_HOME FOR sid ebs
Goto Forum:
  


Current Time: Wed Dec 07 12:54:37 CST 2016

Total time taken to generate the page: 0.07894 seconds