Historical Session information in Oracle 9i

Hi All,
I currently using Oracle 9i for one of my datawarehouse database. I would like to know how can I see historical session information like SID, Username, Program, Consumer CPU Time etc. My main aim is to get Consumed CPU Time for a particular user in a day. Please let me know how can I get this information.
It is a bit important and urgent too.
Thanks,
Kalyan

Oracle version 9i and earlier by default do not track session history information. The information you want for consumed CPU for a particual user for a specific day does not exist.
You can capture some of the mentioned information via the supplied audit command and you could find some sample information in statspack snapshots if statspack has been configured.
HTH -- Mark D Powell --

Similar Messages

  • Single Sign-On and session information

    I have an Oracle Portal application with many Java Web Applications. I wish to
    provide Single Sign-On to this applications. I know how to configure Single
    Sign-On and how to get the user login in Java. I want to store session
    information such as: User First and Last Name, User Social Security Number. I
    want to get this information from the database after authentication, store it
    in session and then access this information from all my applications.

    Are you familiarized with sys_context function?
    Hope this is useful help.
    BR,
    Marcos

  • TIPS(16) : PROVIDING USERS WITH SESSION INFORMATION

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(16) : Providing Users with Session Information
    ===================================================
    rem
    rem orasessn.sql
    rem
    rem
    rem This script is used to provide users with information regarding their
    rem oracle sessions.
    rem The USER_SESSION view provides information related only to the
    rem current session for a user; while the ALL_SESSIONS relates to all
    rem sessions within the database for a user.
    rem The DBA_SESSION can only be viewed by the
    rem Oracle sys id (and anyone granted select on this view).
    rem The DBA_SESSION lists all oracle sessions excluding the Oracle
    rem generic processes (dbwr, pmon, smon, etc.).
    rem The SID and SERIAL# can be used with killing sessions.
    This script must be run from the Oracle sys id.
    rem --------------------------------------------------------------------------
    rem
    set echo on;
    spool orasessn;
    rem
    drop public synonym ALL_SESSIONS;
    create or replace view ALL_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.username = user
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    grant select on ALL_SESSIONS to PUBLIC;
    create public synonym ALL_SESSIONS for ALL_SESSIONS;
    rem
    drop public synonym USER_SESSIONS;
    create or replace view USER_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.audsid = userenv('SESSIONID')
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    grant select on USER_SESSIONS to PUBLIC;
    create public synonym USER_SESSIONS for USER_SESSIONS;
    rem
    create or replace view DBA_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.username is not null
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    rem -------------------------------------------------------------------
    spool off;

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(16) : Providing Users with Session Information
    ===================================================
    rem
    rem orasessn.sql
    rem
    rem
    rem This script is used to provide users with information regarding their
    rem oracle sessions.
    rem The USER_SESSION view provides information related only to the
    rem current session for a user; while the ALL_SESSIONS relates to all
    rem sessions within the database for a user.
    rem The DBA_SESSION can only be viewed by the
    rem Oracle sys id (and anyone granted select on this view).
    rem The DBA_SESSION lists all oracle sessions excluding the Oracle
    rem generic processes (dbwr, pmon, smon, etc.).
    rem The SID and SERIAL# can be used with killing sessions.
    This script must be run from the Oracle sys id.
    rem --------------------------------------------------------------------------
    rem
    set echo on;
    spool orasessn;
    rem
    drop public synonym ALL_SESSIONS;
    create or replace view ALL_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.username = user
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    grant select on ALL_SESSIONS to PUBLIC;
    create public synonym ALL_SESSIONS for ALL_SESSIONS;
    rem
    drop public synonym USER_SESSIONS;
    create or replace view USER_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.audsid = userenv('SESSIONID')
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    grant select on USER_SESSIONS to PUBLIC;
    create public synonym USER_SESSIONS for USER_SESSIONS;
    rem
    create or replace view DBA_SESSIONS
    (USERNAME, OS_USER, SID, SERIAL#, STATUS, SERVICE, DATABASE,
    CURSORS, MACHINE, TERMINAL, PROGRAM)
    as
    select substr(v1.username,1,20), substr(v1.osuser,1,12),
    to_char(v1.sid,'999'), to_char(v1.serial#,'999999'),
    v1.status, v1.server, substr(v3.value,1,10), v2.value,
    substr(v1.machine,1,15), v1.terminal, v1.program
    from v$session v1, v$sesstat v2, v$parameter v3
    where v1.username is not null
    and v2.sid = v1.sid
    and v2.statistic# = 3
    and v3.name = 'db_name' ;
    rem -------------------------------------------------------------------
    spool off;

  • How to get the complete sessions information ?

    Dear All,
    Can any one post a script to get complete sessions information.
    Thanks in advance

    Hi,
    The following script may help u on finding the active sessions on your Oracle database .
    SELECT SID,
    serial#,
    username,
    (SELECT holding_session
    FROM dba_waiters
    WHERE waiting_session = s.SID
    AND ROWNUM = 1
    AND holding_session NOT IN (SELECT waiting_session
    FROM dba_waiters))
    holding_session,
    DECODE (s.status,
    'ACTIVE', ROUND (last_call_et / 60),
    0
    ) time_min,
    DECODE (s.status,
    'ACTIVE', last_call_et,
    0
    ) time_sec,
    (SELECT used_urec
    FROM v$transaction t
    WHERE t.addr = s.taddr) undo_records,
    (SELECT ROUND (sl.sofar / sl.totalwork * 100, 2)
    FROM v$session_longops sl
    WHERE s.SID = sl.SID
    AND s.serial# = sl.serial#
    AND s.status = 'ACTIVE'
    AND sl.time_remaining > 0) progress,
    (SELECT event
    FROM v$session_wait w
    WHERE w.SID = s.SID) wait_event,
    (SELECT ROUND (VALUE / 1024 / 1024, 2) || 'M'
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 20) pga_size,
    (SELECT ROUND (VALUE / 1024 / 1024, 2) || 'M'
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 15) uga_size,
    (SELECT VALUE
    FROM v$sesstat
    WHERE SID = s.SID
    AND statistic# = 4) commits,
    (SELECT sql_text
    FROM v$sql t
    WHERE s.sql_address = t.address
    AND s.sql_hash_value = t.hash_value
    AND ROWNUM = 1) sql_used,
    (SELECT MESSAGE
    FROM v$session_longops sl
    WHERE s.SID = sl.SID
    AND s.serial# = sl.serial#
    AND s.status = 'ACTIVE'
    AND sl.time_remaining > 0) long_ops,
    (SELECT LOWER (ins.instance_name)
    || '_ora_'
    || LTRIM (TO_CHAR (a.spid))
    || '.trc' filename
    FROM v$process a
    WHERE a.addr = s.paddr) trace_file_name,
    resource_consumer_group,
    s.status,
    server,
    osuser,
    program,
    module,
    action,
    NVL (LOWER (s.machine), ins.host_name) machine
    FROM v$session s,
    v$instance ins
    WHERE username IS NOT NULL
    AND s.status = 'ACTIVE'
    AND s.audsid <> USERENV ('sessionid')
    ORDER BY DECODE (s.status,
    'ACTIVE', ROUND (last_call_et),
    0
    ) DESC
    Regards,
    Kumar
    [www.idatamax.com]

  • Client or module information in oracle database in citrix environment

    We have oracle 10g database in citrix environment . We are enable to get client information when he is logon in oracle database or application through citrix. How can we get client information in oracle. we want to stop sqlplus or any other tools except our application. How it would be possible.
    Thanks
    Edited by: Wason Naveen on Feb 19, 2010 6:39 AM

    Sorry I wasn't sure.... But let me try to give you another idea.
    So if you want to protect your schema I suggest to use roles.
    I mean collect all schema privileges into two roles.
    Set default role for your schema user an almost empty role. (create session)
    Plus create a full featured role which is password protected.
    So you can implement in your application that when it connects it "SET ROLE" to the full featured one with password of course...
    This way only your application can use/see objects in schema...
    HTH, Zoltan

  • Want to see session information through coherence console

    I use coherence*web to push the http session information in,and I changed the coherence.cmd to let the configuration point to session-cache-config.xml
    which is like:
    set java_opts=-Xms%memory% -Xmx%memory% -Dtangosol.coherence.distributed.localstorage=%storage_enabled% -Dtangosol.coherence.cacheconfig=session-cache-config.xml %jmxproperties%
    %java_exec% -server -showversion %java_opts% -cp "%coherence_home%\lib\coherence.jar;E:\coherence-java-3.7.1.0b27797\coherence\lib\coherence-web.jar;E:\wls12c\oepe_12.1.1.0.0\plugins\javax.servlet_2.5.0.v201103041518.jar" com.tangosol.net.CacheFactory %1
    when I start coherence.cmd and change to session-storage, I want to list the data,but get the nullpoint exception:
    Map (session-storage): list
    2012-06-08 13:34:38.675/11.309 Oracle Coherence GE 3.7.1.0 <Error> (thread=main,
    member=5):
    java.lang.NullPointerException
    at com.tangosol.coherence.servlet.AbstractHttpSessionModel.readAttribute
    s(AbstractHttpSessionModel.java:1809)
    at com.tangosol.coherence.servlet.AbstractHttpSessionModel.readExternal(
    AbstractHttpSessionModel.java:1735)
    at com.tangosol.util.ExternalizableHelper.readExternalizableLite(Externa
    lizableHelper.java:2041)
    at com.tangosol.util.ExternalizableHelper.readObjectInternal(Externaliza
    bleHelper.java:2345)
    at com.tangosol.util.ExternalizableHelper.deserializeInternal(Externaliz
    ableHelper.java:2746)
    at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelpe
    r.java:262)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.g
    rid.partitionedService.PartitionedCache$ConverterFromBinary.convert(PartitionedC
    ache.CDB:4)
    at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValu
    e(ConverterCollections.java:3548)
    at com.tangosol.coherence.component.application.console.Coherence.doList
    (Coherence.CDB:83)
    at com.tangosol.coherence.component.application.console.Coherence.proces
    sCommand(Coherence.CDB:450)
    at com.tangosol.coherence.component.application.console.Coherence.run(Co
    herence.CDB:37)
    at com.tangosol.coherence.component.application.console.Coherence.main(C
    oherence.CDB:3)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.tangosol.net.CacheFactory.main(CacheFactory.java:827)
    Map (session-storage):
    Anyone have some experiences and can give me some suggestion?
    I do not want to use the httpsession language in jsp, and I just want to use API to access the hpptsession information.
    Thanks a lot!

    Sharing the information directly by accessing the caches will be a bit difficult, because the data format for the session is highly optimized. For example, large attributes are often split out separate from the bulk of the "core" session data, to make moving the session around the network more efficient. What may be the simplest solution (depending on the application's needs) is to use a "back channel" from the ASP.NET application to the Java EE application, for example over REST. This would be a reasonable approach if there are a few items that you want to access and/or update in the session.
    On the Java side, you can "get" a session using the HttpSessionContext interface, but you have to explicitly enable that feature (because it was deprecated in Servlet 2.1):
    public HttpSession getSession(String sId)To enable the feature, you have to set the coherence-enable-sessioncontext property to true. This property is in the XML configuration file that is added to the WAR by Coherence*Web install (WebPluginInstaller) step. I'm not sure how this gets set up in WebLogic (since there is no separate "install" step), but it should still be supported.
    Is this what you were looking for?
    Peace,
    Cameron.

  • Need past sessions information

    Hi,
    One of our db server is high on CPU usage on every day mid night, as per the AWR reports I found a couple of queries which are consuming high cpu during that time, if I look for the sessions as per the sql_id there are many sessions are there, I am not sure these are the sessions which were running these queries.
    can we get the session information from AWR?( I dont think so)
    Is sql_id is unique or will it changes time to time? if it is unique then am I getting the correct sessions?
    Application team asking that from which user these are running, they are looking for the details like username, osusername, logontime,etc.
    can somebody please help me that how can I get the past session information as per sql id?
    we are on oracle 10G.
    Regards,
    Ramesh

    Hi,
    You can start looking out using dba_hist_active_sess_history view where you can provide the snap_id or the sample_time for the period you want to check. For an example you can check
    http://aprakash.wordpress.com/2011/09/20/single-task-message-and-cursorpin-s-wait-on-x/
    Anand

  • Session Information in a UI Template

    Hi,
    Are there any tags available to display session or capture session information within an unstructured UI Template? For example I can use #user# to display the username in the template. What about session id etc?
    Thanks!
    Sudi

    I just solved it!. I can embedd PL/SQL stored procedures and the PL/SQL PDK APIs within <oracle> tags in the UI Template.
    Sudi

  • How to get information from Oracle's views

    Hi,
    I need to get information from Oracle's views about:
    * in which table's column is set index
    * what type of index is on this column
    * name of a trigger which exist on a table
    * type of trigger (before, after etc)
    * trigger status (enable, disable)
    Thanks for help.

    Hi..
    One of the best way to know which views to use is doing select * from dict where table_name like 'xxx';
    For example in your case you needed to know about the indexes and triggers so
    SQL> select * from dictionary where table_name like 'DBA_IND%';
    TABLE_NAME                     COMMENTS
    DBA_INDEXES                    Description for all indexes in the database
    *DBA_IND_COLUMNS                COLUMNs comprising INDEXes on all TABLEs and CLUSTERs*
    DBA_IND_EXPRESSIONS            FUNCTIONAL INDEX EXPRESSIONs on all TABLES and CLUSTERS
    DBA_INDEXTYPES                 All indextypes
    DBA_INDEXTYPE_COMMENTS         Comments for user-defined indextypes
    DBA_INDEXTYPE_ARRAYTYPES       All array types specified by the indextype
    DBA_INDEXTYPE_OPERATORS        All indextype operators
    DBA_IND_PARTITIONS
    DBA_IND_SUBPARTITIONS
    DBA_IND_STATISTICS             Optimizer statistics for all indexes in the database
    10 rows selected.
    SQL> select * from dictionary where table_name like 'DBA_TRI%';
    TABLE_NAME                     COMMENTS
    DBA_TRIGGERS                   All triggers in the database
    DBA_TRIGGER_COLS               Column usage in all triggers
    Reading the comments you can know which view to use, then  describe the view and use what you need

  • What is the relationship between Process and Session parameter in Oracle

    Hi All
    I ran into a problem
    "ORA-00020: maximum number of processes (150) exceeded " on the other day and I want to fix this temporary by increase the process by some number like 200.
    Someone suggesting the syntax to fix my problem then the database must restart after running this command.
    alter system set processes=200 scope=spfile;
    However, I check the v$Paramenter view I see 2 values I believe they go together are
    Processes: 150
    Sessions:170.
    Here are my questions:
    1. "alter system set processes=200 scope=spfile;" is the correct way to increase the max Processes?
    2. Do I have change the number of Sessions after changing the number of Processes?
    3. Is there other way to increase the processes number without reboot the Oracle database?
    Regards,
    Jdang

    According to the Oracle version# Reference manual which documents the database parameters sessions is set to 1.1 * process + 5 using the 10gR2 version.
    Basically an Oracle process cooresponds to an OS process that performs the actual work for the session.
    An Oracle session is a collection of memory structure entries that identifies and keeps track of what is being done for a client of the Oracle database.
    Sometimes a single background process will support multiple sessions even in dedicated server mode such as when recursive SQL is performed to support the DML statement being done in the session.
    PS - you should consider increasing processes first and only increase sessions if you still have an issue.
    HTH -- Mark D Powell --
    Message was edited by: mdp add PS
    mpowel01

  • How to find out the tables effected information from oracle from

    can any one tell me how to find out the tables effected information from oracle form

    Hi,
    Please refer to the following documents.
    Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
    Note: 241628.1 - How to Find the Query That Succeeded Recently?
    Regards,
    Hussein

  • Passing session information to multiple JVM's

    Is it possible to pass session information to another JVM running on another server?
    Example:
    Server A calls a servlet on Server B. Will the session object (and values stored in it) created on Server A be accessible to Server B.

    DrClap wrote:
    No.This is not exactly true. If you're talking about a clustered app server implementation (for example, Weblogic supports clustering), where 'machine A' and 'machine B' are both part of the same cluster, then, generally speaking, yes, you're HttpSessions are distributed across those machines.
    God bless,
    -Toby Reyelts

  • How to retrieve the Foreign key information in Oracle

    I want to know how to retrieve the Foreign Key information in Oracle while using SQL Statement?
    I have use three SQL statement to retrieve such information, but the performance is very bad.
    The three SQL Statements are:
    Select constraint_name, r_constraint_name from all_constraints where constraint_type = 'R' and table_name = table1;
    Select column_name from all_cons_columns where constraint_name = cons1;
    Select table_name, column_name from all_cons_columns where constraint_name = r_ccons1;
    Do anyone know another method to retrieve the Foreign Key information which has better performance?

    These sql-statements don't seem very performance intensive. My guess is something is wrong with your database (unless you have millions of constraints). How many constraints do you have? how many concurrent users? What is your dictionary cach hitratio? (other hitratio?) memory problems? other tasks of the computer? is this query the only one being slow? etc.

  • Need information on oracle certified security admin for solaris 10

    Hi All,
    I need some information on "oracle certified security admin for solaris 10 OS".The information what i am looking out is eligibility criteria and within oraganization any tranning provided .
    Regards,
    Uma Maheshwar.

    http://education.oracle.com

  • Inventory additional Information to Oracle GL

    Hello all,
    I am looking for a solution to pass the data from material transactions additional information to Oracle GL system.
    More detail
    when we create a material transactions (either Miscellaneous issue/receipt) we are entering some additional information into transaction descriptive flexibilities.
    Like in Attribite1 we are storing legacy system transaction number
               Attribute2 we are storing legacy system accounting information
    Now our requirement is we have to pass this information into oracle GL . MY oracle apps version is R12.1.3
    I tried something trough "Supporting Reference" (R12 feature), but attributes information not able to passing to oracle GL.
    Please help us.
    Regards
    Madhuri Swapna.

    You can refer following MOS notes and links: A guide to Inventory Period Closing activities and Inventory-SLA-GL Reconciliation. (Doc ID 1447211.1) 11i : Oracle Inventory Period Closing Activity Test (Doc ID 206576.1) EBS R12 Period Close Advisor: Inventory & Costing (Doc ID 1359452.1) thanks

Maybe you are looking for

  • Itunes wont Open with Vista Service pack 2

    My itunes stopped working a while ago and so i decided to delete it, i then reformatted my laptop and reinstalled vista back to the way it was when i first got my laptop and by wonders itunes worked. However since i have completed the updates that wi

  • Search functionality for SAP script

    All, I am looking some of kind utility or report like RPR_ABAP_SOURCE_SCAN for sap script. This is my requirement One of the country code has been hardcoded in various forms (sapscripts) i like to scan all custom sapscripts and find all these form na

  • Accidentally Uninstalled QuickTime

    PLEASE HELP...I uninstalled QuickTime recently not realizing iTunes requires it. I have tried downloading QT by itself and as part of iTunes again but they don't seem to be in sync. I see a QT folder in "My Programs" but iTunes still won't run. What

  • Icons into photo ... hep please

    greeting helpful friends! once upon a time I changed a few photo icons from the generic jpeg icon to an actual mini photo, that stays when you view in list form. Now I can't remember how I did it to save my life. And I wanna do more! Seems I opened t

  • Feature request: "Last" button works in guide

    Often times, when flipping through channels, I'd like to go back in the guide to were I was. For example: I'm watching a channel, a commercial comes on, I go to the guide, and page up (or down) a few times and find a show I want to flip to. I select