locked
Trying to call a stored procedure in msdb - I get Could not obtain information about Windows NT group/user Msg 15404, Level 16, State 10, Procedure xp_logininfo RRS feed

  • Question

  • I have a stored procedure in msdb that basically wraps sp_send_dbmail and then I grant execute to my procedure to a specific user.

    I can run this "wrapper" procedure just fine when connected as my windows account, but then again I am in the sysadmin role.

    When connected as the user who has been grated exec permissions, I get something like this

    Msg 15404, Level 16, State 10, Procedure xp_logininfo, Line 62
    Could not obtain information about Windows NT group/user  (user name here...) error code 0xffff0002

    Help?

    • Edited by shiftbit Thursday, April 4, 2013 4:32 PM
    Thursday, April 4, 2013 4:32 PM

All replies

  • xp_logininfo

    Requires membership in the sysadmin fixed server role or membership in the public fixed database role in the master database with EXECUTE permission granted.

    You can use EXECUTE AS in msdb database and grant exec permission to user.

    CREATE PROCEDURE dbo.WWW
    WITH EXECUTE AS OWNER
    AS
    

    Thursday, April 4, 2013 6:01 PM
  • Hello,

    Please verify that you database mail profile is public. It should to be public or set to private for the user that is going to access it.

    The following thread is about similar issue, please see:
    http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/cd287575-5b84-4a29-a583-3520e2a74143/

    Reference:grant access to profiles

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support

    • Proposed as answer by Fanny Liu Monday, April 15, 2013 1:17 AM
    Friday, April 12, 2013 6:03 AM