ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 歸檔多路徑設置

歸檔多路徑設置

原创 Linux操作系统 作者:amy_oracle 时间:2012-07-17 15:17:19 0 删除 编辑

oracle允許設置歸檔多路徑,當第一路徑不可用時,自動切換到備用的歸檔路徑,提高了oracle數據庫的可用性,相關設置如下:

 

SQL> show parameter log_archive_dest

 

NAME                TYPE           VALUE

---------------------------------------------- ----------------------

log_archive_dest       string

 

log_archive_dest_1     string  LOCATION=C:\oracle\product\10.2.0\db_1\database\archive

log_archive_dest_10     string

 

log_archive_dest_2      string

 

 

SQL> alter system set log_archive_dest_1='LOCATION=C:\oracle\product\10.2.0\db_1\database\archive';

 

已更改系統.

 

SQL> alter system set log_archive_dest_2='location=d:\arch  alternate=log_archive_dest_1 noreopen';

 

已更改系統.

 

SQL>  alter system set log_archive_dest_state_2=enable;

 

已更改系統.

 

SQL>  alter system set log_archive_dest_state_1=alternate;

 

已更改系統.

 

SQL> select dest_name,destination,status from v$archive_dest;

 

DEST_NAME                      DESTINATION                              STATUS

------------------------------ ---------------------------------------- ------------------

LOG_ARCHIVE_DEST_1  C:\oracle\product\10.2.0\db_1\database\archive ALTERNATE

                              

 

LOG_ARCHIVE_DEST_2           d:\arch              VALID

 

已選取 10 個資料列.

 

一直插入大量數據,使之產生很多的歸檔,當d:\arch空間滿的時候發現歸檔會自己切換到備用歸檔路徑C:\oracle\product\10.2.0\db_1\database\archive

 

警告日志報錯的信息如下:

Tue Jul 17 14:20:37 2012

Errors in file c:\oracle\product\10.2.0\admin\amyt\bdump\amyt_arc1_1956.trc:

ORA-19504: 無法建立檔案 "D:\ARCH\ARC00026_0788281747.001"

ORA-27044: 無法寫入檔案的標頭區塊

OSD-04008: WriteFile() 失敗, 無法寫入檔案

O/S-Error: (OS 112) 磁碟的空間不足。

Tue Jul 17 14:20:37 2012

ARC1: Error 19504 Creating archive log file to 'D:\ARCH\ARC00026_0788281747.001'

ARC1: Failed to archive thread 1 sequence 26 (19504)

ARCH: Archival stopped, error occurred. Will continue retrying

Tue Jul 17 14:20:37 2012

Errors in file c:\oracle\product\10.2.0\admin\amyt\bdump\amyt_arc1_1956.trc:

ORA-16038: 無法存檔日誌 1 序號 26

ORA-19504: 無法建立檔案 ""

ORA-00312: 線上日誌 1 繫線 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\AMYT\REDO01.LOG'

Tue Jul 17 14:20:41 2012

Archiver process freed from errors. No longer stopped

Tue Jul 17 14:23:38 2012

Thread 1 cannot allocate new log, sequence 28

Checkpoint not complete

  Current log# 2 seq# 27 mem# 0: C:\ORACLE\PRODUCT\10.2.0\ORADATA\AMYT\REDO02.LOG

 

SQL> select dest_name,destination,status from v$archive_dest;

 

DEST_NAME                      DESTINATION                              STATUS

------------------------------ ---------------------------------------- ------------------

LOG_ARCHIVE_DEST_1             C:\oracle\product\10.2.0\db_1\database\a rchive  VALID

LOG_ARCHIVE_DEST_2             d:\arch                                  DISABLED

LOG_ARCHIVE_DEST_3                                                      INACTIVE

LOG_ARCHIVE_DEST_4                                                      INACTIVE

LOG_ARCHIVE_DEST_5                                                      INACTIVE

LOG_ARCHIVE_DEST_6                                                      INACTIVE

LOG_ARCHIVE_DEST_7                                                      INACTIVE

LOG_ARCHIVE_DEST_8                                                      INACTIVE

LOG_ARCHIVE_DEST_9                                                      INACTIVE

 

DEST_NAME                      DESTINATION                              STATUS

------------------------------ ---------------------------------------- ------------------

LOG_ARCHIVE_DEST_10                                                     INACTIVE

 

 

 

如果歸檔失敗切換後想回到原來的設置,需重新設置參數:

SQL>  alter system set log_archive_dest_state_2=enable;

 

已更改系統.

 

SQL>  alter system set log_archive_dest_state_1=alternate;

 

已更改系統.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9902302/viewspace-735688/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2008-04-19

  • 博文量
    9
  • 访问量
    20701