Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle DG active / standby startup and shutdown process

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment:

Oracle 11g RAC and DG

Close the operation process:

RAC node:

Shut down the primary host:

SQL > shutdown immediate

Cannot shutdown immediate

SQL > shutdown abort

ORACLE instance shut down.

SQL > startup restrict

ORACLE instance started.

SQL > shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

Shut down the standby host:

SQL > alter database recover managed standby database cancel

SQL > shutdown immediate

Open the operation process:

Turn on the standby host:

SQL > startup mount

ORACLE instance started.

Total System Global Area 1.7103E+10 bytes

Fixed Size 2245480 bytes

Variable Size 2181041304 bytes

Database Buffers 1.4898E+10 bytes

Redo Buffers 21708800 bytes

Database mounted.

SQL > select RECOVERY_MODE from v$archive_dest_status where rownum ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION

Database altered.

Turn on the primary host:

The primary host is RAC and will be pulled up automatically.

The primary host RAC is fine.

Standby host snooping is found to be abnormal:

Restart listening.

[oracle@dg ~] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0-Production on 11-DEC-2017 15:12:16

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

Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

[oracle@dg ~] $lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.3.0-Production on 11-DEC-2017 15:12:37

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

Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

Linux Error: 111: Connection refused

[oracle@dg ~] $lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0-Production on 11-DEC-2017 15:12:44

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

Starting / u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0-Production

Log messages written to / u01/app/oracle/diag/tnslsnr/dg/listener/alert/log.xml

Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=dg) (PORT=1521)

Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521))

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.3.0-Production

Start Date 11-DEC-2017 15:12:45

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File / u01/app/oracle/diag/tnslsnr/dg/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=dg) (PORT=1521))

The listener supports no services

The command completed successfully

[oracle@dg ~] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0-Production on 11-DEC-2017 15:13:29

Copyright (c) 1991, 2011, 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.3.0-Production

Start Date 11-DEC-2017 15:12:45

Uptime 0 days 0 hr. 0 min. 44 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File / u01/app/oracle/diag/tnslsnr/dg/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=dg) (PORT=1521))

Services Summary...

Service "DG" has 1 instance (s).

Instance "DG", status READY, has 1 handler (s) for this service...

The command completed successfully

Enable the read-only feature of the standby host:

SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

Database altered.

SQL > alter database open read only

Database altered.

SQL > select RECOVERY_MODE from v$archive_dest_status where rownum ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION

Database altered.

SQL > select RECOVERY_MODE from v$archive_dest_status where rownum

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report