Stored procedure to search every field in the database for a string literal. Run the stored procedure in Query analyser, which will output sql statements to do the search. The output of these searches will be the update sql, which again should be pasted into a query analyser window. As the stored procedures do not do any updates directly, this is perfectly safe to run, and the outputted sql can be edited and split into batches if the database is too big. Excellent for solving the problem of troublesome "£" characters and searching for offensive data.
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,843 reads