oracle@htpc:admin$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:31:22 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 08-JUL-2007 18:23:39 Uptime 0 days 0 hr. 7 min. 43 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/10g/network/admin/listener.ora Listener Log File /u01/oracle/10g/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htpc)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "peggy" has 2 instance(s). Instance "peggy", status UNKNOWN, has 1 handler(s) for this service... Instance "peggy", status READY, has 1 handler(s) for this service... Service "peggyXDB" has 1 instance(s). Instance "peggy", status READY, has 1 handler(s) for this service... Service "peggy_XPT" has 1 instance(s). Instance "peggy", status READY, has 1 handler(s) for this service... The command completed successfully oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:24 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string peggy SQL> show parameter service_names NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string peggy SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/peggy SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:53 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dog SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:58 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Enter user-name: oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:32:01 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:32:01 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> alter system set service_names='peggy,dog' scope=spfile; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 599785472 bytes Fixed Size 2022600 bytes Variable Size 167772984 bytes Database Buffers 423624704 bytes Redo Buffers 6365184 bytes Database mounted. Database opened. SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options oracle@htpc:admin$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:33:57 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 08-JUL-2007 18:23:39 Uptime 0 days 0 hr. 10 min. 18 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/oracle/10g/network/admin/listener.ora Listener Log File /u01/oracle/10g/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htpc)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "dog" has 1 instance(s). Instance "peggy", status READY, has 1 handler(s) for this service... Service "peggy" has 2 instance(s). Instance "peggy", status UNKNOWN, has 1 handler(s) for this service... Instance "peggy", status READY, has 1 handler(s) for this service... Service "peggyXDB" has 1 instance(s). Instance "peggy", status READY, has 1 handler(s) for this service... Service "peggy_XPT" has 1 instance(s). Instance "peggy", status READY, has 1 handler(s) for this service... The command completed successfully oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dog SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:34:18 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> select sys_context('userenv','SERVICE_NAME') from dual; SYS_CONTEXT('USERENV','SERVICE_NAME') ------------------------------------------------------------------------------------------------------------------------ dog SQL> select sys_context('userenv','DB_NAME') from dual; SYS_CONTEXT('USERENV','DB_NAME') ------------------------------------------------------------------------------------------------------------------------ peggy SQL>