Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
SQL2000User
Starting Member
13 Posts |
Posted - 2007-01-12 : 16:25:04
|
Hi,one step in my sql job always failed, this step just executes the store procedure which runs sucessfuly in SQL ANALYZER. This sp mainly runs serveral queries and in job, it is requested to generates a output text file to write all the result. The reports can only be finished some part, not compeletly, then the job got failedDoes anyone have the clue for this issue ?Thanks in advance |
|
MohammedU
Posting Yak Master
145 Posts |
Posted - 2007-01-13 : 02:38:36
|
Write your job output to a file...and see the error it is causing...post the error if possible...MohammedU |
|
|
SQL2000User
Starting Member
13 Posts |
Posted - 2007-01-15 : 14:05:13
|
Thanks for reply.Actually, this job step is to write the query result in output file.but it just can't complete to output all the result in the file .It stops on some steps and show App.app_ap_reason_code not coded in table "AP_X_ref" [SQLSTATE 01000]the first part is some statement which is writen here to indicates the below content.There is no more error info.But if I just run sp individuly , it runs ok.Any idea |
|
|
SQL2000User
Starting Member
13 Posts |
Posted - 2007-01-15 : 14:07:32
|
And in job error history, the message is :An exception occurred in the TSQL subsystem. The step failed.thanks |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2007-01-16 : 07:25:47
|
Looks like you have an access problem....when you run code in QA...it runs with your security profile....when it runs off the agent it runs with SQL Agents security profile.It also deals with drives local to the user/context it is running under...so "yourdrive:\youroutputdir" could be on the server in this case |
|
|
|
|
|