Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top