SQL-DBA-01 (9/26/2016)
Hi Experts,Wanted to know if there is there any way to have database names aliases in SQL Server?
For example, there is a database with Name: "database A". Can we give the same database an alias: "database B"?
Nope, an synonym has to point at an object...something is sys.objects basically, and the Server.database context can be on another serv er,, or in another database, or in the same database.
so there's no partial object name masks like you were hoping for to help with portablilty.
you could make a procedure that modifies synonym definitions, which might get you close to what you are after.
Lowell