【SQLServer】Server ‘SERVERNAME’ is not configured for RPC
I recently was doing some development on my local machine and needed to pull data from a linked server. I set up the linked server and everything was working great. Executing queries to pull the data to my machine was fine, but a problem arose when I needed to execute a stored procedure from the other server.
First of all, to call a stored procedure from a linked server you need to use a four part qualifier.
EXEC ServerName.DatabaseName.Owner.StoredProcedure PARAMETERS
Using AdventureWorks2008 on the server MYPROD would look like this:
EXEC MYPROD.AdventureWorks2008.dbo. uspGetBillOfMaterials 1, ‘01/01/2008’
The error I ran into when I tried to execute the stored procedure was this: ‘Server ‘SERVERNAME’ is not configured for RPC.’ There could be a couple of issues with this. The easiest one to check is to see if the linked server was configured to allow RPC. If you open the linked server properties and go to the Server Options tab, there is an option for RPC and RPC Out. RPC Out needs to be set to True in order to execute a stored procedure that is stored on the linked server. RPC allows stored procedure call from the linked server whereas RPC Out allows stored procedure calls to go out to the linked server.
The other thing to check is if the server is even configured to allow RPC. To check this run sp_helpserver and it will display a list of settings in the STATUS column. If you do not see RPC, RPC Out listed there they are not enabled and setting your linked server up correctly won’t help the situation any. If they are not listed and you would like to enable them the following commands will do that. Again, using our MYPROD server example:
exec sp_serveroption @server=’Linkserver_name’, @optname=’rpc’, @optvalue=’TRUE’;
exec sp_serveroption @server=’Linkserver_name’, @optname=’rpc out’, @optvalue=’TRUE’;
From now on, as long as everything is configured correctly, you will be able to execute stored procedures to and from linked servers.
Reprinted from :
http://www.bradleyschacht.com/server-servername-is-not-configured-for-rpc/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30776559/viewspace-2148161/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RPC:authentication error:why = server rejected credentialRPCErrorServer
- Sqlserver 如何truncate linked server的表SQLServer
- sqlserver建立linked server到redshift的方法SQLServer
- sql server日期格式 sqlserver的日期格式SQLServer
- Apache 虛擬主機裡的 ServerName 指令ApacheServer
- SQLServer 2017 install for Windows server 2012_問題彙總SQLServerWindows
- Spring Boot Configuration Annotation Processor not configuredSpring Boot
- Poster stopped: message is larger than configured max size
- SQL Server 2014的資料庫引擎新增功能(參考sqlserver官方文件)SQLServer資料庫
- Sqlserver 登入報錯Server is in script upgrade mode(Error 18401)的解決方法SQLServerError
- template might not exist or might not be accessible by any of the configured Template Resolvers
- 【Bug解決】Spring Boot Configuration Annotation Processor not configuredSpring Boot
- sqlserver的waitresource等待事件是linked server連結伺服器的問題SQLServerAI事件伺服器
- [RPC]RPC
- postgresql端使用tds_fdw建立訪問sqlserver的linked server的操作說明SQLServer
- Sqlserver linked server指向Excel報錯編號為7399和7303的解決方法SQLServerExcel
- dubbo啟動多個服務失敗 com.alibaba.dubbo.rpc.RpcException: Fail to start serverRPCExceptionAIServer
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not availableUITLSPythonAI
- The Tomcat connector configured to listen on port 80 failed to start. The port may already be inTomcatAI
- Go RpcGoRPC
- PoS RPCRPC
- 生成 rpcRPC
- 【資料庫資料恢復】windows server下SqlServer資料庫的資料恢復資料庫資料恢復WindowsServerSQL
- sqlserver docSQLServer
- sqlserver 拆分SQLServer
- SQLserver With As 用法SQLServer
- WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.UITLSPythonAI
- golang RPC 應用(1) :net/rpc的應用GolangRPC
- 螞蟻 RPC 框架 SOFA-RPC 初體驗RPC框架
- websocket與RPCWebRPC
- mq和rpcMQRPC
- RPC介紹RPC
- rpc協議RPC協議
- RPC詳解RPC
- RPC的概述RPC
- go語言實現自己的RPC:go rpc codecGoRPC
- Android Studio Git No tracked branch configured for branch branch_name or the branch doesn't existAndroidGit
- SQLSERVER SELECT(zt)SQLServer
- SqlServer 操作 JSONSQLServerJSON