September 4, 2008 at 1:27 am
Hi,
how can i disable certain users to make login into the SQL SERVER after working hours?
i know that i can create a DDL LOGON TRIGGER but what is the syntax for the deny login(i use SQL authentication)?
THX
September 4, 2008 at 2:33 am
LOGON_Triggers would be one way to go and you can find a good article about how to do it here[/url].
Another option would be creating a job which disables the login(s) after working hours and enables it again in the morning.
The syntax is simply
ALTER LOGIN login_name DISABLE /ENABLE
Only thing to keep in mind is that both solutions only prevent users from making new connections. Existing connections can still be used.
[font="Verdana"]Markus Bohse[/font]
September 4, 2008 at 2:42 am
OK.but how i can prevent the user from login?
by issue a rollback or there is a deny logon syntax?
THX
September 4, 2008 at 6:21 am
Disabling a Login will prevent the users to logon. Existing connections you need to Kill, just like it's done in the article about logon triggers.
[font="Verdana"]Markus Bohse[/font]
September 4, 2008 at 9:08 am
Issuing a rollback on a logon_trigger prevents the connection from succeeding.
* Noel
September 4, 2008 at 10:49 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply