How to give procedure execute permission to other database user.

  • Hi,

    I am new to SQL Server 2005,

    I have two databases A and B in my database server.

    My requirement is to give execute permission on

    one of the procedure(proc1) in database A to database B user(UserB).

    Is it possible in SQL Server?

    If it is possible, Can you please share the SQL Script for this...

    Sainath Mannem

  • Granting EXECUTE permission on a stored procedure:

    The following example grants EXECUTE permission on stored procedure

    HumanResources.uspUpdateEmployeeHireInfo to an application role called Recruiting11.

    [font="Courier New"]

    USE AdventureWorks2008R2

    GRANT EXECUTE ON OBJECT::HumanResources.uspUpdateEmployeeHireInfo

    TO Recruiting11

    GO [/font]

    Cheers,
    - Win.

    " Have a great day "

  • - Win. (10/18/2011)


    Granting EXECUTE permission on a stored procedure:

    The following example grants EXECUTE permission on stored procedure

    HumanResources.uspUpdateEmployeeHireInfo to an application role called Recruiting11.

    [font="Courier New"]

    USE AdventureWorks2008R2

    GRANT EXECUTE ON OBJECT::HumanResources.uspUpdateEmployeeHireInfo

    TO Recruiting11

    GO [/font]

    But userB MUST have at least public access to DatabaseA.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

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

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