Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/joe/wp-config.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/feed-rss2.php on line 8
SQL Server Corruption https://www.sqlskills.com/blogs/joe/category/corruption/ SQL Server Performance Tuning, High Availability and Disaster Recovery Blog Sat, 02 Feb 2013 16:58:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 One resolution to “sys.sql_dependencies does not have a matching row” https://www.sqlskills.com/blogs/joe/one-resolution-to-sys-sql_dependencies-does-not-have-a-matching-row/ https://www.sqlskills.com/blogs/joe/one-resolution-to-sys-sql_dependencies-does-not-have-a-matching-row/#comments Mon, 21 Nov 2011 11:59:00 +0000 /blogs/joe/post/One-resolution-to-e2809csyssql_dependencies-does-not-have-a-matching-rowe2809d.aspx This particular issue I’m about to describe should be pretty rare, but I’m posting this here in the event that someone else encounters it and then finds this post and then hopefully applies the “minimum required dose” required to fix the problem instead of using more sweeping methods such as restoring from database backup…  I […]

The post One resolution to “sys.sql_dependencies does not have a matching row” appeared first on Joe Sack.

]]>
This particular issue I’m about to describe should be pretty rare, but I’m posting this here in the event that someone else encounters it and then finds this post and then hopefully applies the “minimum required dose” required to fix the problem instead of using more sweeping methods such as restoring from database backup… 

I had a case today where the following message (with different ids) was appearing in DBCC CHECKDB output across several SQL Server 2005 databases that had original been hosted on SQL Server 2000 instances:

Check Catalog Msg 3853, State 1: Attribute (referenced_major_id=117575457,referenced_minor_id=1) of row (class=0,object_id=1589580701,column_id=0,referenced_major_id=117575457,referenced_minor_id=1) in sys.sql_dependencies does not have a matching row (object_id=117575457,column_id=1) in sys.columns.

Given that sys.sql_dependencies is on the deprecation path (in favor of sys.sql_expression_dependencies) – one might decide to ignore the errors, but living with this kind of noise in DBCC CHECKDB might cause you to then not pay attention in the event that more critical corruption errors occur.

While there are a few invasive solutions for clearing out a metadata mismatch between sys.sql_dependencies and sys.columns, if you’re encountering this issue between sys.sql_dependencies and sys.columns, first try EXEC sys.sp_refreshsqlmodule for the applicable object (for example – stored procedure) instead.  This system stored procedure will then update the metadata associated with the module and, as in today’s case, clean up the mismatches and corruption warnings in DBCC CHECKDB.

The post One resolution to “sys.sql_dependencies does not have a matching row” appeared first on Joe Sack.

]]>
https://www.sqlskills.com/blogs/joe/one-resolution-to-sys-sql_dependencies-does-not-have-a-matching-row/feed/ 2