Comparing Views and Trigger between dbs with different names

ramben76ramben76 Posts: 2
edited October 28, 2008 5:48AM in SQL Compare Previous Versions
Hi, I'm trying to compare the triggers and views from 2 different environments (PROD and DEV)

ENV PROD with databses:
A) DB_PROD
B) DB_PROD_AUDIT

ENV DEV with databases
A) DB_DEV
B) DB_DEV_AUDIT

DB_PROD triggers insert rows in DB_PROD_AUDIT
DB_DEV triggers insert rows in DB_DEV_AUDIT

When comparing tables between DB_PROD and DB_DEV, all of them are different because the triggers are inserting rows in 2 differents DBS

TRIGGER_IN_PROD (INSERT INTO DB_PROD_AUDIT..TABLE SELECT ...)
TRIGGER_IN_DEV (INSERT INTO DB_DEV_AUDIT..TABLE SELECT ...)

of course the trigger bodies are different because of the db name where the insert occurs, but I wanted to treat them like the same, because they are doing the same.

IS THERE A WAY IN SQL COMPARE TO SAY

treat this text in this object as this other text ? so the objects could be the same and I won't see the differences in the result (or the script to sync the databases)

SAME HAPPENS WITH VIEWS (and all objects with body: Stored procedures, etc)

VIEWS in PROD SELECT * FROM DB_PROD_AUDIT..
VIEWS in DEV SELECT * FROM DB_DEV_AUDIT..

all views are differents because of the database where the table resides, but I want to treat DB_PROD_AUDIT as DB_DEV_AUDIT

I hope you understand my question, because I'm not good at english.

THANKS.

Comments

  • We don't have a name mapping feature in SQL Compare (although it does exist in SQL Data Compare). This request comes up quite a lot so it is something we will certainly consider in future, especially if more and more people request it.

    David Atkinson
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.