我使用MSOLAP提供程序连接Analysis Server。因此,我创建了一个下面的连接字符串,并尝试建立从app / web服务器到SSAS服务器的连接
连接字符串
Provider=MSOLAP.2; Data Source=172.16.53.3; Initial Catalog=Myyres;
使用的代码段
AdomdConnection objAdomdConn = new AdomdConnection();
objAdomdConn.ConnectionString = a_strConnSting;
objAdomdConn.Open();
错误发生
"无法建立连接。确保服务器正在运行。"
堆栈跟踪输出
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection+IXmlaClientProviderEx.ConnectXmla()
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
at StackOverflow.AdoMD.button1_Click(Object sender, RoutedEventArgs e)
当我在SSAS服务器上运行时,相同的代码正在运行。我只是在从app \ web服务器调用到SSAS服务器
时才收到错误答案 0 :(得分:0)
预期的连接字符串是
connectionString =“Data Source = ServeName; Integrated Security = SSPI; Initial Catalog = DBName;”;
要连接Windows身份验证,请添加“Integrated Security = SSPI;”在连接字符串中 要连接SQL身份验证,请添加“User ID = userID; Password = pwd;”在连接字符串
中