SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Post-Deployment - Scan for RefreshView/Recompile

By Nate Hughes,

I ran into an issue recently where a table was changed (in beta) and subsequently a view that relied on it was rendered unusable. The idea for this script stemmed from that - to create a script to quickly identify and refresh any view that depends on a changed table. There's room to grow as I realize this isn't a deep dive nor does it cover things like nested views, table functions, etc. but it's a good first pass CYA and I'd welcome any comments or suggestions.

Full disclosure: the dev who made the initial table change also made a note in our problem tracking system that the view should be dropped but failed to include a script to do so. That problem as also been mitigated.

Total article views: 445 | Views in the last 30 days: 1
 
Related Articles
FORUM

script to change the port number

script to change the port number

FORUM

Sql Script to change the Login Permission

Sql Script to change the Login Permission

FORUM

Script for changing the port number & disable Named Pipes protocol

Script for changing the port number & disable Named Pipes protocol

SCRIPT

Script to change auto growth settings for all databases in SQL Server

Script to change auto growth settings for all databases in SQL Server.

FORUM

Script for Changing Port Number of SQL Server 2005

Script for Changing Port Number of SQL Server 2005

Tags
deployment    
execution plans    
 
Contribute