Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Wednesday, March 28, 2012

Maintenance Plan email report failure

Hello,
I have a simple daily maintenance plan for backups.(check integrity, back up, clean up history and then report) However, sending the email report always fails with the following error:

"Could not generate mail report.An exception occurred while executing a Transact-SQL statement or batch.Incorrect syntax near 'sys'."

How can the wizard output Incorrect syntax?

I have set up and tested Database mail and set the default public profile.
I have enabled the mail profile in SQL server agent properties and then restarted SQL server agent.
I have set up operator to receive the mail.
The frustrating thing is that if I set up and schedule a really simple test maintenance plan, the email report works! But it always fails on the real one.
How can I get more detail in the error message and actually see the SQL it is trying to execute when it send the mail?

Thanks,
Adam

More detail.

Having done a few tests it seems that this mail report error only occurs after the check integrity job fails. eg.

Executing the query "DBCC CHECKDB WITH NO_INFOMSGS
" failed with the following error:

"Incorrect PFS free space information for page (1:278) in object ID 60, index ID 1, partition ID 281474980642816, alloc unit ID 71776119065149440 (type LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.
CHECKDB found 0 allocation errors and 1 consistency errors in table 'sys.sysobjvalues' (object ID 60).

CHECKDB found 0 allocation errors and 1 consistency errors in database 'RHJ'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (RHJ).".

Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


This failure does not affect the backup and maintenance cleanup tasks that run afterwards, only the email report that it tries to send at the end.

Friday, March 9, 2012

mailto: with multiple email addresses = Invalid URI

I'm trying to create a mailto link with muliple email addresses like
"mailto:name@.email1.com;name2@.email2.com;name3@.email3.com" and cannot
get it working. any ideas on how to get this working?
Thanksgot it working...as an expression w/in the navigation tab of Advanced
Textbox Properties
=IIf( IsNothing(Fields!EmailGroupList.Value),
Nothing,("javascript:void(window.open('mailto:" &
Fields!EmailGroupList.Value & "','_blank'))"))
this opens up the mail client and populates the To: field with multiple
addresses.

Mails

I have the following code to send email using DTS and CDO objects.

I am getting run time error. Dont know why ?

Any configurations to be made ?

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
dim sch

sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig =CreateObject("CDO.Configuration")

cdoConfig.Fields.Item(sch & "sendusing") =2
cdoConfig.Fields.Item(sch & "smtpserver") = MPBAKOREX01.corp.mphasis.com"

cdoConfig.fields.update

Set cdoMessage =CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "shanmuga.r@.mphasis.com"

cdoMessage.To = "shanmuga.r@.mphasis.com"

cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.HTMLBody="<html><b>rajaganapathy</b></html>"
msgbox "before "
cdoMessage.Send
msgbox "Send"

Set cdoMessage = Nothing
Set cdoConfig = Nothing


Main = DTSTaskExecResult_Success
End Function

hi RajaGanapathy,

What sort of error you see? COM error?

From a .dtsx file or DTS 2000?

|||

Hi,

Creating a new instance of "CDO.Configuration" requires a dll to be registered on the server. Is the dll available on the server. Also please specify the error.

Thanks

Mohit

|||

Thanks enric vives and mohtigupta,

Even i can use xp_sendmail, but i cant send in htmlformat.

I dont think my system is installed with cdo.dll.

Can u just tell me how to send a mail in html format !

|||This forum concerns SSIS, not DTS. However, the DTS newsgroup is still available.

Mailing Lists

Hi All

We are running SQL Server & Outlook with an exchange server. We are
looking for a way to import the address book & email details into a
database table.

We have managed to do this with MS Access by using the import option
exchange(). Is there a similar way this can be done in SQLServer 2000"Mick Kehoe" <mick@.kehoe.demon.co.uk> wrote in message
news:86917a0f.0409220431.21399510@.posting.google.c om...
> Hi All
> We are running SQL Server & Outlook with an exchange server. We are
> looking for a way to import the address book & email details into a
> database table.
> We have managed to do this with MS Access by using the import option
> exchange(). Is there a similar way this can be done in SQLServer 2000

I'm not familiar with Exchange, however if you can export the addresses to a
CSV file, then DTS or bcp.exe can import the data. Alternatively, if you
already have them in Access, then you could use DTS or a linked server to
pull them into MSSQL.

Simon|||From MS SQL 2k Books On Line ...

The Microsoft OLE DB Provider for Exchange exposes data stored in a
Microsoft Exchange 2000 Web Store in tabular form. This data can be queried
using an SQL-like language that is very similar to the SQL subset supported
by the OLE DB Provider for Microsoft Indexing Service.

Microsoft SQL ServerT 2000 distributed queries can be used to query data
from the Exchange Web Store through this OLE DB Provider and can be joined
with tables in SQL Server. The Exchange Web Store should be located in the
same computer as SQL Server. Web Stores located in other computers cannot be
accessed using the OLE DB Provider for Exchange.

"Simon Hayes" <sql@.hayes.ch> wrote in message
news:41517712$1_1@.news.bluewin.ch...
> "Mick Kehoe" <mick@.kehoe.demon.co.uk> wrote in message
> news:86917a0f.0409220431.21399510@.posting.google.c om...
> > Hi All
> > We are running SQL Server & Outlook with an exchange server. We are
> > looking for a way to import the address book & email details into a
> > database table.
> > We have managed to do this with MS Access by using the import option
> > exchange(). Is there a similar way this can be done in SQLServer 2000
> I'm not familiar with Exchange, however if you can export the addresses to
a
> CSV file, then DTS or bcp.exe can import the data. Alternatively, if you
> already have them in Access, then you could use DTS or a linked server to
> pull them into MSSQL.
> Simon

mailing from MS SQL

Hi, is it possible to send an email from MS SQL? I need to have a trigger which will activate the sending an email. Thanksdo not do it from a trigger. What happens if there is a bulk import of 10,000 records. You want 10,000 emails? Otherwise please google or refer to SQL Server Books Online for xp_sendmail or xp_smtpmail.|||A bulk import of 10,000 records is still only going to execute the trigger once. A cursor or loop-based import would stress out your e-mail system, though.
It's just a bad idea for the scope of a trigger's actions to extend outside the database. Don't do it.
An alternative is to have your trigger load messages into a queue table for regularly processing by a scheduled job (which could run as frequently as once per minute).|||I was assuming that we would execute xp_sendmail for every record in inserted smart guy.|||I know you were, and I know you know the difference. Just wanted to make sure the poster did not get the wrong impression.

Mail Task in SSIS

Please help me i am new to ssis ....I am trying to send an email using mail task and I am sure that ISP works fine with smtp. I am entering all the correct information in the task but it takes a long time to run the task and then comes back with a failure error. can someone help me find an easy way to send an email to group of emails...I even tried to send it to 1 email and it is still not working.What error message do you get?|||

Thank you for the quick response....when I have the windows authontications on I don't get any email sent but when I uncheck that optiong I can only send emails withing exchange addresses and not any email address..is there a work around this...or do I have to use a script ...(if so can you please help me with the script)

thanks, Emad

|||Talk to your exchange server administrator - whether you need authentication, and why the server does not allow sending mails to outside people. SSIS is just a client that submits mails to server, we are testing that it can do it successfully, but what happens to the mail on the server is dependent on mail server configuration and completely outside of SSIS control.|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following T-SQL to send mail

sp_send_dbmail [ [ @.profile_name = ] 'profile_name' ]

[ , [ @.recipients = ] 'recipients [ ; ...n ]' ]

[ , [ @.copy_recipients = ] 'copy_recipient [ ; ...n ]' ]

[ , [ @.blind_copy_recipients = ] 'blind_copy_recipient [ ; ...n ]' ]

[ , [ @.subject = ] 'subject' ]

[ , [ @.body = ] 'body' ]

[ , [ @.body_format = ] 'body_format' ]

[ , [ @.importance = ] 'importance' ]

[ , [ @.sensitivity = ] 'sensitivity' ]

[ , [ @.file_attachments = ] 'attachment [ ; ...n ]' ]

[ , [ @.query = ] 'query' ]

[ , [ @.execute_query_database = ] 'execute_query_database' ]

[ , [ @.attach_query_result_as_file = ] attach_query_result_as_file ]

[ , [ @.query_attachment_filename = ] query_attachment_filename ]

[ , [ @.query_result_header = ] query_result_header ]

[ , [ @.query_result_width = ] query_result_width ]

[ , [ @.query_result_separator = ] 'query_result_separator' ]

[ , [ @.exclude_query_output = ] exclude_query_output ]

[ , [ @.append_query_error = ] append_query_error ]

[ , [ @.query_no_truncate = ] query_no_truncate ]

[ , [ @.mailitem_id = ] mailitem_id ] [ OUTPUT ]|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following T-SQL to send mail within SSIS

sp_send_dbmail [ [ @.profile_name = ] 'profile_name' ]

[ , [ @.recipients = ] 'recipients [ ; ...n ]' ]

[ , [ @.copy_recipients = ] 'copy_recipient [ ; ...n ]' ]

[ , [ @.blind_copy_recipients = ] 'blind_copy_recipient [ ; ...n ]' ]

[ , [ @.subject = ] 'subject' ]

[ , [ @.body = ] 'body' ]

[ , [ @.body_format = ] 'body_format' ]

[ , [ @.importance = ] 'importance' ]

[ , [ @.sensitivity = ] 'sensitivity' ]

[ , [ @.file_attachments = ] 'attachment [ ; ...n ]' ]

[ , [ @.query = ] 'query' ]

[ , [ @.execute_query_database = ] 'execute_query_database' ]

[ , [ @.attach_query_result_as_file = ] attach_query_result_as_file ]

[ , [ @.query_attachment_filename = ] query_attachment_filename ]

[ , [ @.query_result_header = ] query_result_header ]

[ , [ @.query_result_width = ] query_result_width ]

[ , [ @.query_result_separator = ] 'query_result_separator' ]

[ , [ @.exclude_query_output = ] exclude_query_output ]

[ , [ @.append_query_error = ] append_query_error ]

[ , [ @.query_no_truncate = ] query_no_truncate ]

[ , [ @.mailitem_id = ] mailitem_id ] [ OUTPUT ]|||

use outlook client on the same machine (as SQL box) and see if you have the same problem, if the you have the same issue using outlook then this an exchange issue, if outlook can send it OK, then you have the investigate the problem on SQL.

you also can set up DatabaseMail in SQL 2005 and test the send mail process then use following sp_send_dbmail within SSIS as T-SQL command.

Mail queued. Why and how can I get it to send?

Each time I test the email in SQL Server 2005 it goes into a queue. The mail
works fine in SQL 2000. There are about 25 emails in the queue and no
amount of configuring or dropping the DBMail accounts seems to be able to get
the queue to send.
example
EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SUPERHOSS',
@.recipients = 'jlongstreet@.Applied-Textiles.com',
@.body = 'The stored procedure finished successfully.',
@.subject = 'Automated Success Message' ;
Reply from the server "Mail queued." Everything appears to be configured
correctly. Exchange server name is configured correctly... default email
client has an account on the network that is configured to send... there is a
receive box that allows for a reply to address which is also configured.
The 2005 server is now live and it would be nice to have it send out job
failure notices. I'm not sure what it is that I am overlooking.
Regards,
Jamie
probably as silly question. DBMail uses SMTP. Is it running and will your
Exchange server accept it?
Chris
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
> Each time I test the email in SQL Server 2005 it goes into a queue. The
> mail
> works fine in SQL 2000. There are about 25 emails in the queue and no
> amount of configuring or dropping the DBMail accounts seems to be able to
> get
> the queue to send.
> example
> EXEC msdb.dbo.sp_send_dbmail
> @.profile_name = 'SUPERHOSS',
> @.recipients = 'jlongstreet@.Applied-Textiles.com',
> @.body = 'The stored procedure finished successfully.',
> @.subject = 'Automated Success Message' ;
> Reply from the server "Mail queued." Everything appears to be configured
> correctly. Exchange server name is configured correctly... default email
> client has an account on the network that is configured to send... there
> is a
> receive box that allows for a reply to address which is also configured.
> The 2005 server is now live and it would be nice to have it send out job
> failure notices. I'm not sure what it is that I am overlooking.
> --
> Regards,
> Jamie
|||That sounds like a plan. Thanks.
Regards,
Jamie
"Chris Wood" wrote:

> probably as silly question. DBMail uses SMTP. Is it running and will your
> Exchange server accept it?
> Chris
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
>
>

Mail queued. Why and how can I get it to send?

Each time I test the email in SQL Server 2005 it goes into a queue. The mai
l
works fine in SQL 2000. There are about 25 emails in the queue and no
amount of configuring or dropping the DBMail accounts seems to be able to ge
t
the queue to send.
example
EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SUPERHOSS',
@.recipients = 'jlongstreet@.Applied-Textiles.com',
@.body = 'The stored procedure finished successfully.',
@.subject = 'Automated Success Message' ;
Reply from the server "Mail queued." Everything appears to be configured
correctly. Exchange server name is configured correctly... default email
client has an account on the network that is configured to send... there is
a
receive box that allows for a reply to address which is also configured.
The 2005 server is now live and it would be nice to have it send out job
failure notices. I'm not sure what it is that I am overlooking.
Regards,
Jamieprobably as silly question. DBMail uses SMTP. Is it running and will your
Exchange server accept it?
Chris
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
> Each time I test the email in SQL Server 2005 it goes into a queue. The
> mail
> works fine in SQL 2000. There are about 25 emails in the queue and no
> amount of configuring or dropping the DBMail accounts seems to be able to
> get
> the queue to send.
> example
> EXEC msdb.dbo.sp_send_dbmail
> @.profile_name = 'SUPERHOSS',
> @.recipients = 'jlongstreet@.Applied-Textiles.com',
> @.body = 'The stored procedure finished successfully.',
> @.subject = 'Automated Success Message' ;
> Reply from the server "Mail queued." Everything appears to be configured
> correctly. Exchange server name is configured correctly... default email
> client has an account on the network that is configured to send... there
> is a
> receive box that allows for a reply to address which is also configured.
> The 2005 server is now live and it would be nice to have it send out job
> failure notices. I'm not sure what it is that I am overlooking.
> --
> Regards,
> Jamie|||That sounds like a plan. Thanks.
--
Regards,
Jamie
"Chris Wood" wrote:

> probably as silly question. DBMail uses SMTP. Is it running and will your
> Exchange server accept it?
> Chris
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
>
>

Mail queued. Why and how can I get it to send?

Each time I test the email in SQL Server 2005 it goes into a queue. The mail
works fine in SQL 2000. There are about 25 emails in the queue and no
amount of configuring or dropping the DBMail accounts seems to be able to get
the queue to send.
example
EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'SUPERHOSS',
@.recipients = 'jlongstreet@.Applied-Textiles.com',
@.body = 'The stored procedure finished successfully.',
@.subject = 'Automated Success Message' ;
Reply from the server "Mail queued." Everything appears to be configured
correctly. Exchange server name is configured correctly... default email
client has an account on the network that is configured to send... there is a
receive box that allows for a reply to address which is also configured.
The 2005 server is now live and it would be nice to have it send out job
failure notices. I'm not sure what it is that I am overlooking.
--
Regards,
Jamieprobably as silly question. DBMail uses SMTP. Is it running and will your
Exchange server accept it?
Chris
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
> Each time I test the email in SQL Server 2005 it goes into a queue. The
> mail
> works fine in SQL 2000. There are about 25 emails in the queue and no
> amount of configuring or dropping the DBMail accounts seems to be able to
> get
> the queue to send.
> example
> EXEC msdb.dbo.sp_send_dbmail
> @.profile_name = 'SUPERHOSS',
> @.recipients = 'jlongstreet@.Applied-Textiles.com',
> @.body = 'The stored procedure finished successfully.',
> @.subject = 'Automated Success Message' ;
> Reply from the server "Mail queued." Everything appears to be configured
> correctly. Exchange server name is configured correctly... default email
> client has an account on the network that is configured to send... there
> is a
> receive box that allows for a reply to address which is also configured.
> The 2005 server is now live and it would be nice to have it send out job
> failure notices. I'm not sure what it is that I am overlooking.
> --
> Regards,
> Jamie|||That sounds like a plan. Thanks.
--
Regards,
Jamie
"Chris Wood" wrote:
> probably as silly question. DBMail uses SMTP. Is it running and will your
> Exchange server accept it?
> Chris
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:8EA12340-FA56-4432-8306-6235DF373E74@.microsoft.com...
> > Each time I test the email in SQL Server 2005 it goes into a queue. The
> > mail
> > works fine in SQL 2000. There are about 25 emails in the queue and no
> > amount of configuring or dropping the DBMail accounts seems to be able to
> > get
> > the queue to send.
> >
> > example
> >
> > EXEC msdb.dbo.sp_send_dbmail
> > @.profile_name = 'SUPERHOSS',
> > @.recipients = 'jlongstreet@.Applied-Textiles.com',
> > @.body = 'The stored procedure finished successfully.',
> > @.subject = 'Automated Success Message' ;
> >
> > Reply from the server "Mail queued." Everything appears to be configured
> > correctly. Exchange server name is configured correctly... default email
> > client has an account on the network that is configured to send... there
> > is a
> > receive box that allows for a reply to address which is also configured.
> > The 2005 server is now live and it would be nice to have it send out job
> > failure notices. I'm not sure what it is that I am overlooking.
> >
> > --
> > Regards,
> > Jamie
>
>

Wednesday, March 7, 2012

Mail Profile sql 2005 : How to retry until successfully sent?

Hi
I recently had a big problem with an important job, after sending an email
using the msdb..sp_send_dbmail stored procedure the job succeeded!
BUT
the emails never went out! because the email server was problematic at
roughly the same time. This is the error that was logged in the sql 2005
email job log.:
No connection could be made because the target machine avtively refused it.
mail server failure ... bla bla bla
When i reran the job a couple of hours later the mails went out because the
mail server was up and running.
My question - is there not a way to tell the mail profile to retry sending
the email a couple of times with say 1 minute intervals between retries -
same as in a sql 2005 job'
thanks
IanHi
As I understood, you may want to PING the server
to check whether or not the server is running up and if it succeded then
send the email
Some ideas, check it out
SET NOCOUNT ON
CREATE TABLE #t_ip (ip varchar(255))
DECLARE @.PingSql varchar(1000)
SELECT @.PingSql = 'ping ' + '00.00.0.0'
INSERT INTO #t_ip EXEC master.dbo.xp_cmdshell @.PingSql
IF EXISTS (SELECT TOP 2 * FROM #t_ip WHERE IP = 'Request timed out' )
BEGIN
DROP TABLE #t_ip
RETURN
END
DROP TABLE #t_ip
"I.W Coetzer" <I.W Coetzer@.discussions.microsoft.com> wrote in message
news:27F55D35-F6A1-437D-888D-B897A30DA9A0@.microsoft.com...
> Hi
> I recently had a big problem with an important job, after sending an email
> using the msdb..sp_send_dbmail stored procedure the job succeeded!
> BUT
> the emails never went out! because the email server was problematic at
> roughly the same time. This is the error that was logged in the sql 2005
> email job log.:
> No connection could be made because the target machine avtively refused
> it.
> mail server failure ... bla bla bla
> When i reran the job a couple of hours later the mails went out because
> the
> mail server was up and running.
> My question - is there not a way to tell the mail profile to retry sending
> the email a couple of times with say 1 minute intervals between retries -
> same as in a sql 2005 job'
> thanks
> Ian|||You can set the number of retires and the retry delay
interval at the server configuration level. In T-SQL, you
can use sysmail_configure_sp. If you are using the Database
Mail Configuration wizard in Management Studio, select the
option to View or Change System Parameters.
-Sue
On Mon, 16 Apr 2007 04:14:04 -0700, I.W Coetzer <I.W
Coetzer@.discussions.microsoft.com> wrote:
>Hi
>I recently had a big problem with an important job, after sending an email
>using the msdb..sp_send_dbmail stored procedure the job succeeded!
>BUT
>the emails never went out! because the email server was problematic at
>roughly the same time. This is the error that was logged in the sql 2005
>email job log.:
>No connection could be made because the target machine avtively refused it.
>mail server failure ... bla bla bla
>When i reran the job a couple of hours later the mails went out because the
>mail server was up and running.
>My question - is there not a way to tell the mail profile to retry sending
>the email a couple of times with say 1 minute intervals between retries -
>same as in a sql 2005 job'
>thanks
>Ian|||Hi
This would not have solved the problem because the server was up and running
- but the mail service was hanging / not working i think.
bye
"Uri Dimant" wrote:
> Hi
> As I understood, you may want to PING the server
> to check whether or not the server is running up and if it succeded then
> send the email
> Some ideas, check it out
> SET NOCOUNT ON
> CREATE TABLE #t_ip (ip varchar(255))
> DECLARE @.PingSql varchar(1000)
> SELECT @.PingSql = 'ping ' + '00.00.0.0'
> INSERT INTO #t_ip EXEC master.dbo.xp_cmdshell @.PingSql
> IF EXISTS (SELECT TOP 2 * FROM #t_ip WHERE IP = 'Request timed out' )
> BEGIN
> DROP TABLE #t_ip
> RETURN
> END
> DROP TABLE #t_ip
>
>
> "I.W Coetzer" <I.W Coetzer@.discussions.microsoft.com> wrote in message
> news:27F55D35-F6A1-437D-888D-B897A30DA9A0@.microsoft.com...
> > Hi
> >
> > I recently had a big problem with an important job, after sending an email
> > using the msdb..sp_send_dbmail stored procedure the job succeeded!
> > BUT
> > the emails never went out! because the email server was problematic at
> > roughly the same time. This is the error that was logged in the sql 2005
> > email job log.:
> > No connection could be made because the target machine avtively refused
> > it.
> > mail server failure ... bla bla bla
> >
> > When i reran the job a couple of hours later the mails went out because
> > the
> > mail server was up and running.
> >
> > My question - is there not a way to tell the mail profile to retry sending
> > the email a couple of times with say 1 minute intervals between retries -
> > same as in a sql 2005 job'
> >
> > thanks
> >
> > Ian
>
>|||brilliant! thank you very much - now to wait and see what happens tomorrow
morning ...
bye
"Sue Hoegemeier" wrote:
> You can set the number of retires and the retry delay
> interval at the server configuration level. In T-SQL, you
> can use sysmail_configure_sp. If you are using the Database
> Mail Configuration wizard in Management Studio, select the
> option to View or Change System Parameters.
> -Sue
> On Mon, 16 Apr 2007 04:14:04 -0700, I.W Coetzer <I.W
> Coetzer@.discussions.microsoft.com> wrote:
> >Hi
> >
> >I recently had a big problem with an important job, after sending an email
> >using the msdb..sp_send_dbmail stored procedure the job succeeded!
> >BUT
> >the emails never went out! because the email server was problematic at
> >roughly the same time. This is the error that was logged in the sql 2005
> >email job log.:
> >No connection could be made because the target machine avtively refused it.
> >mail server failure ... bla bla bla
> >
> >When i reran the job a couple of hours later the mails went out because the
> >mail server was up and running.
> >
> >My question - is there not a way to tell the mail profile to retry sending
> >the email a couple of times with say 1 minute intervals between retries -
> >same as in a sql 2005 job'
> >
> >thanks
> >
> >Ian
>

Mail notification to admin for conflicts

Dear Friends
Can it be possible that i get email for the conflict as
and when they appear.
Your guiaence will be helpful to solve my problem.
Best regards
Sharad
with windows synchronization manager if you select interactive resolver you
will get a dialog that pops up on the client notifiying them of a resolution
and they can solve it there.
Other than that you will have to code something yourself.
You might also want to look at the Microsoft SQL Conflict Resolver library.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Sharad" <niitmalad@.yahoo.co.in> wrote in message
news:0b7301c4ec1e$8b4c3d60$a301280a@.phx.gbl...
> Dear Friends
> Can it be possible that i get email for the conflict as
> and when they appear.
> Your guiaence will be helpful to solve my problem.
> Best regards
> Sharad

Mail Id-how to store?

Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
Shyam
Hi,
Use the data type VARCHAR. The maximum limit is 8000 characters. I recomment
you to have 120 bytes for email storage maximum.
Declare @.emailid varchar(120)
Tahnks
Hari
SQL Server MVP
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
> Hi,
> How to store email address in SQL Server and is there a special data type
> for it and whats the maximum limit that can be stored?
> Kindly help me.
> Regards,
> Shyam
|||See if this helps:
http://vyaskn.tripod.com/handling_em...sql_server.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
Shyam

Mail Id-how to store?

Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
ShyamHi,
Use the data type VARCHAR. The maximum limit is 8000 characters. I recomment
you to have 120 bytes for email storage maximum.
Declare @.emailid varchar(120)
Tahnks
Hari
SQL Server MVP
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
> Hi,
> How to store email address in SQL Server and is there a special data type
> for it and whats the maximum limit that can be stored?
> Kindly help me.
> Regards,
> Shyam|||See if this helps:
http://vyaskn.tripod.com/handling_e..._sql_server.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
Shyam

Mail Id-how to store?

Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
ShyamHi,
Use the data type VARCHAR. The maximum limit is 8000 characters. I recomment
you to have 120 bytes for email storage maximum.
Declare @.emailid varchar(120)
Tahnks
Hari
SQL Server MVP
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
> Hi,
> How to store email address in SQL Server and is there a special data type
> for it and whats the maximum limit that can be stored?
> Kindly help me.
> Regards,
> Shyam|||See if this helps:
http://vyaskn.tripod.com/handling_email_addresses_in_sql_server.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Shyam" <Shyam@.discussions.microsoft.com> wrote in message
news:412215F3-FF74-4BFB-988B-7A2C55E2812D@.microsoft.com...
Hi,
How to store email address in SQL Server and is there a special data type
for it and whats the maximum limit that can be stored?
Kindly help me.
Regards,
Shyam

mail error

Iam unable to send out emails since we changed the system
acount name...
when I test the email name I get the following message
'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
session is not running; check the mail profile and or
SQLServerAgent service startup acount in SQLServerAgent
properties dialogue box'
the mail configeration test works ok and restarted
SQLServerAgent.. any ideasgrumy,
When you say you changed the "system account name", what exactly are you
referring to? The MSSQLServer service account name?
I am also not clear on whether your SQLServerAgent service is running or
not. The error message states that it is not running, but you are saying
that SQLServerAgent was restarted successfully. Could you clarify your
questions?
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"grumy" <anonymous@.discussions.microsoft.com> wrote in message
news:2f5e01c4289b$d6d1eba0$a301280a@.phx.gbl...
> Iam unable to send out emails since we changed the system
> acount name...
> when I test the email name I get the following message
> 'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
> session is not running; check the mail profile and or
> SQLServerAgent service startup acount in SQLServerAgent
> properties dialogue box'
> the mail configeration test works ok and restarted
> SQLServerAgent.. any ideas

mail error

Iam unable to send out emails since we changed the system
acount name...
when I test the email name I get the following message
'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
session is not running; check the mail profile and or
SQLServerAgent service startup acount in SQLServerAgent
properties dialogue box'
the mail configeration test works ok and restarted
SQLServerAgent.. any ideas
grumy,
When you say you changed the "system account name", what exactly are you
referring to? The MSSQLServer service account name?
I am also not clear on whether your SQLServerAgent service is running or
not. The error message states that it is not running, but you are saying
that SQLServerAgent was restarted successfully. Could you clarify your
questions?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"grumy" <anonymous@.discussions.microsoft.com> wrote in message
news:2f5e01c4289b$d6d1eba0$a301280a@.phx.gbl...
> Iam unable to send out emails since we changed the system
> acount name...
> when I test the email name I get the following message
> 'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
> session is not running; check the mail profile and or
> SQLServerAgent service startup acount in SQLServerAgent
> properties dialogue box'
> the mail configeration test works ok and restarted
> SQLServerAgent.. any ideas

mail error

Iam unable to send out emails since we changed the system
acount name...
when I test the email name I get the following message
'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
session is not running; check the mail profile and or
SQLServerAgent service startup acount in SQLServerAgent
properties dialogue box'
the mail configeration test works ok and restarted
SQLServerAgent.. any ideasgrumy,
When you say you changed the "system account name", what exactly are you
referring to? The MSSQLServer service account name?
I am also not clear on whether your SQLServerAgent service is running or
not. The error message states that it is not running, but you are saying
that SQLServerAgent was restarted successfully. Could you clarify your
questions?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"grumy" <anonymous@.discussions.microsoft.com> wrote in message
news:2f5e01c4289b$d6d1eba0$a301280a@.phx.gbl...
> Iam unable to send out emails since we changed the system
> acount name...
> when I test the email name I get the following message
> 'Errorr 22022:SQLServerAgent Error: The SQLServerAgent
> session is not running; check the mail profile and or
> SQLServerAgent service startup acount in SQLServerAgent
> properties dialogue box'
> the mail configeration test works ok and restarted
> SQLServerAgent.. any ideas

mail client and dts send mail task

Hi,
Is it required to have microsoft outlook client up-and-running to send mail from dts package?
I have a dts package which send email if job fail or success. will it work fine if someone by mistek close outlook client running on server?
please reply.
Ram.No, the outlook client does not have to be running to use send-mail in a dts package.

The outlook client needs to be installed on the server and the profile needs to be created for the user context that will be running the dts package.

Here is where the confusion typically lies. When you run a DTS package interactively, the security context is who-ever you are logged in as. As such, it is relatively easy to debug. What most people don't understand is that if the DTS package is running based on some automated feature (timer, or another application starting it) the DTS package typically runs under the SQL Agent ID (Check the logon-id of the user that starts SQL Agent in control panel Services). You will need to use a specific ID, rather than system. This is because to use SQL Mail, you will have to interactively log-on as that user and configure outlook. Once you have done that, the SQL Agent will be able to send and receive e-mail without you being logged in.

Good luck.|||Originally posted by rmillman
No, the outlook client does not have to be running to use send-mail in a dts package.

The outlook client needs to be installed on the server and the profile needs to be created for the user context that will be running the dts package.

Here is where the confusion typically lies. When you run a DTS package interactively, the security context is who-ever you are logged in as. As such, it is relatively easy to debug. What most people don't understand is that if the DTS package is running based on some automated feature (timer, or another application starting it) the DTS package typically runs under the SQL Agent ID (Check the logon-id of the user that starts SQL Agent in control panel Services). You will need to use a specific ID, rather than system. This is because to use SQL Mail, you will have to interactively log-on as that user and configure outlook. Once you have done that, the SQL Agent will be able to send and receive e-mail without you being logged in.

Much thanks for your reply. explains me how dts send email . nothing to do with up-and-running mail client . it sends email internally useing agent.
cool.

Good luck.|||There's a great email extended procedure you can get that will allow you to send email without installing the outlook client on all your SQL servers. You can go this link for details: http://sqldev.net/xp/xpsmtp.htm

We have implemented this at LexisNexis by writing a wrapper procedure that calls the extended procedure. This provides a higher level security. You can call this from within a DTS package or via a job step within a scheduled job. We've been using this for quiet awhile with great success in all our maintenance plans for backups.

Saturday, February 25, 2012

MAIL

Ok, folks, a question for you. I wanna send email through MSSQL Server 2000
using SMTP protocol.HOW?Check out

http://www.sqldev.net/xp/xpsmtp.htm

John

"Licemjer" <licemjer@.licemjer.hr> wrote in message
news:bqq62m$op5$1@.ls219.htnet.hr...
> Ok, folks, a question for you. I wanna send email through MSSQL Server
2000
> using SMTP protocol.HOW?