CHECKCATALOG is failing on a database that originated in SQL Server 2000. I am getting errors of the type:
Msg 3853, Level 16, State 1, Line 1
Attribute (object_id=489156888) of row (object_id=489156888,column_id=1) in sys.columns does not have a matching row (object_id=489156888) in sys.objects.
There are 146 columns in
sys.columns that do not exist in
sys.objects. This represents 21 tables. If I could easily delete these rows from the
sys.columns view I would (blasphemy I know).
CHECKDB had not been ran before so these errors went undetected and all the backups will contain the same error.
My plan is to export the existing tables into a new database. But the db is 170GB so this is not trivial.
My question is this: can I just reuse my existing
.ldf files? Since the system tables are stored in the master database, I could create a
[new_work] database and attach the
.ldf files from the
[orig_work] database. Then when I drop the corrupt
[orig_work] db the bad entries would be deleted from the system table.
Would this work to fix my error?