Set the database archiving mode

Source: Internet
Author: User

View database status, database as archive mode

[Email protected] hey~j->archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1

Note the archive path is the path specified by the parameter use_db_recovery_file_dest, i.e. the fast recovery area path

Modify database to non-archive mode (open, close archive mode is required in Mount mode)

[Email protected] Hey~j->shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.
[email protected] hey~j->startup mount;
ORACLE instance started.

Total System Global area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 541068408 bytes
Database buffers 281018368 bytes
Redo buffers 6586368 bytes
Database mounted.

[Email protected] Hey~j->alter database noarchivelog;

Database altered.

[Email protected] hey~j->archive log list;

Database log mode No Archive mode
Automatic Archival Disabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Current log sequence 1

[Email protected] hey~j->select status from V$instance;

STATUS
------------
Mounted

[Email protected] Hey~j->alter database archivelog;

Database altered.

[Email protected] hey~j->archive log list;

Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1

[Email protected] hey~j->alter database open;

Database altered.

After the database starts archiving, it is particularly important to note that there is still space left in the directory where the archive is placed, and if there is not enough space, it can cause the database hang, because when the redo log is switched on, the logs are archived, the logs are recycled, and if you loop to an archive redo file, Then the database will appear hang, waiting for the log archive. Therefore, the remaining space and the outdated archive log are required to be maintained.

Set Database archiving mode

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.