Full recovery of Oracle user management 5: Control File Corruption (control file content has not changed before and after)

Source: Internet
Author: User

Scenario Description:Control File Corruption (control file content unchanged)

1. Backup

1 SQL> alter database backup controlfile to trace as '/u01/admin/sun/udump/c.trc';2 3 Database altered.4 5 SQL> 

2. Delete the backup file

 1 -bash-3.00$ ls -l 2 total 2183024 3 -rw-r-----   1 oracle   oinstall 7061504 Jan 23 03:12 control01.ctl 4 -rw-r-----   1 oracle   oinstall 7061504 Jan 23 03:12 control02.ctl 5 -rw-r-----   1 oracle   oinstall 7061504 Jan 23 03:12 control03.ctl 6 -rw-r-----   1 oracle   oinstall 104865792 Jan 23 03:01 example01.dbf 7 -rw-r-----   1 oracle   oinstall 52429312 Jan 23 03:01 redo01.log 8 -rw-r-----   1 oracle   oinstall 52429312 Jan 23 03:11 redo02.log 9 -rw-r-----   1 oracle   oinstall 52429312 Jan 23 03:01 redo03.log10 -rw-r-----   1 oracle   oinstall 10493952 Jan 23 03:01 sun01_1.dbf11 -rw-r-----   1 oracle   oinstall 10493952 Jan 23 03:01 sun02_1.dbf12 -rw-r-----   1 oracle   oinstall 251666432 Jan 23 03:07 sysaux01.dbf13 -rw-r-----   1 oracle   oinstall 503324672 Jan 23 03:10 system01.dbf14 -rw-r-----   1 oracle   oinstall 20979712 Jan 22 23:24 temp01.dbf15 -rw-r-----   1 oracle   oinstall 31465472 Jan 23 03:10 undotbs01.dbf16 -rw-r-----   1 oracle   oinstall 5251072 Jan 23 03:01 users01.dbf17 -bash-3.00$ rm -f control01.*18 -bash-3.00$ 

3. Shutdown

1 SQL> shutdown abort2 ORACLE instance shut down.3 SQL> 

4. Change the backup control file

1-Bash-3.00 $ PWD 2/u01/admin/Sun/udump 3-Bash-3.00 $ cp c. trc c. SQL 4 6 delete comments and redundant information from the control file 7-Bash-3.00 $ VI C. SQL 8 9 startup nomount10 create controlfile reuse Database "sun" using archivelog11 maxlogfiles 1612 maxlogmembers 313 maxdatafiles 10014 maxinstances 815 maxloghistory 29216 logfile17 group 1 '/u01/oradata/sunbak/comment 'size 50 m, 18 group 2'/u01/oradata/sunbak/redo02.log 'size 50 m, 19 group 3 '/u01/oradata/sunbak/redo03.log' size 50m20 datafile21 '/u01/oradata/sunbak/system01.dbf', 22'/u01/oradata/sunbak/comment ', 23'/u01/oradata/sunbak/sysaux01.dbf ', 24'/u01/oradata/sunbak/users01.dbf', 25'/u01/oradata/sunbak/example01.dbf ', 26 '/u01/oradata/sunbak/sun01_1.dbf', 27 '/u01/oradata/sunbak/sun02_1.dbf' 28 Character Set al32utf829; 30 31 recover database32 33 alter system archive log all; 34 35 alter database open; 36 37 alter tablespace temp add tempfile '/u01/oradata/sunbak/temp01.dbf' 38 size 20971520 reuse autoextend on next 655360 maxsize 32767 m; 39 -- 40-Bash-3.00 $

5. Use C. SQL to generate control files

 1 -bash-3.00$ sqlplus /nolog 2  3 SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jan 23 03:56:32 2013 4  5 Copyright (c) 1982, 2005, Oracle.  All Rights Reserved. 6 SQL> conn /as sysdba 7 Connected to an idle instance. 8 SQL> @/u01/admin/sun/udump/c.sql 9 ORACLE instance started.10 11 Total System Global Area  289406976 bytes12 Fixed Size                  1279820 bytes13 Variable Size              92276916 bytes14 Database Buffers          192937984 bytes15 Redo Buffers                2912256 bytes16 17 Control file created.18 19 Media recovery complete.20 21 System altered.22 23 Database altered.24 25 Tablespace altered.26 27 SQL> 

 

Related Article

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.