scriptfile generation to syncronize db from scripts folder

rchanrchan Posts: 11
edited March 6, 2008 12:52PM in SQL Compare Previous Versions
I am using the command line and the argument /scriptfile to create a single generated script.

Is it possible to generate multiple script files instead of one long concatenated set of differences?

I work at a company where we deploy to the production database with a set of changed scripts -- e.g. lets say there are 100 stored procedures. During a bug fix, we modify 3 of the stored procedures.

The developers give the 3 scripts the DBA to execute in the production environment.

What we are trying to accomplish is to automate our deployment package so that a developer doesn't have to manually select the 3 scripts that are different for inclusion into a build package.

Thoughts?
Thank you.

Comments

  • Michelle TMichelle T Posts: 566 Gold 1
    You can generate individual object creation scripts for objects in your database by saving the database as a script folder (from the Save Data Source... button or menu option), but these are individual creation scripts rather than change scripts and they don't ensure that all of the dependancies are looked after (they're designed as a repository of information about your database that you should apply using SQL Compare, not something to run directly, although they can in fact be run directly if all of the dependancies have been appropriately dealt with).

    I'm not certain exactly what you are attempting to do - what should the contents of each of the script files be? Could you achieve the result that you want by selecting just the objects that you want in a particular script before generating the synchronization script (using the /include or /exclude command line options)?
    Software Developer
    Redgate Software
  • I'm looking for flexibilty in creating the script file.

    For example, developers do not control (or own) user roles and permissions on objects. It would be nice, for example, if when doing script - db synchronization, that all the users/roles/permissions could be scripted in its own files, while each stored procedure difference be scripted in its own file, etc.

    But yes, it looks like I will have to use SQL Compare to generate a list of differences, and then use my own scripting tools to copy the scripts to form my own deployment package to install on the database. Thanks.
Sign In or Register to comment.