Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Getting the name of the database and machine
I read a tip on one of these newsgroups to place the machine name in a
SQL*Plus prompt and I have used it successfully on many databases except
one.
Here is the SQL tip implemented in my glogin.sql file:
set termout off
col value new_value sid
SELECT Initcap(machine) value FROM v$session WHERE sid = 1;
col value clear
set sqlprompt 'SQL &sid> '
set termout on
I did a SELECT * FROM V$SESSION and discovered that the Machine column on the one database is not populated for SCHEMA_NAME = SYS
What may have caused this and is it a problem?
Is there a special meaning for SID=1?
Any background on how v$session is created and populated would be useful as well.
--
Ken Madsen
Received on Thu Jul 23 1998 - 13:09:14 CDT
![]() |
![]() |