When you define a synonym in SSMS, you cannot leave out the database and schema from the definition of the synonym, although this is permitted in the T-SQL syntax. Furthermore, even if you leave out the server name, when you later look at the synonym properties, you can't see whether the server name is part of the definition or not, asserver is always displayed.Whether there has to be a GUI for defining a synonym is questionable, given how simple the syntax is. But if you have one, you should do it right. Having the database name included by default in the synonym definition is not good. Let's say that the user define the synonym this way, and the restores a copy of database on the same server with a different name. Assume further that the user submits DML against the synonym, believing that he changes data in the current database, when he in fact is modifying data in another database.
Category