How to ignore text within procedure during compare

CHurtCHurt Posts: 1 New member
In our stored procedures (that are system generated), the database name and schema name is included when tables are referenced.  Between our test and production environment, the database names are different.   When procedures are compared every one shows a difference due to the database name.  I would like to know if there is a way to mask the text string (ie.  "Test" or "Prod") during the compare.   I want the procedures to show as no differences when those value are masked/ignored.
Tagged:

Answers

  • Hi @CHurt

    Thanks for reaching out to us regarding this.

    I have discussed this with my colleagues and we don't think it is possible to easily achieve this given that this is code inside the stored procedure.

    Saying that, a possible workaround could be to make use of a synonym in place of the object name. Once the code has been generated with the synonym(s) in place you will then need to utilize the option to filter out synonyms in the comparisons. You will also need to ensure that the synonyms are in place on your Production (target) before finally running the comparison and deployment. 

    I hope that helps! However, please don't hesitate in coming back to us if you require any further clarification or help with this.

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.