September 1, 2009 at 3:45 pm
I am new to SQL Server, and received this MOM alert from a SharePoint server talking to a SharePoint database:
Alert: Unknown SQL Exceptions
Last modified by: System
Alert description: Event ID 5586 from Source Windows SharePoint Services 3 on agent computer
Incorrect syntax near the keyword 'AND'.
How would I go about tracking this down? Run SQL Profiler looking for "AND" statements, or something similar?
Regards,
Jeff
September 3, 2009 at 7:55 am
Do you have the instance where it occurred?
If it's a syntax error, I doubt you'll see it in the trace events because it won't execute, it'll fail to get past the optimizer. Hmmm... I'm not sure.
I don't know about your code, but searching my code would find quite a few instances of the phrase 'AND.'
You might try, and I don't think it will work, but you can try, to search against the cache in sys.dm_exec_query_text.
I'm just not sure. I've never tried to capture a syntax error before.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 3, 2009 at 8:36 am
Grant,
Thanks for the response. I do have the instance where it executed. I might have the developers search their codebase.
I'll try looking for the proverbial needle-in-a-haystack in the cache.
September 3, 2009 at 11:35 am
You could probably run profiler and select some of the "Error and Warnings" events and see what it turns up. I used this before in a similar situation.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply