Monday, March 12, 2012

Missing Subject

Hi,
last month I installed SQL Server 2000 on a new server (Install SQL2000 and
then upgraded to SP4) because that server is going to replace the main
production server. I've restored the database dumps from the old server to
the new one and did also copy the SQL Agent jobs. Also configured SQL Mail,
because there are some stored procedures that use the xp_sendmail.
Everything seems to work OK, until I noticed that the mails, sent by SQL
Mail using the xp_sendmail are all missing the subject line, whereas the
subject line is present in the mail sent by the (old) production server.
the code in the stored procedures that invoke xp_sendmail is identical on
both machines.
Am I missing something or...
--
Adri
Programmers do it Bit by BitHi
Without seeing the actual call to xp_sendmail it is hard to say, but at a
guess you are possibly concatentating to a NULL value or something similar
either because the data is different or may be CONCAT_NULL_YIELDS_NULL is
different.
John
"Adri" wrote:
> Hi,
> last month I installed SQL Server 2000 on a new server (Install SQL2000 and
> then upgraded to SP4) because that server is going to replace the main
> production server. I've restored the database dumps from the old server to
> the new one and did also copy the SQL Agent jobs. Also configured SQL Mail,
> because there are some stored procedures that use the xp_sendmail.
> Everything seems to work OK, until I noticed that the mails, sent by SQL
> Mail using the xp_sendmail are all missing the subject line, whereas the
> subject line is present in the mail sent by the (old) production server.
> the code in the stored procedures that invoke xp_sendmail is identical on
> both machines.
> Am I missing something or...
> --
> Adri
> Programmers do it Bit by Bit|||Adri skrev:
> ...
> Am I missing something or...
> ...
Actually yes, the Subject ;)|||In fact, a simple
xp_sendmail @.recipients = 'someuser@.somedomain.where' ,@.message = 'message'
,@.subject = 'subject'
delivers an e-mail with an empty subject line :-(
--
Adri
Programmers do it Bit by Bit
"John Bell" wrote:
> Hi
> Without seeing the actual call to xp_sendmail it is hard to say, but at a
> guess you are possibly concatentating to a NULL value or something similar
> either because the data is different or may be CONCAT_NULL_YIELDS_NULL is
> different.
> John
> "Adri" wrote:
> > Hi,
> >
> > last month I installed SQL Server 2000 on a new server (Install SQL2000 and
> > then upgraded to SP4) because that server is going to replace the main
> > production server. I've restored the database dumps from the old server to
> > the new one and did also copy the SQL Agent jobs. Also configured SQL Mail,
> > because there are some stored procedures that use the xp_sendmail.
> >
> > Everything seems to work OK, until I noticed that the mails, sent by SQL
> > Mail using the xp_sendmail are all missing the subject line, whereas the
> > subject line is present in the mail sent by the (old) production server.
> >
> > the code in the stored procedures that invoke xp_sendmail is identical on
> > both machines.
> >
> > Am I missing something or...
> > --
> > Adri
> > Programmers do it Bit by Bit|||Hi Adri
More questions...
I assume you can send mail successfully from Outlook with a subject? if the
subject parameter is before the message parameter does it work? Is this 32 or
64 bit?
John
"Adri" wrote:
> In fact, a simple
> xp_sendmail @.recipients = 'someuser@.somedomain.where' ,@.message = 'message'
> ,@.subject = 'subject'
> delivers an e-mail with an empty subject line :-(
> --
> Adri
> Programmers do it Bit by Bit
>
> "John Bell" wrote:
> > Hi
> >
> > Without seeing the actual call to xp_sendmail it is hard to say, but at a
> > guess you are possibly concatentating to a NULL value or something similar
> > either because the data is different or may be CONCAT_NULL_YIELDS_NULL is
> > different.
> >
> > John
> >
> > "Adri" wrote:
> >
> > > Hi,
> > >
> > > last month I installed SQL Server 2000 on a new server (Install SQL2000 and
> > > then upgraded to SP4) because that server is going to replace the main
> > > production server. I've restored the database dumps from the old server to
> > > the new one and did also copy the SQL Agent jobs. Also configured SQL Mail,
> > > because there are some stored procedures that use the xp_sendmail.
> > >
> > > Everything seems to work OK, until I noticed that the mails, sent by SQL
> > > Mail using the xp_sendmail are all missing the subject line, whereas the
> > > subject line is present in the mail sent by the (old) production server.
> > >
> > > the code in the stored procedures that invoke xp_sendmail is identical on
> > > both machines.
> > >
> > > Am I missing something or...
> > > --
> > > Adri
> > > Programmers do it Bit by Bit|||Adri wrote:
> In fact, a simple
> xp_sendmail @.recipients = 'someuser@.somedomain.where' ,@.message = 'message'
> ,@.subject = 'subject'
> delivers an e-mail with an empty subject line :-(
> --
> Adri
> Programmers do it Bit by Bit
*bonk*
Sorry for my pityful attempt of being funny :) I actually didn't read
your post carefully enough and didn't realize your problem was really
'Missing Subject', not that some client added that as a subject for
your post (that you had sent without a subject)... Ahem...
Btw, did you do a search on Google, I saw a lot of hits using
"xp_sendmail" and "subject" as search parameters even though I didn't
instantly find a solution for the problem...
/impslayer, aka Birger Johansson|||Hi Adri,
My understanding of your issue is:
After the migration of SQL Server 2000 from an older server to a new one,
you can also send email by xp_sendmail in your stored procedures,however
those sent mails' subjects are missed.
If I have misunderstood, please let me know.
I recommend that you try the following:
1) Login as account that is running SQL Server server and open outlook.
2) Tools->Options->Mail Format tab. Change the "compose in message format"
to plan
text and send an email through outlook with a subject.
3) Change the "compose in message format" back to html. Send email with
subject.
Stop and start SQL Server instance might be necessary.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi Charles,
In fact, I did a new installation of SQL 2000 on a W2K3 server and upgraded
SQL from RTM to SP4. Having done that, I restored the (user)database dumps
from the old server to the new one, and configured SQL Mail as usual.
The old server had originally SQL 2000 RTM installed, upgraded to SP2, SP3,
Hotfix KB891640 applied and at last upgraded to SP4.
I've changed the Mail Format as you supposed, but that did not help.
--
Adri
Programmers do it Bit by Bit
"Charles Wang[MSFT]" wrote:
> Hi Adri,
> My understanding of your issue is:
> After the migration of SQL Server 2000 from an older server to a new one,
> you can also send email by xp_sendmail in your stored procedures,however
> those sent mails' subjects are missed.
> If I have misunderstood, please let me know.
> I recommend that you try the following:
> 1) Login as account that is running SQL Server server and open outlook.
> 2) Tools->Options->Mail Format tab. Change the "compose in message format"
> to plan
> text and send an email through outlook with a subject.
> 3) Change the "compose in message format" back to html. Send email with
> subject.
> Stop and start SQL Server instance might be necessary.
> Sincerely yours,
> Charles Wang
> Microsoft Online Community Support
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>
>|||Like saying "This page is intentionally blank"!!!
John
"impslayer" wrote:
> Adri wrote:
> > In fact, a simple
> >
> > xp_sendmail @.recipients = 'someuser@.somedomain.where' ,@.message = 'message'
> > ,@.subject = 'subject'
> >
> > delivers an e-mail with an empty subject line :-(
> >
> > --
> > Adri
> > Programmers do it Bit by Bit
> *bonk*
> Sorry for my pityful attempt of being funny :) I actually didn't read
> your post carefully enough and didn't realize your problem was really
> 'Missing Subject', not that some client added that as a subject for
> your post (that you had sent without a subject)... Ahem...
> Btw, did you do a search on Google, I saw a lot of hits using
> "xp_sendmail" and "subject" as search parameters even though I didn't
> instantly find a solution for the problem...
> /impslayer, aka Birger Johansson
>|||Hi Adri,
To make sure this is a dabase wide issue or server instance side issue, I
recommend that you create a new stored procedure with xp_sendmail in a test
database and see whether or not it has the same issue.
Also, you may try recompiling the stored procedures.
Charles Wang
Microsoft Online Community Support|||Hi
Please clarify that using Outlook directly is working ok?
Which version of office is being used?
John
"Adri" wrote:
> Hi Charles,
> In fact, I did a new installation of SQL 2000 on a W2K3 server and upgraded
> SQL from RTM to SP4. Having done that, I restored the (user)database dumps
> from the old server to the new one, and configured SQL Mail as usual.
> The old server had originally SQL 2000 RTM installed, upgraded to SP2, SP3,
> Hotfix KB891640 applied and at last upgraded to SP4.
> I've changed the Mail Format as you supposed, but that did not help.
> --
> Adri
> Programmers do it Bit by Bit
>
> "Charles Wang[MSFT]" wrote:
> > Hi Adri,
> >
> > My understanding of your issue is:
> > After the migration of SQL Server 2000 from an older server to a new one,
> > you can also send email by xp_sendmail in your stored procedures,however
> > those sent mails' subjects are missed.
> > If I have misunderstood, please let me know.
> >
> > I recommend that you try the following:
> > 1) Login as account that is running SQL Server server and open outlook.
> > 2) Tools->Options->Mail Format tab. Change the "compose in message format"
> > to plan
> > text and send an email through outlook with a subject.
> > 3) Change the "compose in message format" back to html. Send email with
> > subject.
> >
> > Stop and start SQL Server instance might be necessary.
> >
> > Sincerely yours,
> > Charles Wang
> > Microsoft Online Community Support
> > ======================================================> > When responding to posts, please "Reply to Group" via
> > your newsreader so that others may learn and benefit
> > from this issue.
> > ======================================================> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > ======================================================> >
> >
> >

No comments:

Post a Comment