Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Messaging User of time out

Author  Topic 

MarkLandau
Starting Member

6 Posts

Posted - 2012-02-10 : 17:45:30

We are monitoring user time on the server.

When they reach the time without activity I want to send a kill command.

When the command is sent I want to display a message explaining why they have been terminated.

I want to give them instructions on how to log-in to system and give them a chance save work if need be.

Thank you

xx

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-10 : 18:06:34
Isn't this the same as this?

You can issue a Net Send command I suppose.

Are users logging in with SSMS or a 3rd party app? If a 3rd party app then I'd program it in there. If SSMS, I wouldn't worry about it, just kill the SPID and move along.

Still, what you really need, it seems, is more licenses. I'm not so sure that purchasing (for example) 50 licenses and issuing access to 75 users, while trying to make sure that no more than 50 are on at the same time is fair to the vendor. I am sure that if an employee reports this, it won't be pretty.

A far better use of resources would be to purchase the # of CALs needed for the enterprise, rather than engineering a workaround.
Go to Top of Page

MarkLandau
Starting Member

6 Posts

Posted - 2012-02-13 : 09:19:28
Yes I have put the monitoring script in place and it works great.
I modified the script to fit our situation.

I don't want to spend the extra for licenses if the user just sits on the screen with no activity. I was just trying to save a little extra money for my company.

The "Kill" message; It will send it directly to the User?

Thank you for your help.

xx
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-13 : 12:06:07
Don't know what you mean by "Kill message." The Kill command in the script will disconnect the user.

I wouldn't bother sending the user a message. But if you must, you can use NET SEND via xp_cmdshell.
Go to Top of Page

MarkLandau
Starting Member

6 Posts

Posted - 2012-02-13 : 14:03:15
I was looking at the @kill variable. I was giving the command to kill the session.
Thank you

xx
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-13 : 14:11:02
yeah.....I...Don't think this is a very good idea

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -