Don't compare EXECUTE AS

AdamRAdamR Posts: 19
edited May 18, 2010 9:01AM in SQL Compare Previous Versions
How do I not compare the execute as on triggers and procs? I also am looking for how not to compare FOR versus AFTER on the trigger keyword.

Comments

  • Thanks for your post.
    How do I not compare the execute as on triggers and procs?

    This isn't possible with the current version, but we might be able to add an option. Is it common for you to have the same stored procs executed under a different security context on different databases?
    I also am looking for how not to compare FOR versus AFTER on the trigger keyword.

    Again we could have an option, but I would think this is a very significant difference that you would always want synchronized. Could you give me an example of a situation where you would want to ignore this difference?
    Chris
  • It's actually an SMO thing. When we build the new database with SMO and compare it to an old one, SMO fills in all the default options like EXECUTE AS, makes keywords like CREATE TRIGGER all caps, uses the keyword AFTER instead of FOR for triggers, etc...

    So, when comparing to our previous versions, it flags all these as differences, so I don't really care about them. Obviously, that is kind of our issue, because our old version wasn't properly formatted. So, I guess I was just looking for a way to specify an algorithm or a way to exclude certian things. You can filter out certain objects, but it would be cool to filter out things like CASE for creation statements, or ignore EXECUTE AS or at least if none is specified it matches it to the default.

    As a side note, one other thing we do have is our customers can create tables and columns in our database. These are prefixed with ud so, with the algorithm theory, I would want to say ignore all columns that start with [x]* or whatever.
  • Michelle TMichelle T Posts: 566 Gold 1
    You can already filter out tables starting with a particular string using the filter panel (which shows up when you press the filter button on the toolbar).

    Unfortunately there's no way to currently filter out individual columns for any reason - table comparisons are all-or-nothing.
    Software Developer
    Redgate Software
Sign In or Register to comment.