tags:

views:

31

answers:

3

I need to get the content(statements) of a stored procedure on databaseA and in serverA, i am using sql server

+1  A: 
Select Routine_name, Routine_Definition
From Information_Schema.Routines
Where Routine_Name = "YourStoredProcedureName"
Barry
+1  A: 
use DATABASE_NAME

select [name], [text]
from sysobjects SO join syscomments SC
on SO.id = SC.id
where xtype = 'P'
il_guru
+3  A: 
use databaseA
go
sp_helptext 'YourProcedure'
go
Joe Stefanelli