Loginless User

  • hi,

    I m not getting the concept of Loginless User and use of this.

    kindly provide some information with example of this.

    I read a blog where mentioned that Loginless users are designed to replace application roles.

    how it works ...

    Regards,
    Shivrudra W

  • A user without a login can be used to grant access for other users to do things that they don't have permissions for. For example, if you use stored procedures for all data access then your normal users will not have any direct table permissions, but just EXECUTE permissions on the stored procedures. In this case if you have to use dynamic SQL in a procedure, ownership chaining does not work, so you need to either grant the necessary permissions for tables to the users, OR you can create a user without a login that has the necessary rights and use EXECUTE AS in the stored procedure definition.

  • Jack Corbett (8/5/2010)


    OR you can create a user without a login that has the necessary rights and use EXECUTE AS in the stored procedure definition.

    or you can (on 2005 and 2008) create a user from a certificate, grant permissions to the objects used in the dynamic SQL, and sign the procedure (ADD SIGNATURE) with this certificate. Then there is no need to use EXECUTE AS in the procedure.

  • Nils Gustav Stråbø (9/9/2010)


    Jack Corbett (8/5/2010)


    OR you can create a user without a login that has the necessary rights and use EXECUTE AS in the stored procedure definition.

    or you can (on 2005 and 2008) create a user from a certificate, grant permissions to the objects used in the dynamic SQL, and sign the procedure (ADD SIGNATURE) with this certificate. Then there is no need to use EXECUTE AS in the procedure.

    Yup this works as well. It's a bit more complex.

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

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