|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 7:11 AM
Points: 27,
Visits: 124
|
|
if a user connects from the application end to the database, he gets only 30 minutes of session time after which the session gets expired and he has to connect again.
how do i implement it in SQL SERVER 2000.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 4,804,
Visits: 8,074
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 7:11 AM
Points: 27,
Visits: 124
|
|
a request from the client side, the problem is there are no logon triggers in sql server 2000, so is it feasible to write a procedure to check the session time for that particular user and schedule it to run every 5 min? or is there any other way to do it?
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 4,804,
Visits: 8,074
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 7:11 AM
Points: 27,
Visits: 124
|
|
having a small doubt(silly one)
if i write a logon trigger(forget the sql version), is it like : after the completion of trigger the user gets the access or he gets the access while the trigger is running?
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 4,804,
Visits: 8,074
|
|
Not sure what you mean. The logon trigger is executed as part of the log on process. The session is established before the trigger runs, but the session is not available to the user until the trigger code completes. I hope this clarifies things instead of complicating...
Get your two-cent-answer quickly The Spaghetti DBA
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 7:11 AM
Points: 27,
Visits: 124
|
|
thanks for resolving my doubt! Is there any other way instead of procedures to accomplish session time limiting in sql server 2000?
if it is sql server 2008, what's the way?
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 4,804,
Visits: 8,074
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 7:11 AM
Points: 27,
Visits: 124
|
|
yes that can be done, i am working on the issue from my end by using (sys.dm_exec_sessions) or should i use something else?
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 4,804,
Visits: 8,074
|
|
In SQL2008 you probably want to use sys.dm_exec_sessions and identify sessions that have been idle for the last 30 minutes:
DECLARE @idle_timeout int = 30; -- minutes
SELECT session_id ,status ,login_time ,host_name ,program_name ,host_process_id ,original_login_name FROM sys.dm_exec_sessions WHERE status = 'sleeping' AND last_request_end_time < DATEADD(minute, -1 * @idle_timeout, GETDATE()) AND is_user_process = 1
Get your two-cent-answer quickly The Spaghetti DBA
|
|
|
|