?
Solved

XPSMTP Multithreading?

Posted on 2006-07-12
9
Medium Priority
?
278 Views
Last Modified: 2008-02-01
We've used the xpsmtp dll to automate the sending of html emails from within SQL Server 2000 and really like it.  We've noticed outgoing emails take about 30 seconds or so per message to transmit... which is fine for our purposes right now.  But we expect user volume for this system to grow in the coming weeks and are a little concerned about transmit times.  We're wondering, is there any way we could multithread it without destabalizing the server?
0
Comment
Question by:ruavol2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
9 Comments
 
LVL 12

Accepted Solution

by:
Einstine98 earned 1500 total points
ID: 17094845
you shouldn't use your SQL server as a mailing server... from your description this is what you are trying to do...
0
 

Author Comment

by:ruavol2
ID: 17138750
Response from the creator of XPSMTP:

The XP is completely thread safe, this is a requirement for XP's since the SQL Server scheduler pre-empts to execute the entrypoint in the DLL.

This is also one of the reasons why you see the slowness, because the XP is fully stateless, the socket connection is created and teardown every invocation.

I have been experimenting with keep them around, but I never implemented in the version that is shipping, also because of security concerns when the socket is authenticated, I need to reset that as well.
0
 
LVL 12

Expert Comment

by:Einstine98
ID: 17143868
Thanks for the update, but the reality of it, emails out of SQL server should be used for "alerts" not as a full fledge email server... if you have a need for sending messages based on data in SQL server you should create an application that would use a normal mailing server... so the application would act as a middleware extracting your data and mailing it...
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17147126
Also, while you may not have liked the response a "C" grade was not merited.  Please taje the time to re-read the EE Guidelines at:

What's the right grade to give?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi73
0
 

Author Comment

by:ruavol2
ID: 17149140
My apologies... my understanding was that the grades themselves only mattered in that they were used as multipliers to adjust the total points awarded.  I should have read the grading guidlines prior to grading the answer.  I've read online about the grading system more now and I clearly should have awarded this answer a "B".  Is there a way I can change the issued grade?

My apologies to Einstine98... there was nothing "wrong" with the answer, it was absolutely correct.  I definitely didn't mean to offend.  I've just seen how much work goes into earning A grades on 500pt questions and felt that awarding 1000 points via the C was fair for a quick (though entirely valid) answer.  When I posted the question, we were working hard to find an answer that addressed what we were doing.  We were aware that using SQL Server to initiate emails was not at all ideal.  I didn't state this in my posted question though... so the response Einstine98 gave was completely appropriate.

In the end, the xpsmtp dll was a quick and convenient fix that has proven reliable (so far - and at low volume), despite its slow processing speed.  In the end, we went the conventional route and set up xp_sendmail using Outlook as the MAPI client (configured to send via POP rather than Exchange).  I had to write a little VB app to periodically open and close the Outlook client, as we have only been able to initiate xp_sendmail when the mail client is closed?!?

Anyway, I do appreciate Einstine98's response and will revise to a B grade if possible as soon as I figure out how.  In the future I will grade according to guidlines.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17150114
>>Is there a way I can change the issued grade?<<
Sure.  See here:

Can I get a grade changed?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi18

And I thank you for your response, not everyone is as appreciative.
0
 

Author Comment

by:ruavol2
ID: 17150758
I have posted a request for a change to the grade:
http://www.experts-exchange.com/Community_Support/Q_21926690.html
0
 
LVL 12

Expert Comment

by:Einstine98
ID: 17151926
Thanks for you both but I don't do it for the points and I don't mind any grade you feel is appropriate... so, no offence taken! and I'm always glad to have helped!
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question