Msg 2754 from Transact-SQL

  • Does anyone know how to get rid of Msg 2754 when using RAISERROR with a Severity greater than 18?

    I keep getting the following. I know what it means, but I just can't see the point of it. I would rather it not appear on the error log.

    Msg 2754, Sev 16: Error severity levels greater than 18 can only be specified by members of the sysadmin role, using the WITH LOG option. [SQLSTATE 42000]

    Thanks.

  • Use this:

    raiserror('',20,1) with log

    which will terminate the client connection (severity > 19) and write to the error log.

    Regards

    Phil

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • It turned out to be a missing WITH LOG clause.

    There was confusion over where the error was been raised - the calling procedure, or another procedure via a Remote Procedure Call.

    Thanks anyway.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply