SQL Server Security ForumAny Security discussions related to SQL Server© 2009 Microsoft Corporation. All rights reserved.Fri, 27 Nov 2009 19:14:08 Zbe43918e-c6d3-45c5-9caf-769ab0d180eahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b80f7871-7897-4bbc-982f-24ec32fda4f8http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b80f7871-7897-4bbc-982f-24ec32fda4f8Viswa Balahttp://social.msdn.microsoft.com/Profile/en-US/?user=Viswa%20BalaTable Deletion in a DatabaseHi Experts,<br/> I'm using SQL Server 2005...<br/> In my Database, some tables are getting deleted automatically....<br/> Please advise me to Secure my Database such that Users to be given rights to edit the Database tables/fields but they should not able to delete a table...<br/> <br/> Waiting for your valuable reply...<br/> <br/> Regards,<br/> Viswa BalaFri, 27 Nov 2009 10:03:53 Z2009-11-27T19:14:07Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/776cc0a3-49c2-4c9b-bfc0-b5aa8949226chttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/776cc0a3-49c2-4c9b-bfc0-b5aa8949226cviggihttp://social.msdn.microsoft.com/Profile/en-US/?user=viggiPeter, I HAVE SAME, EXACT ISSUE WITH SQL SERVER.......How did you resolve it?<p>Security Update for SQL Server 2005 Service Pack 3 (KB970892)</p> <p>Installation date: ‎10/‎31/‎2009 3:02 AM</p> <p>Installation status: Failed</p> <p>Error details: Code 737D</p> <p>Update type: Important</p> <p>A security issue has been identified in the SQL Server 2005 Service Pack 3 that could allow an attacker to compromise your system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer.</p> <p>More information: <br/><a href="http://support.microsoft.com/kb/970892">http://support.microsoft.com/kb/970892</a></p> <p>Help and Support: <br/><a href="http://support.microsoft.com">http://support.microsoft.com</a></p>Sat, 31 Oct 2009 14:14:47 Z2009-11-27T14:51:49Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/62b03e72-0b05-494b-8a27-96e14ab205e1http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/62b03e72-0b05-494b-8a27-96e14ab205e1apal13http://social.msdn.microsoft.com/Profile/en-US/?user=apal13TDE and ClusteringIs there any issue with using TDE along with SQL Server clustering? In particular, if we encrypt a database in one of the SQL Server clusered nodes, do we also need to encrypt it in all other nodes? If so, I'd imagine that we would need to use the same key and encryption algorithm?Thu, 26 Nov 2009 19:54:54 Z2009-11-27T08:14:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/1ef95a72-d52f-4cb0-b079-8589901e0bcdhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/1ef95a72-d52f-4cb0-b079-8589901e0bcdkaygee46http://social.msdn.microsoft.com/Profile/en-US/?user=kaygee46Security Update for SQL Server 2005 Service Pack 2 (KB970895) - Error Code: 0x733F - <p>Thie above update fails to install at every attempt. I've looked around and found others with the same problem, but many of the &quot;solutions&quot; are way too technical for me. I've been asked to post the &quot;summary.txt&quot; file from the hotfix folder in this forum, and it appears below. Please help.<br/><br/>Time: 11/27/2009 14:51:37.449<br/>KB Number: KB970895<br/>Machine: ASUS<br/>OS Version: Microsoft Windows XP Professional Service Pack 3 (Build 2600)<br/>Package Language: 1033 (ENU)<br/>Package Platform: x86<br/>Package SP Level: 2<br/>Package Version: 3080<br/>Command-line parameters specified:<br/>     /quiet<br/>     /allinstances<br/>Cluster Installation: No</p> <p>**********************************************************************************<br/>Prerequisites Check &amp; Status<br/>SQLSupport: Passed</p> <p>**********************************************************************************<br/>Products Detected                         Language  Level  Patch Level       Platform  Edition<br/>SQL Server Database Services 2005 (SQLEXPRESS)  ENU       SP2    2005.090.3077.00  x86       EXPRESS<br/>SQL Server Tools and Workstation Components 2005  ENU       SP3           9.3.4035  x86       EXPRESS</p> <p>**********************************************************************************<br/>Products Disqualified &amp; Reason<br/>Product                                   Reason<br/>SQL Server Tools and Workstation Components 2005  The product instance SQL Tools has had update 4035 applied. You cannot install GDR update 3080 overtop update 4035. An update of build equal to or greater than 3353 should be downloaded.</p> <p>**********************************************************************************<br/>Processes Locking Files<br/>Process Name          Feature               Type          User Name                  PID</p> <p>**********************************************************************************<br/>Product Installation Status<br/>Product                   : SQL Server Database Services 2005 (SQLEXPRESS)<br/>Product Version (Previous): 3077<br/>Product Version (Final)   : <br/>Status                    : Failure<br/>Log File                  : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB970895_sqlrun_sql.msp.log<br/>SQL Express Features      : <br/>Error Number              : 29503<br/>Error Description         : MSP Error: 29503  The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, &quot;How to: View SQL Server 2005 Setup Log Files&quot; and &quot;Starting SQL Server Manually.&quot;<br/>----------------------------------------------------------------------------------<br/>Product                   : SQL Server Tools and Workstation Components 2005<br/>Product Version (Previous): 4035<br/>Product Version (Final)   : <br/>Status                    : NA<br/>Log File                  : <br/>SQL Express Features      : <br/>Error Description         : The product instance SQL Tools has had update 4035 applied. You cannot install GDR update 3080 overtop update 4035. An update of build equal to or greater than 3353 should be downloaded.<br/>----------------------------------------------------------------------------------</p> <p>**********************************************************************************<br/>Summary<br/>     One or more products failed to install, see above for details<br/>     Exit Code Returned: 29503</p> <p> </p>Fri, 27 Nov 2009 05:17:23 Z2009-11-27T05:17:24Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/485ef2fc-d7d7-418e-8ef7-96b4e8d21689http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/485ef2fc-d7d7-418e-8ef7-96b4e8d21689li12345http://social.msdn.microsoft.com/Profile/en-US/?user=li12345sql server 2000 authenticates with SERVERNAME$ account ion backup server instead of domain account<p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">sql server 2000. multiple servers getting access denied os error 5 accessing network backup share on backup server (lets call it <a>\\backup\sql$\backupsgohere</a> for now )<br/>sql server is running under domain account, so does sql agent. they both are given sysadmin<br/>for some reason sql server when it runs the backup job does not authenticate with the service account it is running under. audit on the share showed in security event log that sql server came with SERVERNAME$ account instead of domain account. another server for some reason came with a different domain account (that it used to be running under... not now so). <br/>sql servers in question did restart when their service accounts were changed.</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">did anyone see such a case when sql server does not authenticate with domain account it is running under?</span></p> <p><span style="font-size:8pt;color:black;font-family:'Verdana','sans-serif'">thanks<br/></span></p>Mon, 23 Nov 2009 18:58:35 Z2009-11-26T12:28:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/52cad95e-1382-4a7a-ad7c-56d9f99a6979http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/52cad95e-1382-4a7a-ad7c-56d9f99a6979Sameer Tejani - MShttp://social.msdn.microsoft.com/Profile/en-US/?user=Sameer%20Tejani%20-%20MSFeedback requested: Default schemas for Windows groups   <p style="margin:0in 0in 0pt"><font face=Calibri>We want to seek your feedback on understanding the scenarios where you need to assign default schemas to Windows groups.  Based on the requests we have received and reading through one of the longest threads on this issue (<span style="color:#1f497d"><a href="http://social.msdn.microsoft.com/forums/en-US/sqlsecurity/thread/7d46a024-7ed5-4c9b-b091-3640dc04f5a1/">http://social.msdn.microsoft.com/forums/en-US/sqlsecurity/thread/7d46a024-7ed5-4c9b-b091-3640dc04f5a1/</a></span>), it seems there are multiple solutions that people are trying to achieve using default schemas: </font></p> <p style="margin:0in 0in 0pt 0.5in"><span><font face=Calibri>-</font><span style="font:7pt 'Times New Roman'">          </span><font face=Calibri>Have a default schema as part of the user’s session that is set up by the application (through something like SET DEFAULT_SCHEMA = &lt;foo&gt;).  Any objects referenced or created will be bound to that schema.</font></p> <p style="margin:0in 0in 0pt 0.5in"><span><font face=Calibri>-</font><span style="font:7pt 'Times New Roman'">          </span><font face=Calibri>Have a setting in SQL where it rejects any object reference without a schema.  This enforces the app to always use 2 part names (best practice).  This works best when you have access to the application source code or are writing a new application.</font></p> <p style="margin:0in 0in 0pt 0.5in"><span><font face=Calibri>-</font><span style="font:7pt 'Times New Roman'">          </span><font face=Calibri>Have the ability for a DBA to specify a default schema on a Windows group so that legacy applications can continue to work and reference the correct objects, without requiring all the users to be provisioned.</font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>Does your scenario fall in another bucket other than the ones listed above?  If so, can you please explain your scenario where this would be helpful?  </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>Secondly, if you really prefer the third case, how would you handle cases where a user could belong to multiple Windows groups? What schema should the user be associated with in this case when each group has a unique default schema?<br><br>Looking forward to your responses<br><br>Sameer Tejani<br>SQL Server Engine<br></font></p></span></span></span><hr class="sig">This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Fri, 20 Feb 2009 01:43:50 Z2009-11-26T12:23:01Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/36024c61-7a67-41d9-a598-56b8ed27e6d9http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/36024c61-7a67-41d9-a598-56b8ed27e6d9Mo-ssahttp://social.msdn.microsoft.com/Profile/en-US/?user=Mo-ssaCannot connect Access 2007 to Sql server 2008I have a adp in Access 2007 SP2 that I'm trying to connect to Sql server 2008. On the datalink properties window I put the server name, user and password, but when I click on the dropdown to select the database I get: &quot;Unspecified error&quot; and then &quot;Login failed. Catalog information cannot be retrieved.&quot;.<br/><br/>Anything I need to make sure it's enabled or configured on the sql server?<br/><br/>Any help is appreciated!<br/>Thanks!<br/>Thu, 26 Nov 2009 01:36:07 Z2009-11-27T08:12:04Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/2e266345-27d6-4fdd-9a22-e0debf9816cdhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/2e266345-27d6-4fdd-9a22-e0debf9816cdRockyT69http://social.msdn.microsoft.com/Profile/en-US/?user=RockyT69EncryptByKey Not Workingwhen trying to update field EncryptByKey is retuning null<br/>encryption &amp; deryption works only when using variables<br/>i checked the key name, field types still doesn't work<br/>example EncryptedField should update to EncryptByKey return value of TextField<br/>where EncryptedField is varbinary &amp; TextField is nvarchar<br/><br/>SQL Server 2005<br/>Vista UltimateWed, 25 Nov 2009 22:06:07 Z2009-11-27T07:50:30Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/bd685fd8-16ff-4020-a433-409230dade1ehttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/bd685fd8-16ff-4020-a433-409230dade1eRickshawrentalshttp://social.msdn.microsoft.com/Profile/en-US/?user=RickshawrentalsLast SQL Server 2005 Update (KB970892) - does it break previous SQL command/code ?I'm wondering if anyone can help an increasinly depressed programmer/DBA find out <em>exactly</em> what might have been altered by the last round of server updates -- specifically the SQL Server 2005 (<a name=temp><span style="font-family:'Times New Roman','serif';font-size:10pt">KB970892</span></a>) from october 2009.<br/>My netadmin gave me the link to the microsoft site, but I'm not used to looking at these and I can't figure out exactly WHAT was changed.<br/>We had another issue where the update had affected some code that had run for several years.  However, once we re-booted the server this past Monday, the issue was cleared up (for some reason, the server didn't re-boot after the last round of updates).<br/><br/>We have since (since 11/23) had 2 other instances of code that has been written &amp; run for several years &quot;breaking&quot;.<br/>No edits have been made to the code.<br/>One is using the command &quot;WITH&quot; in a stored procedure.  The server croaks and fails the job, reporting an error around the word &quot;WITH&quot; -- but previous to Monday's reboot (where, presumably, the full affects of the october SQL Server 2005 service pack had not yet taken over) -- all was well....the code ran as it had for the last 3 years.<br/>Now, it will not run.<br/><br/>We found a similar &quot;break&quot; in code that had been running -- admittedly, it was a non-standard (dumb!) way to write a query, but I had inadvertently copied/pasted the same field name into the query result string 2x.  Since there was only a single table involved, there really was no &quot;ambiguity&quot; -- as far as the data coming from different tables -- and the code has run for at least 2 1/2 years.<br/>After the re-boot of the server (after the last SQL Server 2005 update), the code croaked.  <br/><br/>While both of these are (mostly) an easy fix -- my concern is that we've got a lot of code out there and it would be VERY handy to know specifically what changed -- so that I could find these (apparently) &quot;non-standard&quot; coding items that <em>used</em> to pass in SQL, but will now fail -- find them <em>before</em> all of the users find them and I have scads of &quot;emergency&quot; issues......<br/><br/>Since the only thing that has been reported (to me, at least) that has &quot;changed&quot; are the recent SQL Server/Security updates, I'm <em>theorizing</em> that these are what is causing this -- since they have mysteriously cropped up since the re-boot this past Monday....<br/>but I'm certainly open to suggestions......<br/>Thank you !<br/><br/>Kristi<br/><br/>Wed, 25 Nov 2009 16:38:34 Z2009-11-27T04:54:31Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/14b09ea7-0e60-4b0b-b610-db4cdab6fdb5http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/14b09ea7-0e60-4b0b-b610-db4cdab6fdb5HamaMSDNhttp://social.msdn.microsoft.com/Profile/en-US/?user=HamaMSDNDoes bcp support SSL encryption? And how?I couldn't find out if bcp supports SSL encryption. The answer is NO to me. But maybe someone knows some tips.<hr class="sig">HamaWed, 25 Nov 2009 00:37:54 Z2009-11-26T06:42:33Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/77611a09-3053-46e5-beeb-e55f26f23b1ahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/77611a09-3053-46e5-beeb-e55f26f23b1aAtukurihttp://social.msdn.microsoft.com/Profile/en-US/?user=AtukuriSQL Server Agent Job - SSIS Package - Access Information required<p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Hi Team,</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small;font-family:Times New Roman"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Good Afternoon. We need some help in understanding the way the SQL Server Jobs work. Below mentioned is an incident that we have encountered recently.</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman"> </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><strong><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Incident:</span></strong><span style="font-size:10pt;font-family:Verdana" lang=EN-GB> SQL Server Jobs remains in the Execution mode for a very long time. </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><strong><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Description:</span></strong><span style="font-size:10pt;font-family:Verdana" lang=EN-GB> As a standard all the services are setup to execute with the domain account by default. In this process, the SQL Server Agent Services was set up to execute with the domain account.</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Also as a standard, a proxy account is created with the required credentials to execute SSIS package and OS commands. </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>New Job is created with the owner as [sa] to execute a SSIS package. This SSIS package is present on the file system (on disk).<span style="">  </span>When this job is executed from the job, the SQL Server job doesn’t complete.<span style="">  </span>It remains in execution mode forever. This happens very frequently across many servers. Initially the jobs execute without any issue but after some time we run into the problems that were mentioned.</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Arial" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>When the package is executed from the command prompt with the same proxy account that was used in the SQL Server DB, SSIS package executes successfully without any issues. </span></p> <p class=MsoNormal style="margin:0in 0in 0pt 45pt"><span style="font-size:10pt;font-family:Arial" lang=EN-GB> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>One more analysis that we did is that change the service account from domain to local system account. When this is changed and when the package is executed, the job did complete from SQL Server Agent without issues.</span><span style=""></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman"> </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Can anybody explain the reason for this strange behaviour? Also if in case if there are some other standards that we need to follow, please let us know. </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman"> </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Please let me know if I need to provide more information on this.</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:small"><span style="font-family:Times New Roman"> </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:Verdana" lang=EN-GB>Many Thanks in advance. <br/>Regards, <br/>Siva</span></p>Tue, 24 Nov 2009 15:07:14 Z2009-11-25T06:50:52Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/33cb7593-933f-4086-b47d-890f6dec70e9http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/33cb7593-933f-4086-b47d-890f6dec70e9John Dalyhttp://social.msdn.microsoft.com/Profile/en-US/?user=John%20DalyCreating a New User - DefaultsIn sql Server 2008, when you right click Login --&gt; New Login --&gt; Search: The object types that are set are: User or Built-in Security Principal. Is there way to have Groups as part of that default list? Is there a reason why this is not set by default? Are security is set to Mix Mode due to the requirements of 3rd party software that we can not alter.<br/><br/>ThanksMon, 23 Nov 2009 16:33:39 Z2009-11-25T17:14:44Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/242a09c5-38c8-40d0-a1dd-fa13031cf563http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/242a09c5-38c8-40d0-a1dd-fa13031cf563NashVegashttp://social.msdn.microsoft.com/Profile/en-US/?user=NashVegasUser can stll access DB without a login<p>We have a user that we wanted to restrict to read-only access on a DB and deny creation of stored procedures.  After playing around with the user's permissions, I eventually removed the login from the SQL server instance altogether, but the user can still connect.  Anybody got any advice on the first step I should take to figuring out how this is even possible?  We're on SQL server 2005 Standard Edition, and the user was logging in with Windows Authentication<br/><br/>Also, I tried to execute sp_helplogin, but I get an error saying that I don't have permissions to execute it, but I have full permissions on everything.<br/><br/>Thanks!</p> <hr class=sig> ClintTue, 24 Nov 2009 17:45:04 Z2009-11-24T22:32:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9dddf08e-929c-43b4-bc10-ac8f36cbb023http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9dddf08e-929c-43b4-bc10-ac8f36cbb023Pereirahttp://social.msdn.microsoft.com/Profile/en-US/?user=PereiraSQLSTATE 42000- Error 15404 with ADS<p align=left><font face=Arial size=2></font> </p> <p>Hello,</p> <p>I'm having trouble running jobs with my active directory (ADS) account. I've setup my SQL services to run under an ADS account, but jobs cannot seem to query ADS for user information. We're running Windows Server 2003 and SQL Server 2005 SP2.</p> <p> Here is the error message:</p> <p>==</p> <p>The job failed.  Unable to determine if the owner (ADS\me) of job eFASRtest has server access (reason: Could not obtain information about Windows NT group/user 'ADS\me', error code 0x5. [SQLSTATE 42000] (Error 15404)).</p> <p>==</p> <p> </p> <p>also this message in log:</p> <p>==</p> <p>[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'ADS\me, error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin)</p> <p>==</p> <p> </p> <p align=left> </p> <p align=left>I already tested the suggested:</p> <p align=left> </p> <p align=left>execute as login='ads\me' and I get the same error on both (my local installations and production)</p> <p align=left> </p> <p align=left>appreciate your help</p>Tue, 07 Aug 2007 14:56:09 Z2009-11-24T22:10:11Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/0297678b-34e7-47fd-8ab5-30295bfe59eahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/0297678b-34e7-47fd-8ab5-30295bfe59eaNav_2008http://social.msdn.microsoft.com/Profile/en-US/?user=Nav_2008Login Failed NT Authority\SystemLogin Failed for NT Authority \System''<br/><br/>Error: 18456, Severity 14, State 16<br/><br/>When we ran the SQL trace unable to view the login failed details..<br/><br/>Advise needed...<br/><br/>Thanks <hr class=sig> Naveen Mukkasa| Press Yes if the post is useful.Tue, 24 Nov 2009 04:48:21 Z2009-11-25T09:19:34Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/10ff0d8f-48c4-466a-a87f-01f64ed17a0ahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/10ff0d8f-48c4-466a-a87f-01f64ed17a0aXiaoganghttp://social.msdn.microsoft.com/Profile/en-US/?user=XiaogangSQL Server Authentication account for backup purpose only.<p>Hi,<br/><br/>In SQL Server 2005 SP3 server, I created a Maintenance Plan for backing up database to NAS. The job is working well through SQL Server agent.</p> <p>We want to let CA-TNG to schedule the job. So, I created a SQL Server Authentication account &quot;backup&quot; and grant the role &quot;db_backupoperator&quot; from each databases and plus the role &quot;db_dtsoperator&quot; from database MSDB. The &quot;backup&quot; account does not have sysadmin server-wide fix-role.</p> <p>The TNG will run the following DOS command to do the backup</p> <p>dtexec /U backup /P xxxxxxx /SERVER MyServer /SQL &quot;Maintenance Plans\Full_Backup_to_station&quot; /MAXCONCURRENT &quot; -1 &quot; /CHECKPOINTING OFF /SET &quot;\Package\Subplan_1.Disable&quot;;false /REPORTING E<br/><br/>I ran the command without problem but the TNG guy had permission problem.<br/>After I check the evet log on the server &quot;MyServer&quot;, I found out it has to logon to database with Windows Authentication account (domain\userid) first (it alway failed), then use the SQL Server authentication (&quot;backup&quot;) later. <br/><br/>Then later, I add the domain userid into SQL Server Security login list without any permission just &quot;public&quot;. <br/>It still does not work. After I grant sysadmin role to this domain\userid on SQL Server, it works. <br/><br/>It is not my want. The role &quot;db_backupoperator&quot; looks meaningless because it has to logon as sysadmin first.<br/><br/>Any suggestion? Or what's wrong on my setting?<br/><br/>Thanks,<br/>Xiaogang</p>Fri, 20 Nov 2009 16:39:19 Z2009-11-24T21:16:38Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b7330b4a-0596-4240-823d-a123b5c4e942http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b7330b4a-0596-4240-823d-a123b5c4e942Sina Ghasimhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sina%20GhasimSecurity problem when connecting to SQL from Windows 7Hello to all friends<br /> I need to connect to a SQL Server 2005 from a Windows 7 machine that is not joined to the domain. This has always worked on XP but on Win7 I get the following error (when connecting via TCP/IP): <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Login failed for user ''. The user is not associated with a trusted SQL Server connection.<br /> I did not use IIS and Local program worked but when I install Windows 7, I did another successful ... unable to connect to database! <br /> Thank's for allWed, 14 Oct 2009 11:56:06 Z2009-11-24T19:41:21Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9fec87e6-0c0f-4635-bf33-151bd63b65ffhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9fec87e6-0c0f-4635-bf33-151bd63b65ffTRG66http://social.msdn.microsoft.com/Profile/en-US/?user=TRG66Database Security Question<p align=left><font face=Arial></font> </p> <p>I am running SQL 2005, SP2</p> <p align=left>I have two databases (happen to be SMS (dbA) and SMS Client Health (dbB))</p> <p align=left>I have created a view in dbA that selects records from a table in dbB - view is called v_ClientHealthStatus</p> <p align=left>The view works great with my credentials</p> <p align=left> </p> <p align=left>dbA (the SMS db) has SMS Web Reports configured (IIS will run a particular report - which is a sql query).  All reports work, except the one that tries to use the view, v_ClientHealthStatus.  I get the following error: </p> <p align=left> </p> <p align=left>An error occurred when the report was run. The details are as follows: </p> <form> <p>The server principal &quot;NT AUTHORITY\SYSTEM&quot; is not able to access the database &quot;dbB&quot; under the current security context. </p> <p align=left> <table cellspacing=0 cellpadding=0 width=623 border=0> <tbody> <tr> <td valign=center width="25%"> <p><font size=2>Error Number:</font></p></td> <td valign=center width="75%"> <p><font size=2>-2147467259</font></p></td></tr> <tr> <td valign=center width="25%"> <p><font size=2>Source:</font></p></td> <td valign=center width="75%"> <p><font size=2>Microsoft OLE DB Provider for SQL Server</font></p></td></tr> <tr> <td valign=center width="25%"> <p><font size=2>Native Error:</font></p></td> <td valign=center width="75%"> <p><font size=2>916</font></p></td></tr></tbody></table></p> <p> </p> <p align=left>The NT Authority\System user has been granted public database role and is in the schema db_datareader on both databases.  I have even gone so far as to explicitly grant the user Select permissions</p> <p align=left> </p> <p align=left>I ran profiler and it shows NT AUTHORITY\SYSTEM as the account trying to access the database.  I think the permissions are OK - and shouldnt the System account have full access anyway??</p> <p align=left> </p> <p align=left>Why can it not run the report??</p> <p>Any help would be appreciated</p> <p align=left> </p> <p align=left>Thank you</p></form>Wed, 26 Sep 2007 18:52:01 Z2009-11-24T16:23:05Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/eaf429e9-43e8-4b65-b701-3df51a976446http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/eaf429e9-43e8-4b65-b701-3df51a976446scotcrohttp://social.msdn.microsoft.com/Profile/en-US/?user=scotcroVerify Server encryption is being utilizedI have a smart forms app that will access SQL Server 2005 accross internet,  I have installed and configured SSl certificate,  and checked force encryption in network config.  <br/><br/>My question is how can I verify my ADO connectin to the application is truly using SSL encryption?<br/><br/>Thanks  for any advice.<br/><br/>s.Thu, 19 Nov 2009 20:43:28 Z2009-11-24T16:10:42Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e9598089-7f23-431c-810e-4d6252409c1fhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e9598089-7f23-431c-810e-4d6252409c1fmaybel1http://social.msdn.microsoft.com/Profile/en-US/?user=maybel1Is it possible to configure SQL Management Studio so that SQL authentication connection is not availableWe have many third party suppliers providing databases - most of these will have created a SQL database user with full permission to the underlying data. Our business policy is that third party's should not make changes to live data.<br/>The question is how to allow read only access to their databases when they all know the SQL authentication details for dbo user. <br/><br/>One possible solution could be as follows:  we could allow them access to another server running with SQL Management Studio tools installed - they would have an AD account which would have read access to their database somewhere else on the network. If they were only able to use Management Studio through the Windows authentication mode then they would not be able to log in using the SQL authentication and then we would be able to enforce our policy.<br/><br/>Does anyone knwo how to do this - or any other solutions to this problem.Mon, 23 Nov 2009 14:04:38 Z2009-11-25T05:30:14Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/861622b5-423f-4039-b1f6-203fff069215http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/861622b5-423f-4039-b1f6-203fff069215thatsnutshttp://social.msdn.microsoft.com/Profile/en-US/?user=thatsnutsSecurity Update for SQL Server 2005 Service Pack 3 (KB970892) could not be installed<p>Auto updates picked up this update to install but it wouldn't install. I tried doing it manually with no success. Anyone run across this?I have the service pack 2 with updates already. What would cause this?<br />Johnny</p>Fri, 16 Oct 2009 01:15:31 Z2009-11-24T04:19:50Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/1ab13c85-f956-42b4-ae6d-9cc53f808aefhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/1ab13c85-f956-42b4-ae6d-9cc53f808aefsam_squarewavehttp://social.msdn.microsoft.com/Profile/en-US/?user=sam_squarewaveGranting a user rights to create procedures with SELECT and execute them, but not the base tables.<div class=post-text> <p><br/> We're using the latest SQL 2005 version.</p> <p>I need to set some users up to be able to create stored procedures with READ access only. Also, in production they cannot have SELECT, only EXECUTE on the procs they created. In development they would have SELECT so they could create their procedures.</p> <p>I've set up a schema called Reports. The owner of that schema is a login - Report_Admin. That user has select access to tables. I then gave alter and execute on the Reports schema to my report writer account. Dbo owns the table - so it works if dbo also owns the Reporting schema - but then a delete will also work in the procedure!</p> <p>Is there a way to make this work?</p> <p>If not, that's understandable, it's just nice to know there is no way data can be updated.</p> <p>We are using reporting services and would like to have all the SQL in the database for maintainability.</p> <p>Thanks!</p> </div>Tue, 27 Oct 2009 21:07:14 Z2009-11-24T00:11:59Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/ee0754e5-93fa-40dc-aec3-ed3478ca2d7fhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/ee0754e5-93fa-40dc-aec3-ed3478ca2d7fCJ_TSGhttp://social.msdn.microsoft.com/Profile/en-US/?user=CJ_TSGSQL2005 permissions reportI have been asked by our auditors to provide them with a report of the the effective permissions by login on a specific database. They want to make sure that only certain individuals are allowed to execute stored procedures or update values in a table. Is there a standard report, or alternatively what code can I execute?Mon, 23 Nov 2009 10:41:18 Z2009-11-24T10:09:17Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/51e72661-f7e5-4409-902e-61e8aca20e2ehttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/51e72661-f7e5-4409-902e-61e8aca20e2edsteinmetzhttp://social.msdn.microsoft.com/Profile/en-US/?user=dsteinmetzUnlocking login on Status Tab always gets reset to Locked Out<p>I've been having this issue lately with a new login.  We have set it up to use the Windows Password and Expiration Policy and I give it an initial strong password.  In testing this new account I would purposely input the wrong password into an application 3 times thus causing the login to become locked out.  I would then go into the SQL Management Studio, go to the Status Page and uncheck the 'Login is locked out' flag.  If I would then click the 'OK' button to close the properties, I would get an error message that the password is not complex enough.  This is strange since I never changed the password in the first place, I just unchecked the 'Login is locked out' flag.  That's issue#1.</p> <p>I then decided that I would give Management Studio the benfit of the doubt and also change the password to something complex again while still keeping the 'Login is locked out' flag unchecked.  I then could click 'OK' and not get any errors. If I then go back INTO Management Studio and go to the Status Page, 'Login is locked out' would be checked again!  That's issue #2</p> <p>Does anyone have ANY idea what the heck is going on here or what I am missing?  I would think that I should be able to uncheck the locked out login and close without issue and have the end user login again with their old (existing) password.</p> <p> </p> <p>Thanks in advance.</p>Fri, 08 Sep 2006 15:04:38 Z2009-11-23T10:29:47Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/a8faf5fa-0297-4c04-934d-a73a5202a2bahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/a8faf5fa-0297-4c04-934d-a73a5202a2baSheetal Kumarhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sheetal%20KumarScheduled job failure on linked Server<p>Hi,<br/><br/>I have successfully created linked server from 2005 to 2000. I am able to see the table details of target server on executing <span style="font-size:x-small"><span style="color:#0000ff"><span style="color:#0000ff">exec</span></span> </span><span style="color:#800000"><span style="font-size:x-small;color:#800000">sp_tables_ex.<br/><br/><span style="color:#000000">but when I try to schedule a job to pull the data from linked server its throwing following error: </span><br/><br/>Executed as user: NT AUTHORITY\SYSTEM. Login failed for user '(null)'. <br/>Reason: Not associated with a trusted SQL Server connection. [SQLSTATE 28000] (Error 18452)  <br/>TCP Provider: An existing connection was forcibly closed by the remote host. <br/>[SQLSTATE 42000] (Error 10054)  OLE DB provider &quot;SQLNCLI&quot; for linked server &quot;PTUS01DS04&quot; returned message &quot;Communication link failure&quot;. <br/>[SQLSTATE 01000] (Error 7412).  The step failed.</span></span></p> <p><span style="font-size:x-small;color:#800000"><span style="font-size:x-small;color:#800000"><span style="color:#000000">Could someone help me in resolving this issue?<br/><br/></span></span></span></p>Wed, 18 Nov 2009 14:04:35 Z2009-11-25T11:01:17Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/aeee9a4c-6546-405f-a526-1e906ccebb3fhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/aeee9a4c-6546-405f-a526-1e906ccebb3fSheetal Kumarhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sheetal%20Kumarhow to create linked server to named instanceHi,<br/><br/>I am trying to create a linked server for named instance through linked server wizard.<br/><br/>SQL SERVER 2005 to SQL Server 2005 Named instance <br/><br/><strong>linked server details: </strong><br/>/*<br/>Server name: myserver\myinstance<br/>Provider: SQLNCLI<br/>datasource:  myserver\myinstance<br/>product :SQL Server<br/>*/<br/><br/>It was created, but when I try to run the Query it throughs an error. <br/><br/>Could any one provide me the steps to be followed to create a linked server to name instance??<br/><br/><br/>Thanks in Advance.<br/>Wed, 18 Nov 2009 15:10:30 Z2009-11-20T21:51:41Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/0df84336-5b3a-495b-9b7e-bdc0aae4add9http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/0df84336-5b3a-495b-9b7e-bdc0aae4add9alexmetalhttp://social.msdn.microsoft.com/Profile/en-US/?user=alexmetal15401 Error when adding AD User to SQL 2005 loginsI have a very frustrating problem that I can't seem to figure out. Running SQL Server 2005 SP3 64-bit on Server 2008 R2. <div>When I first finished installing SQL I ran Surface Area Config to add DOMAIN\Administrator to the sysadmin role. After that I opened of Management Studio to add another domain user login (DOMAIN\OMAdmin) that was a brand new AD account. Adding the login, SQL finds it from AD if I search for it, but when I try to create it I get the 15401 error. I've followed every step in KB324321 and have had no luck. There are no duplicate SIDs, the SQL server can communicate with both domain controllers, SQL is not case-sensitive, name resolution seems to be working fine (I can ping the NetBIOS name of other servers and it translates to an IP just fine).</div> <div><br/></div> <div>So I'm completely baffled. I have tried adding other domain users and they will not add either. Any help is much appreciated. Thanks in advance!</div>Fri, 20 Nov 2009 17:50:22 Z2009-11-24T09:36:29Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b29b090e-7fd6-4e76-8131-dd75b5571d7ehttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/b29b090e-7fd6-4e76-8131-dd75b5571d7elimssdhttp://social.msdn.microsoft.com/Profile/en-US/?user=limssdLinked Server via Windows Authentication<p>Hi,<br/><br/>I've two SQL 2005 servers, A (mixed) and B (window auth). I want to create a linked server in A which can connect to B. A's SQL Service account is logged on using a local user account called A\sql_svc. I'm able to create the linked server using my domain ID, which has sysadmin to both A &amp; B. However, if I run the job via SQL Agent, it gave me the below error :<br/><br/>Message<br/>Executed as user: A\sql_svc. Access to the remote server is denied because no login-mapping exists. [SQLSTATE 42000] (Error 7416).  The step failed.<br/><br/>What kind of credential should I use to create the linked server so that the job is able to run ?<br/><br/>Please enlighten.<br/><br/>TIA !</p>Tue, 17 Nov 2009 02:34:01 Z2009-11-20T22:08:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/77f6d294-369f-4973-9020-1ef9aab5d191http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/77f6d294-369f-4973-9020-1ef9aab5d191SIVAPRASAD S - SIVAhttp://social.msdn.microsoft.com/Profile/en-US/?user=SIVAPRASAD%20S%20-%20SIVAHide all sys and INFORMATION_SCHEMA views from users in SQL server 2005 <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="" lang=EN-AU>We have a request from client to hide all system views/tables from users in SQL server 2005.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="" lang=EN-AU>As user assigned to a specific database role, client do not want the user to see all system tables and </span><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU>INFORMATION_SCHEMA views</span><span style="" lang=EN-AU>, so they can have a clear view for only user tables in their schema.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="" lang=EN-AU> </span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU>However, whenever they connect using Access via ODBC they get a huge list of sys and INFORMATION_SCHEMA views.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU>Also when connecting from SQL Management Studio, they are getting same list.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU> </span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="" lang=EN-AU>We have taken following steps,but it does not worked.<br></span></font></p> <p class=MsoNormal style="margin-left:93.75pt;text-indent:-18pt"><font style="font-size:12px" face="Courier New"><span style="" lang=EN-AU>1.</span><span style="font-size:7pt" lang=EN-AU>      </span><span style="color:black" lang=EN-AU>DENY permissions on View Definition at all scope levels but still the users can see all these views using ODBC.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU> </span></font></p> <p class=MsoNormal style="margin-left:93.75pt;text-indent:-18pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt" lang=EN-AU>2.</span><span style="font-size:7pt" lang=EN-AU>      </span><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU>Tried denying access by changing permissions to deny in the public role, but still the same.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU> </span></font></p> <p class=MsoNormal style="margin-left:93.75pt;text-indent:-18pt"><font style="font-size:12px" face="Courier New"><span style="font-size:9.5pt" lang=EN-AU>3.</span><span style="font-size:7pt" lang=EN-AU>      </span></font><font style="font-size:12px"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU><font style="font-size:12px" face="Courier New">Created one Role including deny perm</font>issions to all sys and INFORMATION_SCHEMA views and assigned to user, but same issue.</span></font></p> <p class=MsoNormal style="margin-left:72pt"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU><font style="font-size:12px">  <br></font></span></p><p class=MsoNormal style="margin-left:72pt"><span style="font-size:9.5pt;color:rgb(8, 8, 8)" lang=EN-AU>Any suggestions.<br></span></p><span style="font-size:12pt;font-family:'Times New Roman','serif'" lang=EN-AU><span style="color:black"><br style=""> <br style=""> </span></span><hr class="sig">Sivaprasad SMon, 09 Mar 2009 11:58:47 Z2009-11-20T16:30:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/126dee23-38df-4dc0-b072-addc1119285ehttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/126dee23-38df-4dc0-b072-addc1119285eluzippuhttp://social.msdn.microsoft.com/Profile/en-US/?user=luzippusetting up read-only users. how to hide sys. tables. SQL SERVER 2005<p><font size=2>I need to set up 1 new user in SQL Server 2005 to be able to read specific tables in a db (db1).</font></p> <p><font size=2>The user will connect from MS access using odbc links (SQL Native client ot SQL Server driver)</font></p> <p><font size=2>I've tried to set up one and once logged on from the user workstation, I can only see sys. tables and INFORMATION_SCHEMA tables.<br>None of the required db1 tables appear.</font></p> <p><font size=2>under Security/Logins I've created User1:<br>SQL Server auth. with password<br>default db = db1<br>server_roles = none<br>user mapping = map, db1, user1,dbo<br>securables = none<br>status = grant, enabled</font></p> <p><font size=2>on the access db, the  odbc link was set up with default db = db1</font></p> <p><font size=2>Why can't I see any of the db1 tables?</font></p> <p><font size=2>How can I restrict access to the sys. tables?</font></p> <p><font size=2>Thank you</font></p>Mon, 16 Oct 2006 13:15:23 Z2009-11-20T16:29:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/fb41a455-4941-46b2-b177-bdc638225fffhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/fb41a455-4941-46b2-b177-bdc638225fffplantfreakhttp://social.msdn.microsoft.com/Profile/en-US/?user=plantfreakRestricting Access to sys and INFORMATION_SCHEMA views in ODBC<p align=left><font face=Arial size=2>Hi</font></p> <p align=left>I'm building a data warehouse - my end users connect using Access via ODBC Microsoft SQL Server driver (2000.85.1117.00).</p> <p align=left> </p> <p align=left>However, whenever they connect using Access via ODBC they get a huge list of sys and INFORMATION_SCHEMA views, in addition to the data warehouse tables they need to access.</p> <p align=left> </p> <p align=left>How can I remove these sys and INFORMATION_SCHEMA views from the list of tables/views presented to the end user?</p> <p align=left> </p> <p align=left>I've tried denying access by changing permissions to deny in the public role of the master database - I have also changed permissions in the public role in the data warehouse database.  When I do this, the ODBC connection fails to retrieve any objects because it doesn't have access to sys.databases (and various other unspecified objects).</p> <p align=left>I'm stuck - help!</p>Tue, 23 Oct 2007 08:55:37 Z2009-11-20T16:26:21Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9d171afa-bd30-414c-a6f5-0ae42eb53fc9http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9d171afa-bd30-414c-a6f5-0ae42eb53fc9Ravendrahttp://social.msdn.microsoft.com/Profile/en-US/?user=RavendraSQL Server 2005/2000 (JOB running through Domain level Id getting fail )Dear All,<br/><br/>In our production enviroment one new audit is implement from company pocily side.<br/>all SQL Server aunthication account should be disable.<br/><br/>Now I have created 2 a domain level Id one foe sysadmin role &amp; second for public role at SQL server level.<br/>sysadmin id added in &quot;Deney Intractive logon right&quot; at windows level &amp; &quot;allow logon locally&quot; aslo as per company policy.<br/><br/>when I try to connect with SQL Server level with sysadmin Id every time I have remove from &quot;Deney Intractive logon right&quot; ...<br/><br/>I am using runas command for connecting bec as per company policy I never connect with windows level with this Id.<br/><br/>please give me solution for checking the job at database level or how to connect from command prompt  without removing from  &quot;Deney Intractive logon right&quot; or how to connect remotely from GUI mode. <br/><br/>2. How to disable sa login in sql server 2000.<br/><br/>Regards<br/>ravi<br/><br/><br/><br/> <br/> <hr class=sig> indiaSat, 07 Nov 2009 10:56:40 Z2009-11-20T15:50:48Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/82f8fbfc-327f-4969-9001-b1c50e9599dahttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/82f8fbfc-327f-4969-9001-b1c50e9599dacn2500http://social.msdn.microsoft.com/Profile/en-US/?user=cn2500cross database permission<p><span style="font-family:Arial;font-size:x-small">dear all<br/>    I got a problem when I set up my database:</span></p> <p><span style="font-family:Arial;font-size:x-small">    database1 has a table called table1<br/>    database1 has a user called user1 having no explicit permission with table1<br/>    user1 is mapped to login1,which does not belong to any fix server role</span></p> <p><span style="font-family:Arial;font-size:x-small">    database2 has a stored procedure call sp2<br/>    database2 has a user called user1 having EXECUTE permission with sp2<br/>    database2 has a table called table2<br/>    user1 in database2 has no  explicit permission with table2<br/>    user1 is mapped to login1 as well</span></p> <p><span style="font-family:Arial;font-size:x-small">   I found:</span></p> <p><span style="font-family:Arial;font-size:x-small">   it is successful,when I want to execute sp2 as:<br/>   select * from database2.dbo.table2</span></p> <p><span style="font-family:Arial;font-size:x-small">  it failed, when I want to execute sp2 as:<br/>  select * from database1.dbo.table1</span></p> <span style="font-family:Arial;font-size:x-small"> <p><br/> error message:The SELECT permission was denied on the object</p> <p> I didn't grant user2 select permission, but execute the sp2, why it works?</p> <p>when sp2 wants to select table1 in database1 why it doesn't work?</p> <p><br/>any idea. many thanks</p> <p>cn2500</p> </span>Tue, 17 Nov 2009 17:50:22 Z2009-11-20T11:04:49Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9b8ec39b-3b33-4cd5-b4a9-e51ce25914ffhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/9b8ec39b-3b33-4cd5-b4a9-e51ce25914ffNathon Daltonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Nathon%20DaltonSQL Database Access Based On User Table?I am designing a database and am creating essentially a users table that gives access to the application. I'm wondering if there is a way to grant access to the database based on the security level assigned to users in the database's users table. So, for instance...<br/><br/>Users: Nathon, Dalton, 123 Some St, ..., SecurityLevel1 (Admin), ...<br/>Users: John, Doe, 123 Some Other St., ..., SecurityLevel5 (DB Only), ... -- This would give access to the database only.<br/><br/>So, is there a way to setup the database so that it will allow/disallow people based on the security level in one of it's own tables?<hr class="sig">Nathon Dalton .NET Software Developer Tue, 17 Nov 2009 16:35:44 Z2009-11-25T10:48:01Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/40b1d23e-9ff1-4956-b4e3-0eece481f974http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/40b1d23e-9ff1-4956-b4e3-0eece481f974amitbrcmithttp://social.msdn.microsoft.com/Profile/en-US/?user=amitbrcmitSQL Serversir, <br/>   i am running the sql server management 2009.<br/>  Currently having some problems relating to access to database.  when i created the DSN file under ODBC, the test completed succesfully, using SQL Server authentication with user login and password. On the other side, At the SQL Enterprise Manager, I check the authentication method, and it is set to Windows and SQL server (Mixed mode).<br/> while executing the database in dos mode using java it compile successfully but on executing it shows an error<br/> it is<br/> <span style="font-family:Arial;font-size:x-small">[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'</span> <br/>                                                                                                                    please help me<br/>                                                                                                                     Amit kumarThu, 30 Jul 2009 18:44:24 Z2009-11-20T08:08:51Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/dc1f3c58-0f84-48c7-add5-c9ff7e40acb1http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/dc1f3c58-0f84-48c7-add5-c9ff7e40acb1Alec McMillanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alec%20McMillanSQL Server 6.5 to SQL Server 2005/2008 upgrade/migration.Hello,<br/> <br/> We have a client with an app that currently uses a SQL Server 6.5 database with user passwords stored in the snefru hash which the users enter in the form they were generated, ie. PassWord even though sql server 6.5 would accept password, PASSWORD or any combination.  The are wanting to go to SQL Server 2008 via an upgrade/migration but do not want to have to issue new passwords to everyone.<br/> <br/> 6.5 hash system is not supported in 2k5 or 2k8.  Going to 2000, it cheats and hashes upper and lower cases.<br/> <br/> If we were to aquire 7.0 and upgrade to that first and then go to 2k5/2k8, would that work?  Apparently 2k5/2k8 will convert 7.0 hashes correctly but we do not know what 7.0 does to the 6.5 hashes, whether it treats them at 6.5 or actually converts them 7.0...<br/> <br/> Any help would be appreciated, thanks.<br/> <br/> AlecThu, 19 Nov 2009 20:49:02 Z2009-11-23T07:25:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/65b8e6e4-8f46-44c3-85e4-95782caad81bhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/65b8e6e4-8f46-44c3-85e4-95782caad81byork0001http://social.msdn.microsoft.com/Profile/en-US/?user=york0001Database restore & Symmetric keysHi, <br/> <span style="text-decoration:underline"><br/> SQL Server 2005 </span> <br/> <br/> Have a database which utilises a symmetric key / certificate to secure some of the database columns.  I have a need to <br/> move this to a new server but am running into problems when it comes to decrypting the data on the new server. <br/> <br/> Steps I've taken so far <br/> <br/> <ul> <li>Backup database and restore to new server/instance. </li> <li>Recompile all the procedures which use symmetric keys &amp; certificates.  By recompile I mean edit the code, add some whitespace and excute using alter ... . </li> <li>Create the database master key using the same password </li> <li>Create a certificate </li> <li>Create a symmetric key based upon that certificate</li> </ul> <br/> The error i...  <pre>Msg 15581, Level 16, State 3, Procedure usp_GetFile, Line 6<br/> Please create a master key in the database or open the master key in the session before performing this operation.<br/> </pre> <br/> The stored procedure I'm running opens the symmetric key, see below and theis definately worked on the original server.<br/> <br/> <br/> <pre lang=x-sql>OPEN SYMMETRIC KEY TransfersKey<br/> DECRYPTION BY CERTIFICATE TransfersCertificate</pre> <br/> Pretty sure I'm missing something really obvious. <br/> <br/> Anyone got any ideas? <br/> <br/> Thanks <br/> Dave <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>  <br/> <br/> <br/>Thu, 19 Nov 2009 15:04:25 Z2009-11-23T17:39:49Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/fa6bd747-92b3-4285-b6c3-1334ebf71f9dhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/fa6bd747-92b3-4285-b6c3-1334ebf71f9dDaveKBrownhttp://social.msdn.microsoft.com/Profile/en-US/?user=DaveKBrownSymmetric Encrypted by by a Assymetric stored in Master DB.I am in the process of encrypting various elements of our databases and I came across a situation that got me scratching my head.  To start with, I have 2 production database servers with several DBs on them.  Both servers have SQL Server 2008 Enterprise installed.  A few of the DBs are mirrored from the primary server (ServerA) to the standby server (ServerB).  I also have a HSM that will be used to store the keys used for TDE.  I was able to get TDE and Database Mirroring to work without too many issues.  <br/><br/>The issue that has arised involves encrypting columns in some of the tables.  My goal would be to stored the keys for these encrypted columns in the HSM.  Currently, the process to encrypt the columns is to create a Symmetric or Asymmetric key within the database.  When you create these keys, you also encrypt these keys by some other process (i.e.. password, another key or by a key in the EKM provider).  These is easily done using the EKM and the HSM, but the problem is when the database is mirrored.<br/><br/>When you use a HSM to enable TDE, an assymetric key is created in the Master DB, and is stored outside the database that is being encrypted.  This AS key is then used to encrypt the database key of the database that is being encrypted.  This very friendly to a mirror database because the AS key is stored in the Master DB and can be &quot;reused&quot; on another server by specify the &quot;OPEN_EXISTING&quot; option of the CREATE ASYMMETRIC KEY function on the other server.  Unfortunately, this doesn't work well for keys that are being used to encrypt columns because the keys are created within the DB that is being mirrored.  If you create a key using the HSM within the database that is mirrored to a standby server, the standby server does see the new key but it doesn't seem to recongized the fact that the new key being encrypted by a key in the HSM.  When I attempt to decrypt the data in the column, on the primary server, the data comes back cleanly, but on the standby server, the data comes back NULL.  There are no errors on the standby server when I decrypt the data either.  So, this tells that standby server can see the symmetric key, but it can't decrypt the symmetric key because it dosn't &quot;know&quot; about the key in the HSM.<br/><br/>One option to overcome this situation is to use the other forms of encryption to encrypt the new key, which goes against my goals.  Another way of possible way of encrypting a new key in a database with a key from the HSM, is to encrypt the new key with a key from another database, like Master DB.  That way, I could run the CREATE ASYMMETRIC Key on the strandby server with the OPEN_EXISTING option and reuse the HSM key.  So, is it possible to use a key in the Master DB to encrypt a key within a user DB?  If not, could the SQL Server Development Team create a way?  Or how can I get the standby server to &quot;reuse&quot; that HSM key that was firsted created on the primary server?<br/><br/>Thanks,<br/>Dave BrownThu, 19 Nov 2009 18:43:18 Z2009-11-23T06:10:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e3e45bcc-7ca0-4e82-9ec1-086ba09c21dfhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e3e45bcc-7ca0-4e82-9ec1-086ba09c21dfHenry Xuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Henry%20Xu关于通过存储过程 跨数据库访问权限<p>大家好, 我在设置用户权限的时候遇到了一个大问题, 希望大家帮忙解决一下!</p> <p>问题描述:</p> <p>1.同一Server有DB1 和DB2 两个数据库<br/>2.DB1 里有 TB1(Table) , SP11(stored Procedure) SP12 (stored Procedure)<br/>3.DB2 里 TB2(Table) , SP2(stored Procedure)<br/>4.SP11 读取 TB1的数据 SP12 读取 TB1 和TB2的数据<br/>5.SP2 读取 TB2的数据<br/>6.用户名 U1 可以访问 DB1 和DB2 , 但只给了执行SP11, SP12 和SP2的权限, 不能直接对TABLE做任何操作<br/>7.直接执行 SP11和SP2一切正常, 但当执行SP12的时候,系统提示TB2拒绝访问.</p> <p>问题:</p> <p>请问如何才能让SP12访问TB2, 我不想给用户直接访问表的权限, 只想让用户通过存储过程来操作表.</p> <p>谢谢, 请各们指点~~~!</p> <p> </p>Tue, 17 Nov 2009 18:01:35 Z2009-11-20T07:29:32Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e94fe85c-d069-4d11-8bd5-3d95fea25dc3http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/e94fe85c-d069-4d11-8bd5-3d95fea25dc3callump99http://social.msdn.microsoft.com/Profile/en-US/?user=callump99Access to MSSQL connection across domainsHi,<br/> <br/> I have a problem I hope you are going to help me solve.<br/> <br/> Sorry about the length of this post, but I thought it was worthwhile writing all the relevant things I could remember....<br/> <br/> I have two domains that do not have a trust relationship between them and there is no prospect of being able to establish one. In one domain, the &quot;client&quot; domain, I have an MS Access DB that has been &quot;upsized&quot; (using the Wizard) to migrate the data to MSSQL. In the other domain (the server domain) I have the MSSQL server. All systems are Windows XP Pro, the MSSQL server is 2005 and the Access is 2003.<br/> <br/> What I want to be able to do is connect to the MSSQL server from the client domain with the MSSQL server set to &quot;Windows Authentication&quot;. I cannot use MSSQL authentication as this is not sufficiently &quot;strong&quot;.<br/> <br/> However, I have not been able to do this, despite the fact that I can map a network drive (that exists on the server) on the client system, using the SAME username and password that exists on the server domain.<br/> <br/> The MSSQL has the user added as a user and has all the correct permissions, which has been tested by running the Access DB from a client within the server domain.<br/> <br/> The Access upsize wizard migrates the Access tables to be ODBC linked tables, so I have been playing around with the connection string and have used ALL sensible combinations of the following options (including options not present):<br/> <br/> DRIVER={sql server}; also tried {sql native driver}<br/> DATABASE=&lt;databasename&gt;;<br/> SERVER=&lt;servername&gt;;<br/> Persist Security Info=True; also tried false<br/> Trusted_Connection=no; also tried yes<br/> UID=SERVER_DOMAIN\cpaterson;<br/> UID=cpaterson;<br/> PWD=apassword;<br/> <br/> None of them work, where they don't throw up errors about invalid options the error that is logged at the MSSQL server is:<br/> <br/> 2009-11-13 11:46:05.43 Logon Error: 18452, Severity: 14, State: 1.<br/> 2009-11-13 11:46:05.43 Logon Login failed for user 'cpaterson'. The user is not associated with a trusted SQL Server connection. [CLIENT: 192.168.1.110]<br/> <br/> I have even gone as far as trying ADO connections rather than the ODBC connections (which I think might mean I would have to rework my Access code considerably), but I get the same error.<br/> <br/> If I enable Mixed mode Authentication (and use an appropriate username and password) it works with ODBC and with ADO.<br/> <br/> Am I trying to do the impossible?<br/> <br/> Why can I map a drive but not connect to the MSSQL server?<br/> <br/> Any suggestion how to solve my problem or where else I might get help?<br/> <br/> Regards<br/> <br/> CallumMon, 16 Nov 2009 15:28:53 Z2009-11-19T13:02:16Z