Populating tables without comparing
crutledge
Posts: 10
Hi,
I'm sure this has been asked before but I can't seem to find it. I'm often in a situation where I have a local copy of a database, and I want to generate a script that will populate another copy of the database with the data I have locally. But I don't want to have to restore a dummy database and compare the tables in the two databases to get the script.
I'd like to be able to point to the table and say "Give me a script that generates the data in this table." How would I do that with SQL Data Compare?
Thanks,
C
I'm sure this has been asked before but I can't seem to find it. I'm often in a situation where I have a local copy of a database, and I want to generate a script that will populate another copy of the database with the data I have locally. But I don't want to have to restore a dummy database and compare the tables in the two databases to get the script.
I'd like to be able to point to the table and say "Give me a script that generates the data in this table." How would I do that with SQL Data Compare?
Thanks,
C
Comments
You might want to check out SQL Packager which can create scripts of your database (schema / data / both)
Redgate Software
David Atkinson
Red Gate Software
Product Manager
Redgate Software
I'm surprised it's not requested more often. I need to do this kind of thing all the time, although I may do things in an unusual way.
For the record, I would love to have something that let me select rows from a result set in SMS and automatically generate an insert script for them. Quest Software's Toad for SQL Server almost does this, but their syntax only seems to work with SQL 2010. And since I'm using SQL Prompt I'm much happier in SMS than their tool.
BTW, kudos on your tools. They make my life better every single day (except maybe weekends).
I don't know why the Generate Scripts feature is so hidden. It takes me a while to find every time I need it. It's a little too hidden to be practical for a repeat use case.
Thanks for the feedback,
David Atkinson
Red Gate Software
Product Manager
Redgate Software