Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Inactive database user? Expand / Collapse
Author
Message
Posted Thursday, February 10, 2011 4:06 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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!!
Post #1061834
Posted Thursday, February 10, 2011 4:22 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, June 23, 2014 6:03 AM
Points: 920, Visits: 702
you can leaverage the dynamic management view to check the inactive users.

Abhijit - http://abhijitmore.wordpress.com
Post #1061842
Posted Thursday, February 10, 2011 5:58 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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

Post #1061887
Posted Thursday, February 10, 2011 6:51 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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!!
Post #1061926
Posted Thursday, February 10, 2011 6:53 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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!!
Post #1061927
Posted Thursday, February 10, 2011 7:11 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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

Post #1061942
Posted Monday, February 14, 2011 8:29 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 1:34 PM
Points: 1,276, Visits: 2,803
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.


Post #1063573
Posted Monday, February 14, 2011 8:40 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
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

Post #1063580
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse