What are the challenges you face when working across database platforms? Take the survey
Options

Include some identical objects in deployment script

LxocramLxocram Posts: 25 Bronze 3
edited February 7, 2017 6:23AM in SQL Compare
Is there an option to include identical objects in the selected objects for deployment?
I know you can include them in the "change report" html but i can't select them in object selected for deployment script (= is grayed out)

Is want to compare database A to itself - select certain objects - generate script (alter) - do some text replace in the generated script.

My workarounds for now ->
*compare to an empty database and replace create by alter in the generated deployment script - do the text replace and execute script on original database instead of empty
*compare to empty database -> do text replace in creation script -> compare to the original database
*checkout the project from source control svn - do text replace there - commit to svn - get latest from svn to original database

Comments

  • Options
    Hi,

    This is not something we support in the tool. I'd be interesting knowing more about the changes you are trying to deploy but are not being flagged by SQL Compare.

    David
    Software Engineer
    Redgate Software
  • Options
    LxocramLxocram Posts: 25 Bronze 3
    The changes are not flagged by SQL Compare because they are not there yet.
    I'm trying to use the SQL compare to script out a selected range of objects in one script and then implement the changes on that script.

    Think big refactors eg:
    *changing a column name in a range of tables and/or views that are not always "interdependent"
    *replacing a UDF with inline code
    *changing filters and business rules in a range of views
    *applying style-formatting to a range of objects

    so i'd have a script like :
    ALTER VIEW vw1
    ALTER VIEW vw2
    ...
  • Options
    Hi,

    If I understand correctly you're looking for a way to select a subset of the objects in your database and generate the ALTER statements for all of the them in one script? This will then be run against the same database to complete your refactoring.

    If so this sounds like it would be more at home in our SQL editing and refactoring tool - SQL Prompt. I've checked with the development team and while this is not something that is currently available they would be interested in hearing your suggestion on their UserVoice.
    Software Engineer
    Redgate Software
Sign In or Register to comment.