Oracle Database archiving mode switching and related operations

Source: Internet
Author: User

Oracle DatabaseSwitchArchive ModeOperations and some related knowledge of the archive mode is what we will introduce in this article. Next we will begin to introduce this part of content. First, execute the following code:

 
 
  1. SQL> shutdown immediate;  
  2. Database closed.  
  3. Database dismounted.  
  4. ORACLE instance shut down.  
  5. SQL> startup mount;  
  6. ORACLE instance started.Total System Global Area  205520896 bytes  
  7. Fixed Size                  1218532 bytes  
  8. Variable Size              71305244 bytes  
  9. Database Buffers          130023424 bytes  
  10. Redo Buffers                2973696 bytes  
  11. Database mounted.  
  12. SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;  
  13. Database log mode              Archive Mode  
  14. Automatic archival             Enabled  
  15. Archive destination            /oracle/app/oradata/LARRY/arch1  
  16. Oldest online log sequence     184  
  17. Next log sequence to archive   186  
  18. Current log sequence           186 

Switch archive Mode

View archiving Mode

 
 
  1. SQL> archive log list;
  2. Database Log mode: Non-archive mode; non-archive Mode
  3. Disable automatic archiving
  4. Archive end point c: \ oracle \ ora92 \ RDBMS
  5. The earliest log summary sequence 37
  6. Current Log sequence 39
  7. SQL> shutdown immediate
  8. The database has been closed.
  9. The database has been detached.
  10. ORACLE routine disabled
  11. SQL> startup mount;
  12. The ORACLE routine has been started.
 
 
  1. Total System Global Area 135338868 bytes
  2. Fixed Size 453492 bytes
  3. Variable Size 109051904 bytes
  4. Database Buffers 25165824 bytes
  5. Redo Buffers 667648 bytes
  6. The database has been loaded.

Enable archive Mode

 
 
  1. SQL> alter database archivelog;
  2. The database has been changed.
  3. SQL> alter database open;
  4. The database has been changed.
  5. SQL> archive log list;
  6. The archive mode of database logs is enabled.
  7. Disable automatic archiving
  8. Archive end point c: \ oracle \ ora92 \ RDBMS
  9. The earliest log summary sequence 37
  10. Next archive log sequence 39
  11. Current Log sequence 39

Configure the archiving process

SQL> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 3;

The system has been changed.
 
Configure archiving location

 
 
  1. SQL> ALTER SYSTEM SET log_archive_dest = 'C: \ oracle \ admin \ zrqhis \ arch '; the SYSTEM has been changed.
  2. SQL> ALTER SYSTEM SET log_archive_duplex_dest = 'C: \ oracle \ admin \ zrqhis \ arch_duplex_dest '; the SYSTEM has changed.
  3. SQL> archive log list;
  4. Database Log mode archiving Mode
  5. Disable automatic archiving
  6. Archive endpoint C: \ oracle \ admin \ zrqhis \ arch_duplex_dest. The storage location should be changed.
  7. The earliest log summary sequence 37
  8. Next archive log sequence 39
  9. Current Log sequence 39

Enable automatic archiving mode manually

 
 
  1. SQL> archive log start
  2. Processed statements
  3. SQL> archive log list;
  4. Database Log mode archiving Mode
  5. Enable automatic archiving
  6. Archive end point C: \ oracle \ admin \ zrqhis \ arch_duplex_dest
  7. The earliest log summary sequence 37
  8. Next archive log sequence 39
  9. Current Log sequence 39

Enable automatic archiving Mode

 
 
  1. SQL> Alter system set log_archive_start = true scope = spfile;
  2.  
  3. The system has been changed.
  4.  
  5. SQL> shutdown immediate;
  6. The database has been closed.
  7. The database has been detached.
  8. The ORACLE routine has been disabled.
  9. SQL> startup;
  10. The ORACLE routine has been started.
  11.  
  12. Total System Global Area 135338868 bytes
  13. Fixed Size 453492 bytes
  14. Variable Size 109051904 bytes
  15. Database Buffers 25165824 bytes
  16. Redo Buffers 667648 bytes
  17. The database has been loaded.
  18. The database has been opened.
  19. SQL> archive log list;
  20. Database Log mode archiving Mode
  21. Enable automatic archiving
  22. Archive endpoint D: \ oracle \ oradata \ test2 \ archive
  23. Earliest Summary log sequence 5
  24. Next archive log sequence 7
  25. Current Log sequence 7 SVRMGR> alter system switch logfile; -- force the system to switch logs to immediately observe the generation of archived logs
  26. C: \ oracle \ admin \ zrqhis \ arch_duplex_dest
  27. Obtain: ARC00039.001.

This article describes how to switch the Oracle database to the archive mode and some operations related to the archive mode. I hope this introduction will be helpful to you!

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.