I need to get the content(statements) of a stored procedure on databaseA and in serverA, i am using sql server
Select Routine_name, Routine_Definition From Information_Schema.Routines Where Routine_Name = "YourStoredProcedureName"
use DATABASE_NAME select [name], [text] from sysobjects SO join syscomments SC on SO.id = SC.id where xtype = 'P'
use databaseA go sp_helptext 'YourProcedure' go