Recently I had an oppertunity to do some database work for a company in Michigan. To alter for this I found out the company was using Oracle's 10g database product. To be honest I had never done a database copy before on a 10g system. So for the Noobs out there I think I'll include step by go instructions of what I did. There are some PROBLEMS WITH 10g CLONE see optional stepsSource Database: HRPRDTarget Database: HRTESTStep 1.
Step4. Navigate to the location of your trc files. choose by date and write the most current out somewhere to be edited. Then cut out the following divide and deliver it as createnewdb sql:STARTUPNOMOUNTCREATECONTROLFILE apply DATABASE "OLDLSQ" NORESETLOGSNOARCHIVELOGMAXLOGFILES 16MAXLOGMEMBERS 2MAXDATAFILES 240MAXINSTANCES 1MAXLOGHISTORY 113LOGFILEGROUP 1 ('/u03/oradata/oldlsq/log1a dbf','/u03/oradata/olslsq/log1b dbf') coat 30M,assort 2 ('/u04/oradata/oldlsq/log2a dbf','/u04/oradata/oldlsq/log2b dbf') coat 30MDATAFILE'/u01/oradata/oldlsq/system01 dbf','/u01/oradata/oldlsq/mydatabase dbf';# Recovery is required if any of the datafiles are restored# backups or if the last shutdown was not normal or immediate. acquire DATABASE# Database can now be opened normally. alter DATABASE OPEN;go5. change lines from the "createnewdb sql" we just created:shift the lines following the characterset lines including:# Recovery is required if any of the datafiles are restored# backups or if the last shutdown was not normal or immediate. RECOVER DATABASE# Database can now be opened normally. alter DATABASE OPEN;go6. Do a global replace on the old Database name "HRPRD" with "HRDEV" (without quotes-lol) within the createnewdb sql file. Also change the following like to readbefore changes:CREATE CONTROLFILE REUSE DATABASE "HRPRD" NORESETLOGSafter changes:CREATE CONTROLFILE SET DATABASE "HRDEV" RESETLOGSnote: The instructions I've read everywhere say that you decide the "NORESETLOGS" option when using the "SET" operator. In 10g it explicitly tells me that in order to change the database label you have to use the "RESETLOGS" Option. Disclaimer: I'm no know it all. I do what works :)go7. On your Destination forge(HRDEV). Create a bomb database (using your new DB name "HRDEV") using the Database configuration assistant. Step8. Copy all of the datafiles from the source machine to the target forge (yes the clone is on a displace box)using the "windows copy" option or "cp" for UNIX. Put the files in the same location as where you got them on the Production.
Forex Groups - Tips on Trading
Related article:
http://dbashiz.blogspot.com/2007/10/oracle-10g-database-clone-via-data-file.html
comments | Add comment | Report as Spam
|