sql - Extract Data into Reload Scripts -


i have set of legacy test data on several sql server databases want extract in form can replay onto empty database (with same schema). want can manage test data sql scripts (or other script format) in source code control system - test data created on many years exists sql server backups.

i dont think sql server can extract data in format allow replay in referential integrity compliant order - or can ? alternatively there technical method doing not require dropping referential integrity on destination database while doing data load ?

this not quite straightforward 1 wish, possible - use exact setup describe @ workplace.

in order generate insert scripts data, follow these steps:

  1. open connection database engine in sql server management studio

  2. right-click database, , choose "tasks"->"generate scripts...". wizard opens.

  3. click "next" couple of times, until @ "set scripting options" step. there, click "advanced" button.

  4. in list opens, scroll down find "type of data script", "schema only" selected. change "data only" or "schema , data" depending on need ("data only" fit description in question).

  5. choose save generated script (if have lot of data, specified file idea avoid outofmemory errors...) , click "next"/"finish" appropriate generate script.

good luck!


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -