comparision executed user role with given

Syntax : is_srvrolemember(SQLServerRole in String)
Returns : if user has right for given return will be 1

for example;

if (not (is_srvrolemember('sysadmin') = 1)) -- Make sure that executing by SQ.
begin
raiserror(...)
return(1)
end

Comments

Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in CrmServiceHelper.cv