Cross database query is not allowed in Sql Azure. Rather Azure has applied a different logic to use
the same.
Please check my article before proceeding with "sp_execute_remote "
http://an-it-solution.blogspot.in/2017/01/sql-azure-select-from-another-database.html
You need to create a SP in "DbCustomers" with the name of "LogEvents_Insert" which will be called by following query.
The below query will execute in "DbPayments " and insert data into "LogLogin" of "DbCustomers"
EXEC sp_execute_remote @data_source_name = N'DbUtilityLogging_Datasource',
@stmt = N'LogEvents_Insert @LoginID',
@params = N'@LoginId nvarchar(50)',
@LoginID='narender90'
the same.
Please check my article before proceeding with "sp_execute_remote "
http://an-it-solution.blogspot.in/2017/01/sql-azure-select-from-another-database.html
You need to create a SP in "DbCustomers" with the name of "LogEvents_Insert" which will be called by following query.
The below query will execute in "DbPayments " and insert data into "LogLogin" of "DbCustomers"
EXEC sp_execute_remote @data_source_name = N'DbUtilityLogging_Datasource',
@stmt = N'LogEvents_Insert @LoginID',
@params = N'@LoginId nvarchar(50)',
@LoginID='narender90'