I have a testing environment where I have scheduled jobs running restore tests as well as DBCC checks. These jobs run to:
1) copy database back up from the prod.
2) DROP all existing databases except dba_utility
3) restore the backup
4) run dbcc checkdb
I frequently get:
Time-out occurred while waiting for buffer latch type 2 for page (1:3564879), database ID 7.
The weird thing is, there is no database with an Id of 7.
Maximum Id in sys.databases catalog view is 6. (Remember, the job DROP all databases before the restore operation except dba_utility whose Id=5. The newly restored database is assigned the Id of 6.)
Prod environment is 2008 R2, test environment is 2012 SP1.
What might be causing this?