tags:

views:

15

answers:

2

Hi,

We need to deploy some sample data along with the application. The idea is after the deployement of application, and setting up the database. there should be some sample data available to users .This data is around 30-40 rows in 4 tables.

What should be the best approach to achieve this. 1. Insert SQL scripts 2. Export data to files and then We should write a program which will import it 3. SSIS package, i dont know about it.. just read somewhere.

Another consideration is that there is foreign key constraint on the table where data needs to be transfered. So while transfering data I need to select the key from exisiting table, update my data and then insert in the target table. Please help.

Thanks.

A: 

Sounds like not a lot of data, so just scripts would be the easiest option.

However they would be awkward to update if not generated from a program that can be changed when the requirements change.

ck
A: 

Go for the scripts option.

If you are maintaining the test data on your development box then you can use the SSMS Tools to generate the insert scripts for you.

Barry
Hi Thanks for suggesting SSMS. I tried it, its good. The problem i faced it, two columns in my table have datatype as ntext and varbinary. ntext has xml data string, and after generating insert scripts from SSMS and executing them, it gives syntax error. Any idea?
ksa