Estava executando um duplicate para criar um Oracle Standby quando foi reportado o seguinte erro:
}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> using target database control file instead of recovery catalog allocated channel: D1 channel D1: SID=83 device type=DISK allocated channel: D2 channel D2: SID=81 device type=DISK allocated channel: D3 channel D3: SID=62 device type=DISK allocated channel: D4 channel D4: SID=26 device type=DISK allocated channel: AUX1 channel AUX1: SID=1 device type=DISK Starting Duplicate Db at 27-MAR-17 released channel: D1 released channel: D2 released channel: D3 released channel: D4 released channel: AUX1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 03/27/2017 16:41:19 RMAN-05501: aborting duplication of target database RMAN-06217: not connected to auxiliary database with a net service name
Neste caso, como é um Duplicate from Active Database é necessário a adição de uma entrada estática no arquivo Listener.ora do banco de dados auxiliar, além de utilizar a string de conexão na execução do Duplicate tanto para o banco de dados Auxiliar como para o target.
LISTENER_DG2 = (DESCRIPTION_LIST = (DESCRIPTION = (GLOBAL_DBNAME = dg2) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = dg2) (ADDRESS = (PROTOCOL = TCP)(HOST = dg32.localdomain)(PORT = 1524)) ) )
SQL*Plus: Release 11.2.0.3.0 Production on Tue Mar 28 04:56:01 2017 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameters listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ listener_networks string local_listener string (DESCRIPTION=(ADDRESS=(PROTOCO L=tcp)(HOST=dg32.localdomain)( PORT=1524))(GLOBAL_DBNAME=dg2) (ORACLE_HOME=/u01/app/oracle/p roduct/11.2.0/dbhome_1)(SID_NA ME=dg2))
Depois reexecutei o duplicate e finalizou com sucesso:
[oracle@dg32 dbs]$ rman Recovery Manager: Release 11.2.0.3.0 - Production on Mon Mar 27 18:00:33 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. RMAN> connect TARGET SYS/*****@orcl connected to target database: ORCL (DBID=1466446185) RMAN> CONNECT AUXILIARY SYS/*****@dg2 connected to auxiliary database: ORCL (not mounted) RMAN> RUN { DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE NOFILENAMECHECK; }2> 3> Starting Duplicate Db at 27-MAR-17 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=19 device type=DISK .... Finished Duplicate Db at 27-MAR-17
Hi! I am Bruno, a Brazilian born and bred, and I am also a naturalized Swedish citizen. I am a former Oracle ACE and, to keep up with academic research, I am a Computer Scientist with an MSc in Data Science and another MSc in Software Engineering. I have over ten years of experience working with companies such as IBM, Epico Tech, and Playtech across three different countries (Brazil, Hungary, and Sweden), and I have joined projects remotely in many others. I am super excited to share my interests in Databases, Cybersecurity, Cloud, Data Science, Data Engineering, Big Data, AI, Programming, Software Engineering, and data in general.
(Continue reading)