Adding messages without sysadmin privileges

Last Post 11 Aug 2009 02:11 AM by Eoan. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

11 Aug 2009 02:11 AM

We have a customer whose dba security policies prohibit the use of sysadmin privileges at installation time (only dbo privileges allowed).
This poses a problem with our software as we make use of the native custom messages mechanism in SQL Server for Raiserrors, which makes use of master.sys.messages.

The only way to add messages is calling sp_addmessage, which requires membership in the sysadmin and serveradmin fixed server roles.

1. We have tried to wrap the proc call in another proc call which executes as a privileged user, but since the test is_srvrolemember('serveradmin') embedded in the code of sp_addmessage is not satisfied through impersonation, this is to no avail.

2. altering the sp_addmessage proc to mitigate the restriction is_srvrolemember('serveradmin') seems impossible as the proc does not compile, since it appears to contain non-vanilla T-SQL:
EXEC %%ErrorMessage(ID = @msgnum).Lock(Exclusive = 1)

are there any other possible routes at all?

many thanks for your help.

Acceptable Use Policy