Anyone have an idea about how to use sp_helptext to view a stored procedure on a linked server? basically something like this. I don't have the credentials to that linked server to look at it.
任何人都知道如何使用sp_helptext在链接服务器上查看存储过程?基本上是这样的。我没有该链接服务器的凭据来查看它。
EXEC sp_HelpText '[ServerName].[DatabaseName].dbo.storedProcName'
thanks ahead.
谢谢你。
3 个解决方案
#1
44
Instead of invoking the sp_helptext locally with a remote argument, invoke it remotely with a local argument:
不是使用远程参数在本地调用sp_helptext,而是使用本地参数远程调用它:
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'
#2
0
Little addition in answer if you have different user rather then dbo
then do like this.
如果您有不同的用户而不是dbo那么回答很少,那么这样做。
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText '[user].[storedProcName]'
#3
-2
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。
#1
44
Instead of invoking the sp_helptext locally with a remote argument, invoke it remotely with a local argument:
不是使用远程参数在本地调用sp_helptext,而是使用本地参数远程调用它:
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'
#2
0
Little addition in answer if you have different user rather then dbo
then do like this.
如果您有不同的用户而不是dbo那么回答很少,那么这样做。
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText '[user].[storedProcName]'
#3
-2
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。