cupcakes, htpc, c#, ramblings, kittens, puppys, cooking, makeup!!

Archive for the ‘work’ Category


Bye bye

Apr 7, 2009 Author: laura | Filed under: bad times, geek, good times, work

Bye bye to my work and my workmates.. it has been cool working with everyone from BCM.. I certainly have learnt a few things that I will take with me ;) .. hehe… I will miss you all.

byebye
byebye2
byebye3

SSIS Send Mail Task Useless Error messages

Jan 7, 2009 Author: laura | Filed under: geek, work

I have spent ages trying to figure out why I am getting this adequately useless error message:

Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: “Failure sending mail.”.
Task failed: Send Mail Task

Msdn provides a list of Integration services error and warning message definitions here, but check out the definition for this one:

DTS_E_ERROROCCURREDWITHFOLLOWINGMESSAGE An error occurred with the following error message: “%1″.

Wow.. an error occured with the following message, failure sending mail, so amazingly descriptive.

Anyway you know you are doing something severely wrong when you do a google search on SMTP Error: 0xC002F304 and only get back about 2 releveant results, and sure enough I was doing something majorly wrong.  Eventually I got so frustrated with the Send Mail task and its complete lack of error debugging information I decided to use the script task to see if that would give me any more.

So I added a new script task and ew put some VB code in and that gave me a different error that was no more descriptive than the last. Anyway that motivated me to open Visual Studio and try the same in goold old C# and sure enough…

sendmaill

My SMTP server was unable to relay to the recipient I had chosen (my personal email). Switched it to my work email and BOOYA all go.

I have already done a similar post on this but the basics are:

  • turn on delay validation so you don’t have to enter an email address in the *to* field -> you can use expressions to read it from a table or recordset etc
  • configure your exchange server like so
  • Launch your Exchange System Manager
  • Navigate to your server -> Administrative Groups -> Admin Group -> Server Name -> Protocols -> SMTP
  • Right click on the “Default SMTP Virtual Server”
  • Click the access tab
  • Press the Relay button and add the IP of the machine that wishes to use this as their SMTP server.
  • Fun times.

sending mail for each row in a table (SQL 2005)

Aug 8, 2008 Author: laura | Filed under: computing, geek, work

You would think this would be quite a simple task right. It probably is if you are some SQL guru I imagine, this whole sending mail from a db is a new concept to me, and I may have missed something very basic (wouldn’t be the first time, and certainly not the last).. it does not seem to be all that straight forward.

My first thought was to go with Database Mail. Well, Database Mail is nice enough, I set it all up nicely following the msdn walkthrough here, the test email fired off fine.. I thought all was good and well until I thought my problem through a bit further. I will have a recordset where each row is associated with someone to email with information in that row. So to use the sp_send_dbmail procedure would involve some kind of cursor/crazy stored procedure that I just wasn’t all that keen on writing. Like I said. Im no SQL guru.

So then one of my collegaues said what about Notification Services. I thought, hey cool, I love the BI tools that come with SQL 2005 (especially reporting services <3) and Notification Services I would love to learn about. So I spent 20 mins googling it and then I find out Notification Services does not ship with SQL 2008. Well that kind of pissed me off a bit because I didnt want to implement some solution that would get scrapped in a few months when we upgrade to SQL 08. Not that my workplace is likely to do that anytime soon.. haha.
Anyway, so then I discovered this awesome, and I mean awesome tutorial that basically explains to do exactly what I wanted. One thing I have learnt though, is that delaying validation on the send mail task will allow you to set the ToLine property using an expression. This is the perfect solution for my problem, and means that for every row in the table/recordset I can send a new email to the required person with information from that row.

Send Mail Task Editor To Line Configuration

Another caveat was that to get exchange to act as a SMTP relay so you can fire off the Send Mail task you need to tweak the default settings a bit. The official word on how to do that is here, basically just add the IP address of your Exchange server to the Relay settings in your exchange system manager.

Now I can spam emails to my co workers when I test this on Monday :D

dulce de leche fudge brownies.

May 17, 2008 Author: laura | Filed under: brownies, chocolate, geek, work

Studying for exams puts me in 2 moods. Grumpy being the main one, I severely dislike my after-work free time being taken up by reading code and cramming in properties/method names I will possibly never use. Hungry a close contender – a problem easily resolved by a spot of stress-reducing baking.

(more…)