I'm migrating a database from Azure VM to Azure SQL Database. I tried to use the "Deploy Database to Azure SQL Database" function in SSMS but it failed several times, seemingly due to the size of the database (110 GB). So I made a copy of the source database on the same source server, truncated the table with the majority of the data in it, then tried the deploy again. Success.
Now I need to get that data from the original source table into the destination table. I've tried two different approaches to this and both gave errors
In SSMS, I connected to both SQL Servers. I ran the below while attached to the destination database:
INSERT INTO dbo.DestinationTable SELECT * FROM [SourceServer].[SourceDatabase].dbo.SourceTable
With that I was given the error:
Reference to database and/or server name in 'SourceServer.SourceDatabase.dbo.SourceTable' is not supported in this version of SQL Server.
- In SSMS, used the Export Data Wizard from the Source Table. When trying to start that job, I received this error during the validation phase:
Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "CaptureId"
How can I accomplish what should be this seemingly simple task?