1) Check control files:
1. show parameter control
2.select name, status from v$controlfile;
3.select controlfile_created from v$database;
2) How to re-create control file from trace or if you lost all contril files ?
alter database backup controlfile to trace;
alter database backup controlfile to trace as '/tmp/controlfile.txt';
Example:
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "jdb" RESETLOGS [NORESETLOGS] FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 4672
LOGFILE
GROUP 1 (
'+DG_DATA1/jdb/onlinelog/group_1.263.800998057',
'+DG_DATA1/jdb/onlinelog/group_1.262.800998067'
) SIZE 300M BLOCKSIZE 512,
GROUP 2 (
'+DG_DATA1/jdb/onlinelog/group_2.267.800997685',
'+DG_DATA1/jdb/onlinelog/group_2.266.800997695'
) SIZE 300M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
+DG_DATA1/jdb/datafile/system.256.800746777',
'+DG_DATA1/jdb/datafile/sysaux.257.800746777',
'+DG_DATA1/jdb/datafile/undotbs1.258.800746777',
'+DG_DATA1/jdb/datafile/users.259.800746777',
'+DG_DATA1/jdb/datafile/jdb_data01.280.801222241'
CHARACTER SET AL32UTF8 [Character Set];
RECOVER DATABASE;
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
3)CONTROL_FILE_RECORD_KEEP_TIME [default7] : Specifies the minimum number of days before a reusable record in the control file can be reused.
Note:This parameter applies only to records in the control file that are circularly reusable (such as archive log and RMAN backup ). It does not apply to records such as datafile, tablespace, and redo thread records.
No comments:
Post a Comment