SQL0911N The current transaction has been rolled back because of
a deadlock or timeout. Reason code "<reason-code>".
You´re trying to run statistics for a table that´s being locked in another transaction. If those are select only table, make sure that the Isolation Level of the application accessing those tables are NOT Repeatable Read, if they are, change them to Cursor Stability (Read Commited), or at least issue a commit after every Select Statement.
Originally posted by akratz
I have a script that runs nightly and does runstats on some select tables. It sporatically fails on some of the tables with the following error:
SQL2310N The utility could not generate statistics. Error -911 was returned.
The stats command was:
runstats on table db2admin.s_srv_req and detailed indexes all shrlevel reference
Has anyone seen this or know why it would work sometimes but not always. Sounds like contention but should the shrlevel take care of that?