Last user login

Hi all ,
I need to shutdown a few databases, but before that i need to know the users who had used it and when did they use it.
How to go about it ?
I checked and found dba_users view , but that will not give me the information of the last user login with the date.
Other option is select * from dba_audit_session;
but for that also , I am not sure if auditing is enabled or not.. Need to check on that.. Also this is my homework that i am doing for the database whose access i will get in a while.. so dont even know the version. All i know is that itys on windows machine.
any suggestion/help would be appreciated
KKuKreja

Hi,
If you want to check who all are accessing the database just before the shutdown you can check the v$session.
COLUMN username FORMAT A15
col osuser for a15
col module for a15
COLUMN machine FORMAT A30
col program for a20
COLUMN logon_time FORMAT A20
SELECT NVL(s.username, '(oracle)') AS username,
       s.osuser,
       s.sid,
       s.serial#,
       p.spid,
       s.status,
       s.module,
       s.terminal,
       s.machine,
       s.program,
       TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time
FROM   v$session s,
       v$process p
WHERE  s.paddr  = p.addr
and s.username not in '(oracle)'
ORDER BY s.username, s.osuser;But if you want to know who all have accessed till now, auditing is necessary.
Well, little weird, but if you are on 10g and above check the v$active_session_history where you have 'machine' column.You can get all the distinct machine names from which the connections came to the database.
Anand
Anand

Similar Messages

  • How to track "Date of Last user Login" across all provisioned systems ?

    We all know how hard it is to track old users - in particular ones that have left and termination paperwork has not been completed (users such as contractors, service technicians etc)
    Anyone think of a way where IDM could track the date/time of last login to each system that it has provisioned that user to ?
    Maybe a new field per system eg LASTLOGIN<ECPxxx> which I can then view along with the User ID Alias ACCOUNT<ECPxxx> field and see ;
    Which Systems the user has a login to
    Date / Time of last login to these systems
    Yes, it can be done manually by logging in to each to the systems and running SUIM, but I would hopping for an elegant solution as part of the IDM process.

    Hi Phil,
    getting the last logon date is dependent on the system to which you are provisioning userids. For some systems you might not be able to retrieve the last logon date at all.
    We have implemented something like that in my previous project for Active Directory, because we needed to implement a custom password ageing functionality that disables accounts when the user does not change his password in time. For Active Directory you can check the lastLogon attribute or alternatively the accountExpires attribute.
    Best regards
    Holger

  • Last user login date

    Hi
    We use our DS as an authentication service. We have a business requirement whereby if a given user does not authenticate through LDAP after period of inactivity to suspend the
    User�s account and subject user to password reset.
    H
    ow do you retrieve a user's last login date?
    The two viable solutions are not pretty: 1) requiring all client applications to update a user attribute "last_logon_date" or 2) using a scheduled script to mine the audit logs.
    Any additional solution?
    Regards
    Bob

    Correct.
    For Directory Server 5.x, it can implemented as a custom plug-in.
    I am not aware of any implementation of such plug-in though.
    Ludovic.

  • Retrieving Last used User Login Name in OIM 11g R2

    In my scenario, i want to retrieve the last used user login in OIM for user profile, to create next User Login based on last one retrieved ?
    Is there any API method available in User Management to get this value or Any customized DB query that will help ?
    Setup used is OIM 11g R2 PS1.

    Thanks Rajiv for Input !
    Still i have some doubts in my scenario. Actually i have to create new User Login in sequence based on last User Login of Last user created . This is no based on User ID. Also, whatever already existing users with user login are present , they will be uploaded in OIM for first time through trusted reconcilation.
    After reconcilation is done, then hereafter while creating next user i have to update its user login attribute in sequence of latest user login used and check for its uniqueness.Suppose, in case while bulk data import in OIM for first time , the users are not in sequence of User Login attribute, then it will be difficult to get the latest user login. Is there any way to get last user created based on User Login and not on User Id ?
    Hope i have given clear picture of my scenario.

  • Last time user login in 11i

    COuld anyone tell me how to find out the last time a user login into the application in Oracle eBusiness 11i? I hav ebeen audited and need to receive that data for my auditors ?
    Thnx

    Hi,
    See this thread, it should be helpful.
    USERS CONNECTED
    Re: USERS CONNECTED
    Regards,
    Hussein

  • Retrieving all users and last successful login

    Hi. I"m trying to return a list of all users and thier last successful login to a particular database. Oracle version is 10.2.0.4 on RHEL 5.3. I am attempting to join to the sys.aud$ table or use the audit_trail views but I didn't know if there was something more obvious to do. We don't have Audit vault yet nor do we have actual logon triggers that write to an audit table - just have auditing turned on. audit_trail=db_extended.
    I appreciate any help in advance.

    Thanks....I have that on. I am now trying to get this information out of the sys.aud$ table to a report in a format similar to
    username, last successful logon
    by joining the all_users and sys.aud$ tables to get the max timestamp for action 100
    where user is in a list of users from all_users.
    This is taking a long time to return any information.
    I am wondering if there are other ways to get this information out of the database in a quicker fashion.

  • Can EBS show the last date and time of a user login

    We have a requirement to display users their Last sucessfull login date and time. We would like to display after user have entered username/pwd i.e. Could someone guide how can we schive this ?
    Thanks in Advance
    Dinesh

    Hi,
    This is available through "Signon Audit Unsuccessful Logins" concurrent program.
    How do you audit an Oracle Applications' user? [ID 395849.1]
    Need A Way To Notify Users About Previous Failed Login Attempts [ID 357009.1]
    Thanks,
    Hussein

  • HT1492 Hmm, I was deleting some files last night and when I came to booting up this morning my Macbookpro (5 years old) i was greeted with a user login screen? put in my password, but all i get is the space screen and no further action...? cant get apps o

    mm, I was deleting some files last night and when I came to booting up this morning my Macbookpro (5 years old) i was greeted with a user login screen? put in my password, but all i get is the space screen and no further action...? cant get apps o my bar

    Sounds like you may have deleted something you shouldn't have. Boot to an OS X DVD or a bootable backup, and using Disk Utility, do a repair disk, and while there repair permissions. Disconnect any peripherals, and reboot. If you get the same startup behavior, do a safe boot, by holding the shift key down when booting. If that works, try a normal boot. If neither step helps, you may need to relaod your operating system.

  • Displaying last successful login details of user

    Hi,
    I want to display last successful login details (timestamp may be) on Portal homepage.
    By configuration
    Is there any configuration that we can do to display it on Masthead area may be?
    By code
    I found following two links that talk about direct access of Portal table.
    http://wiki.sdn.sap.com/wiki/display/Snippets/DirectAccesstoDatabaseTables
    http://help.sap.com/saphelp_nw04/helpdata/en/48/6aa9429b930b31e10000000a1550b0/frameset.htm
    In this case, what query should I write to get the last login details of user?
    Please help.
    Thanks and regards,
    Amey

    Hi Ameya,
    Thanks for reply.
    1. I was wondering if there is any System admin level configuration we can do to show this info?.
    Is there any such facility?
    2. Through code, this is what I did: -
    I am getting the last logon timestamp by following code (inside JSPDynpage) : -
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.sql.Timestamp;
    import javax.naming.InitialContext;
    Connection con=null;
    Statement stmt=null;
    ResultSet rs=null;
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/SAP/EP_PCD");
    con = ds.getConnection();
    stmt = con.createStatement();
    String connectedUser = _request.getUser().getUniqueName();
    rs = stmt.executeQuery("select MAX(TIMESTAMPHOUR) from WCR_USERSTAT where LOGONID='"+connectedUser+"'");
    int m = 0;
    while(rs.next()){
         m++;
           Timestamp ts = new Timestamp(rs.getLong(m));
         lastLoginString = ts.toGMTString();
    I guess selecting 'MAX' value of time-stamp would return the latest logon time.

  • Need to Apex App user login last login details

    Hi All.
    how will get the Apex App user login details ? is it have any table or please suggest me on this...

    Not sure what is your exact requirement, but did you look at "Monitor Activity" under "Administration" (you should be an Administrator to the workspace)?

  • User login report for given period

    Hi All,
    We have one query relate to user monitoring. We want to get the detail log or report of users login date,time, logout date time and system ip or system name like for the given period.
    Our application environment as
    SAP application : R/3 4.7
    Database : oracle 9.2.0.8
    Thanx in advance
    Regards,
    Vishnu.

    Hi Vishnu,
    kindly consider to use the forum search before posting. similar questions like yours have been posted several times already. In oyur search results you may find for instance [this thread|Re: Last three user logon date and time;
    b.rgds,
    Bernhard

  • User Login Time in obiee 11g

    Hi all,
    we can get get the user login time using
    *@{session.loginTime}*
    But my requirement is to get the last login time ie., Previous login time.
    How to achieve this.
    Thanks,
    Haree.

    Hi MK,
    Thanks a lot for your response.
    I am not aware about that. Can you please explain me in brief.
    Possibly if you have any document related to it please share with me.
    Thanks,
    Haree.

  • Is there a way to get a user login record after sleep?

    I know that by opening terminal and typing in "last" (without the quote marks) that it will give me about a 3 week record of who has logged on my computer after shutdowns and restarts.
    What I want to know is this:
    a) Is there a way to get a user login record after the computer only goes to sleep?
    b) is there a way to get the terminal to go back further than just 3 weeks or so for the shutdown/restart records?
    Is there software that might do this???
    Thanks in advance, this is important for me.

    bikinijack wrote:
    Thanks, Dave: so this is what I type in the terminal? "ls -l /var/log/wtmp*" (without the quotes). And how do you unzip something that has been "gzipped"?
    "man gzip" will give you the details for using gzip
    My first question can be explained this way: To get into the computer when it is coming out of sleep you need to type in a password, then it opens to the desktop. Is there a way I can find out the times over the course of a day/week/month that this is being done? i.e., is there a log being made somewhere of when the computer is being opened and signed onto after being asleep?
    When you wake the computer from a sleep, you are not logging in again so there will be
    no record of the event as a "login"
    My computer possibly could be used by a few other people that have access to my computer password (don't ask why) and I basically want to know if they are signing on when I am away from my desk.
    You may want to look at /var/log/asl.log or /var/log/secure.log which contain details of
    authentication attempts (which is what you are doing) and failures.
    I am not asking why you have multiple people accessing your computer with your password --
    but consider setting up separate username, it is a lot easier to manage and you will probably
    not be asking questions like this one.
    Dave

  • How to create and add a logon/logoff script to populate last user into the computer field in AD

    Hi All,
    Bit stuck here,
    Not sure what forum to put this is as it involves different subjects,
    I work in a Server 2008 RT environment and have access to Active Directory etc.
    I saw this a few weeks ago - http://ivan.dretvic.com/2012/10/automatically-generate-description-field-for-computers-in-active-directory/
    Now, I'm not particularly sure what to do here, I don't know how to create a group policy etc. How to implement it in a test environment etc. Never done this before.
    Can somebody give me a step by step guide on literally everything that would be involved in this?
    Or any links that may be able to help?
    I basically want the AD to show who was the last user that logged into a specific client when the client named is searched for in the Computers OU, and if possible being able to pull the make/model and serial number from the client aswell.
    If possible there should be a way of including this with the existing login script that we already have, how can I do this?
    I've tried a few so far and got stuck, I have domain admin priveledges also.
    Thanks,
    Regards, Max.

    Hi Max,
    Please refer to the following article to learn how to create a logon/logoff script via GPO:
    Assign User Logon Scripts
    Assign User Logoff Scripts
    As for the issues about script, this is the forum to discuss questions about driectory service, better to post your question to the forum for Script:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=scripting
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or
    learn from your interaction with us.
    Thank you for your understanding.
    Regards,
    Lany Zhang

  • User login report in Active Directory for specific date and time

    I want to get User login report in Active Directory for specific date and time e.g user logged in at15-01-2015 from 8:00am to 4:00pm
    Is any query, script or any tool available?
    Waiting for reply please

    You can identify the last logon date and time using my script here: https://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-User-bbcdd771
    If you would like to get back in time and see when the user did a logon / logoff then you need to have auditing enabled. Once done, you can records from Security log in the event viewer: https://social.technet.microsoft.com/Forums/windowsserver/en-US/98cbecb0-d23d-479d-aa65-07e3e214e2c7/manage-active-directory-users-logon-logoff-events
    I have started a Wiki about how to track logon / logoff and it can help too: http://social.technet.microsoft.com/wiki/contents/articles/20422.record-logon-logoff-activities-on-domain-servers-and-workstations-using-group-policy.aspx
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

Maybe you are looking for

  • Oracle Service does not start after installation of Domain role

    Hi all, here is my setting: Windows Server 2008 R2 64bit ORACLE ONE 11g I installed the database and it was working fine until I installed the domain controller role on this server. Finally I needed to uninstall this role again and restarted the serv

  • How to deploy my Java application?

    Have a proxy server running as a plain vanilla Java application from the DOS command line in Windows. Would like to run it 'properly' on a (web) server. Have got Apache and Tomcat installed but I don't know how to adapt my application to run in that

  • Xcelsius 2008 doesn't support excel links?

    I'm building a dashboard with Xcelsius 2008 and my Excel sheet which I imported has a number of links to other Excel files - that is how the values are updated, from other Excel sheets. After adding a collumn graph component and setting it up appropr

  • HT4528 HOW DO I GET MY CONTACKS OFF MY I PHONE AND ON MY S

    how do i transfer my picks my contacts any meadaand all my other medea

  • Connecting to multiple schemas

    am trying to connect to multiple oracle schemas on the same database using a 10.1.3 version of datasources.xml file. Has any one done this. If yes, can you please post an example.