Quantcast
Channel: Answers for "Changing variable value in 300+ stored procedures"
Browsing all 8 articles
Browse latest View live

Answer by Bob Hovious

Using SSMS, you can look at the Object Explorer Details tab and highlight multiple procedures to script them out as ALTER or DROP AND CREATE. They will all wind up in one screen with appropriate GO...

View Article


Answer by Laerte Junior

EXCELLENT Rob !!!!!. I´m a Powershell Enthusiast, can be somenthing like this :foreach ( $StoredP in Get-ChildItem SQLSERVER:\SQL\YOURSERVER\default\databases\YOURDATABASE\storedprocedures ) { $TextSP...

View Article


Answer by AlexS

You can also do this with plain T-SQL:DECLARE @sql nvarchar(max) DECLARE c CURSOR FOR SELECT [definition] FROM sys.sql_modules OPEN c FETCH NEXT FROM c INTO @sql WHILE @@FETCH_STATUS = 0 BEGIN SET @sql...

View Article

Answer by James Moore

I can't directly comment on AlexS's solution for some reason but if you use sp_rename at all then watch out as the create sql is not updated and you will end up renaming your stored procedures back to...

View Article

Answer by Bob Hovious

Using SSMS, you can look at the Object Explorer Details tab and highlight multiple procedures to script them out as ALTER or DROP AND CREATE. They will all wind up in one screen with appropriate GO...

View Article


Answer by Laerte Junior

EXCELLENT Rob !!!!!. I´m a Powershell Enthusiast, can be somenthing like this :foreach ( $StoredP in Get-ChildItem SQLSERVER:\SQL\YOURSERVER\default\databases\YOURDATABASE\storedprocedures ) { $TextSP...

View Article

Answer by AlexS

You can also do this with plain T-SQL:DECLARE @sql nvarchar(max) DECLARE c CURSOR FOR SELECT [definition] FROM sys.sql_modules OPEN c FETCH NEXT FROM c INTO @sql WHILE @@FETCH_STATUS = 0 BEGIN SET @sql...

View Article

Answer by James Moore

I can't directly comment on AlexS's solution for some reason but if you use sp_rename at all then watch out as the create sql is not updated and you will end up renaming your stored procedures back to...

View Article

Browsing all 8 articles
Browse latest View live