I need to look at the code for stored procedure msdb.dbo.sp_send_dbmail
in SQL Server. Could someone tell me where to look for the stored procedure in SQL Server Management Studio 2008.
Right there:
As the name already tells you - it's in the msdb
database (which is under the System Databases
), and the stored proc can be found under Programmability > System Stored Procedures
USE msdb;
GO
sp_helptext 'dbo.sp_send_dbmail';
OR
USE msdb;
GO
SELECT definition
FROM sys.sql_modules
WHERE object_id = OBJECT_ID('dbo.sp_send_dbmail');
From the Object Explorer node for your instance expand...
Databases -> System Databases -> msdb -> Programmability ->
Stored Procedures -> System Stored Procedures
Or (having seen Joe's answer) one non UI method
use msdb;
SELECT object_definition(object_id('dbo.sp_send_dbmail'))
AS [processing-instruction(x)] FOR XML PATH('')
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