oracle@htpc:admin$ lsnrctl statusLSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:31:22Copyright (c) 1991, 2005, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionStart Date 08-JUL-2007 18:23:39Uptime 0 days 0 hr. 7 min. 43 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/oracle/10g/network/admin/listener.oraListener Log File /u01/oracle/10g/network/log/listener.logListening 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 successfullyoracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:24 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> show parameter db_nameNAME TYPE VALUE------------------------------------ ----------- ------------------------------db_name string peggySQL> show parameter service_namesNAME TYPE VALUE------------------------------------ ----------- ------------------------------service_names string peggySQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsoracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/peggySQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:53 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsoracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dogSQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:58 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.ERROR:ORA-12514: TNS:listener does not currently know of service requested in connectdescriptorEnter user-name:oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:32:01 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsoracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:32:01 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> alter system set service_names='peggy,dog' scope=spfile;System altered.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 599785472 bytesFixed Size 2022600 bytesVariable Size 167772984 bytesDatabase Buffers 423624704 bytesRedo Buffers 6365184 bytesDatabase mounted.Database opened.SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsoracle@htpc:admin$ lsnrctl statusLSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:33:57Copyright (c) 1991, 2005, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionStart Date 08-JUL-2007 18:23:39Uptime 0 days 0 hr. 10 min. 18 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/oracle/10g/network/admin/listener.oraListener Log File /u01/oracle/10g/network/log/listener.logListening 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 successfullyoracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dogSQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:34:18 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> select sys_context('userenv','SERVICE_NAME') from dual;SYS_CONTEXT('USERENV','SERVICE_NAME')------------------------------------------------------------------------------------------------------------------------dogSQL> select sys_context('userenv','DB_NAME') from dual;SYS_CONTEXT('USERENV','DB_NAME')------------------------------------------------------------------------------------------------------------------------peggySQL>