|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, February 12, 2011 3:29 AM
Points: 16,
Visits: 60
|
|
Hello all,
I want to automatically logout the inactive users from sql server 2005/2008 after certain time limit(ie. after 5minute). Is there anyway to do so by management studio or some script?
Need your help!
Regards, Charlie
--------------------------------------------------- The Greatest pleasure in life is doing what people say you can't do! 
MS-ACCESS DBA!!
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:06 AM
Points: 900,
Visits: 654
|
|
you can leaverage the dynamic management view to check the inactive users.
Abhijit - http://abhijitmore.wordpress.com
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:41 AM
Points: 38,089,
Visits: 30,383
|
|
Charlie.anna (2/10/2011) I want to automatically logout the inactive users from sql server 2005/2008 after certain time limit(ie. after 5minute).
Why?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, February 12, 2011 3:29 AM
Points: 16,
Visits: 60
|
|
@Abhijit More I am not an advance user, just a programmer so would you please describe
--------------------------------------------------- The Greatest pleasure in life is doing what people say you can't do! 
MS-ACCESS DBA!!
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, February 12, 2011 3:29 AM
Points: 16,
Visits: 60
|
|
@GilaMonster
Its just a requirement, i hope by doing this i will not break any law
--------------------------------------------------- The Greatest pleasure in life is doing what people say you can't do! 
MS-ACCESS DBA!!
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:41 AM
Points: 38,089,
Visits: 30,383
|
|
Charlie.anna (2/10/2011)
Its just a requirement, i hope by doing this i will not break any law 
I'm asking because there are very few good reasons to do this and if you do all your application have to be able to deal with connections that they think are open being closed underneath them, transactions being rolled back that should have been committed, etc.
May I suggest you go to the person who requested this and find out more information on why?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:39 AM
Points: 1,059,
Visits: 2,263
|
|
Some applications create a connection to the db and stay idle and connected to the db. That way when data is requested it simply reuses that idle connection. Killing them defeats that purpose and will fill up your SQL Server log with killed connections.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 11:41 AM
Points: 38,089,
Visits: 30,383
|
|
Markus (2/14/2011) Some applications create a connection to the db and stay idle and connected to the db. That way when data is requested it simply reuses that idle connection. Killing them defeats that purpose and will fill up your SQL Server log with killed connections.
And may cause application errors if the application is not set to handle connections that it thinks are open but are not.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|