– In Object Explorer, connect to an instance of the Database Engine.
– On the toolbar, click New Query.
– In the query window, enter the following statement that uses the sp_helptext system stored procedure. Change the database name and stored procedure name to reference the database and stored procedure that you want.
EXEC sp_helptext N'_SP_MyStoredProcedure'