CREATE SYNONYM ( join multiple databases in tableau sql server)

por | 7 abril, 2016
  1. CREATE SYNONYM [dbo].[tbl1]
  2. FOR
  3. [db1].[dbo].[tbl1]

The above code, if run on db2, would create an object tbl1 which would behave as a table under the dbo schema in db2, but would actually reference [db1].[dbo].[tbl1].

If you are on 2000, then no, it’s fully qualified names or nothing, I’m afraid.

Nota: –>Ubicarse en la base donde se quiere hacer el sinónimo

CREATE SYNONYM dbo.persona
for dbentidad.dbo.persona

 

CREATE SYNONYM dbo.ente
for dbentidad.dbo.ente