SQL Server 2008 - Script Data as Insert Statements from SSIS Package

Posted by Brandon King on Stack Overflow See other posts from Stack Overflow or by Brandon King
Published on 2010-05-11T15:18:44Z Indexed on 2010/05/11 15:24 UTC
Read the original article Hit count: 264

SQL Server 2008 provides the ability to script data as Insert statements using the Generate Scripts option in Management Studio. Is it possible to access the same functionality from within a SSIS package?

Here's what I'm trying to accomplish...

I have a scheduled job that nightly scripts out all the schema and data for a SQL Server 2008 database and then uses the script to create a "mirror copy" SQLCE 3.5 database. I've been using Narayana Vyas Kondreddi's sp_generate_inserts stored procedure to accomplish this, but it has problems with some datatypes and greater-than-4K columns (holdovers from SQL Server 2000 days).

The Script Data function looks like it could solve my problems, if only I could automate it.

Any suggestions?

© Stack Overflow or respective owner

Related posts about ssis

Related posts about ssis-data-tranformations