Reputation: 1287
I have a database on my on-premise SQL Server (SQL Server 2019 Developer edition) that have many views and stored procedures that reference another database, so from database A I have
SELECT *
FROM [DatabaseB].[dbo].[TableName]
Both extracting a data-tier application and deploying to Azure fails because of this.
UPDATE
Example Error Log Entry:
Error SQL71561: Error validating element [cp].[GL_Transactions_All]: View: [cp].[GL_Transactions_All] has an unresolved reference to object [DYNAMICS].[dbo].[MC40200].
How can I migrate both databases at the same time to my Azure SQL database?
Upvotes: 0
Views: 169
Reputation: 4552
Unfortunately, you can't do cross DB in Azure SQL. You need to convert them to fit inside one database in two different schemas. I'm also guessing you can't add a database reference in a SSDT project if the target is Azure SQL.
All you can do is merge the two databases into one, using schemas. Refer: Transfer data from one database to another database
Upvotes: 1