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.
Author |
Topic |
sathishmangunuri
Starting Member
32 Posts |
Posted - 2010-12-28 : 06:13:27
|
I have created logon trigger. without dropping trigger i closed the connection.when i tried to login ,i am getting following error.Logon failed for login ‘corp\smangunuri’ due to trigger execution.Changed database context to ‘master’.Changed language setting to us_english. (Microsoft SQL Server, Error: 17892)i tried to login through sqlcmd also but not able login could any one help me please.c:>sqlcmd -S serverName -E -A not able to connect. |
|
Sachin.Nand
2937 Posts |
Posted - 2010-12-28 : 06:32:56
|
Can you post the trigger script ?PBUH |
 |
|
sathishmangunuri
Starting Member
32 Posts |
Posted - 2010-12-28 : 06:47:23
|
quote: Originally posted by Sachin.Nand Can you post the trigger script ?PBUH
USE master;GOCREATE LOGIN login_test WITH PASSWORD = 'S@tsanvij13' , CHECK_EXPIRATION = ON;GOGRANT VIEW SERVER STATE TO login_test;GOCREATE TRIGGER connection_limit_triggerON ALL SERVER WITH EXECUTE AS 'login_test'FOR LOGONASBEGINIF ORIGINAL_LOGIN()= 'login_test' AND (SELECT count(*) FROM sys.dm_exec_sessions WHERE is_user_process = 1 AND original_login_name = 'login_test') > 1 ROLLBACK;END; |
 |
|
Sachin.Nand
2937 Posts |
|
|
|
|