Showing posts with label sending. Show all posts
Showing posts with label sending. Show all posts

Friday, March 23, 2012

How to setup Operator for sending alerts?

Hello,
I've setup an Operator using the management studio and properly configured
it's settings. However, when I test it by running a job that fires an alert
to the Operator, the alert fails and gives me back the following error.
The job succeeded. The Job was invoked by User XXX. The last step to run
was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
to notify 'John Doe' via pager.
Not sure if this helps but I've properly setup Database Mail via the wizard
along with a default profile and have successfully sent e-mails using the
system sproc for sending emails.
Is there a guide for properly setting up and testing Operator alerts?
P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
they are practically dead.
Johnny
I'd run profiler to see what is happening. Does it *try* to send email? If it does, does the TSQL it
submit execute correctly from a query window?
I had problems with Agent Mail in June CTP, so I decided to wait with Agent Mail testing to a later
build.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
> Hello,
> I've setup an Operator using the management studio and properly configured
> it's settings. However, when I test it by running a job that fires an alert
> to the Operator, the alert fails and gives me back the following error.
> The job succeeded. The Job was invoked by User XXX. The last step to run
> was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
> to notify 'John Doe' via pager.
> Not sure if this helps but I've properly setup Database Mail via the wizard
> along with a default profile and have successfully sent e-mails using the
> system sproc for sending emails.
> Is there a guide for properly setting up and testing Operator alerts?
> P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
> they are practically dead.
> Johnny
|||Yahtzee!!!!!!! I found the problem, right before I was getting ready to give
up. I put together some instructions on how to get it to work for those
interested.
Note: With SQL Server Agent Alerts, you have the option of using "Database
Mail" (recommended) or the soon to be removed "SQL Mail" as the mail system.
These instructions show you how to use "Database Mail".
1. Enable "Database Mail" by using the "SQL Server 2005 Surface Area
Configuration" tool.
2. Install "Database Mail" objects in the msdb database.
3. Create a "Database Mail" profile and name it "Default Profile" or
whatever you like.
NOTE: The next step is to tell "SQL Server Agent" that you want to use
"Database Mail" as the mail system and specify a default profile to use. You
are suppose to do this by going to the Alert System page in the SQL Server
Agent Properties. However, the "Database Mail" option is not available in the
drop down menu and therefore you are unable to properly configure this, even
after rebooting the server. We will have to bypass the "UI" provided by the
SQL Server Management Studio and go straight to the registry to specify our
settings.
4. Open the registry editor by going to Start > Run > regedit.
5. Browse to the "SQLServerAgent" section. The path is something like
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microso ft SQL
Server\MSSQL.1\SQLServerAgent".
6. Modify the following entries with the corresponding values listed below.
KeyValue
UseDatabaseMail1
DatabaseMailProfileDefault Profile
7. Restart the "SQL Server Agent" service and voila!!
- Johnny
"Tibor Karaszi" wrote:

> I'd run profiler to see what is happening. Does it *try* to send email? If it does, does the TSQL it
> submit execute correctly from a query window?
> I had problems with Agent Mail in June CTP, so I decided to wait with Agent Mail testing to a later
> build.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
>

How to setup Operator for sending alerts?

Hello,
I've setup an Operator using the management studio and properly configured
it's settings. However, when I test it by running a job that fires an alert
to the Operator, the alert fails and gives me back the following error.
The job succeeded. The Job was invoked by User XXX. The last step to run
was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
to notify 'John Doe' via pager.
Not sure if this helps but I've properly setup Database Mail via the wizard
along with a default profile and have successfully sent e-mails using the
system sproc for sending emails.
Is there a guide for properly setting up and testing Operator alerts?
P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
they are practically dead.
JohnnyI'd run profiler to see what is happening. Does it *try* to send email? If i
t does, does the TSQL it
submit execute correctly from a query window?
I had problems with Agent Mail in June CTP, so I decided to wait with Agent
Mail testing to a later
build.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
> Hello,
> I've setup an Operator using the management studio and properly configured
> it's settings. However, when I test it by running a job that fires an aler
t
> to the Operator, the alert fails and gives me back the following error.
> The job succeeded. The Job was invoked by User XXX. The last step to run
> was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Faile
d
> to notify 'John Doe' via pager.
> Not sure if this helps but I've properly setup Database Mail via the wizar
d
> along with a default profile and have successfully sent e-mails using the
> system sproc for sending emails.
> Is there a guide for properly setting up and testing Operator alerts?
> P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cau
se
> they are practically dead.
> Johnny|||Yahtzee!!!!!!! I found the problem, right before I was getting ready to give
up. I put together some instructions on how to get it to work for those
interested.
Note: With SQL Server Agent Alerts, you have the option of using "Database
Mail" (recommended) or the soon to be removed "SQL Mail" as the mail system.
These instructions show you how to use "Database Mail".
1. Enable "Database Mail" by using the "SQL Server 2005 Surface Area
Configuration" tool.
2. Install "Database Mail" objects in the msdb database.
3. Create a "Database Mail" profile and name it "Default Profile" or
whatever you like.
NOTE: The next step is to tell "SQL Server Agent" that you want to use
"Database Mail" as the mail system and specify a default profile to use. You
are suppose to do this by going to the Alert System page in the SQL Server
Agent Properties. However, the "Database Mail" option is not available in th
e
drop down menu and therefore you are unable to properly configure this, even
after rebooting the server. We will have to bypass the "UI" provided by the
SQL Server Management Studio and go straight to the registry to specify our
settings.
4. Open the registry editor by going to Start > Run > regedit.
5. Browse to the "SQLServerAgent" section. The path is something like
" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
Server\MSSQL.1\SQLServerAgent".
6. Modify the following entries with the corresponding values listed below.
Key Value
----
UseDatabaseMail 1
DatabaseMailProfile Default Profile
7. Restart the "SQL Server Agent" service and voila!!
- Johnny
"Tibor Karaszi" wrote:

> I'd run profiler to see what is happening. Does it *try* to send email? If
it does, does the TSQL it
> submit execute correctly from a query window?
> I had problems with Agent Mail in June CTP, so I decided to wait with Agen
t Mail testing to a later
> build.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
>

How to setup Operator for sending alerts?

Hello,
I've setup an Operator using the management studio and properly configured
it's settings. However, when I test it by running a job that fires an alert
to the Operator, the alert fails and gives me back the following error.
The job succeeded. The Job was invoked by User XXX. The last step to run
was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
to notify 'John Doe' via pager.
Not sure if this helps but I've properly setup Database Mail via the wizard
along with a default profile and have successfully sent e-mails using the
system sproc for sending emails.
Is there a guide for properly setting up and testing Operator alerts?
P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
they are practically dead.
JohnnyI'd run profiler to see what is happening. Does it *try* to send email? If it does, does the TSQL it
submit execute correctly from a query window?
I had problems with Agent Mail in June CTP, so I decided to wait with Agent Mail testing to a later
build.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Johnny" <Johnny@.discussions.microsoft.com> wrote in message
news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
> Hello,
> I've setup an Operator using the management studio and properly configured
> it's settings. However, when I test it by running a job that fires an alert
> to the Operator, the alert fails and gives me back the following error.
> The job succeeded. The Job was invoked by User XXX. The last step to run
> was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
> to notify 'John Doe' via pager.
> Not sure if this helps but I've properly setup Database Mail via the wizard
> along with a default profile and have successfully sent e-mails using the
> system sproc for sending emails.
> Is there a guide for properly setting up and testing Operator alerts?
> P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
> they are practically dead.
> Johnny|||Yahtzee!!!!!!! I found the problem, right before I was getting ready to give
up. I put together some instructions on how to get it to work for those
interested.
Note: With SQL Server Agent Alerts, you have the option of using "Database
Mail" (recommended) or the soon to be removed "SQL Mail" as the mail system.
These instructions show you how to use "Database Mail".
1. Enable "Database Mail" by using the "SQL Server 2005 Surface Area
Configuration" tool.
2. Install "Database Mail" objects in the msdb database.
3. Create a "Database Mail" profile and name it "Default Profile" or
whatever you like.
NOTE: The next step is to tell "SQL Server Agent" that you want to use
"Database Mail" as the mail system and specify a default profile to use. You
are suppose to do this by going to the Alert System page in the SQL Server
Agent Properties. However, the "Database Mail" option is not available in the
drop down menu and therefore you are unable to properly configure this, even
after rebooting the server. We will have to bypass the "UI" provided by the
SQL Server Management Studio and go straight to the registry to specify our
settings.
4. Open the registry editor by going to Start > Run > regedit.
5. Browse to the "SQLServerAgent" section. The path is something like
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL.1\SQLServerAgent".
6. Modify the following entries with the corresponding values listed below.
Key Value
----
UseDatabaseMail 1
DatabaseMailProfile Default Profile
7. Restart the "SQL Server Agent" service and voila!!
- Johnny
"Tibor Karaszi" wrote:
> I'd run profiler to see what is happening. Does it *try* to send email? If it does, does the TSQL it
> submit execute correctly from a query window?
> I had problems with Agent Mail in June CTP, so I decided to wait with Agent Mail testing to a later
> build.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Johnny" <Johnny@.discussions.microsoft.com> wrote in message
> news:E671A826-D5C3-45AA-95AA-E7EF913E84AE@.microsoft.com...
> > Hello,
> >
> > I've setup an Operator using the management studio and properly configured
> > it's settings. However, when I test it by running a job that fires an alert
> > to the Operator, the alert fails and gives me back the following error.
> >
> > The job succeeded. The Job was invoked by User XXX. The last step to run
> > was step 1 (X). NOTE: Failed to notify 'John Doe' via email. NOTE: Failed
> > to notify 'John Doe' via pager.
> >
> > Not sure if this helps but I've properly setup Database Mail via the wizard
> > along with a default profile and have successfully sent e-mails using the
> > system sproc for sending emails.
> >
> > Is there a guide for properly setting up and testing Operator alerts?
> >
> > P.S - I am using SQL 2005 April CTP. Didnt post on the SQL 2005 forums cause
> > they are practically dead.
> >
> > Johnny
>

Friday, February 24, 2012

How to set an alert to monitr the data file

Hi Guys,
I want to setup a alert that monitor my database data file. When data file
reaches 2/3 full, then produce an alert that inform me by sending me an email
or paging. How to do that in sql server 2005.
Thanks,Iter
Do you mean to examine a datafile growth? There are also events in the
Profiler as weell as writing your own script to compare sizes.
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:8623EC2E-706B-4EB7-8392-5A032043EF06@.microsoft.com...
> Hi Guys,
> I want to setup a alert that monitor my database data file. When data file
> reaches 2/3 full, then produce an alert that inform me by sending me an
> email
> or paging. How to do that in sql server 2005.
> Thanks,
>

How to set an alert to monitr the data file

Hi Guys,
I want to setup a alert that monitor my database data file. When data file
reaches 2/3 full, then produce an alert that inform me by sending me an email
or paging. How to do that in sql server 2005.
Thanks,
Iter
Do you mean to examine a datafile growth? There are also events in the
Profiler as weell as writing your own script to compare sizes.
"Iter" <Iter@.discussions.microsoft.com> wrote in message
news:8623EC2E-706B-4EB7-8392-5A032043EF06@.microsoft.com...
> Hi Guys,
> I want to setup a alert that monitor my database data file. When data file
> reaches 2/3 full, then produce an alert that inform me by sending me an
> email
> or paging. How to do that in sql server 2005.
> Thanks,
>

Sunday, February 19, 2012

How to send mail through SQL Server...

Hi,
I have a requirement of sending mail through SQL Server through SMTP port... But, I dont want to configure my database server as e-mail client...
Is there any way to do it...
Thanks in advance...You can use the procedure xp_sendmail to send email. I'm not sure what you mean with 'client', but sqlserver won't take the place of outlook, pegasus mail or some other email client you have.|||For SQL Server to use xp_xxxmail it MUST be configured as a MAPI-complient client (as the poster noted). To avoid that you can use this:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=670&lngWId=5|||I have also used vbSendMail from www.freevbcode.com with a lot of success. Again, you have to write a stored procedure to "wrap around" the DLL, but it works quite well.

Regards,

hmscott|||I would also go the CDOSYS way that rdjabarov suggests, then you don't need to worry about other things than the SQL part...

Here is another link that might be worth checking out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech|||True, its hassle-free than direct SQL Mail procedures.