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.
EXEC sp_HelpText '[ServerName].[DatabaseName].dbo.storedProcName'
thanks ahead.
Using SQL Server Management StudioIn Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand Databases, expand the database in which the procedure belongs, and then expand Programmability. Expand Stored Procedures, right-click the procedure and then click View Dependencies.
Both stored procedures and distributed queries are allowed against linked servers; however, only stored procedures are allowed against remote servers.
Using SQL Server Management StudioExpand Stored Procedures, right-click the procedure and then select Script Stored Procedure as, and then select one of the following: Create To, Alter To, or Drop and Create To. Select New Query Editor Window. This will display the procedure definition.
In Object Explorer, connect to an instance of the SQL Server Database Engine, expand that instance, and then expand Databases. Expand the database that you want, expand Programmability, and then expand Stored Procedures. Right-click the user-defined stored procedure that you want and select Execute Stored Procedure.
Instead of invoking the sp_helptext locally with a remote argument, invoke it remotely with a local argument:
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'storedProcName'
sp_helptext [dbname.spname] try this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With