There is such a task - to get these tables from another database ( DB2 ) in one database ( DB1 ) and compare them. Since Azure does not support cross-requests between databases, I go through EXTERNAL DATA SOURCE :
CREATE EXTERNAL DATA SOURCE RemoteDS WITH (TYPE = RDBMS, LOCATION = '<path>.database.windows.net', DATABASE_NAME = 'DB2', CREDENTIAL = SQL_Credential --объявлен выше ) ; CREATE EXTERNAL TABLE [dbo].[Employee] ( [Name] [nvarchar](255) NULL, [Id] [int] NOT NULL, ) WITH ( DATA_SOURCE = RemoteDS ); As far as I understand correctly, in the name EXTERNAL TABLE you need to specify the name of the table in DB2, however, in DB1 there is already a table with the exact same name (with it you need to compare). Accordingly, it is impossible to create an object with the same name.
Is there any way around the situation with names or other ways to compare two tables with the same name in different databases?
CREATE EXTERNAL TABLE [dbo].[DB2_Employee] (...) WITH (DATA_SOURCE = RemoteDS, OBJECT_NAME = N'Employee');, well, or create an external table in another scheme. - i-oneOBJECT_NAMEall worked (added optionSCHEMA_NAME), thank you - Eva Nikolaeva