In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Preface
The control file (control file) is a fairly small file (up to about 64m) that contains a directory of other files needed by Oracle. The parameter file tells the instance the location of the control file, and the control file tells the sample database and the location of the online redo log file. The control file also tells Oracle other things, such as information about the checkpoint that has occurred, the database name (which must match the db_name parameter), the timestamp when the database was created, the history of archiving the redo log (which sometimes makes the control file larger), RMAN information, and so on.
Environment: OEL 5.7 + Oracle 10.2.0.5
Background: in the process of operation and maintenance of Oracle, we often encounter some scenarios that need to rebuild the control file. The scenario in this paper can be copied to the new path, run for a period of time, and then start the database to reproduce with the old control file.
1. Current fault phenomenon
Error ORA-01122, ORA-01110, ORA-01207 when starting the database with the old control file:
SQL > shutdown abortORACLE instance shut down.SQL > startupORACLE instance started.Total System Global Area 599785472 bytesFixed Size 2098112 bytesVariable Size 218106944 bytesDatabase Buffers 373293056 bytesRedo Buffers 6287360 bytesDatabase mounted.ORA-01122: database file 1 failed verification checkORA-01110: data file 1:'/ oradata/cxywdb/system01.dbf'ORA-01207: file is more recent than control file-old control file
two。 Analyze the cause of the failure
Find the MOS document based on the error message:
ORA-1122, ORA-1110, ORA-1207 while open the database after crash (document ID 283927.1)
Think about it for a second. Why is this happening?
The main error is ORA-01207. Using the oerr tool, you can see that Oralce describes this error in detail as follows:
01207, 00000, "file is more recent than control file-old control file"
/ / * Cause: The control file change sequence number in the data file is
/ / greater than the number in the control file. This implies that
/ / the wrong control file is being used. Note that repeatedly causing
/ / this error can make it stop happening without correcting the real
/ / problem. Every attempt to open the database will advance the
/ / control file change sequence number until it is great enough.
/ / * Action: Use the current control file or do backup control file recovery to
/ / make the control file current. Be sure to follow all restrictions
/ / on doing a backup control file recovery.
In general, in this case, the current control file must not be found. Then you have to consider rebuilding the control file to solve it, and the suggestion given by MOS is also to rebuild the control file.
3. Rebuild control file
The core steps for rebuilding the control file:
3.1 backup control files to trace
Startup mountalter database backup controlfile to trace;oradebug setmypidoradebug tracefile_name
3.2Boot database to nomount status
Shutdown abortstartup nomount
3.3 confirm the statement to rebuild the control file
Vi control.sqlCREATE CONTROLFILE REUSE DATABASE "CXYWDB" NORESETLOGS FORCE LOGGING ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292LOGFILE GROUP 5'/ oradata2/cxywdb/redo11.log' SIZE 50m, GROUP 6'/ oradata2/cxywdb/redo12.log' SIZE 50m, GROUP 7'/ oradata2/cxywdb/redo13.log' SIZE 50m-STANDBY LOGFILEDATAFILE'/ oradata/cxywdb/system01.dbf','/ oradata/cxywdb/undotbs01.dbf','/ oradata/cxywdb/sysaux01.dbf','/ oradata/cxywdb/users01.dbf','/ oradata/cxywdb/alfred01.dbf' '/ oradata/cxywdb/alfred02.dbf',' / oradata/cxywdb/alfred03.dbf','/ oradata/cxywdb/alfred04.dbf','/ oradata/cxywdb/alfred05.dbf','/ oradata/cxywdb/dbs_i_alfred01.dbf'CHARACTER SET ZHS16GBK
3.4 restore and open the database
SQL > recover database;Media recovery complete.SQL > alter database open;Database altered.
Attachment: the actual solution process is as follows:
SQL > shutdown abortORACLE instance shut down.SQL > startup mountORACLE instance started.Total System Global Area 599785472 bytesFixed Size 2098112 bytesVariable Size 218106944 bytesDatabase Buffers 373293056 bytesRedo Buffers 6287360 bytesDatabase mounted.SQL > alter database backup controlfile to trace;Database altered.SQL > oradebug setmypidStatement processed.SQL > oradebug tracefile_name/s01/oracle/admin/cxywdb/udump/cxywdb_ora_3983.trcSQL > shutdown abortORACLE instance shut down.SQL > startup nomount;ORACLE instance started.Total System Global Area 599785472 bytesFixed Size 2098112 bytesVariable Size 218106944 bytesDatabase Buffers 373293056 bytesRedo Buffers 6287360 bytesSQL > @ controlControl file created.SQL > select status from v$instance STATUS-MOUNTEDSQL > recover database;Media recovery complete.SQL > alter database open;Database altered.
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.