ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 安装Oracle Dg记录 【便于以后查询】

安装Oracle Dg记录 【便于以后查询】

原创 Linux操作系统 作者:junshi66 时间:2012-06-07 22:02:37 0 删除 编辑
DG安装步骤
1 Primay
alter database force logging
2 设置standby log

alter database add standby logfile
    group 4 ('/u01/app/oracle/oradata/orcldb/stdby_redo04.log') size 50m,
    group 5 ('/u01/app/oracle/oradata/orcldb/stdby_redo05.log') size 50m,
    group 6 ('/u01/app/oracle/oradata/orcldb/stdby_redo06.log') size 50m,
    group 7 ('/u01/app/oracle/oradata/orcldb/stdby_redo07.log') size 50m;
3 修改参数
alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(primay,standby)' scope=spfile;
alter system set DB_UNIQUE_NAME='primay' scope=spfile;
alter system set LOG_ARCHIVE_DEST_1='location=/u01/archlog/primay VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primay' scope=spfile;
alter system set LOG_ARCHIVE_DEST_2='service=standby  LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby' scope=spfile;
alter system set LOG_ARCHIVE_MAX_PROCESSES=5 scope=spfile;
alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=spfile;
alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=spfile;
alter system set REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE scope=spfile;
alter system set FAL_SERVER=standby scope=spfile;
alter system set FAL_CLIENT=primay scope=spfile;
alter system set DB_FILE_NAME_CONVERT='standby','primay' scope=spfile;
alter system set LOG_FILE_NAME_CONVERT='standby','primay' scope=spfile;
alter system set STANDBY_FILE_MANAGEMENT=auto scope=spfile;
alter system set STANDBY_ARCHIVE_DEST='LOCATION=/u01/archlog/primay' scope=spfile;
shutdown immediate;
4 配置监听
tnsping 两端都可以访问 在两端
primay:
[oracle@ractest2 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
[oracle@ractest2 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PRIMAY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))
    )
    (CONNECT_DATA =
        (SERVICE_NAME = orcldb)
        (SID = primay)
         (server=dedicated)
 
    )
  )
STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))
    )
    (CONNECT_DATA =
        (SERVICE_NAME = orcldb)
        (SID = standby)
         (server=dedicated)
    )
  )
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

[oracle@ractest2 admin]$ tnsping standby
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 07-JUN-2012 15:31:19
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcldb) (SID = standby) (server=dedicated)))
OK (0 msec)
standby:
[oracle@ractest1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
[oracle@ractest1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PRIMAY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))
    )
    (CONNECT_DATA =
        (SID = primay)
        (server=dedicated)
 
    )
  )
STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))
    )
    (CONNECT_DATA =
     (SID = standby)
        (server=dedicated)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )
[oracle@ractest1 admin]$ tnsping primay
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 07-JUN-2012 15:32:01
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))) (CONNECT_DATA = (SID = primay) (server=dedicated)))
OK (10 msec)
[oracle@ractest1 admin]$ tnsping standby
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 07-JUN-2012 15:32:04
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))) (CONNECT_DATA = (SID = standby) (server=dedicated)))
OK (0 msec)

6 主库生成备库控制文件和参数文件修改
参数文件修改:
standby.__db_cache_size=390070272
standby.__java_pool_size=4194304
standby.__large_pool_size=4194304
standby.__shared_pool_size=150994944
standby.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcldb/adump'
*.background_dump_dest='/u01/app/oracle/admin/orcldb/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/orcldb/control01.ctl','/u01/app/oracle/oradata/orcldb/control02.ctl','/u01/app/oracle/oradata/orcldb/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/orcldb/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='primay','standby'
*.db_name='orcldb'
*.db_unique_name='standby'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=standbyXDB)'
*.fal_client='STANDBY'
*.fal_server='PRIMAY'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(standby,primay)'
*.log_archive_dest_1='location=/u01/archlog/standby VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'
*.log_archive_dest_2='service=primay  LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primay'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.dbf'
*.log_archive_max_processes=5
*.log_file_name_convert='primay','standby'
*.open_cursors=300
*.pga_aggregate_target=185597952
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=556793856
*.standby_archive_dest='LOCATION=/u01/archlog/standby'
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/orcldb/udump'
 
控制文件:
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/home/oracle/control01.ctl';
Database altered.
[oracle@ractest2 ~]$ cp control01.ctl control02.ctl
[oracle@ractest2 ~]$ cp control01.ctl control03.ctl
[oracle@ractest2 ~]$ scp *.ctl ractest1:/u01/app/oracle/oradata/orcldb/
The authenticity of host 'ractest1 (192.168.18.144)' can't be established.
RSA key fingerprint is fc:83:05:84:5a:ac:10:e4:97:36:ff:16:10:02:57:d6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ractest1' (RSA) to the list of known hosts.
oracle@ractest1's password:
control01.ctl                                                                                     100% 6896KB   6.7MB/s   00:00   
control02.ctl                                                                                     100% 6896KB   6.7MB/s   00:01   
control03.ctl                                                                                     100% 6896KB   6.7MB/s   00:00
7 备库上操作
[oracle@ractest1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:48:18 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/home/oracle/inistandby.ora';
LRM-00109: could not open parameter file '/home/oracle/inistandby.ora'
ORA-01078: failure in processing system parameters
SQL> startup nomount pfile='/home/oracle/initstandby.ora';
ORACLE instance started.
Total System Global Area  557842432 bytes
Fixed Size                  2022280 bytes
Variable Size             159384696 bytes
Database Buffers          390070272 bytes
Redo Buffers                6365184 bytes
SQL> create spfile from pfile='/home/oracle/initstandby.ora';
File created.
SQL> alter database mount;
Database altered.
SQL> shutdown immediate;
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  557842432 bytes
Fixed Size                  2022280 bytes
Variable Size             159384696 bytes
Database Buffers          390070272 bytes
Redo Buffers                6365184 bytes
Database mounted.

删除standby redo文件 重现建立
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo04.log';
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo05.log';
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo06.log';
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo07.log';
SQL> alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo04.log';
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo05.log';
alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo06.log';
Database altered.
SQL> alter database drop logfile '/u01/app/oracle/oradata/orcldb/stdby_redo07.log';
Database altered.
SQL>
Database altered.
SQL>
Database altered.

[oracle@ractest1 orcldb]$ rm -rf stdby_redo0*.log

添加新的:
alter database add standby logfile
    group 4 ('/u01/app/oracle/oradata/orcldb/stdby_redo04.log') size 50m,
    group 5 ('/u01/app/oracle/oradata/orcldb/stdby_redo05.log') size 50m,
    group 6 ('/u01/app/oracle/oradata/orcldb/stdby_redo06.log') size 50m,
    group 7 ('/u01/app/oracle/oradata/orcldb/stdby_redo07.log') size 50m;
SQL> alter database add standby logfile
  2      group 4 ('/u01/app/oracle/oradata/orcldb/stdby_redo04.log') size 50m,
  3      group 5 ('/u01/app/oracle/oradata/orcldb/stdby_redo05.log') size 50m,
  4      group 6 ('/u01/app/oracle/oradata/orcldb/stdby_redo06.log') size 50m,
  5      group 7 ('/u01/app/oracle/oradata/orcldb/stdby_redo07.log') size 50m;
Database altered.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/archlog/standby
Oldest online log sequence     1
Next log sequence to archive   3
Current log sequence           3
 
测试能不能sqlplus system/oracle@sid
primay:
[oracle@ractest2 admin]$ sqlplus sys/oracle@primay as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:55:07 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Enter user-name:
[oracle@ractest2 admin]$ sqlplus sys/oracle@standby as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:55:22 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Enter user-name:
[oracle@ractest2 admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-JUN-2012 15:55:29
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
[oracle@ractest2 admin]$ vim tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PRIMAY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))
    )
    (CONNECT_DATA =
      #  (SERVICE_NAME = orcldb) --修改部分
        (SID = primay)
         (server=dedicated)
    )
  )
STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))
    )
    (CONNECT_DATA =
       # (SERVICE_NAME = orcldb) --修改部分
        (SID = standby)
         (server=dedicated)
    )
  )
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

~
~
~
"tnsnames.ora" 39L, 816C written                                                                                 
[oracle@ractest2 admin]$ sqlplus sys/oracle@standby as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:57:36 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@ractest2 admin]$ sqlplus sys/oracle@primay as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:57:41 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

standby:
[oracle@ractest1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PRIMAY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest2)(PORT = 1521))
    )
    (CONNECT_DATA =
        (SID = primay)
        (server=dedicated)
 
    )
  )
STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ractest1)(PORT = 1521))
    )
    (CONNECT_DATA =
     (SID = standby)
        (server=dedicated)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )
[oracle@ractest1 admin]$ sqlplus sys/oracle@primay as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:58:43 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit   
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@ractest1 admin]$ sqlplus sys/oracle@standby as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 15:58:52 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
 
启动到准备接受redo进程的状态

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
主库启动到open状态:
[oracle@ractest2 admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 7 16:00:19 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/archlog/primay
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence           4
 
备库:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/archlog/standby
Oldest online log sequence     0
Next log sequence to archive   0
Current log sequence           4
但是报错了:日志:
[oracle@ractest1 orcldb]$ tail -f /u01/app/oracle/admin/orcldb/bdump/alert_standby.log
    group 4 ('/u01/app/oracle/oradata/orcldb/stdby_redo04.log') size 50m,
    group 5 ('/u01/app/oracle/oradata/orcldb/stdby_redo05.log') size 50m,
    group 6 ('/u01/app/oracle/oradata/orcldb/stdby_redo06.log') size 50m,
    group 7 ('/u01/app/oracle/oradata/orcldb/stdby_redo07.log') size 50m
Thu Jun  7 15:54:02 2012
Completed: alter database add standby logfile
    group 4 ('/u01/app/oracle/oradata/orcldb/stdby_redo04.log') size 50m,
    group 5 ('/u01/app/oracle/oradata/orcldb/stdby_redo05.log') size 50m,
    group 6 ('/u01/app/oracle/oradata/orcldb/stdby_redo06.log') size 50m,
    group 7 ('/u01/app/oracle/oradata/orcldb/stdby_redo07.log') size 50m
Thu Jun  7 16:00:16 2012
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Thu Jun  7 16:00:16 2012
Attempt to start background Managed Standby Recovery process (standby)
MRP0 started with pid=21, OS id=22647
Thu Jun  7 16:00:16 2012
MRP0: Background Managed Standby Recovery process started (standby)
Managed Standby Recovery not using Real Time Apply
Clearing online redo logfile 1 /u01/app/oracle/oradata/orcldb/redo01.log
Clearing online log 1 of thread 1 sequence number 2
Thu Jun  7 16:00:22 2012
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Thu Jun  7 16:00:22 2012
Clearing online redo logfile 1 complete
Clearing online redo logfile 2 /u01/app/oracle/oradata/orcldb/redo02.log
Clearing online log 2 of thread 1 sequence number 3
Clearing online redo logfile 2 complete
Clearing online redo logfile 3 /u01/app/oracle/oradata/orcldb/redo03.log
Clearing online log 3 of thread 1 sequence number 1
Clearing online redo logfile 3 complete
Media Recovery Waiting for thread 1 sequence 3
Thu Jun  7 16:00:57 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 22651
RFS[1]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Thu Jun  7 16:00:57 2012
RFS LogMiner: Client disabled from further notification
Primary database is in MAXIMUM PERFORMANCE mode
RFS[1]: Successfully opened standby log 4: '/u01/app/oracle/oradata/orcldb/stdby_redo04.log'
Thu Jun  7 16:00:58 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 22653
RFS[2]: Identified database type as 'physical standby'
RFS[2]: Successfully opened standby log 5: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:00:59 2012
Errors in file /u01/app/oracle/admin/orcldb/bdump/standby_arc1_22546.trc:
ORA-19504: failed to create file "/u01/archlog/standby/1_3_785338749.dbf"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 13: Permission denied
Thu Jun  7 16:00:59 2012
ARC1: Error 19504 Creating archive log file to '/u01/archlog/standby/1_3_785338749.dbf'
ARC1: Failed to archive thread 1 sequence 3 (19504)
ARCH: Archival stopped, error occurred. Will continue retrying
Thu Jun  7 16:00:59 2012
ORACLE Instance standby - Archival Error
Thu Jun  7 16:00:59 2012
ORA-16038: log 5 sequence# 3 cannot be archived
ORA-19504: failed to create file ""
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:00:59 2012
Errors in file /u01/app/oracle/admin/orcldb/bdump/standby_arc1_22546.trc:
ORA-16038: log 5 sequence# 3 cannot be archived
ORA-19504: failed to create file ""
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:01:22 2012
ARC2: Archiving not possible: No primary destinations
ARC2: Failed to archive thread 1 sequence 3 (4)
ARCH: Archival stopped, error occurred. Will continue retrying
Thu Jun  7 16:01:22 2012
ORACLE Instance standby - Archival Error
Thu Jun  7 16:01:22 2012
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:01:22 2012
Errors in file /u01/app/oracle/admin/orcldb/bdump/standby_arc2_22548.trc:
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:01:53 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 22662
RFS[3]: Identified database type as 'physical standby'
Thu Jun  7 16:01:53 2012
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[4]: Assigned to RFS process 22664
RFS[4]: Identified database type as 'physical standby'
RFS[4]: Archivelog thread 1 sequence 3 cannot be reused
Thu Jun  7 16:01:53 2012
Errors in file /u01/app/oracle/admin/orcldb/udump/standby_rfs_22664.trc:
ORA-16401: archivelog rejected by RFS
Thu Jun  7 16:02:22 2012
ARC3: Archiving not possible: No primary destinations
ARC3: Failed to archive thread 1 sequence 3 (4)
ARCH: Archival stopped, error occurred. Will continue retrying
Thu Jun  7 16:02:22 2012
ORACLE Instance standby - Archival Error
Thu Jun  7 16:02:22 2012
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:02:22 2012
Errors in file /u01/app/oracle/admin/orcldb/bdump/standby_arc3_22550.trc:
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:02:53 2012
RFS[2]: Archivelog thread 1 sequence 3 cannot be reused
Thu Jun  7 16:02:53 2012
Errors in file /u01/app/oracle/admin/orcldb/udump/standby_rfs_22653.trc:
ORA-16401: archivelog rejected by RFS
Thu Jun  7 16:03:22 2012
ARC4: Archiving not possible: No primary destinations
ARC4: Failed to archive thread 1 sequence 3 (4)
ARCH: Archival stopped, error occurred. Will continue retrying
Thu Jun  7 16:03:22 2012
ORACLE Instance standby - Archival Error
Thu Jun  7 16:03:22 2012
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:03:22 2012
Errors in file /u01/app/oracle/admin/orcldb/bdump/standby_arc4_22552.trc:
ORA-16014: log 5 sequence# 3 not archived, no available destinations
ORA-00312: online log 5 thread 1: '/u01/app/oracle/oradata/orcldb/stdby_redo05.log'
Thu Jun  7 16:03:53 2012
RFS[4]: Archivelog thread 1 sequence 3 cannot be reused
Thu Jun  7 16:03:53 2012
Errors in file /u01/app/oracle/admin/orcldb/udump/standby_rfs_22664.trc:
ORA-16401: archivelog rejected by RFS
经过排查发现 主库上/u01/archilog/primay 和 standby的目录权限是 oracle.oinstall 755
但是备库上的 /u01/archilog/primay 和 standby的目录权限是 root.root  755
所以讲备库上archlog下目录的权限和属组修改
chown -R oracle.oinstall /u01/archlog  【standby库】
然后重新将主库的数据文件复制到备库
重现生成控制文件
再次打开standby 数据库就没有报错。

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

请登录后发表评论 登录
全部评论

注册时间:2011-02-25

  • 博文量
    18
  • 访问量
    44677