The following error occurred while connecting to the SQL Server 2008 database remotely:
<--A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections.
(Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)-
Because SQL Server 2008 defaults to not allow remote connections, the SA account is also disabled by default if you want to use SSMS locally (SQL Server Management Studio Express)
A two-part configuration is required to connect to SQL Server 2008 on a remote server:
1,sql Server Management Studio Express (SSMS)
2,sql Server Config Manager/sql Server Configuration Manager (abbreviated SSCM)
Here are the specific steps to be done:
(1: open SSMs, connect to the database as Windows, log on, right-select the "Properties"
On the left, select "Security" and select "SQL Server and Windows authentication mode" on the right to enable hybrid login mode
(2: Select "Connect", tick "Allow remote connection to this server", then click "OK"
(3: expand Security, login name, "sa", right-select "Properties", then "General" on the left, "SQL Server Authentication" to the right, and set the password; Select "Status", check "Enable", click "OK"
(4: Right-click the database, select "Facet", set the "Remoteaccessenabled" property to "True", point "OK"
(5: Now that SSMs is set up, exit first, and then log in with SA, success means that the SA account is enabled
Next, start configuring SSCM, open SSCM:
(6: Check the SQL Server service on the left to make sure that SQL Server on the right and SQL Server Browser are running
(7: TCP/IP on the right: double-click to open the Settings panel to modify it to "Enabled"
Select the "IP addersses" tab, set the port "1433",
"Client protocols" TCP/IP is also modified to "Enabled"
(8: configuration complete, restart SQL Server 2008, if Visual Studio 2010 is:
(9: You should be able to use it at this time, but check the firewall: Turn on firewall settings.) The SQLServr.exe (C:\Program Files\Microsoft SQL Server\mssql10. Sqlexpress\mssql\binn\sqlservr.exe) is added to the Allowed list.
SQL Server r2:error 26 Open remote Connection details