Connecting SSMS client to remote SQL Server instance failing with 'AnyAny' firewall rule - sql-server-2008-r2

How can I connect my SSMS client to a remote SQL Server 2008 R2 instance using SQL browser AND with Windows firewall enabled?
I find that that with the firewall turned off, I can connect fine (without specifying the instance name). Now when I turn the firewall (domain profile) back on, my connection attempts time out. So, to begin my troubleshooting, I created an 'AnyAny' firewall rule however it still failed with a timeout error.
Naturally I can connect fine either way (firewall turned on/off) when I specify the instance name and port. SQL browser is running and listening on UDP 1433. SQL Server is running Windows 2008 R2.
What is getting blocked? And why won't a custom 'AnyAny' rule bypass it?

The information on this SQLCAT blog might be helpful to you. By default, the SQL Browser service runs on UDP port 1434. If you have a firewall configured on your SQL server, you should open up port 1434 for inbound connections from SSMS.
If you need help setting remote connections to your SQL Server, this guide is spot on.

Related

Monitoring SQL service on a remote computer and start or stop a local service based on the result

I have a local service which interacts with a SQL database.
This service stays up when SQL database goes down.
What I need is a PowerShell script that checks the remote SQL service and based on the result it must start or stop the local service.
Any help would be highly appreciated
You can check if SQL server port is open on a remote host.
See this answer for details about how to do this How to check Network port access and display useful message?
The port number is depending on SQL server you're using. For example, for MS SQL default port is 1433 and for MySQL - 3306.

What's the correct MSDTC configuation for a clustered SQL server for BizTalk WCF SQL adapter

I have a issue on connecting to a clustered sql server instance using wcf-sql adapter.
The sql cluster infrastructure is :
We have 2 servers, SVR1 and SVR2, each have a named SQL instance INST1 installed and these 2 servers are clustered. In SRV1, a clustered MSDTC installed and assigned a NETBIOS name as DTCCLUSTER1. SRV1/SRV2 and DTCCLUSTER1 have its own IP address.
When I try to connect to this SQL Server using WCF-SQL Adapter, I got a timeout error and finally find out this is caused by a MSDTC connection issue. DTCPing test failed in both SRV1 to BizTalk server and BizTalk to SRV1.
The SRV1 hosting DTCCLUSTER1 have been configured to allow both inbound and outbound connections. For security reason, we cannot allow "No Auth" in MSDTC but choosed "Mutual Auth required" in both SRV1 and BizTalk server side.
On server side, the firewall was configured to allow DCE RPC inbound and outbound. We even disabled the firewall in BizTalk server side. Also no port blocking by network.
We are still doing the troubleshooting now, but my question here is kind of more general: what's the proper configuration of the MSDTC for a clustered SQL Server?
For now, there MIGHT be a workaround by setting the UseAmbientTransaction property to false.
Off course, the MSDTC issue is your main concern :)
Are you sure you checked the Network DTC access checkbox as described here:
http://msdn.microsoft.com/en-us/library/dd897483(v=bts.10).aspx
For more information on troubleshooting these specific issues, please see here: http://msdn.microsoft.com/en-us/library/aa561924(v=bts.10).aspx
This link provides you with some good advice on how to set these properties.
More specifically, if you enable the mutual auth required option, take a look at this paragraph:
If either the Mutual Authentication Required or the Incoming Caller
Authentication Required configuration options are enabled then the
client(s) computer account must be granted the Access this computer
from the network user right. If the computer account for a client
computer is not granted the Access this computer from the network user
right, or is included in the Deny access to this computer from the
network user right, then DTC communication between the client and
server computer will fail.
Typically I always set no auth. It might be worth it to try the setting and see if this makes it work. Also be aware that MSDTC settings need to be the same across your BizTalk and SQL servers, including your MSDTC cluster (IIRC: if you have a windows 2008 R2 msdtc cluster).

Access SQL Server 2008 R2 from a remote location

I have remote access enabled in SQL Server at my work network, which is on my "server". In the office, I have my desktop machine which I can use SQL Server Management Studio to access - no problems. I can use telnet [LOCAL_IP] 1433 with no problems.
When I am at home, I want to access the SQL Server too. I can PING [EXTERNAL_IP] address to the office fine (which is a router), but can't telnet [EXTERNAL_IP] 1433. So my machine can't access it when using SQL Server Management Studio.
I thought it was a router firewall issue, I have modified the router firewall to let my IP address through on TCP and UDP on ports 1433 and 1434 both source and destination. I've also tried letting my home IP through on all ports too, and still nothing. I've also tried to disable the firewall on the windows server at work.
I can set up RDP fine though....so I am thinking something I don't know about in SQL Server is the problem.
Does anyone have any suggestions to try please?
Thx

Sql Server Times Out Twice - Connects on 3rd Attempt

I have a WinForms application installed on multiple PCs in an office, and a SQL Server 2012 Express database on the server to which the client application connects.
Each machine fails to connect on the first two attempts giving an error -
Timeout Expired: The timeout period elapsed prior to the completion of the operation or the server is not responding.
However, it always works on the 3rd attempt on all machines!
The server is SBS 2008, the machines are running Windows 7.
The issue was I had used a Named Instanced on SQL Server which by default uses dynamic ports. Hence each connection attempt used a different Port, and each time I was asking the server administrator to allow additional ports. The successful log ins where simply because the dynamic port chosen just so happened to be one previously allowed.
The answer was to use SQL Server Configuration Manager to remove the dynamic port setting and specify a single port to use for all connection attempts, and ensure firewalls etc had an exception for that particular port.

SSRS Reporting Services

I have been trying for SSRS 2008R2 reports access from my one of the server which are delpoyed on it (O.S windows 2008 R2 server) to my web
application which is hosted on another server ..
I tried by using reportviewer and by passing the server credentails.
I am getting an error :
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IPAddess:80
plzz can any one help me..
Looks more a firewall port blocking problem to me.
Can you open the report server via http://yourserver/reports on the machine itself?
If so then check your firewall settings on the server. On default they block all incoming port in "domain", "public" and "private".
EDIT:
Checkout the screenshot for firewall settings (german, but english gui is the same location)