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


String Replace in Stored Procedures with Powershell


String Replace in Stored Procedures with Powershell

Author
Message
Michael DSpain
Michael DSpain
Right there with Babe
Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)

Group: General Forum Members
Points: 740 Visits: 189
Comments posted to this topic are about the item String Replace in Stored Procedures with Powershell
Sue_H
Sue_H
SSC Guru
SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)

Group: General Forum Members
Points: 77474 Visits: 15517
thedspaincrew - Tuesday, November 6, 2018 12:35 PM
Comments posted to this topic are about the item String Replace in Stored Procedures with Powershell


Not intended towards you but in general, the problem with the task
" 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".
So then with someone creating stored procedures with the setting off, they will need to run this every time that person deploys new stored procedures.
Seems the client should have worked on understanding the issue and knowing they could check sys.sql_modules to find the settings for the stored procedures. If it was me, I'd want to know that I was screwing this up every time. And I'd learn things in the process.

Sue



Michael DSpain
Michael DSpain
Right there with Babe
Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)

Group: General Forum Members
Points: 740 Visits: 189
It was an issue on the customer side. The application, obviously has a SQL Server backend, but it seems customers think databases just run themselves and don't require folks to work on them. They have no dedicated DBA resource. I provided this script to the customer as a way to fix an issue they were creating on their side. We have multiple customers using this application all over the world on this specific version that do not have this issue. Now if it was my database, that I managed, as a part of my SQL estate then yes I would agree, I should get to the root cause, but I am a "third-party vendor". I hope this better explains the issue.

Michael
Doug Bishoop
Doug Bishoop
SSC Rookie
SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)

Group: General Forum Members
Points: 48 Visits: 26
One concern, CREATE PROC and CREATE PROCEDURE are the same. This will not work if procedure was created using CREATE PROC.
Michael DSpain
Michael DSpain
Right there with Babe
Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)Right there with Babe (740 reputation)

Group: General Forum Members
Points: 740 Visits: 189
doug.bishop - Tuesday, November 13, 2018 12:16 PM
One concern, CREATE PROC and CREATE PROCEDURE are the same. This will not work if procedure was created using CREATE PROC.

regarding this issue, there were no "Create Proc" statements I had to worry about, but that could easily be accounted for.

thx
Michael

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search