manand123


hi mates,

following code works fine in the server machine where sql server exists.

but this doen't run at client machine.

it throws error as "A connection cannot be made. Ensure that the server is running."

help to solve this problem

thanks

Code Snippet

Dim msSvr As New Server

Dim db As New Database

Try

If Not msSvr Is System.DBNull.Value Then

msSvr.Disconnect()

End If

'both connections r not working

msSvr.Connect("Provider=MSOLAP.9; datasource=http://server/olap/msmdpump.dll;Initial Catalog=testolap;user id=sa;password=sa;")

msSvr.Connect("Provider=SQLNCLI.1;Data Source=esERVER;user id=sa;password=sa;")

If Not db Is System.DBNull.Value Then

db.Dispose()

End If

db = msSvr.Databases.Find("testdb")

db.Process(ProcessType.ProcessFull)

db.Refresh(True)

Catch ex As Exception

Console.WriteLine(ex.Message)

Finally

db.Dispose()

msSvr.Disconnect(True)

End Try




Re: problem connecting Remote Analysis service 2005 from vb.net 2005

Darren Gosbell


You seem to be mixing up your API's. You are using an ADOMD connection string, but you appear to be trying to use AMO objects. I have not checked, but I did not think AMO worked over http. Usually you just put the server name in the Connect() method.





Re: problem connecting Remote Analysis service 2005 from vb.net 2005

ak43958

Specifying server name in the connect method throws error

"A connection cannot be made. Ensure that the server is running."

i verfied surface area configuration for Allowing remote connection

everything is ok,

but still i am not able to connect to server.

is there any other way to process the server cube from the client machine






Re: problem connecting Remote Analysis service 2005 from vb.net 2005

Darren Gosbell

This almost sounds like there might be a firewall or something blocking the communication. Are you able to connect and query the cubes from remote machines Are you using a windows account that has permission to process the cube

You can send an xmla command to process the cubes, but you need to be able to connect first.






Re: problem connecting Remote Analysis service 2005 from vb.net 2005

ak43958

Hi Darren,

i am not able to connect analysis service from my sql management studio,

but i could connect datbase engine using sql server authentication and query the db.

when i select server type as analysis service, authentication combo got disabled, couldn't select anything.





Re: problem connecting Remote Analysis service 2005 from vb.net 2005

Darren Gosbell

The authentication combo is disabled because SSAS only supports windows authentication, so all you can choose is which server to connect to.

If you cannot connect this would mean that the account which you are logged in under does not have permission to connect to SSAS.

If you are using a domain account you will need to add that account to a role in the SSAS database. (or add it to the server as a server admin)

If you are not using a domain account, you can work around this by setting up a local account on the server that has the identical name and password as the account that you use to log on to your local machine. (this sort of mapping only works with 2 local accounts - you cannot map a domain account to a local account in this way)






Re: problem connecting Remote Analysis service 2005 from vb.net 2005

Marble

Hi,

Instead of the mirrored local accounts, set up the APP POOL account on your msmdpump website to impersonate a user (I use a service account). If you have not set up the msmdpump website, follow this article:

http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx

-bob-





Re: problem connecting Remote Analysis service 2005 from vb.net 2005

Darren Gosbell

I would usually only set up a very low priviledged account in this manner, if don't require any special secuirty and you are happy for anyone who can connect to the server to see the same thing. But I would not use this method to perform administrative tasks.

It might be possible to set up a second virtual directory in IIS that maps to a different app pool or even set it up with SSL and Basic Authentication and use this for Admin access, but I ususally use the mapped local account approach if I am not on a windows domain.