Error 7788



Message text

WARNING: An explicit or implicit HOLDLOCK or NOHOLDLOCK was specified for table '%.*s'; however, since this is an isolation level 0 scan, the HOLDLOCK or NOHOLDLOCK is ignored.


Isolation level zero (0) allows transactions to read uncommitted data (dirty reads). You can specify isolation level 0 for your queries using the at isolation syntax, or you can specify level 0 for your session as part of the transaction isolation level option of the set command. Adaptive Server’s default transaction isolation level is 1.

The holdlock parameter makes a shared lock on a specified table or view more restrictive by holding it until the completion of a transaction (instead of releasing the lock as soon as the required data is no longer needed, whether or not the transaction has been completed). Setting transaction isolation level 3 with a set command implicitly applies a holdlock.

The noholdlock parameter prevents Adaptive Server from holding any locks acquired, regardless of the transaction level currently in effect.

Error 7788 is a warning message that is raised during query execution when level 0 (zero) scans are active and the query includes an explicit or implicit holdlock or noholdlock parameter. The query is executed and the transaction isolation level 0 option of the set command takes precedence over the holdlock or noholdlock parameter of the query.


To use holdlock or noholdlock in your query, use the transaction isolation level option of the set command to change the isolation level to a value other than 0 (zero) for your session:

1> set transaction isolation level <n>
2> go

Where <n> is the value to which you want to set the isolation level. Then re-enter your query.

Additional information

Refer to the Transact-SQL User's Guide for information about selecting an isolation mode for a query or for your session.

Refer to the Reference Manual: Commands for information about holdlock and noholdlock.

Versions in which this error is raised

All versions