Sunday, March 25, 2012

Connectivity Issues in AMO

Hi,

I am using AMO to connect to SSAS 2005 and programmatically create objects. currently I am specifying only the ServerName in the connection string. Please see the code below:

<code>

Server SSASServer = new Microsoft.AnalysisServices.Server();
SSASServer.Connect("DataSource=" + ServerName);

</code>

The above code works fine and I am able to connect. Now I want to provide the instance name of the server and also the server name. because tomorrow we will have multiple instances of Analysis server running on the same server. I read somewhere that we need to specify ServerName\InstanceName.

SSASServer.Connect(ServerName + "\\" + InstanceName);

So I tried the above, with both the serverName and InstanceName being the same for now. (currently only one instance is running). but that is not working, whenever I do that I get the error: I also removed the string "DataSoruce=", still I get the same error.

{"A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running."}

1. How to identify the ServerName and the InstanceName?

2. How to specify them in the connection string?

3. Currently I am using Windows Integrated Authentication, how do i specify username and password to connect to SSAS 2005.

Please do provide any information possible.

Thanks and Regards

Vijay R

Connection to the default instance could only be made by using ServerName.

Anything you specify after the '\' will be considered as an instance name. meaning client will try to find an AS named instance with such name.

In your experiment above, it will try to find a named instance and will fail because you dont have it installed.

Get your named instance installed and connect to it using ServerName\InstanceName where InstanceName you provide during setup of Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks a lot Melomed,

That certainly helped me.

But what about specfying the Username and password for connection.

That is if I do not want to use Windows Integrated Authentication for SSAS in AMO.

Regards

Vijay R

|||

When using TCP/IP to connect to Analysis Server , Windows authentication is your only choice.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Melomed,

I was succesful in implementing and executing teh AMO based app that creates Cubes, Dimensions, MeasureGroups, Measures and Partitions.

but I still have the problem of connecting to an named instance of the SSAS server. I now have a named instance of SSAS.

I am also able to conect to it using the BI studio /Visual Studio 2005. After connecting the summary/properties display ServerName\InstanceName.

but when i try this programmatically using AMO, it throws the below error. (the same one!)

{"A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running."}

Here is the code:

string tempConnstring = "DataSource=" + SSASServerName + @."\" + SSASInstanceName;

SSASServer.Connect(tempConnstring);

-

Please do help me as to how I should be doing this?

Thanks and Regards

Vijay R

|||

It is not "DataSource="

But rather "Data Source="

You are missing a space there.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

sqlsql

No comments:

Post a Comment