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)

String Replace in Stored Procedures with Powershell

By Michael D'Spain ,

A customer had an issue where quoted_identifiers was being turned off for random SPs.  My task wasn't to find out why that was happening but to find a way to script out the SPs and replace the proper text and alter the procedures as it was causing an outage.  This script is intended to be run by the customer and on a box with the sqlps module.   Call the script from powershell proper or open the script in Powershell ISE and execute.   The script will ask you for a DB instance name.  Progress wil be written to the screen.

Hope you find this useful. 

Michael D'Spain 

http://thesurfingdba.weebly.com

Total article views: 231 | Views in the last 30 days: 190
 
Related Articles
FORUM

Monitoring script

script

FORUM

Script

Need Automated Script

FORUM

drop script

drop script

FORUM

Script component

Script component

Tags
 
Contribute