Upload
tecip
View
224
Download
0
Embed Size (px)
Citation preview
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
1/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
How to enable remote connections in SQL
Server 2008?
54Daniel_Walzenbach 14 Apr 2010 3:36 PM
You experience the following error message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 -
Could not open a connection to SQL Server)
How to solve this issue?
There are a couple of things that might be going on here (All of the following configurations are made on the
computer running your SQL Server 2008 instance)
Allow remote connections to this server
The first thing you want to check is ifRemote Connections are enabled on your SQL Server database. In SQL
Server 2008 you do this by opening SQL Server 2008 Management Studio, connect to the server in question,
right click the server
http://www.microsoft.com/downloads/details.aspx?familyid=08E52AC2-1D62-45F6-9A4A-4B76A8564A2B&displaylang=enhttp://blogs.msdn.com/40127/ProfileUrlRedirect.ashxhttp://blogs.msdn.com/40127/ProfileUrlRedirect.ashxhttp://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx#comments7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
2/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 2
and open the ServerProperties.
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
3/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 3
Navigate to Connections and ensure thatAllow remote connections to this serveris checked. Check if this solves
the problem. If it does, here you go, continue with whatever you were doing and have a nice day.
Protocols for MSSQLServer
If youre still running in issues lets dig a bit deeper. The next good thing to check is the SQL Server NetworkConfiguration. Open the SQL Server Configuration Manager, unfold the node SQL Server Network Configuration and
select Protocols for MSSQLServer(or whatever the name of your SQL Server instance is).
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
4/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 4
Make sure that TCP/IP is enabled and try again. Even though I hope that this resolved your problems there might
still be an issue with
The Firewall
If there is still no communication happening between your computer and the remote SQL Server you most likely
need to configure your firewall settings. A good first step is to figure out which port is being used by TCP/IP (and
which you need to open in your firewall). You can do this by right clicking TCP/IP and selecting Properties.
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
5/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 5
Click on the tab IP Addresses and voil Port 1433 it is :-) That was easy enough and all there is left to do is to
allow inbound TCP/IP traffic on Port 1433 in your firewall. In Windows 7 this works something like this. Open the
Control Paneland navigate to Windows Firewall.
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
6/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 6
Click onAdvanced Settings on the left hand side and you should see the Windows Firewall with Advanced Security.
Select the Inboud Rules on the left hand side and click on New Rule on the right hand side.
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
7/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 7
This opens the New Inbound Rule Wizardwhich you can use to allow inbound trafficon Port 1433 forTCP/IP(and
which is exactly how you configured your SQL Server in the steps above). Just follow the steps outlined below and
you should be good :-)
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
8/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 8
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
9/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 9
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
10/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 10
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
11/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 1
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
12/16
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
13/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 13
Oliver Bradley
15 Apr 2010 6:38 AM
I see red X's instead of your screenshots.
Behtash Moradi
17 Apr 2010 1:31 AM
it is very good article.Thank you indeed.
Gerhard
20 Apr 2010 1:25 AM
Hey Daniel,
very nice article!
One comment: Many enterprise firewalls are blocking the UDP-Ports. By default SQL-Server-Browser-
Services use UDP-Port 1433. System administrators are not very happy when you ask them to open UDP-
Ports, because they are frequently used for cyber-attacks.
If SQL-Server-Browser-Services are not available, you cannot find the named instance of you server. An
easy workaround is to append the TCP-Port of your server instance (in this case 1433) to the server
address (e.g. 234.567.123.23, 1433)
Not using SQL-Server-Browser-Services and blocking UDP-Ports makes systems much safer at no cost of
usability.
cheers
Daniel_Walzenbach
20 Apr 2010 9:55 AM
@Oliver >> do you still have issues seeing the pictures?
@Gerhard >> Great tip! Thanks very much!
Grant
11 May 2010 7:13 AM
Thank you!! This is a very good article and it sorted my problem out. So much for the technet and MSDN
online help.
Vadim
21 Jan 2011 6:52 AM
How to enable remote connections in SQL Server 2008 into Windows Server 2008 R2 Core?
http://none/http://blogs.msdn.com/40127/ProfileUrlRedirect.ashxhttp://blogs.msdn.com/40127/ProfileUrlRedirect.ashx7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
14/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 14
Salim
14 Jul 2011 5:33 AM
thank u so much ...it helps me lot..keep up ur good work.
JayB2 Aug 2011 6:00 AM
Step 1>Install MS SQL server 2008
Step2>During Istallation Always Select MIXED User connection;
Step3>after successful installation of data base Login as Local User.and create Database..then in side
Database select security
and then right click on login and create new Login.
Step4>give new User name and Select SQL Authentication..and give password then deselect USE MUST
CHANGE PASSWORD AT NEXT LOGIN
Step5>Go to USER MAPPING on that form and select database wihich u want to assign to that User.and
below that assign
read,write,backup permission.and then Click "ok" to finish.
Step6>NOW open SQL Server Configuration Manager->SQL Server Network Configuration->Protocols for
->Enable Shared
Memory & TCP/IP and Double Click on TCP/IP then got to IPaddress TAB->in here ScrollDown and look
"IP ALL"there give TCP Port
"1433" then "ok".
Step7>Now Go to SQL NATIVE Client xx.x Configuration->Client Protocols->Enable Shared memmory and
TCP/IP->Double click on Client
Protocols and Default Port =1433
Step8 Optional Client side>Go to Aliases and create new Alias.eg-Alias name=xyz,)port
no=1433,Protocol=TCP/IP,Server=Ip Add
(192.168.1.1) or DomainName\InstanceName(JOI-MI\MSSQLSERVER)
Step9>do Step 6 & 7 in client Side.
Note:-Remember Do all settings of SQL Server Configuration Manager in 32-bit version.ull see don't worry.
Use this Connection string ->
cnn = New SqlConnection("Data Source=;Network Library=DBMSSOCN;Initial
Catalog=DATAbaseNAME;User
ID=SQLCreatedUSERname;Password=Pass;")
7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
15/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx 15
Duncan
11 Aug 2011 9:19 PM
Thank you so much for this. Saved me at midnight for a launch tomorrow!
Hussain
26 Aug 2011 4:47 PM
I didn't try your solution yet, but realy I want to thank you very much for your explanation.
Roshan
28 Oct 2011 12:27 AM
I tried till the step of enabling TCP. I still could not connect to database remotely. Windows firewall was off.
I restarted sql server service. Then it worked :)
oracle boy
6 Nov 2011 1:35 AM
what kind o microsoft IDIOT mind this ?
what for ???
this way Everybady open ALL !
IDIOT !!!
kenan
30 Nov 2011 5:25 AM
have you can do this automaticly with code
Hunk RE
2 Dec 2011 5:29 PM
This is good guide, but you forgot that it is needed to create specific username and password to establish
connections to the server, also select wich logins are going to be used to access the database, this is
could be all done from the management studio, and the most important is you should enable sql server
authentication and windows from the properties -> security. more info: videotutors.net/sqlserver-remote-
access.aspx
Syed Irfan
11 Jan 2012 10:15 PM
http://videotutors.net/sqlserver-remote-access.aspx7/30/2019 RemoteconnectionsSQlServer08dw Daniel Walzenbach
16/16
03/05/13 How to enable remote connections in SQL Server 2008? - - Site Home - MSDN Blogs
1 2 3 4
Thanks you dear this is very helpful document i have deployed its successfully.
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx?PageIndex=4#commentshttp://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx?PageIndex=3#commentshttp://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx?PageIndex=2#commentshttp://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx?PageIndex=1#comments