SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


cdosysmail works for a few days then stops


cdosysmail works for a few days then stops

Author
Message
bbsec2k
bbsec2k
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 107
Guys ... Tell the solution of the original question?
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15031 Visits: 14396
If you're on SQL 2008 implement Database Mail.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
bbsec2k
bbsec2k
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 107
Thanks SSCertifiable

Unforgettably, we are still stuck with SQL Server 2005 for next 6 months. Is there any resolution of this issue in SQL 2005.

Cheers
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15031 Visits: 14396
No problem Grasshopper :-) Database Mail is available on SQL 2005 but there is a limitation when it comes to setting the from or reply to addresses dynamically. If that is not an issue for you then I would switch to Database Mail.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
bbsec2k
bbsec2k
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 107
That's the main reason we are using cdosysmail in once of our project. Database mail doesn't do this. We have plans to move to database mail once we get SQL 2008.

In the mean time do we have any solution for this bug ?
Orlando Colamatteo
Orlando Colamatteo
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15031 Visits: 14396
The fact that it works for a while and then starts having trouble is the odd part. Everything I am seeing online talks about it never working at all when you see that error.

I am assuming the server is 32-bit? Are you having any other symptoms besides this? Have you checked to make sure your VAS reservation is not fragmented by the time this starts happening? Does restarting help? Is it happening now? What does this say on your server?

WITH    VASummary(Size, Reserved, Free)
AS (
SELECT Size = VaDump.Size,
Reserved = SUM(CASE (CONVERT(INT, VaDump.Base) ^ 0)
WHEN 0 THEN 0
ELSE 1
END),
Free = SUM(CASE (CONVERT(INT, VaDump.Base) ^ 0)
WHEN 0 THEN 1
ELSE 0
END)
FROM (
SELECT CONVERT(VARBINARY, SUM(region_size_in_bytes)) AS Size,
region_allocation_base_address AS Base
FROM sys.dm_os_virtual_address_dump
WHERE region_allocation_base_address <> 0x0
GROUP BY region_allocation_base_address
UNION
SELECT CONVERT(VARBINARY, region_size_in_bytes),
region_allocation_base_address
FROM sys.dm_os_virtual_address_dump
WHERE region_allocation_base_address = 0x0
) AS VaDump
GROUP BY Size
)
SELECT SUM(CONVERT(BIGINT, Size) * Free) / 1024 AS [Total avail mem, KB],
CAST(MAX(Size) AS BIGINT) / 1024 AS [Max free size, KB]
FROM VASummary
WHERE Free <> 0;



__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87092 Visits: 41113
I actually haven't run into this particular problem with CDOSYS but have run into similar problems because someone forgot to destroy the sp_OA* objects that were created. Make sure that your CDOSYS proc has something like the following near the end and that it actually is being executed. It may or may not be the solution to your particular problem but I've found that a lot of people forget to do this so it's a good check to make anyway.

--===== Close the email object (helps prevent memory leaks)
EXEC @Result = dbo.sp_OADestroy @objEmailID;
IF @Result <> 0 OR @@ERROR <> 0 THEN RAISERROR('ERROR: Failed to destroy mail object on exit',16,1) WITH NOWAIT;



--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search