Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 BLOB File

Author  Topic 

Chirag23
Starting Member

13 Posts

Posted - 2011-11-11 : 10:00:05
Hi,

A users current BLOB file on the live server seems to have corrupted and I would like to restore this file from a previous backup which is on the test server.

The live db is running SQL2000 and the test db is running SQL2005.

I would like to export the existing BLOB file from the backup running a command like:

Select TIMERS from USERST where USERID = 'CDP'

The BLOB field is called TIMERS and the result shows something like this:

0x04000000BEBA000423343234DDE ...etc

What I'd like to do is just export this field and import it back into the live system, in the exact same location and replace whatever is there.

Do I use something like

Save results as... then take the CSV file and try this:

UPDATE TIMERS="[copyfromcsv]" from USERST where USERID = 'CDP'

I've yet to try this as I don't think this is the correct way of doing this and was hoping somebody could point me in the right direction.

Thanks

Chirag

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-11-11 : 10:10:49
By blob do you mean an image?

Restore the backup then use ssis to copy the row to the live server.
Once there I think you will have to use updatetext to update the image or maybe delete and insert the row.

Not really sure what was available in v2000.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Chirag23
Starting Member

13 Posts

Posted - 2011-11-11 : 10:17:15
Its not an image but actually a timekeeper program that just retains the information of all the timers the user sets up so I would guess its some form of alphanumerics.I'll need to look up what SSIS is. Will get back to you. Thanks
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-11-11 : 10:24:26
>> a timekeeper program
That's the application - you have a problem with tthe data. What you have posted looks like an image or binary dtatype.
try scripting the USERST table and check the datatype of the TIMERS column.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -