SQL Server 2005でメールを送信する機能
SQL Server 2005のメール送信機能の概要
SQL Server 2005でメールを送信:
SQL Server 2005でメールを送信:
- EXEC msdb.dbo.sp_send_dbmail
- @profile_name = 'test',
- @recipients = '[email protected];[email protected]',
- --@recipients = '[email protected]',
- @body = ' msdb.dbo.sp_send_dbmail , , ',
- @subject = ' sql ',
- @query = ' select =name, =case xtype when ''S'' then '' '' else '' '' end from sysobjects where xtype in(''U'',''S'') ',
- @attach_query_result_as_file = 1,
- @query_attachment_filename = 'Results.txt';