Oralce archive log enabling and disabling example, oralce Archive

Source: Internet
Author: User

Oralce archive log enabling and disabling example, oralce Archive

Check whether the oracle database is in archive Mode
SQL> select name, log_mode from V $ database;

NAME LOG_MODE
------------------------------------------
TEST NOARCHIVELOG

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 80157
Current log sequence 80163

Edit the archive mode of the configuration database in this section

1. Change non-archive mode to archive Mode  

1) SQL> conn/as sysdba (connect to the database as DBA)
2) SQL> shutdown immediate; (close the database immediately)
3) SQL> startup mount (start the instance and load the database, but do not open it)
4) SQL> alter database archivelog; (change the database to archive Mode)
5) SQL> alter database open; (open the database)
6) SQL> alter system archive log start; (enable automatic archiving)
7) SQL> exit (exit)

Make a full backup because the backup logs generated in non-archive log mode are no longer available in archive mode. This step is not very important!

2. Change the archive mode to non-archive mode.  

1) SQL> SHUTDOWN NORMAL/IMMEDIATE;
2) SQL> STARTUP MOUNT;
3) SQL> ALTER DATABASE NOARCHIVELOG;
4) SQL> ALTER DATABASE OPEN;

3. Archiving related commands

Archive log stop;
Archive log start;
Archive log list;

Show parameters;
Show parameters log_archive_start;
Show parameters log_archive_max_process; # Number of archiving processes
Alter system set log_archive_max_process = 5; # change the number of archiving processes to 5
Select * from v $ bgprocess; # Check the background process


Oracle archive logs were originally opened and closed later. How can I re-open them now?

Are you talking about the archive mode?
The method is as follows:
First, you need to set the database to the mount state, and then execute the alter database archivelog; command.

SQL> archive log list; -- view the current archive mode.

What tools can be used to open oracle archive log files?

Brother,
Oracle archive log files are binary files.
We cannot view or modify such files in the normal way.
We recommend that you do not touch it.

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.