【RAC】Creating a filesystem physical standby from ASM (RAC ) primary 之二

楊奇龍發表於2011-09-09
oracle@rac3:/opt/oracle/11.2.0/yangdb/dbs>rman target sys/yang402@rac  auxiliary /
Starting Duplicate Db at 08-SEP-11
released channel: c1
released channel: s1
released channel: s2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/08/2011 11:22:40
RMAN-06217: not connected to auxiliary yangdb with a net service name

如錯誤提示::未使用Net服務名連線到輔助資料庫,
解決方法:透過連線服務名的方式連線輔助例項即可,使用
rman  target sys/yang402@rac  auxiliary sys/yang402@yangdb
oracle@rac3:/opt/oracle/11.2.0/yangdb/dbs>rman  target sys/yang402@rac  auxiliary sys/yang402@yangdb

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 8 11:42:32 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target yangdb: RAC (DBID=2349052205)
connected to auxiliary yangdb: RAC (not mounted)
RMAN> run {
2>    allocate channel c1 type disk;
3>    allocate auxiliary channel s1 type disk;
4>    allocate auxiliary channel s2 type disk;
5>    sql channel c1 "alter system archive log current";
6>    duplicate target yangdb for standby from active yangdb
7>    DB_FILE_NAME_CONVERT=('+DATA1','/opt/oracle/oradata/yangdb')
8>          spfile
9>          set db_name='rac' 
10>          set db_unique_name='yangdb'
11>          set cluster_yangdb='FALSE'
12>          set audit_file_dest='/opt/oracle/admin/yangdb/adump'
13>          set DB_CREATE_FILE_DEST='/opt/oracle/oradata/yangdb'
14>          set control_files='/opt/oracle/oradata/yangdb/control01.ctl','/opt/oracle/oradata/yangdb/control02.ctl','/opt/oracle/oradata/yangdb/control03.ctl'
15>          set undo_tablespace='UNDOTBS1'
16>          set service_names='yangdb'
17>          set standby_file_management='AUTO'
18>          set log_archive_config='DG_CONFIG=(rac,yangdb)'
19>          set log_archive_dest_1='LOCATION=/opt/oracle/arch'
20>          set log_archive_dest_2='service=rac ARCH ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=rac'
21>          set log_archive_dest_state_1='enable'
22>          set log_archive_dest_state_2='enable'
23>          set log_archive_format='yangdb%t_%s_%r.log'
24>          set remote_login_passwordfile='exclusive'
25>          set LOG_FILE_NAME_CONVERT='+DATA1','/opt/oracle/oradata/alibank'
26>          set fal_client='yangdb'
27>          set fal_server='rac' 
28>          NOFILENAMECHECK;
29>     sql channel c1 "alter system archive log current";
30>  }
using target yangdb control file instead of recovery catalog
allocated channel: c1
channel c1: SID=61 instance=rac2 device type=DISK
allocated channel: s1
channel s1: SID=18 device type=DISK
allocated channel: s2
channel s2: SID=17 device type=DISK
sql statement: alter system archive log current
Starting Duplicate Db at 08-SEP-11
contents of Memory Script.:
{
   backup as copy reuse
   targetfile  '/opt/rac/oracle/11.2.0/db/dbs/orapwrac2' auxiliary format 
 '/opt/oracle/11.2.0/yangdb/dbs/orapwyangdb'   targetfile 
 '+DATA1/rac/spfilerac.ora' auxiliary format 
 '/opt/oracle/11.2.0/yangdb/dbs/spfileyangdb.ora'   ;
   sql clone "alter system set spfile= ''/opt/oracle/11.2.0/yangdb/dbs/spfileyangdb.ora''";
}
executing Memory Script
Starting backup at 08-SEP-11
RMAN-03009: failure of backup command on c1 channel at 09/08/2011 11:43:03
ORA-17629: Cannot connect to the remote yangdb server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote yangdb server
continuing other job steps, job failed will not be re-run
released channel: c1
released channel: s1
released channel: s2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/08/2011 11:43:04
RMAN-03015: error occurred in stored script. Memory Script
RMAN-03009: failure of backup command on c1 channel at 09/08/2011 11:43:04
ORA-17629: Cannot connect to the remote yangdb server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote yangdb server
RMAN> exit
在備庫上:
由於備庫在建立的時候是nomount狀態的,服務為註冊!
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac3)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                08-SEP-2011 11:42:07
Uptime                    0 days 0 hr. 14 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/11.2.0/alifpre/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/rac3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=1521)))
Services Summary...
Service "alifpre" has 1 instance(s).
  Instance "alifpre", status UNKNOWN, has 1 handler(s) for this service...
Service "rac" has 1 instance(s).
  Instance "alifpre", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
必須在listener.ora中配置靜態監聽:
如上面顯示的blocked 狀態!
oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>cat listener.ora 
# listener.ora Network Configuration File: /opt/oracle/11.2.0/alifpre/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
 (SID_LIST =
  (SID_DESC =
   (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)
    (PROGRAM = extproc)
  )
 (SID_DESC =
  (GLOBAL_DBNAME = alifpre)
    (ORACLE_HOME = /opt/oracle/11.2.0/alifpre)
  (SID_NAME = alifpre)
 )
)

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac3)(PORT = 1521))
    )
  )
ADR_BASE_LISTENER = /opt/oracle
oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl reload

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 09-SEP-2011 22:44:24

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 09-SEP-2011 22:44:33

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                08-SEP-2011 13:18:24
Uptime                    1 days 9 hr. 26 min. 9 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/11.2.0/alifpre/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/rac3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac3)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "alifpre" has 2 instance(s).
  Instance "alifpre", status UNKNOWN, has 1 handler(s) for this service...
  Instance "alifpre", status READY, has 1 handler(s) for this service...
The command completed successfully
oracle@rac3:/opt/oracle/11.2.0/alifpre/network/admin>
後續。。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-707060/,如需轉載,請註明出處,否則將追究法律責任。

相關文章