Monday, February 13, 2012

auto logout in sql server

Hi,
Is there a auto logout feature in SQL Server? If a user is logged on to the
server through an application and is not using the application, is there a
way to force a logoff after 15 or 30 minutes? Thanks.Lookup KILL command in the BOL
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:8B561246-456E-427A-B57E-F887E329C4EB@.microsoft.com...
> Hi,
> Is there a auto logout feature in SQL Server? If a user is logged on to
> the
> server through an application and is not using the application, is there a
> way to force a logoff after 15 or 30 minutes? Thanks.|||No built-in feature.
You could create a job that took the data from sp_who2 and compared the time
now to the LastBatch column. If they exceed your threshold disconnect them
with the KILL command.
Ensure your application can handle this and exit gracefully.
HTH. Ryan
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:8B561246-456E-427A-B57E-F887E329C4EB@.microsoft.com...
> Hi,
> Is there a auto logout feature in SQL Server? If a user is logged on to
> the
> server through an application and is not using the application, is there a
> way to force a logoff after 15 or 30 minutes? Thanks.

No comments:

Post a Comment