Dusda
Dusda

Reputation: 3367

RAISERROR with >20 Severity and Database Permissions

I'm attempting to deploy an INSTEAD OF trigger to a Sql Azure db. Among other things, it can potentially execute the following line:

raiserror('error text', 20, 1, @somevar) with log;

Anything with a severity greater than or equal to 20 in Sql Server requires the 'with log' command, which requires ALTER TRACE permissions. Okay, no problem, except I can't figure out how to grant my Sql Azure user the permissions to run it. sp_addrolemember isn't supported in Sql Azure, and the following:

grant alter trace to MyUser

Fails with this obscure message:

Msg 40520, Level 16, State 1, Line 1 Securable class 'server' not supported in this version of SQL Server.

Googling for the above error pulled up very little, and MSDN's documentation on this is pretty vague.

Upvotes: 1

Views: 777

Answers (0)

Related Questions