Hi,
We still have databases running in 2008R2 100 compatibility mode.
Don't feel bad. I still have clients with SQL Server 2005 as well 😀
Recently, the job step that runs ALTER DATABASE [MY_DATABASE] SET READ_ONLY WITH ROLLBACK IMMEDIATE; after the RESTORE throws this error:
It is a bit hard to provide exact answer without checking the exact issue (the database) but in first glance (or first guess) it sound like there is a chance that your database is corrupted.
But did you notice this: "To check for database corruption, consider running DBCC CHECKDB.
"
The error which you get include multiple good suggestions/options. Have you tried any of these?
Without any more information and based on your description only, in your situation, I would probably start with running a check using DBCC CHECKDB on the original database which you backup.
Note! Founding that the database is corrupted might be much simpler then solve it. This can be a totally different story.
Note! In any case, I DO NOT recommend to made any attend to fix the database without someone with the right experience. In any case, make sure that you backup everything including all system databases as well before you do anything.
last note for noe: If one database is corrupted and the server exists so many years without proper checks then there is a good change you have more database(s). It is good to check all (again, after backup all)