Showing posts with label logon. Show all posts
Showing posts with label logon. Show all posts

Monday, March 19, 2012

Last logon time

How do I find out the last time a SQL Server login id was
used? Is there a system table that will show last login
time? Thanks.The easiest way would be to enable auditing for successfull logins on SQL.
This will print the info you want in both the NT Application event log and
the SQL Errorlog. Otherwise, you could use Profiler to capture
login/logoff events and write them to your own table.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Check the actual SQL logs themselves. I believe by default SS retains 6
copies of the log since sp_cycle_errorlog was run or the instance was
restarted.
hth
Eric
"Jammin" <anonymous@.discussions.microsoft.com> wrote in message
news:079f01c3bf39$06e26fd0$a001280a@.phx.gbl...
quote:

> How do I find out the last time a SQL Server login id was
> used? Is there a system table that will show last login
> time? Thanks.

Last Logon Date

Is there a system table that shows the last logon date for a login?
Or is there a way to setup an alert or something to keep track of logon date
for a login?
Thanks,
Ken
Ken,
You can trace this using Profiler or you can set up auditing for successful
and/or failed login attempts on the EM - Server Properties - Security tab -
Audit Level.
HTH
Jerry
"Ken" <Ken@.discussions.microsoft.com> wrote in message
news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
> Is there a system table that shows the last logon date for a login?
> Or is there a way to setup an alert or something to keep track of logon
> date
> for a login?
> Thanks,
> Ken
|||I setup an alert for error 18453 Login succeeded trusted connection.
This works fine -- I get notified by an email. But I want to execute a job
from this alert to save the login information into a table so that I can
remove the login if it has not been used for a number of months. This is
part of our security audit.
My question is -- how can I pass the login info from an alert to a job?
Thanks,
Ken
"Jerry Spivey" wrote:

> Ken,
> You can trace this using Profiler or you can set up auditing for successful
> and/or failed login attempts on the EM - Server Properties - Security tab -
> Audit Level.
> HTH
> Jerry
> "Ken" <Ken@.discussions.microsoft.com> wrote in message
> news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
>
>

Last Logon Date

Is there a system table that shows the last logon date for a login?
Or is there a way to setup an alert or something to keep track of logon date
for a login?
Thanks,
KenKen,
You can trace this using Profiler or you can set up auditing for successful
and/or failed login attempts on the EM - Server Properties - Security tab -
Audit Level.
HTH
Jerry
"Ken" <Ken@.discussions.microsoft.com> wrote in message
news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
> Is there a system table that shows the last logon date for a login?
> Or is there a way to setup an alert or something to keep track of logon
> date
> for a login?
> Thanks,
> Ken|||I setup an alert for error 18453 Login succeeded trusted connection.
This works fine -- I get notified by an email. But I want to execute a job
from this alert to save the login information into a table so that I can
remove the login if it has not been used for a number of months. This is
part of our security audit.
My question is -- how can I pass the login info from an alert to a job?
Thanks,
Ken
"Jerry Spivey" wrote:

> Ken,
> You can trace this using Profiler or you can set up auditing for successfu
l
> and/or failed login attempts on the EM - Server Properties - Security tab
-
> Audit Level.
> HTH
> Jerry
> "Ken" <Ken@.discussions.microsoft.com> wrote in message
> news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
>
>

Last Logon Date

Is there a system table that shows the last logon date for a login?
Or is there a way to setup an alert or something to keep track of logon date
for a login?
Thanks,
KenKen,
You can trace this using Profiler or you can set up auditing for successful
and/or failed login attempts on the EM - Server Properties - Security tab -
Audit Level.
HTH
Jerry
"Ken" <Ken@.discussions.microsoft.com> wrote in message
news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
> Is there a system table that shows the last logon date for a login?
> Or is there a way to setup an alert or something to keep track of logon
> date
> for a login?
> Thanks,
> Ken|||I setup an alert for error 18453 Login succeeded trusted connection.
This works fine -- I get notified by an email. But I want to execute a job
from this alert to save the login information into a table so that I can
remove the login if it has not been used for a number of months. This is
part of our security audit.
My question is -- how can I pass the login info from an alert to a job?
Thanks,
Ken
"Jerry Spivey" wrote:
> Ken,
> You can trace this using Profiler or you can set up auditing for successful
> and/or failed login attempts on the EM - Server Properties - Security tab -
> Audit Level.
> HTH
> Jerry
> "Ken" <Ken@.discussions.microsoft.com> wrote in message
> news:806D9945-7352-49F3-B43C-97B3F838F9F2@.microsoft.com...
> > Is there a system table that shows the last logon date for a login?
> > Or is there a way to setup an alert or something to keep track of logon
> > date
> > for a login?
> >
> > Thanks,
> > Ken
>
>