<?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>Raul Garcia's blog - All Comments</title><link>http://blogs.msdn.com/b/raulga/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx#10273665</link><pubDate>Mon, 27 Feb 2012 23:30:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10273665</guid><dc:creator>Raul Garcia - MS</dc:creator><description>&lt;p&gt;Quick disclaimer in case you haven’t seen it yet. I am no longer part of the SQL Server group, but I will keep posting and responding to questions/comments on SQL Server topics on this blog.&lt;/p&gt;
&lt;p&gt;Users without login are similar to approles, with the main difference that application roles are set and controlled via a password (i.e. middle tier needs to know the password), which brings by itself all sort of password management issues, while users without login are permission based (IMPERSONATE permission on the user).&lt;/p&gt;
&lt;p&gt;This is a significant difference when dealing with code. When people use approles, I have often seen hardcoded passwords as a simplification for the developers dealing with them, but this typically causes a lot of problems for DBAs/ops who need to conform to password policies. The user without login approach on the other hand can simplify the password administration.&lt;/p&gt;
&lt;p&gt;Even more, considering test &amp;amp; prod environments, the deployment would be pretty much the same, without risk of the devs having access to the prod environment (unless DBA explicitly grants them access to the database and permission to impersonate the application-specific user). Because impersonation is permission based, the impersonation action itself can be audited.&lt;/p&gt;
&lt;p&gt;Another great advantage of user without logins, is that you can use them with EXECUTE AS within a module (i.e. SP) and grant permissions via the SP directly instead of granting permissions on the underlying tables to the SP caller. Once the SP execution finishes, the execution context would revert back to the caller automatically.&lt;/p&gt;
&lt;p&gt;Because impersonation is permission based, you can also take advantage of AD security groups, and grant IMPERSONATE permission on the application user (or EXECUTE permission on the SP if you prefer the EXECUTE AS approach) and take advantage of managing security via Windows security groups.&lt;/p&gt;
&lt;p&gt;Both the users with no-logins and the application roles are very similar in terms of access to server-scoped resources. As I recall, the main difference is that approles have some limited access to some catalog views (metadata) for backwards compatibility purposes. By default access to other databases is also similar (only via “guest”).&lt;/p&gt;
&lt;p&gt;The main difference regarding permission management for users without login is that there are supported mechanisms to have a controlled escalation of privileges to full server-scope of across databases (i.e. trustworthy bit on the DB or usage of digital signatures).&lt;/p&gt;
&lt;p&gt;I hope this helps,&lt;/p&gt;
&lt;p&gt;-Raul&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10273665" width="1" height="1"&gt;</description></item><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx#10267923</link><pubDate>Tue, 14 Feb 2012 21:57:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10267923</guid><dc:creator>Mark Burns</dc:creator><description>&lt;p&gt;Raul,&lt;/p&gt;
&lt;p&gt;I find this topic very interesting, and I would like to get some advice for using these NLI-Users (No LogIn Users) as that Application Role replacement from the POV of an MS Access FE + SQL Server BE Application Developer.&lt;/p&gt;
&lt;p&gt;In general it&amp;#39;d be best for an application (regardless of AD user logins and groups) to have either little or no actual table/view access from the linked tables (enough access permissions to create the linked tableDef in the Access DBs, but not to pull data from the server) from the old Database Window (or the newer navigation menus). Ideally, then we could launch access permissions based upon these users w/o logins on a form-by-form/report-by-report/code-module-by-code-module basis, greatly enhancing the security of the application and data.&lt;/p&gt;
&lt;p&gt;Could you offer any insights as to how to best approach this idea - taking into account the differing needs of the App developer (in a DEV &amp;nbsp;or TEST server environment of course) an actual SQL Server DBA&amp;#39;s roles and access requirements, and the (TEST + PROD servers) needs of varying groups of users (think AD Groups) for multiple permutations of read and write access to the different data tables, depending upon database functions employed and their AD group memberships.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10267923" width="1" height="1"&gt;</description></item><item><title>re: Disaster Recovery: What to do when the SA account password is lost in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx#10267396</link><pubDate>Mon, 13 Feb 2012 18:16:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10267396</guid><dc:creator>Raul Garcia - MS</dc:creator><description>&lt;p&gt; &amp;nbsp;This is a disaster recovery mode, and a single admin connection is allowed. Most tools with a rich GUI typically open multiple connections, and they are not suitable for this task. Please try using sqlcmd, which will only open a single connection. &lt;/p&gt;
&lt;p&gt; &amp;nbsp;If sqlcmd is also giving the error message, most likely there is another tool/service establishing a connection before you have a chance to connect. Stop all services that may connect to SQL Server during the password disaster recovery operation.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10267396" width="1" height="1"&gt;</description></item><item><title>re: Disaster Recovery: What to do when the SA account password is lost in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx#10255412</link><pubDate>Wed, 11 Jan 2012 07:29:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10255412</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;Maybe I&amp;#39;m missing something here... after starting SQL server in single user mode. I try to access the SQLSMD.. it couldn&amp;#39;t giving an error &amp;quot;Server is in single user mode. Only one administrator can connect at this time.&amp;quot;&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t access via the management studio either with the same issue.&lt;/p&gt;
&lt;p&gt;Please advise.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10255412" width="1" height="1"&gt;</description></item><item><title>re: Disaster Recovery: What to do when the SA account password is lost in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx#10244687</link><pubDate>Tue, 06 Dec 2011 16:57:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10244687</guid><dc:creator>Cesar</dc:creator><description>&lt;p&gt;I was able to just add the &amp;quot;;-m&amp;quot; to the start up parameters, log in to the SQL express instance in via management studio, and give my user the admin rights necessary.&lt;/p&gt;
&lt;p&gt;this worked thanks so much!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10244687" width="1" height="1"&gt;</description></item><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx#10244444</link><pubDate>Tue, 06 Dec 2011 00:49:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10244444</guid><dc:creator>Raul Garcia - MS</dc:creator><description>&lt;p&gt; &amp;nbsp;Can you please provide more information about the error? I cannot repro on my own, but I may be able to recognize the root cause from the error description. There shouldn’t be any different behavior whether the statement you mentioned is executed remotely or on the local server.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; If the error persists, I would also recommend opening a bug @ Microsoft connect (&lt;a rel="nofollow" target="_new" href="http://connect.microsoft.com/sql"&gt;connect.microsoft.com/sql&lt;/a&gt;). &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10244444" width="1" height="1"&gt;</description></item><item><title>re: SQL Server 2005 –Encrypting data on existing applications</title><link>http://blogs.msdn.com/b/raulga/archive/2006/05/03/589691.aspx#10244442</link><pubDate>Tue, 06 Dec 2011 00:44:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10244442</guid><dc:creator>Raul Garcia - MS</dc:creator><description>&lt;p&gt; &amp;nbsp; &amp;nbsp;The method I described here pretty much was designed as a workaround for scenarios that needed to be encrypted at rest, but the application was not prepared for it. 200K records is not that much, so I am a bit surprised; try using DecryptByAutoCert directly on the base table (i.e. SELECT *, DecryptbyAutoCert( encrypted_column) … ) and see if there is any difference.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;BTW. This article was written before the introduction of SQL Server 2008 Transparent Data Encryption (&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/bb934049.aspx"&gt;msdn.microsoft.com/.../bb934049.aspx&lt;/a&gt;). If you have the possibility, I would strongly recommend using TDE instead. The performance penalty will be significantly reduced.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10244442" width="1" height="1"&gt;</description></item><item><title>re: Disaster Recovery: What to do when the SA account password is lost in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx#10241541</link><pubDate>Fri, 25 Nov 2011 14:25:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10241541</guid><dc:creator>Tarun__Arora</dc:creator><description>&lt;p&gt;A big Thanks, this works for SQL Server 2008 R2 as well. &lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10241541" width="1" height="1"&gt;</description></item><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx#10241242</link><pubDate>Thu, 24 Nov 2011 10:03:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10241242</guid><dc:creator>Matt1855</dc:creator><description>&lt;p&gt;I encountered a issue when I comment the command &amp;#39;CREATE USER [mytestDB] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]&amp;#39;, if I deployed the db to the remote site, the DB connection has error, but if I used it in local site, it&amp;#39;s no DB connection error.&lt;/p&gt;
&lt;p&gt;Could you pls give me some idea?&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Matt.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10241242" width="1" height="1"&gt;</description></item><item><title>re: Quick guide to DB users without logins in SQL Server 2005</title><link>http://blogs.msdn.com/b/raulga/archive/2006/07/03/655587.aspx#10241236</link><pubDate>Thu, 24 Nov 2011 09:51:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10241236</guid><dc:creator>matt</dc:creator><description>&lt;p&gt;One question, why I comments &amp;#39;CREATE USER [mytestDB] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]&amp;#39;, when I deploym db to the remote site, the db connection will generate error? If I used it in local site, it has no error?&lt;/p&gt;
&lt;p&gt;Could you pls give me some comments? Thanks a lot. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10241236" width="1" height="1"&gt;</description></item></channel></rss>