Oracle Redo Log Recovery Data simulation experiment

Source: Internet
Author: User

A system environment:

1. Operating system: Oracle Linux 5.62, database: Oracle 11g two Oracle redo log: [Simulated media recovery]1. Turn off database archiving mode: [[email protected] ~]$ sqlplus/nologsql*plus:release 11.2.0.1.0 Production on Mon Feb 6 23:49:30 2017Copy  Right (c) 1982, Oracle. All rights reserved. Sql> Conn/as sysdbaconnected.sql> show Useruser is "SYS" sql> shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down. sql> start mountsp2-0310:unable to open File "Mount.sql" Sql> startup Mountoracle instance started. Total System Global area 830930944 bytesfixed size 2217912 bytesvariable size 478152776 byte Sdatabase buffers 348127232 Bytesredo buffers 2433024 bytesdatabase mounted.     sql> ALTER DATABASE Noarchivelog;database altered. 2. Create test table Space hltest:create tablespace hltest datafile ' hltest.ora ' size 5M autoextend on NEXT 1M MAXSIZE UNLIMITED Default  Storage (initial 128K next 1M pctincrease 0);  3. Create test user and test table: Drop user HL cascade; Create User HL IDentified by HL default tablespace hltest;  Grant Connect,resource to HL; Conn Hl/hl;  CREATE Table A (a number)----creating tables and populating the data.    Begin for I in 1..100000 loop insert into a values (i);   End Loop;    End  Commit 4. Copy Test.ora to Test1.ora file.    5. Insert into a SELECT * from A; --200,000 article 6. Close the database shutdown Immediate7. Swaps the file Test1.ora with the Test.ora name. 8. Start the database again sql> shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down. Sql> Startuporacle instance started. Total System Global area 830930944 bytesfixed size 2217912 bytesvariable size 478152776 byte Sdatabase buffers 348127232 Bytesredo buffers 2433024 bytesdatabase mounted. Ora-01113:file 8 Needs Media recoveryora-01110:data file 8: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/ U01apporacleoradataorclhltest.ora ' 9. The media recovery:sql> recover database; Media recovery complete. sql> ALTER DATABASE open;D Atabase altered. Experience: Oracle online redo log (online REDO log FILE) is primarily used for databaseMedia recovery, such as corruption of data files.          The archive log (archived log FILE) is actually a backup of the online log, after all, the online log space is limited and can only hold a certain amount of time to redo the log data. The combination of archived logs and full-Library backup files restores better results.
The next article will perform a simulation of the data table removal via Rman for recovery.

Oracle Redo Log Recovery Data simulation experiment

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.