Full recovery for Oracle user management 2: Restore in noarchivelog mode (Backup without online logs)

Source: Internet
Author: User

1. view the environment

 1   - Bash -  3.00 $ Sqlplus /  Nolog  2   3 SQL * Plus: Release 10.2 . 0.2 . 0   - ProductionOn Mon Jan 21   19 : 22 : 40   2013  4   5 Copyright (c) 1982 , 2005 , Oracle. All  Rights Reserved.  6  7 SQL > Conn /  As  Sysdba  8   Connected.  9 SQL > Archive Log  List;  10   Database   Log  Mode no archive Mode  11  Automatic Archival disabled  12   Archive destination use_db_recovery_file_dest  13 Oldest online Log Sequence 1  14   Current   Log Sequence 2  15 SQL >  

2. Backup in non-archive mode (no online logs are backed up)

2.1 Shutdown

1SQL> ShutdownImmediate2 DatabaseClosed.3 DatabaseDismounted.4 Oracle instance shut down.5SQL> 

2.2 back up data files and Control Files

 1   / U01 / Oradata /  Sunbak 2 Bash -  3.00 $ CP * . CTL / U01 /  Backup  /  Sunbak  3 Bash -  3.00 $ CP * . DBF / U01 / Backup  /  Sunbak  4 Bash -  3.00 $

3. damage the current database

 1 Bash -  3.00  $ Pwd  2   / U01 / Oradata /  Sunbak 3 Bash -  3.00 $ Ls -  L  4 Total 2142000  5   - RW - R --  --- 1 Oracle oinstall 7061504 Jan 21 control01.ctl  6   - RW- R --  --- 1 Oracle oinstall 7061504 Jan 21 control02.ctl  7   - RW - R --  --- 1 Oracle oinstall 7061504 Jan 21 control03.ctl  8   - RW - R --  --- 1 Oracle oinstall 104865792 Jan 21 example01.dbf  9  - RW - R --  --- 1 Oracle oinstall 52429312 Jan 21 redo01.log  10   - RW - R --  --- 1 Oracle oinstall 52429312 Jan 21 redo02.log  11   - RW - R -- --- 1 Oracle oinstall 52429312 Jan 21 redo03.log  12   - RW - R --  --- 1 Oracle oinstall 251666432 Jan 21 sysaux01.dbf  13   - RW - R --  --- 1 Oracle oinstall 503324672 Jan 21 system01.dbf  14   - RW - R --  --- 1 Oracle oinstall 20979712 Jan 21 temp01.dbf  15   - RW - R --  --- 1 Oracle oinstall 31465472 Jan 21 undotbs01.dbf  16   - RW - R --  --- 1 Oracle oinstall 5251072 Jan 21 users01.dbf  17 Bash-  3.00 $ RM - F *  18 Bash -  3.00 $

4. Restore (backup does not back up the redo file)

 1 Bash -  3.00  $ Pwd  2   / U01 / Oradata /  Sunbak  3 Bash -  3.00 $ CP / U01 /  Backup  / Sunbak /*  .  4   Bash-3.00 $ LS-l  5   Total 1834512  6  -RW-r ----- 1 Oracle oinstall 7061504 Jan 21 control01.ctl  7   -RW-r ----- 1 Oracle oinstall 7061504 Jan 21 control02.ctl  8   -RW-r ----- 1 Oracle oinstall 7061504 Jan 21 control03.ctl  9   -RW-r ----- 1 Oracle oinstall 104865792 Jan 21 example01.dbf  10   -RW-r ----- 1 Oracle oinstall 251666432 Jan 21 sysaux01.dbf  11   -RW-r ----- 1 Oracle oinstall 503324672 Jan 21 system01.dbf 12   -RW-r ----- 1 Oracle oinstall 20979712 Jan 21 temp01.dbf  13   -RW-r ----- 1 Oracle oinstall 31465472 Jan 21 undotbs01.dbf  14   -RW-r ----- 1 Oracle oinstall 5251072 Jan 21 users01.dbf  15   Bash-3.00 $ 

5. Restore

5.1 open to mount status

 1 Bash -  3.00 $ Sqlplus / Nolog  2   3 SQL * Plus: Release 10.2 . 0.2 . 0   - Production On Mon Jan 21   19 : 47 : 04  2013  4   5 Copyright (c) 1982 , 2005 , Oracle. All  Rights Reserved.  6   7 SQL > Conn /  As  Sysdba  8 ConnectedTo  An idle instance.  9 SQL >  Startup Mount  10   Oracle instance started.  11   12 Total system global area 289406976  Bytes  13 Fixed size 1279820  Bytes 14 Variable Size 92276916  Bytes  15   Database Buffers 192937984  Bytes  16 Redo Buffers 2912256  Bytes  17   Database  Mounted.  18 SQL>  

5.2 run the recover command

 1 SQL > Recover Database Until cancel using Backup  Controlfile;  2 Ora -  00279 : Change 570446 Generated 01  /  21 /  2013   19 : 27 : 52 Needed For Thread 1  3 Ora -  00289  : Suggestion:  4   / U01 / Flash_recovery_area / Sun / Archivelog / 2013_01 _ 21  / O1_mf_1_2 _ %  U _. Arc  5 Ora -  00280 : Change 570446   For Thread 1  Is   In Sequence # 2  6   7 Specify Log :{ < RET > = Suggested | Filename | Auto |  Cancel}  8   Cancel  9  Media recovery canceled.  10 SQL >  

5.3 open the database and create logs

 
1SQL> Alter Database OpenResetlogs;2 3 DatabaseAltered.4 5SQL>

6. Verify that the log file has been created

1SQL>! Ls/U01/Oradata/Sunbak/*. Log2 /U01/oradata/sunbak/redo01.log/u01/oradata/sunbak/redo02.log/u01/oradata/sunbak/redo03.log3 4 SQL>

 

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.