我正在尝试使用重复命令创建备用数据库。
Primary : tntdb19
Standby : mntdb19
重复命令开始但在一段时间后失败
[oracle@monta191 admin]$ rman target sys/manager@tntdb19 auxiliary sys/manager@mntdb19
Recovery Manager: Release 19.0.0.0.0 - Production on Sun Nov 1 13:24:19 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: TNTDB19 (DBID=2747252158)
connected to auxiliary database: TNTDB19 (not mounted)
RMAN> duplicate target database for standby from active database nofilenamecheck;
Starting Duplicate Db at 01-NOV-20
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=25 device type=DISK
...
contents of Memory Script:
{
sql clone "create spfile from memory" ;
shutdown clone immediate;
startup clone nomount;
restore clone from service 'tntdb19' standby controlfile;
}
executing Memory Script
sql statement: create spfile from memory
Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/01/2020 13:27:12
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
正如您在开始时看到的那样,rman 毫无问题地连接到主数据库和新备用数据库
connected to target database: TNTDB19 (DBID=2747252158)
connected to auxiliary database: TNTDB19 (not mounted)
但问题是我认为当
shutdown clone immediate;
作为复制过程的一部分,因为听者在这一刻失去了
Service "mntdb19" has 1 instance(s).
Instance "mntdb19", status UNKNOWN, has 1 handler(s) for this service...
Service "mntdb19.vboxlab.es" has 1 instance(s).
Instance "mntdb191", status BLOCKED, has 1 handler(s) for this service...
这是备用机器中的 listener.ora。
[grid@monta191 admin]$ cat listener.oa
cat: listener.oa: No such file or directory
[grid@monta191 admin]$ cat listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ASMNET1LSNR_ASM=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ASMNET1LSNR_ASM=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_ASMNET1LSNR_ASM=SUBNET # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN1=OFF # line added by Agent - Disabled by Agent because REMOTE_REGISTRATION_ADDRESS is set
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN2=OFF # line added by Agent - Disabled by Agent because REMOTE_REGISTRATION_ADDRESS is set
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_SCAN3=OFF # line added by Agent - Disabled by Agent because REMOTE_REGISTRATION_ADDRESS is set
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mntdb19)
(ORACLE_HOME = /u01/app/grid/product/19c/grid_1)
(SID_NAME = mntdb19)
)
)
我认为 SID_LIST_LISTENER 条目如果针对此问题,但它不起作用。
和 tnsnames.ora
[oracle@monta191 admin]$ cat tnsnames.ora
TNTDB19 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = tanto19-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tntdb19.vboxlab.es)
)
)
MNTDB19 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = monta19-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mntdb19.vboxlab.es)(UR=A)
)
)
Balazs 发布后所做的更改
嗨 Balazs,我已经更改了 listener.ora 中的 GLOBAL_DBNAME 和 ORACLE_HOME 条目
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mntdb19.vboxlab.es)
(ORACLE_HOME = /u02/app/oracle/product/19c/db_1)
(SID_NAME = mntdb19)
)
)
我为用户网格 (/u01/app/grid/product/19c/grid_1) 和 oracle 用户 (/u02/app/oracle/product/19c/db_1) 提供了不同的主页。在我原来的帖子中,我使用了网格主页,但现在我更改了数据库主页。
服务名称是
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string mntdb19.vboxlab.es
有了这 2 个更改,关闭备用数据库时重复的结果仍然是相同的
Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/01/2020 18:55:30
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
我误会了什么?
问候