Oracle Archive/Non-archive

Source: Internet
Author: User

1. See if Oralce is an archive or non-archive mode

Sql> select Name,log_mode from V$database;

NAME Log_mode
---------------------------------------- ------------------------------------
YOON ARCHIVELOG

Sql> select Name,log_mode from V$database;

NAME Log_mode
---------------------------------------- ------------------------------------
YOON ARCHIVELOG

sql> archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 326
Next log sequence to archive 328
Current log sequence 328

2. View Archive Storage Path

Sql> Show parameter db_recovery;

NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
Db_recovery_file_dest String/u01/oracle/fast_recovery_area
Db_recovery_file_dest_size Big Integer 4122M

3. Modify the archive path size

Sql> alter system set db_recovery_file_dest_size=5g;

4. View archive Path

Sql> select name,space_limit,space_used from V$recovery_file_dest;

NAME Space_limit space_used
---------------------------------------- ----------- ----------
/u01/oracle/fast_recovery_area 5368709120 2539942912

5. Modify the archive path

Sql> alter system set db_recovery_file_dest= '/u01/archivelog ';

6. Delete Archive log

① View Archive Path status

② to the system directory to delete the archive log

③crosscheck Archivelog All;

④delete expired Archivelog All;

7. Deleted 7 days ago

DELETE ARCHIVELOG all completed before ' SYSDATE-7 ';

8, 7 days ago to now

DELETE ARCHIVELOG from time ' SYSDATE-7 ';

9. Modify the archive format

Modify the archive format alter system set Log_archive_format = "Archive_%t_%s_%r.log" scope=spfile;
You can also set a parameter alter system set log_archive_max_processes = 2; How many archive processes are opened by the operating system for the Oracle archive and the database is restarted.
Sql> alter system set log_archive_dest_1= ' Location=/u01/archivelog ' scope =both;

Oracle Archive/Non-archive

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.