Problems with SQL SERVER, Express, cannot connect remotely

Source: Internet
Author: User
Tags connect

Error tip: "An error has occurred while establishing a connection to the server." When connecting to SQL Server in failure, this is caused by the fact that under the default settings SQL server does not allow remote connections. (provider:named pipes provider, error:40-could not open a connection to SQL Server) "

After loading sqlserver2005 (Express Edition), you will need to go to the next manager (Sqlserver2005_ssmsee.msi) for easy management, Microsoft's official website.

1, open sql2005 remote connection function:
The Configuration tool->sql the server perimeter configuration-> service and the perimeter configuration of the connection-> open the database Engine node under the MSSQLSERVER node, select Remote Connection, and then recommend "use tcp/simultaneously" IP and Named pipes ", after determining, restart the database service.

2, the landing changed into a mixed mode:
Open the Manage Manager-> Windows connection and enter the database-> right click on your data server-> properties->security> Select SQL Server and Windows authentication

3, the new SQL Server method of user name and password:
Maage Manager->security-> Right-click logins-> new login...-> Select SQL Server authentication-> Set login name and password (Confirm password)
It is best to remove the "Enforce password expiration" before the small hook, or every login to modify the password.
/*
Manage manager->windows authentication>new query>sp_password null, ' sa123456 ', ' sa '
This sets a user named SA, the password is: sa123456 users, the next time you log in, you can use SQL Server method,
User name is SA, password is: sa123456 user into the database.
*/

4, after the above three steps, so write the connection string can be successfully entered the database (server=.\\sqlexpress;uid= user name; pwd= password; database=master ");

I have been writing server= (local), fainted.

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.