Wednesday, March 7, 2012

Audit Logins

Is it possible to produce a report of when each login last logged in to a
server?
Thanks
AdamNot directly no, but there are a couple of things you can have a look at.
Firstly you can track all log on and attempts at log on in your SQL Server
log file. To do that right click on Server, select Security, and under Audit
select 'All', this will log both succuessful, and unsuccessful attempts. You
will need to start and stop the Service however.
If you want a bit more of a solution closer to what you want, I know where
you can start looking, but you will have to do a bit of research on how to d
o
it yourself.
Under SQL Server Alerts you can get SQL Server to perform an action based
upon a internal message. For instance I have it to send me an email whenever
an illegal log in is performed, you could have a look at doing that, but in
your case run a job afterwards to add / modify the date of the log in a tabl
e.
They maybe another way using the sysprocesses table in the master database
by running a job, but you may want to look into doing that yourself.
Peter
"Adam Sankey" wrote:

> Is it possible to produce a report of when each login last logged in to a
> server?
> Thanks
> Adam|||Hi Peter,
When I selected Security in EM, I don't see Audit. Do I need to turn on
some option to see it? This is SQL 2000 on a win2k3 box.
Thanks,
Bing
"Peter Nolan" wrote:
[vbcol=seagreen]
> Not directly no, but there are a couple of things you can have a look at.
> Firstly you can track all log on and attempts at log on in your SQL Server
> log file. To do that right click on Server, select Security, and under Aud
it
> select 'All', this will log both succuessful, and unsuccessful attempts. Y
ou
> will need to start and stop the Service however.
> If you want a bit more of a solution closer to what you want, I know where
> you can start looking, but you will have to do a bit of research on how to
do
> it yourself.
> Under SQL Server Alerts you can get SQL Server to perform an action based
> upon a internal message. For instance I have it to send me an email whenev
er
> an illegal log in is performed, you could have a look at doing that, but i
n
> your case run a job afterwards to add / modify the date of the log in a ta
ble.
> They maybe another way using the sysprocesses table in the master database
> by running a job, but you may want to look into doing that yourself.
> Peter
> "Adam Sankey" wrote:
>|||Never mind. Found it.
"bing" wrote:
[vbcol=seagreen]
> Hi Peter,
> When I selected Security in EM, I don't see Audit. Do I need to turn on
> some option to see it? This is SQL 2000 on a win2k3 box.
> Thanks,
> Bing
> "Peter Nolan" wrote:
>

No comments:

Post a Comment