Search This Blog

Wednesday, September 24, 2008

Linked server from SQL 2005 to SQL 2000

Linked Server from SQL 2005 to SQL 2000 failed with the following error:
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server.The provider supports the interface, but returns a failure code when it is used. [SQLSTATE 42000] (Error 7311) OLE DB provider "SQLNCLI" for linked server returned message "Unspecified error". [SQLSTATE 01000]
(Error 7412) OLE DB provider "SQLNCLI" for linked server returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.". [SQLSTATE 01000] (Error 7412).

Solution to this would be to check whether SP4 is installed on SQL 2000 Server , if not install the same.

If SP4 is already installed and still you receive the error , then please run the below mentioned wrapper procedure in SQL 2000 master database.

create procedure sp_tables_info_rowset_64
@table_name sysname,
@table_schema sysname = null,
@table_type nvarchar(255) = null
as

declare @Result int set @Result = 0
exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type

3 comments:

Anonymous said...

I just had this problem moving some code from the a test 2005 environment to the live 2005 server. Both were connecting to the same 2000 server. The difference is that the Live 2005 server was 64 bit.
Thanks for the fix Ganesh.

Mike

Paw said...

Nice Blog.
Gives lot of information.
thanks.
:)

Anonymous said...

Thanks - that worked.