Question

I've read thoroughly about AdomdConnection but can't find how to set the Connection Timeout in my connection string. My current connection string is as follows:

Data Source=MySSAS;Initial Catalog=MyCatalog

But no matter what I do, any variation of Connection Timeout, ConnectionTimeout, Connect Timeout or ConnectTimeout doesn't seem to change my connection (MSDN)

I observe the connection properties in my debugger and always see the getter value of the ConnectionTimeout as 0:

enter image description here

Needles to say that the property has no setter.

Does anyone know how to set it? I'm only interested in the connection timeout, not command timeout.

Était-ce utile?

La solution

I found the answer over at MSDN - SSAS Client Connection Timeout:

In msmdsrv.ini: <InitialConnectTimeout>10</InitialConnectTimeout>

Perhaps you can verify what SQL does by running a trace when you connect:

enter image description here

Or it maybe even though you are seeing Connection Timeout = 0 in Visual Studio on the client the value on the server could be different.

Also dont forget you could resort to pinging the server for a minute as an alternative to the Connection Timeout setting.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top