|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 2:49 PM
Points: 69,
Visits: 220
|
|
Hi all, What is the best (fastest) way to export data into a flat file if one of the columns is varbinary(max)? I am trying the following:
DECLARE @table VARCHAR(128), @file VARCHAR(255), @cmd VARCHAR(512)
SET @file = 'C:\temp\' + @db_in + '.' + @schema_in + '.' + @table_in + '.dat' SET @cmd = 'bcp ' + @db_in + '.' + @schema_in + '.' + @table_in + ' out ' + @file + ' -n -T ' EXEC master..xp_cmdshell @cmd END but it is taking some time and I am suspecting BLOB column being the offender. Is there another way?
Thanks,
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 3,163,
Visits: 4,342
|
|
First of all, is it really neccessary to export the BLOB column to a flat file? this will be huge. an alternative is to use SSIS...
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|