| SQLPLUS /NOLOG CONNECT SYS AS SYSDBA | |
| CREATE PFILE='init?.ora' FROM SPFILE; - Only if you are on 9i and using an SPFILE | |
| >ALTER SYSTEM SWITCH LOGFILE;' | |
| >ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS; | |
| SHUTDOWN EXIT | |
| Move any datafiles to there new location. | |
| Find the trace file created and rename it. Remove all lines up to STARTUP NOMOUNT If you were using an spfile modify STARTUP NOMOUNT to be STARTUP NOMOUNT PFILE='??'; Modify the positions of the datafiles. Change the database name if required. Change REUSE to set if you are renaming the database. | |
| Remove any controlfiles. | |
| Modify the init.ora file: change the DB_NAME parameter ensure that the parameter DB_BLOCK_SIZE is the same as the originating database, otherwise when creating the controlfile you may receive: ORA-01160 "file is not a %s" modify any other position/name based parameters | |
| If REMOTE_LOGIN_PASSWORDFILE is set to exclusive or shared then a valid passwordfile should exist in ORACLE_HOME/dbs or created using orapwd (otherwise you will receive an ora-600 [kzsrsdn:1]. See [NOTE:97630.1]. | |
| Modify the /etc/oratab if necessary (see notes below if NT) and reset with . oraenv if the database name has changed | |
| >STARTUP NOMOUNT PFILE='init?.ora' Run create controlfile script | |
| >ALTER DATABASE OPEN RESETLOGS | |
| CREATE SPFILE FROM PFILE 'init?.ora'; - Only if you are on 9i and using an SPFILE |
| Before you create the control file - Create & start an Oracle Service In MSDOS | |
| Cd to directory with script in | |
| ORADIM80 - NEW -SID ???? -INTPWD ORACLE -STARTMODE AUTO -PFILE C:\????????\INITSID.ORA SET ORACLE_SID=???? NET START (Shows all services, check ORACLESERVICESID is running) SVRMGR30 >CONNECT INTERNAL >STARTUP NOMOUNT PFILE=C:\???????\ INITSID.ORA >SPOOL ???.LOG >@CONTROL FILE CREATION SCRIPT >EXIT | |
| REGEDT32 \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID Locate ORACLE_SID & change or add new (Add value - ORACLE_SID, data type REG_EXPAND_SZ, OK then enter SID) | |
| Startup and shutdown database, then stop and start machine and check if started | |
| Run easyconfig and set up listener and tnsnames. |