May 25, 2005 at 4:35 am
Hi, I've created a stored proc which queries Active Directory through a linked server and sends out some e-mails. It runs fine. However, when I execute the SP through a DTS package I get an error stating that ANSI_NULLS and ANSI_WARNINGS must be set to ON for the connection. I have set these to ON in the DTS task before executing the SP but I still get the same error. I saw another post which suggested addding a GO before the exec statement but I still get same error. Any help much appreciated since I'm running out of ideas!
May 25, 2005 at 5:41 am
I didn't describe the problem correctly. When I execute the DTS package it runs okay. The problem occurs when I schedule the package as a job. When I run the job it fails and I get the ANSI messages. SQL Server Agent was set up to run using the local system account. I have changed this to run under a domain account but I still experience the same error when running the job.
May 25, 2005 at 5:57 am
Have discovered what the problem was.
Every time I edited the stored procedure in Enterprise Manager it was losing the ANSI settings so I had to script out the SP and then re-create it through Query Analyser with ansi_nulls and ansi_warnings set to on.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply