• Not the error message that you get. Open up the SQL Server error log and see if there are any errors in there that may suggest why the trigger failed. If not, change your trigger as follows and then see what's in the error log after another login attempt

    CREATE TRIGGER [LoginAudit] ON ALL SERVER

    WITH EXECUTE AS 'sa'

    FOR LOGON

    AS

    BEGIN

    BEGIN TRY

    INSERT INTO Audit_Log

    SELECT @@SPID ,

    SYSTEM_USER ,

    HOST_NAME() ,

    HOST_ID() ,

    CURRENT_TIMESTAMP ,

    APP_NAME() ,

    DB_NAME()

    END TRY

    BEGIN CATCH

    PRINT CAST(ERROR_NUMBER() AS VARCHAR(5)) + ' ' + ERROR_MESSAGE();

    END CATCH

    END

    GO

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass