ORACLE Archive Log Open Close method (reprint)

Source: Internet
Author: User

One set to archive mode

    1Sql>ArchiveLoglist; #查看是不是归档方式2Sql> AlterSystemSetLog_archive_start=True scope=spfile; #启用主动归档 SQL> AlterSystemSetLog_archive_dest='Location=/oracle/ora9/oradata/arch'Scope=SPFile; #设置归档路径 SQL> AlterSystemSetLog_archive_dest_1='Location=/oracle/ora9/oradata/arch1'Scope=SPFile; SQL> AlterSystemSetLog_archive_dest_2='LOCATION=/ORACLE/ORA9/ORADATA/ARCH2'Scope=SPFile; #如果归档到两个位置, the SQL can be implemented by the top method> AlterSystemSetLog_archive_format='Arch_%d_%t_%r_%s.log'#设置归档日记款式3Sql> shutdownimmediate; 4Sql>startup Mount; #打开控制文件, do not open the data file5Sql> Alter DatabaseArchivelog; #将数据库切换为归档模式6Sql> Alter Database Open; #将数据文件打开7Sql>ArchiveLoglist; #查看此时是否处于归档模式8query to determine that the database is in Archivelog mode and the archive process is running SQL> SelectLog_mode fromv$Database; SQL> SelectArchiver fromv$instance; 9Log Switching SQL> Altersystem switch logfile; in the Oracle scenario, run the following query: SQL> SelectName fromV$archived_log; 

Two set non-archive mode

    1Sql>ArchiveLoglist; #查看是否是归档方式2Sql> AlterSystemSetLog_archive_start=False scope=SPFile; #禁用自动归档3Sql> shutdownimmediate; 4Sql>startup Mount; #打开控制文件, do not open the data file5Sql> Alter DatabaseNoarchivelog; #将数据库切换为非归档模式6Sql> Alter Database Open; #将数据文件打开7Sql>ArchiveLogList #查看此时便处于非归档模式

Three-Archive related commands

    Log stop;       Log start;       Log list;            Show parameters;      Show parameters Log_archive_start;      Show Parameters log_archive_max_process; #归档进程数       alterset log_archive_max_process=5; #将归档进程数改为5       Select *  from v$bgprocess;    #检察后台进程  

ORACLE Archive Log Open Close method (reprint)

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.