<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/raulga/archive/2006/07/03/655587.aspx</link><description>SQL Server 2005 introduced a new SQL DB principal subtype that can be quite useful: a SQL user that is not mapped to any login. You may be asking yourself “Why is this feature interesting? after all SQL Server already had the ability to create SQL users”.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/raulga/archive/2006/07/03/655587.aspx#1110561</link><pubDate>Mon, 20 Nov 2006 22:45:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1110561</guid><dc:creator>raulga</dc:creator><description>&lt;p&gt; &amp;nbsp;Another good use of users without logins I forgot to mention is as a replacement for application roles (approles) when combined with the optional “WITH NO REVERT” or “WITH COOKIE” clauses.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;The main advantage of using users without logins rather than approles is that permission to impersonate is based on permissions and not on a password, eliminating the need to share a password that most likely will be hardcoded into an application.&lt;/p&gt;
&lt;p&gt;CREATE USER [myAppUser] WITHOUT LOGIN&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;-- ...&lt;/p&gt;
&lt;p&gt;-- Your application can impersonate the user without login instead of calling sp_setapprole&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;EXECUTE AS USER = 'myAppUser' WITH NO REVERT&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;SELECT user_name()&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
&lt;p&gt;-- ... after that it won't be possible to revert to the original context&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;REVERT&lt;/p&gt;
&lt;p&gt;go&lt;/p&gt;
</description></item><item><title>Connection Pooling vs Audit Logging</title><link>http://blogs.msdn.com/raulga/archive/2006/07/03/655587.aspx#8750933</link><pubDate>Fri, 18 Jul 2008 22:22:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8750933</guid><dc:creator>Nates Stuff</dc:creator><description>&lt;p&gt;These past two weeks have been very exciting for me. I have gotten to be involved in some R&amp;amp;amp;D for&lt;/p&gt;
</description></item></channel></rss>