Article ID: 319930 - Last Review: May 18, 2007 - Revision: 4.5 How to connect to an instance of SQL Server Desktop Edition or of SQL Server 2005 Express EditionThis article was previously published under Q319930 On This PageSUMMARY
This step-by-step article describes how to establish a connection to an instance of Microsoft SQL Server Desktop Engine (MSDE) or of Microsoft SQL Server 2005 Express Edition. Note The same concepts and discussions about MSDE in this article also apply to SQL Server 2005 Express Edition. MSDE uses two authentication modes:
For more information about authentication modes in MSDE, see the following MSDN Web site:
Authentication Modes http://msdn2.microsoft.com/en-us/library/aa905171(SQL.80).aspx (http://msdn2.microsoft.com/en-us/library/aa905171(SQL.80).aspx) RequirementsThe following list outlines the recommended hardware, software, network infrastructure, and service packs that are required:
Connect to MSDE with Windows NT authenticationMSDE achieves logon security integration with Windows NT 4.0, Windows 2000, or Windows XP by using the security attributes of a network user to control logon access. A user's network security attributes are established at network logon and are validated by a Windows domain controller. When a network user tries to connect, MSDE uses Windows-based facilities to determine the validated network user name. To successfully connect to and administer MSDE under Windows Authentication, one of the following conditions must be met:
Connect to MSDE with SQL Server authenticationWhen a user connects with a specified logon name and password from a non-trusted connection, MSDE performs the authentication by checking if a SQL Server logon account has been set up with a password that matches the password that the user specifies. If MSDE does not have a logon account set, authentication fails.Under some circumstances, you may be required to use SQL Server Authentication. The following list outlines some of the circumstances in which you must use SQL Server Authentication:
WARNING: The built-in SA user account is installed without a password. This enables you to connect to MSDE initially. However, if you enable SQL Server Authentication, you must create a password for this account immediately. To create a password for the built-in SA account, follow these steps to use OSQL, which is a command-line utility that is installed with MSDE:
OSQL Utility http://msdn2.microsoft.com/en-us/library/aa214012(SQL.80).aspx (http://msdn2.microsoft.com/en-us/library/aa214012(SQL.80).aspx) Enable Mixed Mode authentication during installationDuring installation, you can change the authentication mode that MSDE uses by running the installation with the following command parameter:Enable Mixed Mode authentication after installationImportant This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:322756
(http://support.microsoft.com/kb/322756/
)
How to back up and restore the registry in Windows
By default, the value of the LoginMode Windows registry subkey is set to 1 for Windows Authentication. To enable Mixed Mode authentication after installation, you must change this value to 2.The location of the LoginMode subkey depends on whether you installed MSDE as the default MSDE instance or as a named instance. If you installed MSDE as the default instance, the LoginMode subkey is located in the following registry subkey: HKLM\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode
If you installed MSDE as a named instance, the LoginMode subkey is located in the following registry subkey:
HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>\MSSQLServer\LoginMode If you are using SQL Server 2005 Express Edition, the LoginMode registry entry is located in the following registry subkey:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer To change the value of LoginMode to 2, follow these steps:
Verify connectivityFollow these steps (which are not specific to a technology) to make sure that you can connect properly to an instance of MSDE:
Troubleshooting
REFERENCES
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
325022
(http://support.microsoft.com/kb/325022/
)
MSDE security and authentication
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
(http://support.microsoft.com/kb/227091/
)
Command-line switches for the Microsoft Windows Installer tool
For more information about changing the default authentication mode for SQL Server 2000 Desktop Engine, click the following article number to view the article in the Microsoft Knowledge Base:
285097
(http://support.microsoft.com/kb/285097/
)
How to change the default login authentication mode to SQL while installing SQL Server 2000 Desktop Engine by using Windows Installer
For more information about using SQL Server Desktop Engine, see the following Microsoft Web sites:
SQL Server 2000 Desktop Engine (MSDE 2000) http://msdn2.microsoft.com/en-us/sql/aa336301.aspx (http://msdn2.microsoft.com/en-us/sql/aa336301.aspx) Integrating MSDE 2000 with your Applications http://www.microsoft.com/sql/prodinfo/previousversions/msde/msdeintegration.mspx (http://www.microsoft.com/sql/prodinfo/previousversions/msde/msdeintegration.mspx) | Article Translations
|

Back to the top
