Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Mail (SQL2K call to 2005 instance)

Status
Not open for further replies.

onpnt

Programmer
Dec 11, 2001
7,778
US
I'm in the process of setting up on all the instances in a new location notifications for jobs and other tasks. Currently the SQL Server machines to not have smtp services running on them so I am trying to avoid installing smtp in order to use CDOSYS or CDONTS. The work around was to use one of the SQL Server 2005 instances as my notification system.

Database mail is configured and working. I added a linked server entry to the 2005 instance on all the instances I want to send notifications out on. this works fine on all of the 2005 instances and also works on the 2000 instances however I get this when calling sp_send_dbmail from the 2000 instances

Code:
Mail queued.
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

As you can see the mail is queued and does go out without any problems but the error message following it. I thought this was a quoted identifier issue but turning that off does not rid me of the follow up error.

Any suggestions? Or should I code around the error level 11?

[sub]____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood[/sub]
 
I forgot to add that this does not cause jobs to fail of course sense its a severity of 11. It only displays when manually running something like this

Code:
declare @body1 varchar(1000)
set @body1 = 'Test From Server

EXEC linkedserver.msdb.dbo.sp_send_dbmail @recipients=email@lessthandot.com',
    @subject = 'Test From Server,
    @body = @body1,
    @body_format = 'HTML'

[sub]____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood[/sub]
 
onpnt, I think state 0 is just informational, so I would just work around it. I don't think you can suppress it.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
:) Thanks.

[sub]____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood[/sub]
 
Agreed. I'd just work around it.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top