Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

cdosysmail works for a few days then stops Expand / Collapse
Author
Message
Posted Thursday, February 7, 2013 5:07 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 1, 2014 10:09 PM
Points: 21, Visits: 76
Guys ... Tell the solution of the original question?

Post #1417395
Posted Thursday, February 7, 2013 8:53 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:51 PM
Points: 7,140, Visits: 12,763
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
Post #1417444
Posted Thursday, February 7, 2013 9:09 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 1, 2014 10:09 PM
Points: 21, Visits: 76
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
Post #1417451
Posted Thursday, February 7, 2013 9:51 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:51 PM
Points: 7,140, Visits: 12,763
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
Post #1417460
Posted Thursday, February 7, 2013 11:48 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, December 1, 2014 10:09 PM
Points: 21, Visits: 76
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 ?
Post #1417472
Posted Friday, February 8, 2013 6:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:51 PM
Points: 7,140, Visits: 12,763
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
Post #1417666
Posted Friday, February 8, 2013 7:56 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:11 PM
Points: 35,772, Visits: 32,441
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1417715
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse