|
I will assume that you are trying to do this from either an offline (cold) backup of your production system or that your production system is down while you are copying the datafiles across to the development server. You can do this using an online backup or RMAN but I don't think that's the case here.
At a high level, the procedure looks mostly correct except there are a few key steps missing.
On the development server, create the admin directories (bdump, udump, cdump, etc.) and the directories where the datafiles will reside.
Log in to the production database and type in 'alter database backup controlfile to trace;'. You will want to copy that file over to the development server and edit it appropriately. Change the database name, as well as the datafile information. Also, change the first line to read:
CREATE CONTROLFILE REUSE set DATABASE "newdbname" RESETLOGS
Copy over the production datafiles (either from a cold backup or after shutting down production) but don't bother copying over any tempfiles, redo logs or controlfiles.
Log in to the development server, and set your environment appropriately. If you are doing this on a Windows operating system, create the service for the new database.
Start SQL*Plus and perform the following steps:
connect sys as sysdba
startup nomount;
@createcontrolfilescript.sql
alter database open resetlogs;
Don't forget to add any tempfiles to the TEMP tablespace since these would not have been copied over. Also, if you will be using RMAN to perform backups on this database, change the DBID as your development database will now have the same DBID as production.
Finally, if you are using a version older than Oracle 8.1.5 and continue to see the errors above, there is a reported bug that may require you to restart the service and then continue with creating the controlfiles.
|