SQL Server 2008express version enables hybrid login and SA

Source: Internet
Author: User
Tags mssqlserver

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.