ORACLE Control File Management

Source: Internet
Author: User

ORACLE Control File Management 1. Control File: a binary file that records the physical structure of the database. 2. The control file mainly includes the Database Name (DB_NAME) data file name and location, REDOLOG file name and location database creation time the current log SCNCHECKPOINT Number 3. The control file can be written in the open state. If the control file cannot be written, the database cannot be mounted or restored. 4. The control file will be created at the same time when the database is created. ORACLE recommends copying two or more copies on different disks. To prevent loss. 5. You can set the location of CONTROL_FILES In the parameter file. If OMF is not enabled, the control file created by the database is named by the name specified by the system. If OMF is enabled, enable this feature in the parameter file. OMF defines the name and location of the control file. If ASM is used, it is set by the initialization parameters DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST. 6. Back up the control file in the following cases: Create, delete, or rename the data file. Create or delete a tablespace, or change the tablespace to READ/WRITE status. Create or delete a redo log or LOG group. 7. creating additional copies, renaming, and relocating controlfilesshutdown the database. Use the operating system command to copy an existing control file to a new location. Modify the CONTROLE_FILES parameter, add a new control file name, or change the large control file name. Restart the database. 8. Create a control file (1) query data files and REDO files. [SQL] select member from v $ logfile; select name from v $ datafile; (2) shut down the database. (3) back up all data parts and redo logfiles. (4) Start the database to the NOMOUNT status. (5) create new controlfile. [SQL] CREATE CONTROLFILE SET DATABASE prod LOGFILE GROUP 1 ('/u01/oracle/prod/redo01_01.log', '/u01/oracle/prod/redo01_02.log '), GROUP 2 ('/u01/oracle/prod/redo02_01.log', '/u01/oracle/prod/redo02_02.log'), GROUP 3 ('/u01/oracle/prod/redo03_01.log ', '/u01/oracle/prod/redo03_02.log') resetlogs datafile '/u01/oracle/prod/system01.dbf' SIZE 3 M,'/u01/oracle/prod/rbs01.dbs 'S IZE 5 M, '/u01/oracle/prod/users01.dbs' SIZE 5 M, '/u01/oracle/prod/temp01.dbs' SIZE 5 m maxlogfiles 50 MAXLOGMEMBERS 3 MAXLOGHISTORY 400 MAXDATAFILES 200 MAXINSTANCES 6 ARCHIVELOG; (6) Open the database. [SQL] alter database open resetlogs; 9. when the data file to be queried is MISSINGnnnn, the data file is read-only or closed OFFLINE. You cannot rename the file to solve the problem. You should use the Restoration Service, finally, open the database in RESETLOGS mode. 10. Control the file backup method. [SQL] (1) alter database backup controlfile to '/home/oracle/control. bkp'; (2) alter database backup controlfile to trace; this file can be opened in plain text. 11. Use the COPY method to restore the control file. When a single control file is damaged, you can use the following methods. [SQL] cp control01.tl control02.tl; startup; 12. Move the control file. [SQL] cp olde_location new_loction; modify the initialization parameter: CONTROL_FILES to start the database. 13. Delete the control file. Shut down the database. Modify the parameter file to remove the control file to be deleted. Start the database. 14. database view. V $ database: displays the database information. V $ controlfile: query the name of a control file. V $ controlfile_reord_section can query the information recorded in the control file. V $ parameter can display the control file location from the parameter file (CONTROL_FILES) Parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.