/ * Control file * /
The control file is a binary that contains important information about the database physical structure, including the name of the database, the relevant data file, and the name and location of the redo log file, the current log serial number and so on.
Creating a composite control file (Oracle supports up to 8 control files at the same time) Oracle will also write all control files at the same time, but only the first control file specified in the control_files parameter 1. Close the database 2. will have Some control files copy multiple copies and rename them, then move them to other locations of the operating system. Control_Files = ('i: /oracle/oradata/ctrloradb01.ctl', 'j: /oracle/oradata/ctrlorradb02.ctl', 'k: /oracle/oradata/ctrlorradb03.ctl', 'l: /oracle/oradata/ctrlorAdb04.ctl') 3. Modify the Control_Files set in the initialization parameter file 4. Restart the database
Backup Control File 1. Back up the control file as binary, Alter Database Backup ControlFile To 'i: /oracle/backup/control.bkp';
2. Back up the control file as a text file (back up to the tracking file in the Oracle / Base / Admin / Sid / UDUMP directory, will generate a SQL script in the trace file) ALTER DATABASE BACKUP ControlFile to TRACE;
Deleting Control File 1. Turn off Database 2. Edit the Control_Files initialization parameters, so that the name of the control file to be deleted is no longer included 3. Remove the control file in the operating system 4. Restart the database
Control File Data Dictionary: V $ ControlFile All Control File Names and Status Information
/ * Reform log files * / Oracle Database The set of heavy log files need to include two redo log file groups. Only after the redo record generated by a transaction is written to redo log files Oracle believes that this transaction has been successfully submitted. The redo record may also write a log file before transaction.
The LGWR process must confirm that this upcoming redo log file must be done as follows: * If the database is in non-archive mode, the redo log file is overwritten before being overwritten. All transactions corresponding to all redo-records must already be written into the data file * If the database is archived, the redo log file has been filled before being covered, not only should be corresponding to all transactions Modifying the result results are written to the data file, but also wait for the archive process to complete the archive operation.
When establishing a composite log file, you should distribute the individual members in the same redo log group to different hard drives, which can also avoid hard disk I / O conflicts generated between the LGWR process and the ARCN process. If there is Conditions, it is best to store data files and log files in different hard drives, which can also avoid I / O conflicts between the LGWR process and the DBWR process.
Maximum number of redo log groups: MaxLogfiles can have the maximum number of members of each redo log group: MaxLogmembers
Creating a redo log group (composite) The redo log group has the group number that cannot be larger than the value set by the maxLogfiles parameter, and there is no intermittent. RALTER DATABASE Add logfile ('i: /oracle/roadata/oradb01/redo0301.rdo', ' i: /oracle/oradata/oradb01/redo0302.rdo ') Size 100M (should be set to the group number to set the group number for the newly built log group, which will automatically set the newly built log group, usually incremented after the current group number)
Alter Database Add Logfile Group 3 ('i: /oracle/oradata/oradb01/redo0301.rdo', 'i: /oracle/oradata/oradb01/redo0302.rdo') Size 100M Create a non-complementary log file ALTER DATABASE ADD Logfile 'i: /oracle/oradata/oradb01/redo01.rdo'
Create a member log file (can not use the size parameter to set the log file size) Alter Database Add logfile Member 'i: /oracle/oradata/oradb01/redo0303.log' to group 3 or Alter Database Add logfile Member 'i; / oracle / ORADATA / ORADB01 / Redo0303.log 'to (' i; /oacle/oradata/oradb01/redo0301.log ',' i; /oracle/oradata/oradb01/redo0302.log ')
Change the redo log file name or position 1. Turn off the database 2. Rename or move the redo log file at the operating system level, you want to delete the files on the original location 3.Startup Mount, do not open the database 4. Use the rename file clause Alter Database Rename File 'i; /oracle/oradata/oradb01/redo0301.log', 'i; /oracle/roadata/oradb01/redo0302.log' to 'j; /oracle/logs/redo0301.log', 'k; /oracle/logs/redo0302.log'5.alter database Open6. Backup control file
Status of Active / Current / Inactive Member Log File Valid / Invalid / Stale
Delete the redo log group (only to delete the rest of the INACTIVE status, if you want to delete the redo log group for the Current status, you must execute a manual log switch, switch it to the inactive state)
ALTER DATABASE DROP LOGFILE Group 3 The last need to manually delete the corresponding files in the operating system
Deleting a member log file (only the member log file in the restoable log group that can be removed) ALTER DATABASE DROP logfile medb01/redo0302.log 'Finally, you need to manually delete the corresponding file in the operating system.
Hand-switched log (after each log switch, Oracle will record in a warning file of the database) Alter System Switch logfile
Empty the redo log group (that is, it will initialize all the contents of the log file, want to delete the redo log file, rebuild it) ALTER DATABASE CLOGFILE GROUP 3
If the redo log group to be emptied has not been archived, you must specify the unarchived clause (Oracle will avoid archiving this redo log group, where the redo record saved will not be lost) ALTER DATABASE CLEAR UnarchiveD logfile group 3
WARNING: If the redo log group is not archived, it is possible to cause data loss. For example, if it is switched to offline in a table space, it is not clean, that is, some of the SGA zone belongs to the table space. The dirty bolus has not been written to the data file, then the next time the table space is restored to online status, the information in the redo log file is required to recover, and if the recovery information is included in the redo log group Called, the table space will not be restored to online status.
Heavy log file data dictionary V $ log Heavy log file basic information V $ logfile information for each member log file