October 21, 2009 at 9:59 am
i have a SP that creates an email using MASTER.DBO.XP_SENDMAIL. the issue is that this strored proc executes fine in Query Analyzer. but when i start the job in Enterprize i get an in the job history of " [SQLSTATE 01000] (Message 18014) ODBC error 208 (42S02) Invalid object name " & table name.
Stored Proc is dbo owner and job is sa.
Can someone please shed some light on this?
thanks
Jim
October 22, 2009 at 6:35 am
What is the database context the job is executing in?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 22, 2009 at 8:32 am
I hope I understand your question. We have a db named res. The job command, under sql server agent/jobs, is 'exec survey' with the db being res. All tables referenced in the sproc are in the form of 'res.dbo.tablename'. When executing xp_sendmail, the systax is 'exec master.dbo.xp_sendmail'
Does that help?
Thanks
Jim
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply