views:

246

answers:

3

I've never been able to find a good script or plugin for sql server Management Studio (2005 and or 2008) for a very common scripting need: specifying a few/all rows in a table and scripting their insert. You can guess my story: I've got some configuration data in my dev db and I need to script it for deployment to UAT and then production.

I've found a few cludgy systems in the past, that were more trouble than they were worth. I need something free and unobtrusive. Once I find it I'll share it with the other 20 developers in my shop who are annoyed by this. Aren't we all annoyed by this by the way?

What is the best, easiest, free, way to specify a few/all rows in a table and get a script their insert?

Edit

Resolution: SSMS Tools Pack rocks! Just what I was looking for: free, unobtrusive, simple, solid. It's got a lot of other handy additions too that I look forward to exploring.

+1  A: 

You can use RedGate Data Compare to compare table(s) across databases. It will generate inserts for you.

Raj More
+1  A: 

Well anytime we add rows to a lookup table in dev, we do it in an insert script which is put into source control like the rest of the project. Then the script is run as part of deployment.

HLGEM
right. Once the dust has settled on a table, this is the way to do it. The way I often do it. But sometimes that data changes as the system is developed, and you don't know how exactly the data should be until a certain point. And at that point, you've got 40 or so existing rows that need to be scripted.
Patrick Karcher
We have linked servers set up between dev and prod, so I usually do ascript of an Insert to prod with a select using the linked server on dev and whteever critieria I need to get the records I want if I need a group of records.
HLGEM
+2  A: 

The SMSS Tools Pack can do this. Sorta.

Alex K.
hmmmm, that's looking like it might be it. I'll look into this SMSS Tools thing. . . Couldn't wait, looked into it for a few minutes. This seems like something I wish I had found out about before. Must investigate more.
Patrick Karcher