The Situation
I come from PHP + MySQL background and I’m migrating an ASP website.
I’ve migrated them a few times before, but in this case I’m encountering a couple of issues that disorient me and are preventing me from importing a database.
The Obstacles
- I downloaded, through Plesk (current version as of writing of this post), a backup of the MS SQL database. But upon opening it I find strings of numbers, not SQL. Thus I cannot do a find and replace of the website URL.
Ex.
5441 5045 0000 0300 8c00 0e01 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
- When I connect to MS SQL via
myLittleAdmin
and navigate to Tools > New Query and attempt to use aFIND
orSEARCH
command, as I would in MySQL, it simply doesn’t work.
I search the MS SQL documention for similar commands but couldn’t locate any. And all of the Questions here on Stack Overflow that come up related to my question have huge queries that have a lot of syntax / code that is irrelevant to the simplicity of my question.
The Question
Can someone help me understand what I’m missing here?
Ultimately I am just seeking the MS SQL code I write to search the entire database for an instance of a particular string of text.
2
Answers
I hired someone to write the script for me.
Here is the
find
script (update line 2, "TEXT_TO_SEARCH"):And here is the
find and replace
script (update line 13):Please see the following SO post on obtaining a dump: How can I get a SQL dump of a SQL Server 2008 database?
From there, locate the text in question then update the actual DB accordingly once you’ve identified the requisite tables and columns.