<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connection SID (Oracle) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907820#M933308</link>
    <description>You may try to execute:&lt;BR /&gt;select distinct sid from v$mystat;</description>
    <pubDate>Wed, 19 Feb 2003 10:39:07 GMT</pubDate>
    <dc:creator>mark spoke</dc:creator>
    <dc:date>2003-02-19T10:39:07Z</dc:date>
    <item>
      <title>Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907819#M933307</link>
      <description>I am trying to retrieve the Session ID of the current database connection. I have searched in the V$SESSION table, but there are several SID's asociated to my username. Is there a way to resolve which one of them is the one who belongs to the current connection? &lt;BR /&gt;&lt;BR /&gt;Thanks in advance. &lt;BR /&gt;&lt;BR /&gt;System: HP 9000 &lt;BR /&gt;OS: HP-UX 11i &lt;BR /&gt;DataBase: Oracle 8.1.7</description>
      <pubDate>Wed, 19 Feb 2003 10:23:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907819#M933307</guid>
      <dc:creator>Solrac</dc:creator>
      <dc:date>2003-02-19T10:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907820#M933308</link>
      <description>You may try to execute:&lt;BR /&gt;select distinct sid from v$mystat;</description>
      <pubDate>Wed, 19 Feb 2003 10:39:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907820#M933308</guid>
      <dc:creator>mark spoke</dc:creator>
      <dc:date>2003-02-19T10:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907821#M933309</link>
      <description>Hi&lt;BR /&gt;maybe you find your connection with the terminal column of v$session.&lt;BR /&gt;&lt;BR /&gt;in sqlplus:&lt;BR /&gt;SQL&amp;gt; host env | grep -i pts&lt;BR /&gt;SSH_TTY=/dev/pts/11&lt;BR /&gt;SQL&amp;gt; select sid,terminal from v$session;&lt;BR /&gt;16  pts/11&lt;BR /&gt;&lt;BR /&gt;Another possible way is the timestamp of the unix-process&lt;BR /&gt;SQL&amp;gt; select PROCESS from v$session;&lt;BR /&gt;SQL&amp;gt; host ps -ef | grep &lt;PID&gt;&lt;BR /&gt;&lt;BR /&gt;Chris&lt;/PID&gt;</description>
      <pubDate>Wed, 19 Feb 2003 10:45:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907821#M933309</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2003-02-19T10:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907822#M933310</link>
      <description>You can select the sid, serial#, username, osuser, logon_time from v$session and this will give you the time of the various logins and the operating system as whome you logged on. But if you have OS authenticated user, then the logon_time value should give you your session information. &lt;BR /&gt;OR &lt;BR /&gt;&lt;BR /&gt;You can select from V$session and v$process where v$process will have the terminal number of the PC that you are running from. Refer to the attachment for the script. Hope this helps. &lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 05:00:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907822#M933310</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-02-20T05:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907823#M933311</link>
      <description>A better way, which doesn't require access to the catalog tables, is to use SYS_CONTEXT, as follows:&lt;BR /&gt;&lt;BR /&gt;select SYS_CONTEXT('USERENV','SESSIONID') &lt;BR /&gt;from dual ;&lt;BR /&gt;&lt;BR /&gt;There are many other values which SYS_CONTEXT can return, see the Oracle SQL reference guide.&lt;BR /&gt;&lt;BR /&gt;-- Graham&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 08:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907823#M933311</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-02-20T08:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907824#M933312</link>
      <description>select * from v$instance;&lt;BR /&gt;&lt;BR /&gt;Tells you what instance you have which is set by the variable ORACLE_SID in most cases.&lt;BR /&gt;&lt;BR /&gt;each instance has its own v$session table which tracks who's logged on and what they are doing.&lt;BR /&gt;&lt;BR /&gt;set your sid and then check v$session&lt;BR /&gt;&lt;BR /&gt;My dba has a policy.  He runs that first sql statement right after connect internal to make sure whatever he's about to do is going to be to the instnace he thinks he's about to do it to.&lt;BR /&gt;&lt;BR /&gt;If you know what I mean.&lt;BR /&gt;&lt;BR /&gt;Here is a link to a thread filled with wonderful sql scripts for all kinds of database tasks.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4177ef70e827d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4177ef70e827d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 21 Feb 2003 19:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907824#M933312</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-02-21T19:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Connection SID (Oracle)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907825#M933313</link>
      <description>Hi !&lt;BR /&gt;v$mystat helps You. This view contains sid of current session.</description>
      <pubDate>Sat, 22 Feb 2003 06:38:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/connection-sid-oracle/m-p/2907825#M933313</guid>
      <dc:creator>Evgeny Filippenkov</dc:creator>
      <dc:date>2003-02-22T06:38:00Z</dc:date>
    </item>
  </channel>
</rss>

