Resolved - modify SQL 2005 Express mixed authentication mode

Resolved - modify SQL 2005 Express mixed authentication mode

A few days ago, Visual Studio is installed a virtual machine, fidgety chose to automatically install MS SQL Express, I usually manually install the 
results two days to use SQL Express and found hey, the original program can not be launched , a look, oh, when two days to install, choose to automatically install, estimated to automatically install into the Windows authentication methods, but not before the two SQL Windows and mixed mode. Also gone through quite some time - almost five words to get it. Record it here for future reference 

00- verify whether Windows authentication is a model
HOW TO: Verify and Change the MSDE system administrator password
http://support.microsoft.com/kb/322336/zh-cn
view a document - How to determine or change the authentication mode a Day, forget this KB article too old for SQL 2000 and earlier versions, do not look worth mentioning.

If the confirmation is no doubt, use the following steps and operations.

1. Stop SQL Server / SQL Express Services
net stop / y mssql $ sqlexpress

2. Modify the registry entries
to find the HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server \ MSSQL.1 \ MSSQLServer
modify LoginMode field from 1-> 2

3. Restart the SQL Server / SQL Express Services
net start mssql $ sqlexpress

4. Log into the system

osql -E -S .\sqlexpress

ALTER LOGIN sa WITH PASSWORD = 'yoursapassword' ;
GO
ALTER LOGIN sa ENABLE ;
GO


Of reference: MSDN documentation - http://msdn2.microsoft.com/en-us/library/ms188670.aspx

5. Verify that the success
osql -U sa -S. \ Sqlexpress
prompted to enter 'yoursapassword' just set a password when a password.

Well, look lazy, do not use the manual installation, so Visual Stuido 2008 SQL Express installed automatically, and the result .....

Reproduced in: https: //www.cnblogs.com/llbofchina/archive/2008/05/24/1206391.html

Guess you like

Origin blog.csdn.net/weixin_33756418/article/details/94206507