How to check the date of an Oracle session

hello
How to check how long a session was opened?
thx

set lines 100 pages 999
col ID          format a15
col osuser     format a15
col login_time     format a14
select      username
,     osuser
,     sid || ',' || serial# "ID"
,     status
,     to_char(logon_time, 'hh24:mi dd/mm/yy') login_time
,     last_call_et
from     v$session
where     username is not null
order     by login_time
Regards,
Andy Barry

Similar Messages

  • How to check the data of an archived table.

    I have archived a table created by me. I have executed the write program for the archiving object in SARA. Now how can check the data of my archived table.

    Hello Vinod,
    One thing to check in the customizing settings is your "Place File in Storage System" option.  If you have selected the option to Store before deleting, the archive file will not be available for selection within the delete job until the store job has completed successfully.
    As for where your archive file will be stored - there are a number of things to check.  The archive write job will place the archive file in whatever filesystem you have set up within the /nFILE transaction.  There is a logical file path (for example ARCHIVE_GLOBAL_PATH)where you "assign" the physical path (for example UNIX: /sapmnt/<SYSID>/archivefiles).  The logical path is associated with a logical file name (for example ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK).  This is the file name that is used within the customizing settings of the archive object.
    Then, the file will be stored using the content repository you defined within the customizing settings as well.  Depending on what you are using to store your files (IXOS, IBM Commonstore, SAP Content Server, that is where the file will be stored. 
    Hope this helps.
    Regards,
    Karin Tillotson

  • How to check the date and time when a material is blocked

    Hello,
       Please tell me how can i check the date and time when a material is blocked or unblocked.
    Regards,
    Priyanka

    Hi Pryianka,
    Are you speaking about blocked status of material master ('X-plant matl status' > MM03 > Basioc view 1; 'Plant-sp. matl status' > MM03 > MRP 1) or your problem is to find out the date when your material was booked into blocked state (stock category).
    If your problem is about mmr you can use the above mentioned MM04 (or MM03 > menu > Environment > Display changes).
    If your problem is to find out when your goods were posted to blocked stock you have to use MB51 + relevant movement types (e.g. 103, 344) + batch + etc. ()
    BR
    Csaba

  • Help! how to check the SQL run in Oracle?

    Hi all,
    I have a problem. the developer said the SQL written in Java code are not the one executed in Oracle DB. that mean the query is some how manipulated by some PL/SQL so the final query run in Oracle is different. So can someone teach me how to check the actual SQL run in Oracle?
    Thanks a lot.
    Regards,
    Jason

    Hi Michel Thanks. But it looks like the query stored in v$sqlarea is not the final executable SQL. for example, the code in application is "select column_A from default_table where column_A = ?" and this ? will be given some value in run time. the query stored in v$sqlarea will be like "select column_A from default_table where column_A = :1"... what is this :1?
    Also if some PL/SQL procedure appends some condition to the SQL, is it possible to view the full query from database side?
    ok, let me try trace and tkprof first.

  • How to check the date is initial in the calculated keyfigure

    Hi,
    While calculating the difference between the two dates , i need to check the date is having the values or not in the calucluated key figures .how to achieve this .
    number of days = delviered date -  creation date
    All the dates are key figures
    Regards,
    Raj

    Hi there,
    It depends on what you want to retrieve.
    If you have this:
    day 1 - day 2
    If day 1 is initial, you'll have day 2 as the result of the difference which is correct. If in the other hand day1 is initial you'll have - day 2 as the result. So you just need the ABS() formula to give the absolute value of the difference.
    What exaclty do you want to achieve? only do the formula when both day 1 and day 2 have values? Retrieve always a positive value of the formula no matter if day 1 is initial or day 2 or both?
    Can you give a complete example with values of what's happening and what do you pretend to achieve?
    Diogo.

  • How to check the load balancing in Oracle 11gR2 2 node RAC

    Dear All,
    Can any one please assist me how to check whether the incoming connections are evenly distributing across the nodes..?
    We have two nodes, when we check the sessions counts in both nodes, Most of the time we could see node -1 has more no of sessions than node-2..? So just wanted to know whether load balancing is happening or not ...? If not how to enable it and distribute the incoming connections evenly..?
    Oracle 11gR2 / RHEL5

    SQL> select inst_id,count(*) from gv$session where username is not null group by inst_id;
    INST_ID COUNT(*)
    1 43
    2 40
    Not sure how to check the users are connecting through scan or not ..? But below are scan setttings...
    SQL> !srvctl config scan_listener
    SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
    SQL> !srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node za-rac-prd-02
    SCAN Listener LISTENER_SCAN2 is enabled
    SCAN listener LISTENER_SCAN2 is running on node za-rac-prd-01
    SCAN Listener LISTENER_SCAN3 is enabled
    SCAN listener LISTENER_SCAN3 is running on node za-rac-prd-01
    SQL> !srvctl config scan
    SCAN name: rac_prd.abc.local, Network: 1/10.100.130.0/255.255.255.192/eth6.64
    SCAN VIP name: scan1, IP: /rac_prd.abc.local/10.100.130.55
    SCAN VIP name: scan2, IP: /rac_prd.abc.local/10.100.130.54
    SCAN VIP name: scan3, IP: /rac_prd.abc.local/10.100.130.53
    SQL>

  • How to check the data in a temporary table

    Hi,
    A procedure inserting data into a temporary table , data exists in the table now. so, how to see the data from the temporary table. Is it possible to see from the sqlplus by selecting, right now i'm not getting any data. .thanks Bcj.

    If you are referring to Global Temporary Tables, then the only way to see the contents of the table are to select from the table while connected to the same session that inserted the data into the GTT.
    Please note however that there is not a 1 to 1 correspondence between sessions and users (shcemas). A user may be connected to 1 or more sessions, but it is only the session that inserted the records that will be able to view the records.

  • How to check the date in the date format

    hi all,
    i am using db10g
    i have to read the data column from some source.
    I should accept as it is and validate whether that date is in the date format how can i validate this condition?
    Thanks..

    user13329002 wrote:
    hi all,
    i am using db10g
    i have to read the data column from some source.
    I should accept as it is and validate whether that date is in the date format how can i validate this condition?
    Thanks..Ask your source what the date format is. If it is constantly changing then the format needs to be transmitted also.
    Imagine a string (that could represent a date) like this:
    10-01-11
    it could mean:
    10th of January 2011
    1st of October 2011
    11th of January 2010
    1st of November 2011
    11th of October 2001 (highly unlikly but still possible).
    How should an automated system decide which is the correct date? You need to establish a rule that includes a date format and therefore returns the correct value. Or even better: Deal with dates, not with strings. This is especially for those Java/VB programmers who have no real clue what a data type is ment for.

  • How to check the data type dynamically

    hi all
    my requirement is like this  in one screen field which is of character type user is inputing data .
    now while saving to the database i have to apply one external check for this data if it is integer type or not
    as this data on the screen is refrenced to the database so i can not change the data type on the screen itself .
    i have to check it externally from PAI ....... would any one please help on this
    Thanks and regards
    Papps

    Hi
    Thanks again you are right i missed the space one ..
    but Now another problem...
    I have tried that but in that case even user can input data by mistake like this
    123 4  but this is not an integer it should also give error as this is also not a correct integer ...
    as par asi think . we have to aain check if there is any spaces in the data provided i guess or
    is there any other procedure ?

  • How to check the data for duplicates in xml

    Hi all,
    I have an xml similar to the below. In that I need an xquery which can remove the tags for which the data is same. For example in the below xml for first <customer> first <address> the <houseno>
    and the second <address>'s <houseno> is same in that case there should be only one <houseno> tag with the data in the output xml. Please check the Input XML and Output XML xml formats below .
    I am able to get the OUtputxml but with the same <houseno> repeating. I am not able to find a way in which I can chk the data and stop the tag getting created in the output.
    Could you please suggest me the ways in which I can do. It would be of great help for me. Thanks a ton in advance.
    Input XML
    <customers>
         <customer>
              <address>
                   <houseno>212</houseno>
                    <phone>121221</phone>
              </address>
              <address>
                   <houseno>212</houseno>
                   <phone>42334</phone>             
              </address>
         <customer>
         <customer>
              <address>
                   <houseno>3243</houseno>
                   <phone>6565</phone>
              </address>
              <address>
                   <houseno>3434</houseno>
                    <phone>78778</phone>
              </address>
         </customer>
    </customers>
    Output XML Expected
    <customers>
    <customer>
              <address>
                   <houseno>212</houseno>
                    <phone>121221</phone>
                      <phone>42334</phone>              
              </address>
         <customer>
    <customer>
              <address>
                   <houseno>3243</houseno>
                   <phone>6565</phone>
                   <houseno>3434</houseno>
                    <phone>78778</phone>
              </address>
         </customer>
    </customers>
    Output XML Which I am getting
    <customers>
    <customer>
              <address>
                   <houseno>212</houseno>
                    <houseno>212</houseno>        
                    <phone>121221</phone>
                      <phone>42334</phone>              
              </address>
         <customer>
    <customer>
              <address>
                   <houseno>3243</houseno>
                   <phone>6565</phone>
                   <houseno>3434</houseno>
                    <phone>6565</phone>
              </address>
         </customer>
    </customers>
    Regards

    First of all the desired output.
    [quote]
    <customers>
    <customer>
              <address>
                   <houseno>212</houseno>
                    <phone>121221</phone>
                      <phone>42334</phone>              
              </address>
         <customer>
    <customer>
              <address>
                   <houseno>3243</houseno>
                   <phone>6565</phone>
                   <houseno>3434</houseno>
                    <phone>78778</phone>
              </address>
         </customer>
    </customers>
    [/quote]
    I don't think this is a very good choice and will be causing trouble no end in a future stage of using the data...
    I would rather propose a better choice to my thinking like this.
    [code]
    <customers>
        <customer>
              <address>
                   <house houseno="212">
                       <phone>121221</phone>
                       <phone>42334</phone>
                   </house>
              </address>
         </customer>
        <customer>
            <address>
                <house houseno="3243">
                    <phone>6565</phone>
                </house>
                <house houseno="3434">
                    <phone>78778</phone>
                </house>
           </address>
      </customer></customers>
    [/code]
    In that case, this is capable of producing the regrouped output.
    [code]
    <customers>{
        let $doc:=doc("your_data.xml")
        for $customer in $doc/customers/customer
        return
        <customer>{
            for $houseno in distinct-values($customer/address/houseno)
            return
            <house houseno="{$houseno}">{
               for $phone in $customer/address[houseno=$houseno]/phone
               return
               <phone>{data($phone)}</phone>
            }</house>
        }</customer>
    }</customers>
    [/code]

  • How to display the data store in Oracle Spatial?

    Hello everyone,
    I am totally newbie in Oracle Spatial and to GIS in general. I have started playing around with Oracle Spatial and did an example which is to store a couple of polygons in Oracle and my question is: how to view/display the stored data (in my case the polygons) using Oracle?
    Thanks in advance

    Latvian83,
    thing is, most of the GIS data out there are in SHAPE format so does it make sense to convert [between formats]Depends.
    If you're a data producer that wants to ensure a single version of the truth across your company, then maintaining a central repository makes imminent good sense. The alternative would be people working on likely outdated snap-shots of data – stored on their PCs as well as duplicated on file-servers -- bumbling along creating derivatives and passing on the results as if they were valid... Anyhow, spatial analysts would also benefit from a single version of truth.
    Data consumers who just want the latest mashups may not want to be bothered with the translation in/out of a database.
    Then there’s a grey area with transformations: I've seem instances where it was more expedient to pull data into ArcMap for a massive transformation than performing a similar operation within Oracle.
    Regards,
    Noel
    (I'm sure you've already found it, but you can right-click on a legend entry on ArcMap's Table of Contents and find the Export to ShapeFile option on the context-menu.)

  • How to Check the date and get the latest date?

    Hi Everyone,
    I've an internal table which holding few records which contain date field. How I can check this internal table by getting the record which contain "latest date" only? Kindly advise. Thank you.
    eg:
    I should only get the record which contain lastest date. (eg: I should picked up Record3)
    Table i_test
    Field 1              Field 2(date)
    Record1            20090322
    Record2            20090101
    Record3            20090601
    Moderator message - Please search before asking and do not ask basic questions - post locked
    Edited by: Rob Burbank on Jun 17, 2009 9:21 AM

    Its easy...sort the internal table using the field i.e. date field in DESCENDING manner
    SORT gt_final BY date_field DESCENDING.
    Read the first entry of the internal table..it will have what you require
    READ gt_final INDEX 1.

  • How to check  the date with current day after 5 days

    Hello,
    I need to make the visible of delete button in my struts application. I've application in which user can be deactivated. If the user is deactivated and the admin can't delete the user for the specific period of time (set in property file). while deactivating the user, system time is set. and 5 days after the system time's set, i need to make the button visible.
    This is my code.
    Calendar cal = Calendar.getInstance();
    Date deActivatedDate = null;
    deActivatedDate =new Date(userData.getDeActivatedTime().getTime());// Set it in the Calendar object
    cal.setTime(deActivatedDate);                    // Add 5 days
    cal.add(Calendar.DATE, 5);// get the current date
    Calendar currentCal = Calendar.getInstance();
    Date currentDate = new Date();
    currentCal.setTime(currentDate);// check if the de-activation time is over.
    if (cal.get(Calendar.DATE) < currentCal.get(Calendar.DATE)) {
    userData.setDeletionAllowed(true);}
    can anyone help to solve this issue?

    What's the problem with the code that you posted?

  • HT1349 Is the Apple Magsafe 2 Power Adapter covered under Apples one year warranty?  I cant figure out how to check the date.  The serial number is to long to enter.

    I need help finding out warranty information on the Apple Magsafe 2 Power Adapter.  When I enter the serial number, it is too long for the box.  Any help would be appreciated.  Thanks.

    I got this from my father.  It looks like it is an aftermarket package and not something that came with the original Mac. I will try to attach a picture of the item box and the barcode label.  The actual part number is MD506LL/A .

  • How to check the Oracle Release?

    Hi,
    How to check the release version in Oracle AS ?
    And
    How to find what oracle AS release has happened in year (example 2005)?
    Best Regards

    There are a couple of ways I use to find the version:
    1. Open the Oracle Universal Installer on the machine where the OAS is installed, click on Installed Products. That should display the product and the version number.
    2. Set the oracle environment variables, then run the command below
    +$ORACLE_HOME/jdk/jre/bin/java -jar $ORACLE_HOME/j2ee/home/oc4j.jar -version+
    This should display the version of the OC4J which generally is the version of the OAS (unless you have applied any one-off patches)
    Have no idea about the second part of your question. Sorry.
    - Steve

Maybe you are looking for

  • File too large error unpacking War during app deploy - RHEL &WLS 10.3.5

    I'm stumped and I'm hoping someone can help out here. Does anyone have any insights into the cause of my problem below, or tips on how to diagnose the cause? scenario We ran into an open files limit issue on our RH Linux servers, and had the SA boost

  • How do i add windows to my macbook pro

    I just bought windows 8.1 software and i was wondering how to install it onto my macbook pro? I was told a program called parralels or fusion could do it but i could not find them. How do i install windows and still have OS X available?

  • WebUtil file transfer in multiple user implementation

    Hi Installed WebUtil and able to integrate forms/reports in Web enviroenment 10gAs. Around 30 to 40 people will use this application, Now to do client side integration (To Save generated output to Cleint m/c) we are geerating file on AppServer and tr

  • Maintain output condition record for KONS

    Dear all friends, Anybody help me to maintain output condition record for KONS during consignment cycle. when,where and how i can maintain the output condition record for KONS thanx in advance. best regards, Rajesh

  • PC Suite on Vista causes excessive print spooler l...

    I had PC Suite 6.84.10.3 installed on two Vista Home Premium systems. Some time after the installation was complete, I noticed excessive disk activity, and tracked this down to writes to the file c:\windows\system32\spool\SpoolerETW.etl - a file that