Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the reconstruction of Rebuild controlfile?

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces what the reconstruction of Rebuild controlfile is like, the content is very detailed, interested friends can use it for reference, I hope it can be helpful to you.

DBA needs to know when rebuilding control files, but may not meet on the production system for the entire career.

First of all, it is emphasized that backup is the safest, fastest and effective way to recover. If a DBA is not planned for an effective backup, one day, he will be awakened by a nightmare.

After waking up, it is helpless, complicated manual recovery. Moreover, to what extent it is restored, it depends on the sky and fate. Anyway, you can't look at yourself, because there is no backup, you have completely handed over the initiative to individual people. Here is a record of the reconstruction of controlfile

Create a controlfile trace on another normal database

1. SQL > alter database backup controlfile to trace

The path of trace file is under user_dump_dest.

1. SQL > show parameter user_dump_dest

two。

3. NAME TYPE VALUE

4.-

5. User_dump_dest string / home/oracle/admin/R10105/udump/

6. After navigating to the directory locate the latest trace file by date/time by issuing: ls-ltr.

7.

8.% cd / home/oracle/admin/R10105/udump/

9.% ls-ltr

For a complete trace, please refer to the attachment

You can modify specific parameter values such as the path of the trace file, and extract the creation script from it.

1. STARTUP NOMOUNT

2. CREATE CONTROLFILE REUSE DATABASE "R10105" NORESETLOGS ARCHIVELOG

3. MAXLOGFILES 16

4. MAXLOGMEMBERS 3

5. MAXDATAFILES 100

6. MAXINSTANCES 8

7. MAXLOGHISTORY 454

8. LOGFILE

9. GROUP 1'/ opt/oracle/oradata/R10105/redo01.log' SIZE 10m

10. GROUP 2'/ opt/oracle/oradata/R10105/redo02.log' SIZE 10m

11. GROUP 3'/ opt/oracle/oradata/R10105/redo03.log' SIZE 10m

12.-- STANDBY LOGFILE

13. DATAFILE

14.'/ opt/oracle/oradata/R10105/system01.dbf'

15.'/ opt/oracle/oradata/R10105/undotbs01.dbf'

16.'/ opt/oracle/oradata/R10105/sysaux01.dbf'

17.'/ opt/oracle/oradata/R10105/users01.dbf'

18.'/ opt/oracle/oradata/R10105/example01.dbf'

19. CHARACTER SET AL32UTF8

20.

Register for archivelog

1.-- ALTER DATABASE REGISTER LOGFILE'/ home/oracle/flash_recovery_area/R10105/archivelog/2012_06_15/o1_mf_1_1_%u_.arc'

2.-- ALTER DATABASE REGISTER LOGFILE'/ home/oracle/flash_recovery_area/R10105/archivelog/2012_06_15/o1_mf_1_1_%u_.arc'

3.-- Recovery is required if any of the datafiles are restored backups

4.-or if the last shutdown was not normal or immediate.

5. RECOVER DATABASE

6.-All logs need archiving and a log switch is needed.

7. ALTER SYSTEM ARCHIVE LOG ALL

8.-Database can now be opened normally.

9. ALTER DATABASE OPEN

10.-Commands to add tempfiles to temporary tablespaces.

11.-Online tempfiles have complete space information.

12.-Other tempfiles may require adjustment.

13. ALTER TABLESPACE TEMP ADD TEMPFILE'/ opt/oracle/oradata/R10105/temp01.dbf'

14. SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M

15.-End of tempfile additions.

16.--

In fact, rebuilding the control file is equivalent to manually rebuilding the library, adding the existing resources to controlfile one by one, and finally registering the current archivelog file.

At the same time, the reconstruction controlfile is divided into NORESETLOGS and RESETLOGS, and the corresponding script is selected according to the requirements.

About how the reconstruction of Rebuild controlfile is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report