Author |
Topic |
viktor
Starting Member
6 Posts |
Posted - 2009-02-17 : 18:38:00
|
I am receiving this message 6 times in one run, and it is ended with "The step succeeded". Doesn't happen every time, approximately every other execution. Does not affect the result. Please help.Thanks - Viktor |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
viktor
Starting Member
6 Posts |
Posted - 2009-02-18 : 10:00:57
|
The full message is:Executed as user: RACETRAC\SQLAdmin. Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170) Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170) Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170) Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170) Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170) Line 1: Incorrect syntax near '1'. [SQLSTATE 42000] (Error 170). The step succeeded. The code is rather big, and also is calling several stored procedures. What's strange, the error does not prevent the proc to complete successfully. Also, it doesn't happen every time.Thanks - Viktor |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-18 : 10:05:34
|
seems like this is happening inside a conditional branch. what does procedure do basically? does it involve dynamic sql? |
|
|
viktor
Starting Member
6 Posts |
Posted - 2009-02-18 : 10:20:46
|
The procedure retrieves data from a linked server, does some processing, and then inserts/updates on the "local" SQL Server 2000. It is doing this in a loop, i.e. it retrieves data from the linked server into a temp table, and then loops through its rows, building and executing dynamic SQL. The results are perfectly fine, and that's what bothers me most: Isn't it supposed to crash once a syntax error is encountered?Viktor |
|
|
viktor
Starting Member
6 Posts |
Posted - 2009-02-18 : 10:55:31
|
I forgot to tell that this proc is executed as a job, and the next step in the job looks like that:SELECT TOP 1 messageFROM sysjobhistoryWHERE job_id = 'F8F8A443-14AB-4A50-AB71-5B951334C079' and step_id = 1and the message is what I've posted. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-18 : 11:58:47
|
quote: Originally posted by viktor The procedure retrieves data from a linked server, does some processing, and then inserts/updates on the "local" SQL Server 2000. It is doing this in a loop, i.e. it retrieves data from the linked server into a temp table, and then loops through its rows, building and executing dynamic SQL. The results are perfectly fine, and that's what bothers me most: Isn't it supposed to crash once a syntax error is encountered?Viktor
we cant answer more on this without knowing whats the code inside the procedure. |
|
|
viktor
Starting Member
6 Posts |
Posted - 2009-02-18 : 12:08:48
|
Sorry can't do this, it's against the company policy. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-02-19 : 01:49:28
|
quote: Originally posted by viktor Sorry can't do this, it's against the company policy.
So, asking for help or posting only the error message is not against company policy? MadhivananFailing to plan is Planning to fail |
|
|
viktor
Starting Member
6 Posts |
Posted - 2009-02-19 : 12:47:45
|
The main procedure is 550 lines, it is calling some 5-6 other sps, etc. I don't think you have time/desire to parse such a monster, so I tried to present the core of the problem: How is that possible for the proc to get the error, and still keep running (it is SQL Server 2000, no try/catch). |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|