Options

Cmd Line: Exclude missing objects with criteria

klatessaklatessa Posts: 4
edited October 3, 2011 10:42AM in SQL Compare Previous Versions
I am trying to do a compare where I want ignore missing objects from a specific schema. I have attempted a number of different permutations. If I could use the Missing operator in conjunction with a reg ex (as follows) it would be great:
/exclude:missing:\[dbo\]

Unfortunately it doesn't appear to be supported. Is there some other combination I can use to get there? Been spinning my wheels for awhile now.

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    It's all in the regex magic, I think. Try
    /exclude:missing:\[dbo\].\[.*
    
  • Options
    Thanks for the reply. I tried this as well as several other variations (even trying an exact match on a stored procedure name that was missing) and none of them work. It appears that the switch is completely ignored. I am guessing that regex functionality with the missing attribute is not supported.

    Please let me know otherwise.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Looks like you're right. You can use exclude:objecttype:regex or exclude:missing. Of course you could set ALL as the object type.
  • Options
    My problem is that there are old legacy objects in my database that I do not want in source control for varying reasons. But I do want to sync production objects that change to the production repository.

    So, my thought was that I could ignore any object in the production database MISSING from the production repository that is in the DBO schema (which is likely to have new objects in it based on our design standards).

    That way if an object in dbo that I care about changes OR if objects are put into one of our valid schema, then the comparison and synch will occur.

    I have come up with a work around using filters but it is a little cumbersome to maintain. I am really surprised that this is not supported. Seems like something that would be fairly common.

    Anyway. Thanks for your help. If you happen to run across a better solution or add the regex support for missing, additional, etc. let me know.
Sign In or Register to comment.