I wanted to create a linked server from SQL Server 2005 to SQL Server 2000 and got the following error when I tried to query the remote server.
So after some initial research found that there is a Microsoft support page for this error but requires SP3 or higher on the 2000 instance and also requires us to run a particular SQL file called 'instcat.sql in the INSTALL directory for MSSQL. But such a change would require backups of the master database. In case something went wrong.
Ref : http://connect.microsoft.com/SQLServer/feedback/details/465959/unable-to-query-linked-sql-server-2000
So I found this small workaround with less hassles.
Just create the following Stored Procedure and GRANT EXECUTE to the Public.
Hope this helps........
OLE DB provider "SQLNCLI10" for linked server "XXXXXX" 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 "SQLNCLI10" for linked server "XXXXXX". The provider supports the interface, but returns a failure code when it is used.
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "XXXXXX". The provider supports the interface, but returns a failure code when it is used.
So after some initial research found that there is a Microsoft support page for this error but requires SP3 or higher on the 2000 instance and also requires us to run a particular SQL file called 'instcat.sql in the INSTALL directory for MSSQL. But such a change would require backups of the master database. In case something went wrong.
Ref : http://connect.microsoft.com/SQLServer/feedback/details/465959/unable-to-query-linked-sql-server-2000
So I found this small workaround with less hassles.
Just create the following Stored Procedure and GRANT EXECUTE to the Public.
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
GO
Hope this helps........
THANK YOU FOR THE INFORMATION, SO GREAT WORK, FUNCIONO GENIAL, CON UN ERROR MUY SIMILAR,
ReplyDeleteYou are most welcome.
DeleteHello,
ReplyDeleteLooks like very interesting, on wich server / database should I create / execute this SP ?
Thanks !
On second thoughts, create this procedure on SQL 2000 master database
DeleteDon't forget to grant execute on this SP to the user.
DeleteGRANT EXEC ON sp_tables_info_rowset_64 TO PUBLIC
Valeu mano, exatamente o que eu precisava!
ReplyDeleteEstá muito bem-vindos
DeleteThanks that works perfectly!
ReplyDeleteHi there,
ReplyDeleteThanks so much for your sharing first, however, I found NO sp_tables_info_rowset system stored procedure on SQL Server 2000 machine which will cause sp_tables_info_rowset_64 to fail. Any idea?
Did you look in the master database? I forgot to put a USE DB in the TSQL.
ReplyDeleteSuper!!! Thanks.
ReplyDeleteWonderful! Thank you for posting this...
ReplyDeleteThanks! Save me a lot of time.
ReplyDeletenice workaround and works like a charm .. thanks a lot for sharing
ReplyDeleteSavior !!
ReplyDeleteThanks alot, u saved my life
ReplyDeleteThis Worked Perfect....we have been struggling with this for Dayzzzzzzzz!!!
ReplyDeleteThank you very much legend worked perfect
ReplyDeleteThanks a lot! Mucho bueno! ;)
ReplyDeleteHOla amigo que es lo que hace esté procedimiento, no lo logro comprender del todo, mi pregunta va porque lo he usado y funciona perfectamente, pero para poderlo utilizaar me han pedido que justifique porque es necesario usarlo tienes alguna idea ?? gracias de antemano un cordial saludo.
ReplyDeleteAwesome! Thanks.
ReplyDelete