Listener.ora 配置文件 中global_dbname 可以随便配置;
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ora11gbak)----可以自定义
(ORACLE_HOME = /u01/app/ora11/product/11.2.0/dbhome_1)
(SID_NAME = ora11g)
)
(SID_DESC =
(GLOBAL_DBNAME = lixorabak) ----可以自定义
(ORACLE_HOME = /oracle)
(SID_NAME = lixora)
)
)
LSNRCTL> status
Services Summary...
Service "PLSExtProc" has 1instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) forthis service...
Service "lixora" has 1instance(s).
Instance "lixora", status READY, has 1 handler(s) for thisservice... ----------动态注册
Service "lixorabak" has 1 instance(s).
Instance "lixora", status UNKNOWN, has 1 handler(s) for this service...----------静态注册
Service "ora11g" has 1instance(s).
Instance "ora11g", status READY, has 1 handler(s) for thisservice... --------------动态注册
Service "ora11gbak" has 1 instance(s).
Instance "ora11g", status UNKNOWN, has 1 handler(s) for this service... ----------静态注册
The command completed successfully
NAME TYPE VALUE
---------------------------------------------------------- ------------------------------
db_name string ora11g
db_unique_name string ora11g
global_names boolean FALSE
instance_name string ora11g
service_names string ora11g
客户端连接测试:---可以正常连接
C:\Users\hlj>sqlplus system/[email protected]/ora11gbak
SQL*Plus: Release 10.2.0.1.0 - Productionon 星期五 6月 19 16:56:15 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
SQL> select * from dual;
DU
--
X
racle Net Manager Field |
listener.ora File Parameter |
Description |
SID |
SID_NAME |
The Oracle system identifier (SID) of the instance. You can obtain the SID value from theINSTANCE_NAME parameter in the initialization parameter file. |
Service Name |
GLOBAL_DBNAME |
The database service. While processing a client connection request, the listener tries to match the value of this parameter with the value of the SERVICE_NAMEparameter The value for this parameter is typically obtained from the combination of the DB_NAMEand DB_DOMAIN parameters 缺省是从pfile 但是我们也可以自己取一个有意义的名字; |
Oracle Home Directory |
ORACLE_HOME |
The Oracle home location of the instance. Without this setting, the listener assumes its Oracle home for the instance. On Linux and UNIX, this setting is optional. On Microsoft Windows, this setting is ignored. The Oracle home specified by theORACLE_HOME parameter inHKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID of |