December 21, 2007 at 4:26 am
I have been having errors with a script that runs in PHP connecting to a SQL 2000 database that has been running for a few years (with minor maintanance over this time).
The database is regularly maintained to only have recent transactional data but all of a sudden it has been having problems when sending an update after a series of inserts.
The PHP script has been logged out of the database with no proper error. I have a screenshot of SQL Profiler above and with the update statement which fails the next line, instead of reporting an exception just says 'Attention'.... this is baffling me as there is virtually nothing to go on to debug this.... I am starting to think my SQL Server may need a complete re-install.... I patched it to SP4 only a couple of days ago.
Any ideas?
Regards.
December 21, 2007 at 11:54 am
copy and paste your update statement from the profiler into query analyzer and see if it runs.
if not can you post the DDL for this table and the update statement?
December 21, 2007 at 12:26 pm
From BOL:
The Attention event class indicates that an attention event, such as cancel, client-interrupt requests, or broken client connections, has occurred. Cancel operations can also be seen as part of implementing data access driver time-outs.
Could you be timing out?
I would agree with Alex about trying it in Query Analyzer, but I would add that you should also check the execution plan to be sure that the update is still using indexes correctly. You may also want to manually update statistcs since you upgraded the server.
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
December 24, 2007 at 2:36 am
AlexSQLForums (12/21/2007)
copy and paste your update statement from the profiler into query analyzer and see if it runs.if not can you post the DDL for this table and the update statement?
Hi... yes I had already tried that.. should have mentioned it before. It does work if I run it on Query Analyser.... I had thought about the potential it was a timeout issue myself, so yes in a word there is nothing wrong with the syntax of the update query.
December 26, 2007 at 8:18 am
It may nort be timing out in Query Analyzer, but how long is it taking to run? The timeout settings on your connection from the PHP app may be shorter than the timeout settings in Query Analyzer.
Have you checked the web and sql servers event logs for network errors? The BOL article I quoted also noted there could be a network issue causing this as well.
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
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply