Remote Connection to SQL Server 2012 Standard Edition port 1433 - sql

I have a Windows Server 2008 R2 running SQL Server 2012 Standard Edition and:
Allow remote connection to this server (in SQL Server Management Studio)
TCP/IP Enable and configured IPserver and 1433 port (on SQL Server Network Condiguration -> Protocol for...)
Named Pipes Enable (on SQL Server Network Condiguration -> Protocol for...)
Shared Memory Enable (on SQL Server Network Condiguration -> Protocol for...)
Firewall Off
When I run telnet localhost 1433 on the server - connect perfect. But if I run telnet IPSserver 1433 or telnet DomainNameServer 1433 - not connect
Something else netstat -a display:
0.0.0.0:1433 NameServer:0 LISTENING
[::]:1433 NameServer:0 LISTENING
Any ideas?

You probably have the Firewall turned on, so you have to create an exception to TCP/1433.
Be aware that if you have multiple instances you must also create an exception for UDP/1434 and check on which port the multiple instances are binding.

Related

Cannot connect to SQL Server remotely from Management Studio

I have a SQL Server setup on one machine, where I have created a user and assigned a database to the user.
Now I want to access that server from client machine using management studio.
What I did:
I enabled remote access from Management Studio on the server machine from server properties and set authentication mode as "Windows auth and SQL Server auth"
I set TCP port as "1433" for IPAll in SQL Server Network Configuration and restarted SQL Server Services
I created an inbound rule in firewall settings to accept all connections on port "1433"
I added port forwarding in my router settings as follows: Router Port Forwarding
(That's my private IP address in destination address)
I types public IP (49.36.55.132\SQLEXPRESS) in client machine SQL Server Management Studio along with username and password with SQL Server authentication mode.
Getting this error on client machine:
Cannot connect to 49.36.55.132\SQLEXPRESS.
ADDITIONAL INFORMATION:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
Check out your port forwarding on your Server machine, you should add your port on your modem.
change your port, 1433 is default port.so you need to have Dynamic Port for you service.
First you have to completely disable firewall in server machine and check if client machine sees server. After that if it's ok, check connecting with sql server management studio from client and at last enable firewall with rules to check if error is from firewall port settings.

connect MS SQL database to railo datasources

I'm having a heck of a time getting a MS SQL datasource connected through my railo installation. I can connect fine through Adobe ColdFusion, but railo keeps throwing an error
In Adobe ColdFusion I have my server set as mycomputername\sqlexpress and port 1433. In Railo using the same server, database, username and password. I'm getting the following error
The TCP/IP connection to the host myservername, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."..
I've also tried connecting via the IP address listed in SQL Server Configuration Manager IP4 is set to active and enabled with an IP address of 127.0.0.1 but that throws the same error as above
I have IPv6 turned on and that shows up as IP1 in my TCP/IP settings, but I don't know why that would be causing an issue.
Port 1433 is open as I can connect through Adobe ColdFusion. I hope I'm missing something obvious, but I'm stumped.
I finally got this working by changing the Listen All setting to no in SQL Server Configuration Manager > TCP/IP Propertiest
and setting the TCP Port to 1433 and enabling the datasource in IP2 below

Cannot connect to msql 2008 express with JDBC

I was able to connect to MSSQL 2008 express on local machine using SQL server management Studio for host 'nash-pc\sqlexpress'. But when I connect with Microsoft JDBC driver it gives me error like below. JDBC has problem with having '\' in the host name? I'm not sure how to make host name to become 'localhost' instead of 'nash-pc\sqlexpress'. funny thing is that if i use server name as 'localhost' then I could not even connect with SQL server management Studio.
"The driver encountered an unknown error: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host nash-pc, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port."."
My JDBC connection string
Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://nash-pc\sqlexpress:1433;databaseName=jruby
http://www.webxpert.ro/andrei/2009/05/31/enable-tcpip-on-sql-server-2005-express-edition/

enable TCP in SQL server 2005 express edition

sorry for answer but how to enable TCP in SQL server 2005 express edition? I used configuration manager, find network configuration/protocols and there enabled TCP, after that I have restarted sql server service and tried installation of problematic software again (software which told me that TCP is not enabled) but I have the same problem :-(
In Sql Server Configuration Manager.
Sql Server Network Configuration > Protocols for SQLEXPRESS
Select TCP/IP
Protocol Tab, Change Enabled
IP Address Tab, Section IPALL set the TCP Port to 1433
Restart Service.
To verify that it works, go to cmd
> netstat -an
and you will see
...
TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
...
Then try on cmd
> sqlcmd -U sa -S .\sqlexpress,1433
And you will be connected...hope so
*Remember to enable and start the Sql Server Browser Service
Source
You can connect to SQL2005 Express edition over TCP/IP.
Did you open 1433 port on your firewall? Server should accept incoming connections on 1433 port.
After that enable TCP/IP in SQL Server 2005 Surface area configuration utility (see MSSQLSERVER > Database Engine > Local and remote connections > Using TCP/IP only)
In express edition the TCP support is disabled, although you see the corresponding configuration. Either buy a commercial version of use another RDBMS.

SQL Server Ports

We recently installed a sonic firewall on our network. We have a SQL 2005 express server that's configured to listen on dynamic ports. In its configuration manager the dynamic port number is set as 1067 with its default port still 1433.
From my understanding we need to have the following ports open for it to work:
Tcp 1433
Tcp 1067
Udp 1434
Problem is we still cannot connect to the server from outside. When we switch off/disconnect the firewall we can can access the server.
This tells me that the SQL server's setup is fine and the that the problem must be some port we are missing on the firewall.
Any ideas?
Issue netstat -an from an MS-DOS command and try to find what are all ports opend as given in the artilce at
http://support.microsoft.com/kb/287932
and configuring SQL 2005 to allow connections at
http://support.microsoft.com/kb/914277
these may help according those articles:
Client-Server Communication Over a Firewall
Setting up a client to communicate to a SQL Server over a firewall is a simple three-step process:
Make SQL Server listen on a specific port on TCP (the default is 1433) or RPC (the default is a random port greater than 1023). You have to cycle the server after this change.
Configure your firewall server to allow traffic on the specific .
Make the client (on the other side of firewall) use the appropriate connection string to talk to the on the server. You can also use the Client Configuration Utility to add an "Advanced" entry with the appropriate Net-Library and connection string.