Home > Ask the Oracle Database / Applications Experts > Oracle database internals Questions & Answers > Reading WSID from back-end
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Reading WSID from back-end

Mike Ault EXPERT RESPONSE FROM: Mike Ault

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 27 January 2006
We're using the following string to connect to the Oracle DB Server through the OraOLEDB Driver:
Provider=OraOLEDB.Oracle;Data
Source=MyOracleDB;User
Id=test;Password=test;WSID=test
We want to read WSID from this string in the back-end session for the purpose of auditing using triggers. So is there any means of reading this information (WSID) in the back-end? (WSID=Workstation ID.)

>
You may want to look at the connection data inside Oracle:
column username format a12 heading 'User Name'
column program format a25 heading 'Executing|Program'
column pid format 9999
column sid format 9999
column osuser heading Operating|system|User format a10
column terminal format a10
column g_date new_value f_date noprint
select to_char(sysdate,'ddmmyyyyhh24mi') g_date from dual;
set lines 130
break on username
compute count of pid on username
set pages 58
start title132 "Oracle Processes"
spool rep_out&dbcur_proc_&&f_date
select
        NVL(a.username,'Null') username,
        b.pid,
        a.sid,
        decode(a.terminal,'?','Detached',a.terminal) terminal,
        b.program,
        spid,
        a.osuser,
        a.serial#
 from
        v$session a,
        v$process b
where
        a.PADDR = b.ADDR
order by
        a.username,
        b.pid
/
spool off
clear breaks
clear columns



Operating
                                    Executing
system
User Name      PID   SID TERMINAL   Program                   SPID
User          SERIAL#
------------ ----- ----- ---------- ------------------------- ------------
---------- ----------
OEMMAN          14    15 MRALAPTOP2 ORACLE.EXE                2496
SYSTEM              7
                15    14 MRALAPTOP2 ORACLE.EXE                3336
SYSTEM              8
                16    16 MRALAPTOP2 ORACLE.EXE                3908
SYSTEM            174
                17    11 MRALAPTOP2 ORACLE.EXE                3732
SYSTEM             14
                18    12 MRALAPTOP2 ORACLE.EXE                132
SYSTEM             33
                19    18 MRALAPTOP2 ORACLE.EXE                300
SYSTEM              6
                20    19 MRALAPTOP2 ORACLE.EXE                604
SYSTEM              6
                21    20 MRALAPTOP2 ORACLE.EXE                976
SYSTEM             12
                22    21 MRALAPTOP2 ORACLE.EXE                4152
SYSTEM             13
************ -----
count            9
SYSTEM          23    22 MRALAPTOP2 ORACLE.EXE                2688
Mike?Ault        2851
************ -----
count            1
Null             2     1 MRALAPTOP2 ORACLE.EXE                2904
SYSTEM              1
                 3     2 MRALAPTOP2 ORACLE.EXE                2976
SYSTEM              3
                 4     3 MRALAPTOP2 ORACLE.EXE                2940
SYSTEM              1
                 5     4 MRALAPTOP2 ORACLE.EXE                2956
SYSTEM              1
                 6     5 MRALAPTOP2 ORACLE.EXE                2900
SYSTEM              1
                 7     6 MRALAPTOP2 ORACLE.EXE                2924
SYSTEM              1
                 8     7 MRALAPTOP2 ORACLE.EXE                2500
SYSTEM              1
                 9     8 MRALAPTOP2 ORACLE.EXE                2604
SYSTEM              1
                12     9 MRALAPTOP2 ORACLE.EXE                972
SYSTEM              1
                13    10 MRALAPTOP2 ORACLE.EXE                2608
SYSTEM              1
************ -----
count           10


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle database internals
How to find a dropped table?
Removing carriage returns at the end of clob fields
Finding length of numeric datatype field
Problem with incoming parameter in dynamic SQL statement
Making a select statement faster
Select * from loc
Difference between 9i and 10g OCP exams
Concatenate values separated with commas
How to free up more space for Oracle?
Error after installation of 9i on Red Hat Linux

Oracle database design and architecture
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure
How to choose the primary key columns in an Oracle table
Understanding the data archiving definition
Review: Oracle's 11g R2 database has some good and bad
Scaling an Oracle database: What is the best strategy for you?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
E. F. Codd  (SearchOracle.com)
extent  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
multidimensional database  (SearchOracle.com)
object-oriented database management system  (SearchOracle.com)
quad tree  (SearchOracle.com)
relational online analytical processing  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts