Oracle 单实例 2个service的问题

[oracle@PD admin]$ ps -ef | grep smon
oracle    1917     1  0 Aug21 ?        00:33:51 ora_smon_podinndb
oracle   22659 22448  0 08:03 pts/2    00:00:00 grep smon
[oracle@PD admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-NOV-2016 08:03:43

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.25)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                21-AUG-2016 19:34:44
Uptime                    88 days 12 hr. 28 min. 59 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/PD/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.25)(PORT=1521)))
Services Summary...
Service "NCDB" has 2 instance(s).
  Instance "podinndb", status UNKNOWN, has 1 handler(s) for this service...
  Instance "podinndb", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "podinndb", status READY, has 1 handler(s) for this service...
Service "podinndb" has 1 instance(s).
  Instance "podinndb", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@PD admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 18 08:03:44 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> show parameter service;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
service_names			     string	 ncdb,podinndb


*.audit_file_dest='/u01/app/oracle/admin/NCDB/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/NCDB/controlfile/o1_mf_9z8tkd80_.ctl','/u01/app/oracle/flash_recovery_area/NCDB/controlfile/o1_mf_9z8tkd99_.ctl'
*.db_block_size=8192
b_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_name='NCDB'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=1000
*.log_archive_dest_1='location=/archive'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_format='arch_%t_%s_%r.arc'
*.memory_target=15458472960
*.open_cursors=1000
*.processes=1000
*.remote_login
_passwordfile='EXCLUSIVE'
*.service_names='ncdb,podinndb'
*.undo_tablespace='UNDOTBS1'

nc2012/xxxxxxxxx 


2个服务名,不同业务可以连接不同的业务名这种


sqlplus  nc2012/xxxxxxxxx @192.168.2.25:1521/ncdb



sqlplus 直接带service连接:
[oracle@PD dbs]$ sqlplus  nc2012/xxxxxxxxx@192.168.2.25:1521/ncdb



SQL> show parameter service;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
service_names			     string	 ncdb,podinndb
SQL> exit

原文地址:https://www.cnblogs.com/hzcya1995/p/13350027.html