I can't login on the server giving error: 17892.
I want to drop the trigger but , as soon as I tried to login, the trigger(Tr_ServerLogon) get executed
and login failed.

CREATE TRIGGER Tr_ServerLogon
ON ALL SERVER FOR LOGON
AS
BEGIN
INSERT INTO AuditDb.dbo.ServerLogonHistory
SELECT SYSTEM_USER,USER,@@SPID,GETDATE()
END
GO

/*Where 'Tr_ServerLogon' is trigger name */
/* AuditDb the database name which I have created. */

I have used following link with mine credentials but failed .
Here I am using SQL Authentication to logon to the server.
http://mssqlonline.blogspot.com/2009/06/sql-server-fix-error-17892-logon-failed.html


Can anybody suggest me the solution?

Recommended Answers

All 3 Replies

Hi

What actually happened?

1. Did you drop table ServerLogonHistory prior trigger?

2. Did you really have write access to table ServerLogonHistory?
(if not, you possibly need an "execute as" clause.)

3. Did you already try to drop the trigger via command prompt running sqlcmd?

(btw, if 17892 appears, you won't be able to access database using SQL Server Management Studio.
A possible work arround seems to be connecting via c++ program using odbc or java using jdbc.)

-- tesu

Hi

What actually happened?

1. Did you drop table ServerLogonHistory prior trigger?

2. Did you really have write access to table ServerLogonHistory?
(if not, you possibly need an "execute as" clause.)

3. Did you already try to drop the trigger via command prompt running sqlcmd?

(btw, if 17892 appears, you won't be able to access database using SQL Server Management Studio.
A possible work arround seems to be connecting via c++ program using odbc or java using jdbc.)

-- tesu

I just want to access database using SQL Server Management Studio .

But due to that trigger I can't access the interphase provided by the Studio .

So that, I want to drop that trigger.

I just want to access database using SQL Server Management Studio .

But due to that trigger I can't access the interphase provided by the Studio .

So that, I want to drop that trigger.

Your initial posting has already told that.

Well, maybe you answer to my questions?

-- tesu

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.