Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

How can I use sp_helptext to display a stored procedure on a linked server? Essentially something like the following.

I am not having the credentials to that linked server to look at it.

EXEC sp_HelpText '[ServerName].[DatabaseName].dbo.storedProcName'

1 Answer

0 votes
by (12.7k points)

Rather than invoking the 'sp_helptext' locally using the remote argument, you can invoke it remotely using the local argument:

EXEC  [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'

 Join the SQL Training course now if you want to gain more knowledge in SQL.

Browse Categories

...