Monday, March 19, 2012
how to configure SQL server 2000 Agent Mail to use outlook express
I've read with SP3, SQL Agent Mail can be set up to use outlook express to
send out job notifications. On our SQL server 2000, I logged on as the
service account which runs both SQL server and SQL server agent. I was able
to send mail manually from outlook express. But how should I make SQL Agent
use outlook express? I've searched google but was not able to find any step
by step instruction on that. I checked the properties of SQL Server Agent.
Under the General tab, the Mail session is grayed out. I think that's
correct because outlook express doesn't have a profile. No other mail
configurations are available.
I'd appreciate if anybody can shed some light or provide some pointers.
Thanks,
BingOutlook Express does not provide the MAPI interface necessary for SQL Mail
and SQL Agent Mail. Only Outlook provides that functionality.
Personally, I do not use the built-in mail components. I use
xp_smtp_endmail from www.sqldev.net. XP_smtp_sendmail is a smtp connector
for SQL. It is not a drop-in replacement, but with a little scripting, you
an duplicate the functionality without the instability and headaches of the
MAPI-based built-in components.
Note that SQL 2005 uses its own SMTP connector called Database Mail.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"bing" <bing@.discussions.microsoft.com> wrote in message
news:875C2067-DAF3-47B0-9A0A-C0DDA5636D4B@.microsoft.com...
> Hi,
> I've read with SP3, SQL Agent Mail can be set up to use outlook express to
> send out job notifications. On our SQL server 2000, I logged on as the
> service account which runs both SQL server and SQL server agent. I was
> able
> to send mail manually from outlook express. But how should I make SQL
> Agent
> use outlook express? I've searched google but was not able to find any
> step
> by step instruction on that. I checked the properties of SQL Server
> Agent.
> Under the General tab, the Mail session is grayed out. I think that's
> correct because outlook express doesn't have a profile. No other mail
> configurations are available.
> I'd appreciate if anybody can shed some light or provide some pointers.
> Thanks,
> Bing|||Thanks much for the response. I haven't done any stored procedure scripting
in SQL server 2000 environment. I'll check how the scripts you mentioned
work. On this SQL 2000 server, outlook is not installed.
Bing
"Geoff N. Hiten" wrote:
> Outlook Express does not provide the MAPI interface necessary for SQL Mail
> and SQL Agent Mail. Only Outlook provides that functionality.
> Personally, I do not use the built-in mail components. I use
> xp_smtp_endmail from www.sqldev.net. XP_smtp_sendmail is a smtp connector
> for SQL. It is not a drop-in replacement, but with a little scripting, you
> an duplicate the functionality without the instability and headaches of the
> MAPI-based built-in components.
> Note that SQL 2005 uses its own SMTP connector called Database Mail.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:875C2067-DAF3-47B0-9A0A-C0DDA5636D4B@.microsoft.com...
> > Hi,
> >
> > I've read with SP3, SQL Agent Mail can be set up to use outlook express to
> > send out job notifications. On our SQL server 2000, I logged on as the
> > service account which runs both SQL server and SQL server agent. I was
> > able
> > to send mail manually from outlook express. But how should I make SQL
> > Agent
> > use outlook express? I've searched google but was not able to find any
> > step
> > by step instruction on that. I checked the properties of SQL Server
> > Agent.
> > Under the General tab, the Mail session is grayed out. I think that's
> > correct because outlook express doesn't have a profile. No other mail
> > configurations are available.
> >
> > I'd appreciate if anybody can shed some light or provide some pointers.
> >
> > Thanks,
> >
> > Bing
>
how to configure SQL server 2000 Agent Mail to use outlook express
I've read with SP3, SQL Agent Mail can be set up to use outlook express to
send out job notifications. On our SQL server 2000, I logged on as the
service account which runs both SQL server and SQL server agent. I was able
to send mail manually from outlook express. But how should I make SQL Agent
use outlook express? I've searched google but was not able to find any step
by step instruction on that. I checked the properties of SQL Server Agent.
Under the General tab, the Mail session is grayed out. I think that's
correct because outlook express doesn't have a profile. No other mail
configurations are available.
I'd appreciate if anybody can shed some light or provide some pointers.
Thanks,
Bing
Outlook Express does not provide the MAPI interface necessary for SQL Mail
and SQL Agent Mail. Only Outlook provides that functionality.
Personally, I do not use the built-in mail components. I use
xp_smtp_endmail from www.sqldev.net. XP_smtp_sendmail is a smtp connector
for SQL. It is not a drop-in replacement, but with a little scripting, you
an duplicate the functionality without the instability and headaches of the
MAPI-based built-in components.
Note that SQL 2005 uses its own SMTP connector called Database Mail.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"bing" <bing@.discussions.microsoft.com> wrote in message
news:875C2067-DAF3-47B0-9A0A-C0DDA5636D4B@.microsoft.com...
> Hi,
> I've read with SP3, SQL Agent Mail can be set up to use outlook express to
> send out job notifications. On our SQL server 2000, I logged on as the
> service account which runs both SQL server and SQL server agent. I was
> able
> to send mail manually from outlook express. But how should I make SQL
> Agent
> use outlook express? I've searched google but was not able to find any
> step
> by step instruction on that. I checked the properties of SQL Server
> Agent.
> Under the General tab, the Mail session is grayed out. I think that's
> correct because outlook express doesn't have a profile. No other mail
> configurations are available.
> I'd appreciate if anybody can shed some light or provide some pointers.
> Thanks,
> Bing
|||Thanks much for the response. I haven't done any stored procedure scripting
in SQL server 2000 environment. I'll check how the scripts you mentioned
work. On this SQL 2000 server, outlook is not installed.
Bing
"Geoff N. Hiten" wrote:
> Outlook Express does not provide the MAPI interface necessary for SQL Mail
> and SQL Agent Mail. Only Outlook provides that functionality.
> Personally, I do not use the built-in mail components. I use
> xp_smtp_endmail from www.sqldev.net. XP_smtp_sendmail is a smtp connector
> for SQL. It is not a drop-in replacement, but with a little scripting, you
> an duplicate the functionality without the instability and headaches of the
> MAPI-based built-in components.
> Note that SQL 2005 uses its own SMTP connector called Database Mail.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "bing" <bing@.discussions.microsoft.com> wrote in message
> news:875C2067-DAF3-47B0-9A0A-C0DDA5636D4B@.microsoft.com...
>
how to configure SQL server 2000 Agent Mail to use outlook express
I've read with SP3, SQL Agent Mail can be set up to use outlook express to
send out job notifications. On our SQL server 2000, I logged on as the
service account which runs both SQL server and SQL server agent. I was able
to send mail manually from outlook express. But how should I make SQL Agent
use outlook express? I've searched google but was not able to find any step
by step instruction on that. I checked the properties of SQL Server Agent.
Under the General tab, the Mail session is grayed out. I think that's
correct because outlook express doesn't have a profile. No other mail
configurations are available.
I'd appreciate if anybody can shed some light or provide some pointers.
Thanks,
BingOutlook Express does not provide the MAPI interface necessary for SQL Mail
and SQL Agent Mail. Only Outlook provides that functionality.
Personally, I do not use the built-in mail components. I use
xp_smtp_endmail from www.sqldev.net. XP_smtp_sendmail is a smtp connector
for SQL. It is not a drop-in replacement, but with a little scripting, you
an duplicate the functionality without the instability and headaches of the
MAPI-based built-in components.
Note that SQL 2005 uses its own SMTP connector called Database Mail.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"bing" <bing@.discussions.microsoft.com> wrote in message
news:875C2067-DAF3-47B0-9A0A-C0DDA5636D4B@.microsoft.com...
> Hi,
> I've read with SP3, SQL Agent Mail can be set up to use outlook express to
> send out job notifications. On our SQL server 2000, I logged on as the
> service account which runs both SQL server and SQL server agent. I was
> able
> to send mail manually from outlook express. But how should I make SQL
> Agent
> use outlook express? I've searched google but was not able to find any
> step
> by step instruction on that. I checked the properties of SQL Server
> Agent.
> Under the General tab, the Mail session is grayed out. I think that's
> correct because outlook express doesn't have a profile. No other mail
> configurations are available.
> I'd appreciate if anybody can shed some light or provide some pointers.
> Thanks,
> Bing
Monday, March 12, 2012
How to configure Email notification?
I am not sure if I am posting my question at the right place. Anyway, I hope
someone can help me out.
I have a scheduled job in SQL server agent and I would like to configure the
email notification if the job fails. When I tried to create a new email
operator name, I clicked on the small button [...] besides the "Email Name"
textbox, an error message "Unable to logon to the mail system. You should
start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
this feature." appeared. Can any teach me how to do the configuration?
Thanks a lot!
Ivanhttp://support.microsoft.com/default.aspx?scid=kb;en-us;263556&sd=tech
HTH, Jens Suessmeyer.|||I don't like the fact a mapi client has to be loaded on the box for SQL Mail,
doesn't seem best practice... ...I prefer to use a script.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test Message"
objMessage.From = "SQLServer"
objMessage.To = "" 'Insert email address here.
objMessage.TextBody = "Notification message (" & FormatDateTime(Date,1) & ",
" & FormatDateTime(Time,4) & ")"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "exchange" 'Insert your exchange server name here
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
"Ivan" wrote:
> Dear all,
> I am not sure if I am posting my question at the right place. Anyway, I hope
> someone can help me out.
> I have a scheduled job in SQL server agent and I would like to configure the
> email notification if the job fails. When I tried to create a new email
> operator name, I clicked on the small button [...] besides the "Email Name"
> textbox, an error message "Unable to logon to the mail system. You should
> start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
> this feature." appeared. Can any teach me how to do the configuration?
> Thanks a lot!
> Ivan
>|||And for me I dont like using the old fashioned Scripting approach, did
you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
interface (SMTP) to send out mails, it has some restrictions, but and
the other hand some great features, like sending out HTML mails (I know
thats the hell for some of you guys :-) ), giving friendly names, etc.
You can download that on:
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Suessmeyer.|||I'm not sure if you will be upgrading to SQL 2005 anytime soon, but
mail is much improved in 2005. There is no need for email clients to
be installed and you don't have to write your own object and you don't
need any 3rd party xp.
Jens wrote:
> And for me I dont like using the old fashioned Scripting approach, did
> you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
> interface (SMTP) to send out mails, it has some restrictions, but and
> the other hand some great features, like sending out HTML mails (I know
> thats the hell for some of you guys :-) ), giving friendly names, etc.
> You can download that on:
> http://www.sqldev.net/xp/xpsmtp.htm
> HTH, Jens Suessmeyer.
How to configure Email notification?
I am not sure if I am posting my question at the right place. Anyway, I hope
someone can help me out.
I have a scheduled job in SQL server agent and I would like to configure the
email notification if the job fails. When I tried to create a new email
operator name, I clicked on the small button [...] besides the "Email Name"
textbox, an error message "Unable to logon to the mail system. You should
start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
this feature." appeared. Can any teach me how to do the configuration?
Thanks a lot!
Ivan
http://support.microsoft.com/default...263556&sd=tech
HTH, Jens Suessmeyer.
|||I don't like the fact a mapi client has to be loaded on the box for SQL Mail,
doesn't seem best practice... ...I prefer to use a script.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test Message"
objMessage.From = "SQLServer"
objMessage.To = "" 'Insert email address here.
objMessage.TextBody = "Notification message (" & FormatDateTime(Date,1) & ",
" & FormatDateTime(Time,4) & ")"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "exchange" 'Insert your exchange server name here.
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
"Ivan" wrote:
> Dear all,
> I am not sure if I am posting my question at the right place. Anyway, I hope
> someone can help me out.
> I have a scheduled job in SQL server agent and I would like to configure the
> email notification if the job fails. When I tried to create a new email
> operator name, I clicked on the small button [...] besides the "Email Name"
> textbox, an error message "Unable to logon to the mail system. You should
> start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
> this feature." appeared. Can any teach me how to do the configuration?
> Thanks a lot!
> Ivan
>
|||And for me I dont like using the old fashioned Scripting approach, did
you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
interface (SMTP) to send out mails, it has some restrictions, but and
the other hand some great features, like sending out HTML mails (I know
thats the hell for some of you guys :-) ), giving friendly names, etc.
You can download that on:
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Suessmeyer.
|||I'm not sure if you will be upgrading to SQL 2005 anytime soon, but
mail is much improved in 2005. There is no need for email clients to
be installed and you don't have to write your own object and you don't
need any 3rd party xp.
Jens wrote:
> And for me I dont like using the old fashioned Scripting approach, did
> you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
> interface (SMTP) to send out mails, it has some restrictions, but and
> the other hand some great features, like sending out HTML mails (I know
> thats the hell for some of you guys :-) ), giving friendly names, etc.
> You can download that on:
> http://www.sqldev.net/xp/xpsmtp.htm
> HTH, Jens Suessmeyer.
How to configure Email notification?
I am not sure if I am posting my question at the right place. Anyway, I hope
someone can help me out.
I have a scheduled job in SQL server agent and I would like to configure the
email notification if the job fails. When I tried to create a new email
operator name, I clicked on the small button [...] besides the "Email Na
me"
textbox, an error message "Unable to logon to the mail system. You should
start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
this feature." appeared. Can any teach me how to do the configuration?
Thanks a lot!
Ivanhttp://support.microsoft.com/defaul...;263556&sd=tech
HTH, Jens Suessmeyer.|||I don't like the fact a mapi client has to be loaded on the box for SQL Mail
,
doesn't seem best practice... ...I prefer to use a script.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test Message"
objMessage.From = "SQLServer"
objMessage.To = "" 'Insert email address here.
objMessage.TextBody = "Notification message (" & FormatDateTime(Date,1) & ",
" & FormatDateTime(Time,4) & ")"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserver") = "exchange" 'Insert your exchange server name here.
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
"Ivan" wrote:
> Dear all,
> I am not sure if I am posting my question at the right place. Anyway, I ho
pe
> someone can help me out.
> I have a scheduled job in SQL server agent and I would like to configure t
he
> email notification if the job fails. When I tried to create a new email
> operator name, I clicked on the small button [...] besides the "Email
Name"
> textbox, an error message "Unable to logon to the mail system. You should
> start a mail client (Microsoft Outlook or Microsoft Exchange Client) to us
e
> this feature." appeared. Can any teach me how to do the configuration?
> Thanks a lot!
> Ivan
>|||And for me I dont like using the old fashioned Scripting approach, did
you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
interface (SMTP) to send out mails, it has some restrictions, but and
the other hand some great features, like sending out HTML mails (I know
thats the hell for some of you guys :-) ), giving friendly names, etc.
You can download that on:
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Suessmeyer.|||I'm not sure if you will be upgrading to SQL 2005 anytime soon, but
mail is much improved in 2005. There is no need for email clients to
be installed and you don't have to write your own object and you don't
need any 3rd party xp.
Jens wrote:
> And for me I dont like using the old fashioned Scripting approach, did
> you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
> interface (SMTP) to send out mails, it has some restrictions, but and
> the other hand some great features, like sending out HTML mails (I know
> thats the hell for some of you guys :-) ), giving friendly names, etc.
> You can download that on:
> http://www.sqldev.net/xp/xpsmtp.htm
> HTH, Jens Suessmeyer.
How to configure a job for maintenance plan?
I have a maintenane plan to backup user database daily, How to configure a job to execute this plan daily? Thanks
zytLook up SQLMAINT or XP_SQLMAINT in BOL, depending on whether you want to run the job as OS command or T-SQL, respectively.
Wednesday, March 7, 2012
How to Compare Date every day automatically?
such a way that they will be LIVE when Flag=1 and EXPIRED when Flag=0.
But how can I compare the Expiry Job Date with the Current Date and
Update Flag=0 automatically when its expired. I probably need compare
everyday.
I have no clue how to do this. I looked at Triggers but may be its not
the one i'm looking for..
Is this possible in SQL Server?
Thanks in Advance for your time and helpsomething like this:
update jobs
set flag=0
where expiry_date=convert(varchar(8),getdate()
,112)
set up a job to run this update daily.
however, it seems redundant, to have both the expiry date and the flag in
the table.
dean
"savvy" <johngera@.gmail.com> wrote in message
news:1138960957.385296.309670@.g47g2000cwa.googlegroups.com...
>I got various Job Details listed in my table. I have set all jobs in a
> such a way that they will be LIVE when Flag=1 and EXPIRED when Flag=0.
> But how can I compare the Expiry Job Date with the Current Date and
> Update Flag=0 automatically when its expired. I probably need compare
> everyday.
> I have no clue how to do this. I looked at Triggers but may be its not
> the one i'm looking for..
> Is this possible in SQL Server?
> Thanks in Advance for your time and help
>|||Thank you very much for your help Dean
I created a job in SQL Server and its working fine
Thanks in once again
Sunday, February 19, 2012
How to check whether an SSIS package is executing
I have scheduled an SQL Job to run every 15 mins. This runs an SSIS package. But sometimes my package might execute for more than 15 mins. In this case, a second instance of the package would start. I don't want this to happen. So is there any way I can check whether the package is already running before I continue the execution of the same. Right now I am using a mutex to handle this problem. Are there any problems using the mutex and is there a better way to handle this?
Thanks in advance.
Sumesh
have you tried using the sql server profiler?|||Actually the entire process is an automated process. I want my SSIS or the SQL job to check whether an instance it has initiated earlier is not running when the next instance has to be started.|||Interesting problem. There is no way that I know of to check whether a package is already executing or not. A good way of getting around this is to disable the Agent job at the start of the package and then re-enable it again at the end. I would probably do this even if I *could* check if a package was running or not.
-Jamie
|||Thank you Jamie! But if I disable the job and then re-enable it after the execution of my package, won't the agent wait for another 15 mins before it starts the next execution of the package?|||i recently heard in an msdn webcast that package execution can be monitored in the sql server management studio object explorer, but i haven't tried this.|||
Hi Sumesh,
I think you could use a scripting task and SMO to extract the current run status of the job:
http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.agent.job.currentrunstatus.aspx
cheers,
Markus