Michael
Lovely - that works a treat. I'm puzzled though as to what's going on behind the scenes. I suspect my resolution '48 hours later' (see above) was due to a restart of SQL Server.
Thanks
I took these statistics 24 hours after running the mail_delete routines. When I look 48 hours later at the properties of msdb the Space Available is now 4000 meg (it was small before); this has allowed be to shrink the database regaining the space in the two tables in question.
I'm surprised...
Hi
Can anyone come up with a neat where statement to catch overlapping date ranges. My table has a from and to date eg.
ID F_FromDate F_ToDate
1 1-Mar-2008 18-Mar-2008
2 1-Jan-2000 31-Dec-2010
3 10-Mar-2008 01-Apr-2008
4 13-Mar-2008 15-Mar-2008
5 1-Jan-2008 01-Mar-2008
6...
Sorry to come back again, but a related question. Having run above mail delete I am left with table properties as below:
table Data Space Index Space Row Count
sysmail_attachments 2566 MB 0.016 MB 70
sysmail_attachments_transfer 2131...
The answer is:
DECLARE @GETDATE datetime
SET @GETDATE = GETDATE()
EXECUTE msdb.dbo.sysmail_delete_mailitems_sp @sent_before = @GETDATE
to purge them all.
Thanks Denny - you set me on the right track.
Thanks for the reply Denny.
The sys.transmission_queue was empty, but snuffling around the other system views I notice that
select * from msdb.dbo.sysmail_mailattachments
seems to indicate that my attachments are being retained of successfully sent items.
How do I go about purging these...
.... I should add a reference to my other thread which may or may not be relevant (thread962-1446671). This was to do with email attachments that were dumped in a temporary folder, which I manually deleted. Are these attachments also stored in msdb? If so, where?
Thanks
Hello
Our SQL server 2005 msdb database is growing at rate of 100 Meg per day and is currently 4844 Meg.
Having looked at thread962-1142670 I can discount dts packages (none in use), and backupset (1325 records). Job history is 999. I'm struggling to find a table with a large number of...
Thanks Paul
Yes I can do that.
Why does Database mail leave them in the first place? For example, we don't expect to clean up Tempdb after it has run some queries. Is there a reason why they are allowed to build up?
Curious really
Many Thanks
Robert
Hi
We recently started to use Database Mail to send information packs to our clients (pdf attachments). The emails + attachments are sent without a problem. I have subsequently noticed that the attachments are being saved on the C drive causing space issues - for example:
C:\Documents and...
Hi
Is it possible to change the default font and font size settings for emails sent using 'Database Mail' with 'Text' as the value for the @body_format parameter.
Many Thanks
Just a quick question - how do you go about loading workstation components onto a Win32 PC where the SQL Server itself is x64?
I can't use the x64 setup disk on my XP (Win32) workstation.
Thanks in advance
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.