Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can we make use of user without login..


Can we make use of user without login..

Author
Message
mohan.bndr
mohan.bndr
SSC-Enthusiastic
SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)

Group: General Forum Members
Points: 132 Visits: 473
Hi All,

Can you please suggest...Can we create user without login and what is the use for this if we can create user without login...
Erland Sommarskog
Erland Sommarskog
SSC Eights!
SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)SSC Eights! (959 reputation)

Group: General Forum Members
Points: 959 Visits: 866
Yes, you can say:

CREATE USER Nisse WITHOUT LOGIN

Like any good feature, this has a multitude of use cases. Here are a few:

1) You don't want to grant end users direct access to SQL Server, so you use an application login. However, you want to be able to audit who is doing what, why the application performs EXECUTE AS = 'User' and you create loginless users in the the database.

2) You want to use the EXECUTE AS clause to package permissions in stored procedure. Rather than the casual EXECUTE AS OWNER, you should use EXECUTE AS 'loginlessuser' where the user has only been granted the permissions needed to run the stored procedure.

3) You use Service Broker and activation procedures which you want to run in a controlled context. Loginless users which has been granted restricted rights come in handy here.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search