Академический Документы
Профессиональный Документы
Культура Документы
You should only need to recreate your control file under very special
circumstances:
- All current copies of the control file have been lost or are corrupted.
- You need to change a "hard" database parameter that was set when the
database was first created, such as MAXDATAFILES, MAXLOGFILES,
MAXLOGHISTORY, etc.
Instructions:
=============
1. If you are running Oracle7 or higher you can get Oracle to generate
a script for you that enables you to recreate the controlfile. Run the
following command while the database is mounted or open and connected
as a user with DBA privileges:
% svrmgrl
SVRMGR> connect internal
SVRMGR> startup mount
SVRMGR> alter database backup controlfile to trace;
Oracle6 does not have this feature and therefore you will need to build
the CREATE CONTROLFILE statement yourself. The syntax is discussed in
detail in the Oracle SQL Reference Guide.
To find out what USER_DUMP_DEST is set to, follow one of the following:
USER_DUMP_DEST = d:/oradata/orcl/trce/udump
VALUE
------------------------------------------------
d:/oradata/orcl/trace/udump
The easiest way to locate the correct trace is to look at its date.
A file will exist with the current date and time. The naming
convention for these files is operating system specific.
Example:
--------
% cd $ORACLE_HOME/rdbms/log
% ls -l
-rw-r--r-- 1 osupport dba 2315 Oct 3 16:39 alert_p716.log
-rw-r--r-- 1 osupport dba 1827 Oct3 16:39 p716_ora_26220.trc
3. Modify the trace file and use it as a script to create the control
file. Copy the trace file to a script file, such as "new_control.sql",
delete the header information prior to the words STARTUP NOMOUNT,
and make any other desired changes, such as increasing MAXDATAFILES,
MAXLOGFILES, etc.
Sample:
-------------------------- <start trace> -----------------------------
Dump file /u01/oracle/7.1.6/rdbms/log/p716_ora_26220.trc
Oracle7 Server Release 7.1.6.2.0 - Production Release
With the distributed and replication options
PL/SQL Release 2.1.6.2.0 - Production
ORACLE_HOME = /u01/oracle/7.1.6
ORACLE_SID = p716
Oracle process number: 9 Unix process id: 26220
System name: SunOS
Node name: tcsun2
Release: 5.4
Version: Generic_101945-27
Machine: sun4m
Example:
--------
% cd $ORACLE_HOME/dbs
% mv ctrlV716.ctl ctrlV716.bak
1. Take a full backup of the database, including all datafiles and redo
log files.
Example:
--------
6. At the first opportunity, shut the database down and take a full cold
backup.