Native environment: WIN10 64-bit VS2010 with its own database sqlserver2008 Express version
To log into the database using the command line:
OSQL-E-slocalhost\sqlexpress
Login success:
The following code is automatically generated by SSMs 2008. You can implement the title requirement without installing SSMS.
--Enable hybrid Login Use [Master]GOEXECXp_instance_regwrite N'HKEY_LOCAL_MACHINE'N'Software\microsoft\mssqlserver\mssqlserver'N'LoginMode', REG_DWORD,2GO--enable SA user password for SA Use [Master]GOALTERLOGIN[SA] withDefault_database=[Master], check_expiration= on, Check_policy= onGO Use [Master]GOALTERLOGIN[SA] withPASSWORD=N'SA'GOALTERLOGIN[SA]ENABLEGO--then "Restart the service", with the VS connection tool can be connected.
General Express version created instance name Host name \SQLExpress
There is also a default instance name of host name
Specific instances open the service look
Reference article:
Use the command-line window to manipulate sqlserver-czy10000-itpub blogs
http://blog.itpub.net/24128627/viewspace-1114484/
SQL Server Windows authentication changed to Mixed Mode Authentication-dreamjava9213 column-Blog channel-csdn.net
http://blog.csdn.net/dreamjava9213/article/details/41970265
SQL Server 2008express version enables hybrid login and SA