Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3127966
  • 博文数量: 710
  • 博客积分: 14546
  • 博客等级: 上将
  • 技术积分: 6738
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-30 10:20
文章分类

全部博文(710)

文章存档

2016年(1)

2014年(7)

2013年(22)

2012年(227)

2011年(322)

2009年(119)

2008年(12)

分类: Oracle

2011-05-08 21:48:10

8)configuring the database archiving mode(b8_1)

    

noarchivelog(b8_2)

    archivelog(b8_3)

    

    a) changing the archiving mode

        sys>shutdown immediate

        sys>startup mount

        sys>alter database archivelog;(ALTER DATABASE ARCHIVELOG MANUAL;)(10g)

        sys>alter database open;

        (full database backup)

 

     log_archive_start=true|false(9i)

     select name,ISDEPRECATED from v$parameter where name like '%log_archive_star%';(10g)

    

    b) Specifying Multiple ARCn Processes

 

        log_archive_max_processes (max ARCn process number)

 

        sys> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=3;

        sys>select name,paddr from v$bgprocess where paddr<>'00';

 

    c)Specifying the Archive Log Destination

    

       log_archive_dest_n (archive log destination)(n=1..10)

 

       log_archive_dest_1='location=/u01/app/oracle/arch'

       log_archive_dest_2='service=standby_db1'

 

       sys>alter system set log_archive_dest_1='location=/u01/app/oracle/arch';

       sys>alter system set log_archive_dest_2='location=USE_DB_RECOVERY_FILE_DEST';

 

     MANDATORY: implies that archiving to this destination must complete successfully

                before an online redo log file can be overwritten.

       reopen or reopen=600:whether archiving to a destination must be re-attempted in case of failure

 

       sys>alter system set log_archive_dest_1='location=/u02/app/oracle/arch MANDATORY';

       sys>alter system set log_archive_dest_1='location=/u02/app/oracle/arch MANDATORY reopen';

       sys>alter system set log_archive_dest_1='location=/u02/app/oracle/arch MANDATORY reopen=600';

 

 

     OPTIONAL: implies that an online redo log file can be reused even if it has not been successfully archived to this destination.

               This is the default.

        sys>alter system set log_archive_dest_1='location=/u02/app/oracle/arch OPTIONAL';

 

     flash recovery area

 

          The Flash Recovery Area provides a centralized location for

              control file backups, archived redo logs, flashback logs, and database backups.

 

          The Flash Recovery Area can be defined as a directory, file system, or ASM disk group.

 

          A single Flash Recovery Area can be shared by more than one database

 

          USE_DB_RECOVERY_FILE_DEST=/u01/app/oracle/flash_recovery_area

 

    d)Specifying the Minimum Number of Successful Archive Locations

 

     log_archive_min_succeed_dest

       The number of destinations that need to be archived successfully before an online redo log file can be used is determined

       based on the following settings:

           The number of destinations defined as MANDATORY.

 

           The value of the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter.

           The value specifies a lower bound on the number of local destinations that need to be archived.

 

           If this number is less than the number of mandatory local destinations,

               it has no effect on the archiving behavior.

 

           If this number exceeds the number of mandatory local destinations,

            the number of local destinations archived must be at least equal to this value before an online redo log file can be reused.

 

        LOG_ARCHIVE_MIN_SUCCEED_DEST = 2

 

    e)Controlling Archiving to a Destination

        An archival destination can be disabled by using the dynamic initialization parameter LOG_ARCHIVE_DEST_STATE_n

  

          LOG_ARCHIVE_DEST_STATE_2 = DEFER

  

        Archiving to a destination can be enabled again

         LOG_ARCHIVE_DEST_STATE_2 = ENABLE

   

    

     f)log_archive_format

        alter system set log_archive_format='%s_%a_%t_%r.arc' scope=spfile;

          %s (log sequence)(*)

          %S (length )

          %t (log thread) (*)

          %T

          %a (active id)

          %d (db id)

          %r (resetlogs id) (*)

          %R  (select resetlogs_id from V$DATABASE_INCARNATION);

 

     alter system archive log start

     alter system archive log stop;

     alter system archive log current

 

     g)see archivelog

                   SYS>archive log list;

                   SYS>select DBID,NAME,LOG_MODE from v$database;

 

 

      v$archived_log

      v$archive_dest

      v$log_history

      v$archive_processes

阅读(1230) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~