This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A blank wooden fingerpost on a moor, one arm pointing to the stone footings of a vanished cottage

Finding Procedures That Reference Databases That No Longer Exist

March 13, 2019
Pinal Dave
SQL Tips and Tricks
DBA, Dynamic SQL, SQL Dependency, SQL Stored Procedure

Find procedures that reference databases missing from the instance, retain review coverage, and check dynamic SQL and synonyms separately.

Read More
A polished wooden ship's wheel on an old ship's bridge with a child's swimming bag hanging from one spoke.

Finding User Objects in master Created by Accident

July 24, 2017
Pinal Dave
SQL Tips and Tricks
DBA, SQL Dependency, SQL Server, SQL System Table, System Database

Find user objects in master, inspect their purpose and dependencies, and prepare a safe move without removing deliberate server helpers.

Read More
A hand holding scissors over one thread of a crocheted lace doily with a red vase resting on it.

What Breaks If I Drop This Column? sys.sql_expression_dependencies

July 19, 2016
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Dependency, SQL Server, SQL System Table

Use sql_expression_dependencies and referencing-entity queries before a column change, then check module text and external callers for gaps.

Read More
A dusty high kitchen shelf of forgotten appliances, a hand lifting a red fondue pot down into a box.

Finding Dead Code: Stored Procedures Nobody Calls

December 8, 2015
Pinal Dave
SQL Tips and Tricks
DBA, SQL Dependency, SQL DMV, SQL Stored Procedure

Investigate dead code with cached procedure statistics, dependency checks and retained snapshots, then quarantine candidates before removal.

Read More
A power strip under a table with cables to a lamp, a radio and a kettle, one cord vanishing through the floor.

Finding What Depends on a Table

January 15, 2014
Pinal Dave
SQL Tips and Tricks
SQL Dependency, SQL Server, SQL Stored Procedure, SQL System Table

Finding What depends on a table starts with sys.dm_sql_referencing_entities, then checks cross-database code and dynamic SQL.

Read More
A bicycle pedal is detached beside the bicycle while its chain and other connected parts remain visible

Decommissioning a Database: A Safe Checklist Before the Drop

July 17, 2012
Pinal Dave
SQL Tips and Tricks
DBA, SQL Backup and Restore, SQL Dependency, SQL Monitoring

Dropping an old database is a one-way door. Here is the short checklist I run first, with a demo you can paste into SSMS.

Read More
A hand checking an unlit firework rocket standing in a bottle on a garden wall, the matches still closed.

SET NOEXEC and PARSEONLY: Checking a Script Without Running It

January 4, 2012
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Dependency, SQL Server, SQL Stored Procedure

Use PARSEONLY and NOEXEC to inspect scripts without executing them, understand deferred references, and check existing module dependencies.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com