Solved

How to track the last time user accessed database

Posted on 2008-10-14
4
541 Views
Last Modified: 2012-05-05
Hi All,

Just a small doubt,. Could you please let me know if there is any way to find out the last time a user has entered (logged)  into the database? I am working on sybase 12.5 ASE
I checked syslogins and few other tables but couldn't get any relevant information from there. Our database is not tracking this date currently.
0
Comment
Question by:arundintyala
  • 2
4 Comments
 
LVL 10

Assisted Solution

by:bret
bret earned 250 total points
ID: 22712874
There are a couple of ways to do it, but nothing automatically track this.

You can set up auditing and audit logins.  That was the traditional solution, but is a bit much if that is all you want to audit.

You can also create a login trigger that updates a table every time someone logs in.

0
 

Author Comment

by:arundintyala
ID: 22714908
Hi  Bret,

thanks for the reply
This login trigger would update the records from now if I write one. but is there any way to track the existing user logins.

0
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 250 total points
ID: 22720034
I'm pretty sure there is no way to get this retroactively if nothing was set up in advance to capture it.

It's exactly the same as setting up a video camera outside your front door - it can't tell you anything about what happened before you installed it.

We should also be clear on the difference between logging it to Sybase (connecting to the ASE) and using a database. They aren't the same thing, and you would need very different solutions to be able to see one set of data vs the other. (They may actually effectively be the same thing when a login has had a default database defined, but even so internally the process of connecting to the Sybase server is still not the same thing as connecting to a database within a Sybase server.)
0
 

Author Comment

by:arundintyala
ID: 22724110
hi all thanks a lot for the replies.. looks like i will write one trigger now atleast to track this down from now
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question