none
从sqlserver2014通过iis链接到SSAS数据库 链接服务器报错. RRS feed

  • 问题

  • SSAS 服务器 :S

    另一台SQL DB  :B

    从B用ssms连接s成功,且可以查询cube.

    但从B建立链接服务器到S,则提示下面的消息.

    我在C,D等其它Sqlserver服务器链接到S均成功.而且把链接服务器的脚本弄到B上面重新创建链接到S.也失败.信息同样如下.

    我把B上面的链接服务器脚本放到C,D等服务器上面创建链接,也能成功链接到S.

    求大神帮忙分析下原因.

    ===================================

    The test connection to the linked server failed.

    ===================================

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------
    Program Location:

       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(String cmd)
       at Microsoft.SqlServer.Management.Smo.LinkedServer.TestConnection()
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LinkedServerConnectionTest.Invoke()

    ===================================

    Cannot initialize the data source object of OLE DB provider "MSOLAP" for linked server "ssas_Cube1".
    OLE DB provider "MSOLAP" for linked server "ssas_Cube1" returned message "内部错误: 出现错误(文件“ pcxmlaclient.cpp”,第 280 行,
    函数“PCXMLAClient::PrepareForMessage”)。". (.Net SqlClient Data Provider)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.4427&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476

    ------------------------------
    Server Name: bi_svr
    Error Number: 7303
    Severity: 16
    State: 1
    Procedure: sp_testlinkedserver
    Line Number: 1


    ------------------------------
    Program Location:

       at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

    2016年4月8日 2:00

全部回复

  • Do you have LS script?
    2016年4月8日 2:23
  • 这是linkserver的创建脚本.

    USE [master]
    GO

    /****** Object:  LinkedServer [SSAS_Cube]    Script Date: 2016/4/8 10:27:28 ******/
    EXEC master.dbo.sp_addlinkedserver @server = N'SSAS_Cube', @srvproduct=N'OLAP', @provider=N'MSOLAP', @datasrc=N'http://110.27.16.8/SSAS/msmdpump.dll', @catalog=N'S_Cube'
     /* For security reasons the linked server remote logins password is changed with ######## */
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'SSAS_Cube',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL

    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'collation compatible', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'data access', @optvalue=N'true'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'dist', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'pub', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'rpc', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'rpc out', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'sub', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'connect timeout', @optvalue=N'0'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'collation name', @optvalue=null
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'lazy schema validation', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'query timeout', @optvalue=N'0'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'use remote collation', @optvalue=N'true'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SSAS_Cube', @optname=N'remote proc transaction promotion', @optvalue=N'false'
    GO

    2016年4月8日 2:27