| Author |
Topic |
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 13:55:24
|
| Can anyone tell me about the sql job run?well, i have to run one sql job and it says mail queued. but it not delievered till yet..i check in sql agent database mail profile is enabled..so what's the reason? can anyone help me?thanks,Akash. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-23 : 13:56:43
|
| Check your email server.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-04-23 : 13:57:15
|
| Check whether you get mail or not by testing DBmail? How did you set up? |
 |
|
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 14:06:39
|
| thanks for ur reply,well, sodeep i checked thru EXEC msdb.dbo.sp_send_dbmail @profile_name = 'PR', @recipients = 'akas@email.com', @body = 'The procedure finished successfully.', @subject = ' Testmail-Automated Success Message'but it says mail queued..but i haven't delievered yet.. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-04-23 : 14:09:33
|
| So do you get mail while testing from DBMail directly? Not as a job |
 |
|
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 14:23:37
|
| no not from any side...from dbmail - it says MAIL QUEUED.and in job run - job failed.thanks, |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-04-23 : 14:27:03
|
| Actually you have restart SQL agent to take effect. Make sure no jobs are running at the time you are doing it.Looks like you haven't setup profile right. Tell us step-by-step how you setup Database mail? |
 |
|
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 14:59:28
|
| i follow the steps from BOL of database mail.i also restart and tried but it says that - mail queued.means my email has already sent but i didn't get it. may be server problem? or what? |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-04-23 : 15:05:04
|
| Are you using outlook express?Go to SQL agent properties- enable your profileGo to SQL Surface area config.-enable Database mail.What exactly are you trying to mail? Is there any query ? Post it . |
 |
|
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 15:26:14
|
quote: Originally posted by sodeep Are you using outlook express? - yesGo to SQL agent properties- enable your profile enabled alreadyGo to SQL Surface area config.-enable Database mail. enabled alreadyWhat exactly are you trying to mail? Is there any query ? Post it .
i have to execute simple update statement :update salestabset transsales = (select replace(transales, substring(transales,1,len(transales)-4),'transsales outdated')where (transdate < dateAdd(m, -3, convert(datetime, convert(varchar(10), getdate(), 112), 112))) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-23 : 15:26:58
|
| What does an update statement have to do with Database Mail?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
akas
Starting Member
42 Posts |
Posted - 2008-04-23 : 15:35:19
|
| i have update statement in the sproc.and i ahve to run job weekly every sunday 5pm - to check before 3months older all salestransaction..i ahve to update then as outdated. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-23 : 15:41:01
|
| But you aren't running the update statement when you are sending the email. I'm sure you are running the query before the email.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|