Configuring Database Mail in Sql Server 2005

I want to send a e-mail using msdb.dbo.sp_send_dbmail but I don’t know how to configure Sql Server 2005 so that it will work.  That was my delimma.  Oh, I googled it.  But everything I read said “Click on Management and then click on Database Mail and follow the wizard.”  For those of us coming from a Oracle background that was a little vague.  The trouble was the answer was right in front of my face.  Microsoft Sql Server Management Studio has a view called Object Explorer.  It is the tree window on the right by default when Management Studio opens.  Towards the bottom there is a node labeled “Management”.  Well, what do you know.  I opened it and found Database Mail.  I walked through the wizard and set up my SMTP server.  I did the test offered by right clicking on Database Mail but no test e-mail came to my configured account.  I realized I had the wrong password and tried again.  No, luck.  It then occured to me that the wizard wasn’t updating the profile.  I deleted the profile put it in correctly and it worked.  Oh, and I have forgot to mention I had to use the Surface Area Configuration application to enable Database Mail.  Once that was all done.  I could look at the log of what was happening by right clicking on Database Mail and I could write queries on msdb like these to check how things were going include what was sent:

SELECT * FROM msdb.dbo.sysmail_allitems order by mailitem_id desc;

SELECT * FROM msdb.dbo.sysmail_event_log WHERE mailitem_id = 4 ;

It was frustating not finding the information I needed and being blind to the obvious.  I hope this helps other avoid my mistakes.  I’d be glad to answer any question if you will comment on the post.

I’m Bugged – My experience with the Bodybugg by Apex

I decided it was time to lose some weight. My wife was doing great. She was just about back to her weight when we were first married. I on the other hand was far from it. I decided I wanted to slim down too. The trouble was I don’t like doing aerobics and I don’t get out much. Its true I’m a computer geek. Hey! Its my job! A fellow co-work had recently got the Bodybugg and had lost 4 pounds a week for 2 weeks straight.  His life style was far more active then mine but what he told me about the Bodybugg was enough to interest me.  After searching high and low for coupon I could find none.  The watch and the armband were $350 on Apex.com.  I found them for $50 cheaper at 24hourfitness.com.  I decided it would be a good idea to get the watch because the web site you use with the armband is subscription based.  Yes!  You get 3 months free and then they want you to pay something like $45 a month after that to use it.  Without the watch the armband is useless if you don’t want to pay the subscription fee.  I bit the bullet and paid the $300.  I figured if it will help me to live healthy now the $300 investment will save me thousands in the future on medical bills.  My Bodybugg arrived and my life changed.  It wasn’t to hard to set up and there was a free coaching session to help me get started logging my calories and understanding the website.  I have had it for 1 month now and lost 9 poundsI always throught I didn’t have the will power to diet.  The truth was I didn’t have the feedback I needed to diet.  Once I could truly see how many calories I was consuming and burning I really could take control.  I’m not saying it was a breeze.  I haven’t changed my activity and I have changed my eating habits.  I don’t eat as much now.  I have never gone hungry for more then a day in my life.  The first two weeks were the hardest.  I felt hungry day and night.  Because I choose not to increase my activity the only other way to lose weight was to cut back on what I was eating.  I did.  It was eye opening.  Over all I love my Bodybugg.  I’ll continue to use it with the watch longer after the subscription expires.  My goal is to reach the weight I’ve set for myself by the new year.  Tune it to see if I make it through the Thanksgiving and Christmas holidays.