Problem / Solution
One of the tasks of DBAs is to maintain the database and correct or remove any objects that reference invalid objects. If you have a database with lots of objects, it can be very time consuming to check each object for invalid references. In this video tip we will look at using PowerShell along with sys.sp_refreshsqlmodule to help you identify which objects may be referencing invalid objects.
Key Learning Items
- Using PowerShell to loop through servers, databases and database objects
- Using sys.sp_refreshsqlmodule
Read Companion Tip

Tim consults for FinTek Development and teaches the course Automating ETL on Udemy. He’s worked with technology since high school, helping his school win its first TCEA award and continues to work in automation, data architecture, back-end development, and smart contract architecture. Tim enjoys testing new technologies early in the diffusion of innovation curve and was an early adopter of NoSQL and smart contract development. He has a blog at http://www.fintekdev.com/ and helps contribute to local technical and financial events in Texas.

