【SQLServer】The provider supports the interface
一、問題現象
SQLserver上有一個Linkserver,在Management Studio可以展開它,可以看到其連結的schema,但是使用select語句查詢時,會報如下的錯誤:
OLE DB provider "SQLNCLI10" for linked server "xxx" returned message "Unspecified error".
OLE DB provider "SQLNCLI10" for linked server "xxx" 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 2
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "xxx". The provider supports the interface, but returns a failure code when it is used.
二、原因解析
若要從 64 位 SQL Server 2005 客戶端對 32 位 SQL Server 2000 伺服器進行分散式查詢,則需要使用 SQL Server 2000 SP3 或更高版本。分散式查詢包括對您使用 sp_addlinkedserver 以及 OPENROWSET 和 OPENQUERY 函式定義的連結伺服器項的引用。另外,必須在 SQL Server 2000 SP3 和 SP4 伺服器上手動升級系統儲存過程(也稱為目錄儲存過程)。
如果 32 位例項的 SQL Server 2000 上的目錄儲存過程的版本未更新為隨此 Service Pack 釋出的版本,您將收到以下錯誤訊息:
"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 "". The provider supports the interface, but returns a failure code when it is used.
三、解決方法
1、在32位SQL Server 2000伺服器安裝相應補丁,並升級其系統預存程式
如果是SQL Server 2005,要在 32 位SQL Server 2000 伺服器上安裝 SQL Server 2000 SP3 或 SQL Server 2000 SP4;然後,在 32 位 SQL Server 2000 伺服器上手動執行 SQL Server 2000 SP3 或 SP4 隨附的 Instcat.sql 指令碼。(具體方法參考文末連結)
如果是SQL Server 2008,則必須在32位SQL Server 2000伺服器上安裝SQL Server 2000 SP4;然後,執行Instcat.sql指令碼。
2、使用可替代的SQL語句
SELECT * FROM OPENQUERY(Linkserver, 'select * from ..');
參考文件:
http://blog.itpub.net/9932141/viewspace-521055/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30776559/viewspace-2148164/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CSS3 @supportsCSSS3
- Androidstudio除錯真機提示-Device supports,but APK only supports armeabi rmeabi-v7aAndroid除錯devAPK
- TNS問題排查 The listener supports no services
- The ArrayAccess interface
- interface/介面
- provider之selectorIDE
- golang使用sqlx報錯:unsupported type []interface {}, a slice of interfaceGolangSQL
- Interface中加Static
- Golang之interfaceGolang
- public interface View介面和public interface ViewResolver介面介紹View
- Android中Content ProviderAndroidIDE
- Android Content Provider SecurityAndroidIDE
- Laravel 2.3 Service ProviderLaravelIDE
- Flutter狀態管理Provider(三)基於Provider的程式碼框架FlutterIDE框架
- CHECK_INTERFACE作用
- 如何理解 interface 介面
- Java-介面(interface)Java
- firewalld: 介面interface操作
- Flutter Provider使用指南FlutterIDE
- 自己寫一個ProviderIDE
- Flutter Provider and Streams [翻譯]FlutterIDE
- Go interface實現分析Go
- go interface 的筆記Go筆記
- kubernetes container device interface (CDI)AIdev
- trait in rust, and comparison with interface in javaAIRustJava
- Shooter Game User Interface StarterGAM
- @interface SpringBootTest註解分析Spring Boot
- java中的interface(介面)Java
- Oracle Payment Interface安裝Oracle
- Uncaught Error: Cannot instantiate interfaceError
- Flutter Provider 之 FutureProvider 與 StreamProviderFlutterIDE
- 域滲透——Security Support ProviderIDE
- Flutter Provider 3.0實戰教程FlutterIDE
- Flutter Provider狀態管理框架FlutterIDE框架
- provider for back&restore app datyaIDERESTAPP
- Half-edge 3D mesh in python/cython. Supports dynamic manipulation operators.3DPython
- Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.C++Compile
- sqlserver docSQLServer
- sqlserver 拆分SQLServer