none
DBLINK出错 RRS feed

  • 问题

  • A机器是64位的SQLServer 2005 SP3,B机器是32位的SQLServer 2000 SP4.

    在A级器上创建到B机器的DBLINK,创建OK。

     
    /****** Object:  LinkedServer [B]    Script Date: 09/16/2011 10:47:47 ******/
    EXEC master.dbo.sp_addlinkedserver @server = N'B', @srvproduct=N'SQL Server'
     /* For security reasons the linked server remote logins password is changed with ######## */
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'B',@useself=N'False',@locallogin=NULL,@rmtuser=N'dba',@rmtpassword='########'

    GO

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

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

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

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

    EXEC master.dbo.sp_serveroption @server=N'B', @optname=N'rpc', @optvalue=N'true'
    GO

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

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

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

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

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

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

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

    但是当执行select * from B.dbname.dbo.tablename的时候,就报错。

    OLE DB provider "SQLNCLI" for linked server "NEO05" returned message "Unspecified error".
    OLE DB provider "SQLNCLI" for linked server "NEO05" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".
    Msg 7311, Level 16, State 2, Line 1
    Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "NEO05". The provider supports the interface, but returns a failure code when it is used.

    在网上查找了下资料,Microsoft TechNet中写道:

    需要执行SQLServer 2000那边的一个 instcat.sql.

    难道就只有这样吗?


    If you haven't all the things you want,be grateful for the things you don't have that you didn't want.
    2011年9月16日 3:04

答案

全部回复