Recognize the oracle listener profile
There can only be one listener for the same database on the same host. When we configure multiple listeners, it will listen to the database on another host, but the performance is not good.
The listener.ora configuration file explains:
Listener section:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS= (PROTOCOL = IPC) (KEY=EXTPRO1)
(ADDRESS= (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
)
)
Database configuration section:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.localdomain)
(ORACLE_HOME = / opt/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
)
)
Tnsname.ora profile
Test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.29) (PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl.localdomain)
)
Service_name defaults to global_name.
Query global_name
Select * from global_name
Modify global_name
Alter database rename global_name to orcl
Update global_name set global_name = 'orcl'
Commit
But modified, global_name will not change server_name by default, nor will it modify db_domain by default
So modify the db_domain
Alter system set db_domain='' scope=spfile