Showing posts with label blob. Show all posts
Showing posts with label blob. Show all posts

Friday, February 24, 2012

Bulk import images to binary object in SQL 2000

I have a web application that I am rebuilding. I have many picture files that want to take off the file system and move into SQL as a blob. I will create an index of uids against the file names but need a good way to bulk add the files to the database... any hints on code or tools would be a great help.

Thanks

Bill

You can use a utility 'textcopy' in 'Command Prompt' under the SQL instance directory:

C:\Program Files\Microsoft SQL Server\MSSQL$InstanceName\Binn

FYI, you can use it as following, make sure the command in a single line:

====Copy data from file to table====

textcopy /S labsh96223\iori2000 /I /F c:\xml\iori.bmp /D northwind /T testImage /C img /U sa /P /W "where idx=2"
====Copy data from table to file====

textcopy /S labsh96223\iori2000 /O /F c:\xml\iori.jpg /D northwind /T testImage /C img /U sa /P /W "where idx=2"

You can also use some programming code (written in VC++,C# etc.) to manipulte the binary data of BLOBs between files and database.

Sunday, February 19, 2012

Bulk extract/export BLOB data?

Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
kit) that will bulk BLOB export data?
MortenTextcopy.exe might be what you need.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://weblogs.asp.net/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"hansiman" <hansi@.hotmail.com> wrote in message
news:7a8pp050vnkp7f1se31lpr9o6rljg2ie2h@.
4ax.com...
> Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
> kit) that will bulk BLOB export data?
> Morten

Bulk extract/export BLOB data?

Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
kit) that will bulk BLOB export data?
Morten
Textcopy.exe might be what you need.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://weblogs.asp.net/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"hansiman" <hansi@.hotmail.com> wrote in message
news:7a8pp050vnkp7f1se31lpr9o6rljg2ie2h@.4ax.com...
> Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
> kit) that will bulk BLOB export data?
> Morten

Bulk extract/export BLOB data?

Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
kit) that will bulk BLOB export data?
MortenTextcopy.exe might be what you need.
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://weblogs.asp.net/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"hansiman" <hansi@.hotmail.com> wrote in message
news:7a8pp050vnkp7f1se31lpr9o6rljg2ie2h@.4ax.com...
> Is there a tool (like Bulk Image Insert (bii.exe) from sql resource
> kit) that will bulk BLOB export data?
> Morten