Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Move records with Image datatype column from database on one server to database on another server.

$
0
0

Hi Experts,

How can i transfer table records (having image datatype column with huge data) from database on one server to database on another server.

Issue detail :

I have to transfer records (with referneces) from one database server to another. Both databases have same schema but ID values will be different in Destination tables for referencing tables. The two database servers and not linked and cannot be linked. So I planned to create a script that will be executed on Source DB and it will generate an insert script for Destination DB. All is fine but when i try to create script for image column in one of the tables like below, i get garbage values instead of the hex image data.

declare @sql nvarchar(max)

select @sql = 'insert into dest_table (col1, img) Values ( ''something'' , ' +Convert(varchar(max),varbinary,img)))

Any suggestions on how i can move image data?

Thanks in Advance,

Vishal.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>