Wednesday, October 15, 2014

Analysis services 2012: a connection cannot be made, ensure that the server is running

After the installation of a new SQL Server 2012 with Analysis Services, I found that I could reach the Analysis services database perfectly well when I was remotely logged in on the Server and connected with SSMS locally. When I tried to connect with SSMS from another computer  I received the error message:

A connection cannot be made. Ensure that the server is running. (Microsoft.AnalysisServices.AdomdClient)

On the internet some advice is given about this connection problem.On the server with Analysis Services 2012 the SQL Server Browser must be running under the LOCALSYSTEM account. On my Server the browser service was running under LOCALSERVICE. After I changed this I still could not connect remotely.

Another advice was to try to connect to the Analysis Service using <Servername>:2383, in order not use SQL Server Browser. But I still received the same error message.

Finally it dawned to me that the firewall was probably blocking this port. On the Server with Analysis Services 2012, open ‘Windows Firewall with Advanced Security’ and add a new inbound rule, for TCP port 2383, to allow the connection in the Domain. This rule is similar as the rule one must setup for SQL Server Service in port 1433.

open ‘Windows Firewall with Advanced Security’

Select Inbound Rules, In Actions, click on ‘New Rule…’

image

In the New Inbound Rule Wizard, Rule Type, select Port, click Next

image

In the Protocols and Ports, Select ‘TCP’, Specific local ports, type ‘2383’, click Next

image

In Action, Select ‘Allow the connection’, Next

image

In Profile, check only ‘Domain’ (because I only want to grant access from my corporate domain). Next

image

In Name, type the name: ‘Sql Server analysis service port’ (or some other name that allows you to recognize your inbound rule). Finish.

image

As soon as the Inbound rule is created, the connection from another computer to the analysis service will work.

1 comment:

Unknown said...

Hi, I'm trying to connect my SQL Server data base with Visual Studio, but no way. I've tried everything you wrote and still same error:

"Unable to connect to localhost: A connection cannot be made. Ensure that the server is running."

I don't know what to do.