How to Ignore DataBase name while comparing?

sasikumarpsksasikumarpsk Posts: 5
edited August 4, 2011 1:25PM in SQL Compare Previous Versions
HI,
Is there any way to ignore database name while cmparing two diferent database in same server with only Database name change, remaing are unchanged. this is in SQL Compare 9 tool.

Comments

  • HI,
    Is there any way to ignore database name while cmparing two diferent database in same server with only Database name change, remaing are unchanged. this is in SQL Compare 9 tool.

    There is project option in tools, but i am not sure what for it is used. The option is --> Ignore DataBase name in synonyms
  • aolcotaolcot Posts: 27 Bronze 2
    You can compare two databases on the same SQL instance from the project options. Can you clarify exactly where you need to ignore the database name? Do you have hard coded database name references in your procedures/triggers for example that you are trying to ignore?

    Synonyms are a useful feature to allow you to use an alternative name for a database object that is could be local or remote. Or, as we use them, a means to reference an object in a different database on the same SQL instance without specifying a hard database name within the procedure or trigger.
  • yes i have hard coded database name references in my views..
    is there any way to ignore those...
  • aolcotaolcot Posts: 27 Bronze 2
    Unfortunately, I'm not aware that it is currently possible using SQL Compare to ignore database references that are in the definition of a view.

    Going forward, converting your hard coded database references to synonyms may be a potential solution.
  • in near future we might get this functionallity?
  • It's unlikely that we'll add this as an additional option unless there's sufficient demand for it. I think that the synonym approach may be your best bet.

    If anyone else needs this option, please add your request to this thread!

    Kind regards,

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