[英]SQL using sp_HelpText to view a stored procedure on a linked server
Anyone have an idea about how to use sp_helptext to view a stored procedure on a linked server?任何人都知道如何使用 sp_helptext 查看链接服务器上的存储过程? basically something like this.
基本上是这样的。 I don't have the credentials to that linked server to look at it.
我没有该链接服务器的凭据来查看它。
EXEC sp_HelpText '[ServerName].[DatabaseName].dbo.storedProcName'
thanks ahead.提前谢谢。
不是使用远程参数在本地调用 sp_helptext,而是使用本地参数远程调用它:
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'
如果您有不同的用户而不是dbo
那么答案很少。
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText '[user].[storedProcName]'
sp_helptext [dbname.spname] 试试这个
It's the correct way to access linked DB:这是访问链接数据库的正确方法:
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'
But make sure to mention dbo
as it owns the sp_helptext
.但请务必提及
dbo
因为它拥有sp_helptext
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.