After the DB server restarts, the following error is attached:
The reason is that Listener.ora is reverted to the initial file after reboot and the SID is emptied.
Steps to resolve:
1. View monitoring service and database service:
This is where you find the path to the Listener.ora file: D:\oracle\product\10.2.0\db_2\network\ADMIN
Modify the following (the red flag is the add part):
# Listener.ora Network Configuration File:d:\oracle\product\10.2.0\db_2\network\admin\listener.ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home = D:\oracle\product\10.2.0\db_2)
(program = Extproc)
)
(Sid_desc =
(global_dbname = DATASTG)
(oracle_home = D:\oracle\product\10.2.0\db_1)
(sid_name = DATASTG)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Inspur-73507df8) (PORT = 1521))
)
)
Restart Service, use Plsql connection to find error ORA-01034 and ORA-27101
2. This error is reported because, although the DB service is turned on, but there is no boot instance, workaround: Open cmd input
Set ORACLE_SID=DATASTG
Sets the SID to connect to. Re-enter
Sqlplus/nolog
Conn/as Sysdba;
Connect to the database, and then enter the startup instance of the startup database, and then use Plsql to connect properly.
Troubleshooting the connection error after an Oracle server restart