sp_configure 'Database Mail XPs', 1; lieferte die Fehlermeldung, dass die Option 'Database Mail XPs' nicht verfügbar ist - advanced options müssen auch eingestellt werden:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Database Mail XPs', 1;
GO
RECONFIGURE
GO
nützliche Stored Procedures und Views:
exec msdb.dbo.sp_send_dbmail @profile_name='dbmp',@recipients='x@y.z',@body='test body',@subject='test header'
exec msdb.dbo.sysmail_start_sp
exec msdb.dbo.sp_SendMailQueues 'test'
SELECT * FROM [msdb].[dbo].[sysmail_log]
SELECT * FROM msdb.dbo.sysmail_allitems -- This view allows you to return a record set that contains one row for each email message processed by Database mail.
SELECT * FROM msdb.dbo.sysmail_event_log -- This view returns a row for each Windows or SQL Server error message returned when Database Mail tries to process an email message.
SELECT * FROM msdb.dbo.sysmail_faileditems -- This view returns one record for each email message that has a status of failed.
SELECT * FROM msdb.dbo.sysmail_mailattachments --This view contains one row for each attachment sent
SELECT * FROM msdb.dbo.sysmail_sentitems -- This view contains one record for every successfully email sent
SELECT * FROM msdb.dbo.sysmail_unsentitems –
weitere Infos
No comments:
Post a Comment