Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Getting the name of the database and machine

Getting the name of the database and machine

From: Ken Madsen <madsenkj_at_pe-nelson.com>
Date: Thu, 23 Jul 1998 11:09:14 -0700
Message-ID: <35B77C4A.4EB1012B@pe-nelson.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US