db_name/db_unique_name/instance_name/service_names

http://www.oracle-home.ro/Oracle_Database/Architecture/Oracle-service-name.html

Look at these cases and see how an Oracle service is named function of the pfile/ spfile parameters. Listener.ora could add services as well.

 

Case nr. 1

 

DB_NAME                       = 'myDB'

DB_DOMAIN                   - not set in the pfile
DB_UNIQUE_NAME       - not set in the pfile
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           - not set in the pfile

 

 

C:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 11:43:17

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 11:27:43
Uptime 0 days 0 hr. 15 min. 34 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myDB_XPT" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
Service "mydb" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...

The command completed successfully

 

 

Case nr. 2

 

DB_NAME                         = 'myDB'

DB_DOMAIN                   - not set in the pfile
DB_UNIQUE_NAME       - not set in the pfile
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           = 'myDB'

 

The result is the same as in the case nr. 1

 

 

Case nr. 3

 

DB_NAME                         = 'myDB'

DB_DOMAIN                   - not set in the pfile
DB_UNIQUE_NAME       - not set in the pfile
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           = 'myDB2'

 

C:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:03:38

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:03:19
Uptime 0 days 0 hr. 0 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myDB2" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...

Service "myDB_XPT" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
Service "mydb" has 1 instance(s).

Instance "mydb", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

Case nr. 4

 

DB_NAME                        = 'myDB'

DB_DOMAIN                   = 'myDomain.ca'
DB_UNIQUE_NAME       - not set in the pfile
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           - not set in the pfile

 

C:\>lsnrctl status

 

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:08:10

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:07:58
Uptime 0 days 0 hr. 0 min. 12 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myDB.myDomain.ca" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...

Service "myDB_XPT.myDomain.ca" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

Case nr. 5

 

DB_NAME                        = 'myDB'

DB_DOMAIN                   - not set in the pfile
DB_UNIQUE_NAME      = 'myUniqueDB'
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           - not set in the pfile

 

C:\>lsnrctl status

 

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:20:19

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:20:08
Uptime 0 days 0 hr. 0 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myUniqueDB" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...

Service "myUniqueDB_XPT" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

Case nr. 6

 

DB_NAME                        = 'myDB'

DB_DOMAIN                   = 'myDomain.ca'
DB_UNIQUE_NAME      = 'myUniqueDB'
INSTANCE_NAME         - not set in the pfile

SERVICE_NAMES           - not set in the pfile

 

C:\>lsnrctl status

 

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:23:48

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:23:37
Uptime 0 days 0 hr. 0 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myUniqueDB.myDomain.ca" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...

Service "myUniqueDB_XPT.myDomain.ca" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

Case nr. 7

 

DB_NAME                          = 'myDB'

DB_DOMAIN                    = 'myDomain.ca'
DB_UNIQUE_NAME        = 'myUniqueDB'
INSTANCE_NAME           = 'myInstance'

SERVICE_NAMES           - not set in the pfile

 

C:\>lsnrctl status

 

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:26:27

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:26:19
Uptime 0 days 0 hr. 0 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "myUniqueDB.myDomain.ca" has 1 instance(s).
Instance "myInstance", status READY, has 1 handler(s) for this service...
Service "myUniqueDB_XPT.myDomain.ca" has 1 instance(s).
Instance "myInstance", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 listener.ora is always:

 

LISTENER =
   (DESCRIPTION_LIST =
             (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cata1)(PORT = 1521))
              )
   )

 

for these cases.

 

Case nr. 8 - listener.ora can add services to the Oracle database

 

DB_NAME                           = 'myDB'

DB_DOMAIN                      = 'myDomain.ca'
DB_UNIQUE_NAME          = 'myUniqueDB'
INSTANCE_NAME             = 'myInstance'

SERVICE_NAMES              = 'myService'

 

listener.ora is

-- The listener.ora defines the service names for the database (using GLOBAL_DBNAME in the listener definition).

 

LISTENER =
   (DESCRIPTION_LIST =
       (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cata1)(PORT = 1521))
       )
   )

SID_LIST_LISTENER=
    (SID_LIST=
             (SID_DESC= (GLOBAL_DBNAME=DB10.myDomanin.fr)(ORACLE_HOME=D:\ORACLE\db10)(SID_NAME=myDB))
             (SID_DESC= (GLOBAL_DBNAME=myDB2)(ORACLE_HOME=D:\ORACLE\db10)(SID_NAME=myDB)))
 

 

C:\>lsnrctl status

 

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-AUG-2010 12:50:01

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cata1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-AUG-2010 12:45:54
Uptime 0 days 0 hr. 4 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\OH\network\admin\listener.ora
Listener Log File D:\Oracle10g\OH\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cata1)(PORT=1521)))
Services Summary...
Service "DB10.myDomanin.fr" has 1 instance(s).
Instance "myDB", status UNKNOWN, has 1 handler(s) for this service...
Service "myDB2" has 1 instance(s).
Instance "myDB", status UNKNOWN, has 1 handler(s) for this service...

Service "myService.myDomain.ca" has 1 instance(s).
Instance "myInstance", status READY, has 1 handler(s) for this service...
Service "myUniqueDB.myDomain.ca" has 1 instance(s).
Instance "myInstance", status READY, has 1 handler(s) for this service...
Service "myUniqueDB_XPT.myDomain.ca" has 1 instance(s).
Instance "myInstance", status READY, has 1 handler(s) for this service...

The command completed successfully

 

 

Notes:

 

1) It is possible to force the service registration with the listener using:

    alter system register

 

2) These cases are tested on Oracle 10.2


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/228190/viewspace-677327/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/228190/viewspace-677327/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值