When you get these results, it is usually due to the way SQL Server is installed and configured to work with authentication. By default, it will allow only integrated Windows authentication. In order to enable SQL authentication, you must open the SQL Server Enterprise Manager, right-click on the SQL server machine node, and setup mixed mode authentication in the Security section.
Alternatively, you can modify the registry to change the setting easily by modifying the value of the LoginMode entry under MSSQLServer key. These will be located in different places depending on your installation, but usually it will be in HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode.
The value should be a REG_DWORD with the value 2. If you save the following script to a file with a .vbs extension, it will be just a matter of double-clicking it on the target machine:
' Changes the login mode of MSDE/SQL Server Option Explicit Dim shell Set shell = CreateObject("WScript.Shell") Rem Write For default SDK tutorials installation. shell.RegWrite "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\NetSDK\MSSQLServer\LoginMode", &H2, "REG_DWORD" Rem Write For standalone MSDE installation (from asp.net site) or full SQL Server setups. shell.RegWrite "HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode", &H2, "REG_DWORD"
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ...continue reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers.continue reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.