Restored SCCM2012 from snapshot, DB complaining (SQL 824), DBCC CHECKDB complaining
I have really fouled things up here :(
I was looking at Office365 and installed DirSync on my SCCM server - thinking it had SQL already and is a secure server. Unfortunately I didn't read the documentation (I'd hit TechNet tab explosion hell) and so didn't realise I needed to run with a command line switch to get DirSync to use the existing SQL - instead it just went ahead and installed SQL2012. I didn't want that, so I uninstalled it all (SQL2012 as well), reinstalled on the existing DB, but SCCM had gone wrong and and and...
So I decided to restore from backup.
I have restored the server from DPM snapshots half a dozen times now. Every time I bring it back, it wants to run a chkdsk at boot. If I don't, the event log fills with complaints from NTFS about file structure. Once I do, the event log fills with complaints about SQL 824 events ("SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:59769; actual 0:0)" etc.).
I try and run
DBCC CheckDB ('CM_KGG') WITH NO_INFOMSGS, ALL_ERRORMSGS
Msg 8921, Level 16, State 1, Line 1
Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors.
in reply. TempDB has 8.875MB free out of 17.1875MB, but my understanding is it should grow automatically anyway.
The server is virtual, so I don't see how it can be hardware failure causing these problems. SCCM2012 still runs despite all these errors in the logs. This happens with multiple backups.
What the bloody hell can I do to make it all ok again? Can I get SQL to repair the DB or is a system table too thoroughly borked? Can I rebuild the DB in SCCM?
/feeling really, really stupid atm :(