- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Connection SID (Oracle)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2003 02:23 AM
тАО02-19-2003 02:23 AM
Thanks in advance.
System: HP 9000
OS: HP-UX 11i
DataBase: Oracle 8.1.7
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2003 02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2003 02:45 AM
тАО02-19-2003 02:45 AM
Re: Connection SID (Oracle)
maybe you find your connection with the terminal column of v$session.
in sqlplus:
SQL> host env | grep -i pts
SSH_TTY=/dev/pts/11
SQL> select sid,terminal from v$session;
16 pts/11
Another possible way is the timestamp of the unix-process
SQL> select PROCESS from v$session;
SQL> host ps -ef | grep
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2003 09:00 PM
тАО02-19-2003 09:00 PM
Re: Connection SID (Oracle)
OR
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2003 12:17 AM
тАО02-20-2003 12:17 AM
Re: Connection SID (Oracle)
select SYS_CONTEXT('USERENV','SESSIONID')
from dual ;
There are many other values which SYS_CONTEXT can return, see the Oracle SQL reference guide.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2003 11:12 AM
тАО02-21-2003 11:12 AM
Re: Connection SID (Oracle)
Tells you what instance you have which is set by the variable ORACLE_SID in most cases.
each instance has its own v$session table which tracks who's logged on and what they are doing.
set your sid and then check v$session
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.
If you know what I mean.
Here is a link to a thread filled with wonderful sql scripts for all kinds of database tasks.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4177ef70e827d711abdc0090277a778c,00.html
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2003 10:38 PM
тАО02-21-2003 10:38 PM
Re: Connection SID (Oracle)
v$mystat helps You. This view contains sid of current session.