You cannot connect to MSDE 2000 by using ADO.NET with SQL Server Authentication (321698)
The information in this article applies to:
- Microsoft ADO.Net 2.0
- Microsoft ADO.NET (included with the .NET Framework) 1.0
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
- Microsoft Data Engine (MSDE) 1.0
- Microsoft SQL Server 2000 Desktop Engine (MSDE)
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio 2005 Professional Edition
This article was previously published under Q321698 SYMPTOMS
If you try to open a SqlConnection object to a new installation of Microsoft SQL Server 2000 Data Engine (MSDE 2000) under the following conditions, a SqlException exception may by thrown:
- You are using SQL Server Authentication.
- You are using the built-in SA account with the default blank password.
If the exception is not caught in a try-catch block, you receive the following error message:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
If the exception is caught by a try-catch block, you receive the following error message:
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
CAUSE
The default authentication mode for MSDE 2000 is Windows Authentication. MSDE 2000 installs with a built-in system administrator (SA) user account. However, because SQL Server Authentication is disabled by default, you cannot access the built-in account after a typical installation.
RESOLUTION
To enable SQL Authentication, use one of the following methods:
- Use the following command-line switch to enable SQL Authentication during installation:
- Edit the registry after installation.
For more information about how to do either method, click the following article number to view the article in the Microsoft Knowledge Base:
285097
How to change the default login authentication mode to SQL while installing SQL Server 2000 Desktop Engine by using Windows Installer
Note When you change the default login authentication mode from Windows NT authentication to SQL authentication, we recommend that you change the sa password to a strong password.
For more information about how to change the SQL Server sa password, click the following article number to view the article in the Microsoft Knowledge Base:
322336
How to verify and change the system administrator password in MSDE or SQL Server 2005 Express Edition
STATUSThis behavior is by design.REFERENCES
For more information about connecting to Microsoft Desktop Engine, click the following article number to view the article in the Microsoft Knowledge Base:
319930
How to connect to an instance of SQL Server Desktop Edition or of SQL Server 2005 Express Edition
For more information about using Windows Installer if you are customizing setup for SQL Server 2000 Desktop Engine, click the following article number to view the article in the Microsoft Knowledge Base:
227091
Command-line switches for the Microsoft Windows Installer Tool
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
325022
MSDE security and authentication
For more information, visit the following Microsoft Web sites:
Modification Type: | Minor | Last Reviewed: | 3/9/2006 |
---|
Keywords: | kbprb kbSqlClient kbSystemData KB321698 kbAudDeveloper |
---|
|