[grid@dg02:/home/grid]$ lsnrctl stat LISTENER_SCAN1
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 16-OCT-2025 11:04:32
Copyright (c) 1991, 2024, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias LISTENER_SCAN1 Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 16-OCT-2025 09:47:56 Uptime 0 days 1 hr. 16 min. 36 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/19.3.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/dg02/listener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.199.40.235)(PORT=1521))) Services Summary... Service "dgdb" has 1 instance(s). Instance "dgdb1", status BLOCKED, has 1 handler(s) for this service... The command completed successfully
Recovery Manager: Release 19.0.0.0.0 - Production on Thu Oct 16 11:13:40 2025 Version 19.24.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: RPTDB (DBID=170820080) connected to auxiliary database: RPTDB (not mounted)
RMAN> run { allocate channel prmy1 type disk; allocate channel prmy2 type disk; allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate channel prmy5 type disk; allocate channel prmy6 type disk; allocate auxiliary channel aux1 type disk; allocate auxiliary channel aux2 type disk; allocate auxiliary channel aux3 type disk; allocate auxiliary channel aux4 type disk; allocate auxiliary channel aux5 type disk; allocate auxiliary channel aux6 type disk; duplicate target database for standby from active database dorecover nofilenamecheck; }
等待 RMAN duplicate 复制完成即可。
打开备库只读
1 2 3
-- 重启备库2个节点到只读状态 [oracle@dg01:/home/oracle]$ srvctl stop db -d dgdb [oracle@dg01:/home/oracle]$ srvctl start db -d dgdb -o "read only"
-- 主库 SQL>set line2222 pages1000 col status for a10 col type for a10 col error for a20 col gap_status for a20 col synchronization_status for a30 col recovery_mode for a60 select inst_id,status,DEST_ID,TYPE,ERROR,GAP_STATUS,SYNCHRONIZED,SYNCHRONIZATION_STATUS,RECOVERY_MODE from GV$ARCHIVE_DEST_STATUS where STatus <>'INACTIVE'and type ='PHYSICAL';
-- 备库 SQL>set line222 pages1000 select process,thread#,group#,sequence#,status from v$managed_standby;
SQL>select t2.thread#,t1.group#,t1.member,t2.STATUS,t2.ARCHIVED,t2.bytes/1024/1024from v$logfile t1,v$standby_log t2 where t1.group#=t2.group# orderby1,2;