Best way to move tables/views from SQL Server 2016 to Azure SQL Database

Andrew Harris 96 Reputation points
2021-09-10T14:28:35.363+00:00

I made an Azure SQL Database and I am trying to use an SSIS package in Visual Studio to move tables and views to it from my desktop SQL Server 2016 database. I get an error message about the "USE" statement. I don't know why my script would even have a "USE" statement since I am not switching between databases. I am just moving tables and views from a single database locally to a single database in Azure. How can I fix this? Am I just going about this the wrong way?

Azure SQL Database
{count} votes

Accepted answer
  1. Andrew Harris 96 Reputation points
    2021-09-12T14:54:58.58+00:00

    Alberto,
    I was able to successfully migrate a database using the DMA. I had been selecting "assessment" instead of "migration". Once I switched to migration I was able to use SQL Server authentication and everything worked great. Thank you for all of your help.
    -Andrew


5 additional answers

Sort by: Newest
  1. Alberto Morillo 32,891 Reputation points MVP
    2021-09-12T02:20:33.207+00:00

    DMA takes care of many things in the background. It disables foreign keys and non-clustered indexes ahead of migration and re-enable them after data migration is done. It reads the data in parallel from the tables and perform BULK INSERTs into the target tables. It also takes care of identity columns and this can be a real problem, as some migration methods can left the seed value set to 1. This tool takes care of many challenges you many not see at this time.

    In addition, read here all the capabilities this tool has that probably you wont' have with SSIS or will require hours of your time to develop them in SSIS.

    0 comments No comments

  2. Andrew Harris 96 Reputation points
    2021-09-11T15:18:05.66+00:00

    I upgraded to "Pay as you Go" and still get the same error message:
    Failed to fetch subscription list from Azure.
    AADSTS16000: Either multiple user identities are available for the current request or selected account is not supported for the scenario.

    Are you sure I can't use SSIS to do this? I'm not trying to do a one-time migration. I need a way to regularly copy one or more tables/views from my local SQL Server 2016 to Azure SQL Database. This was very easy to do with SSIS when my cloud database was a SQL Server database. Now it seems to be very difficult. Am I missing something?

    0 comments No comments

  3. Andrew Harris 96 Reputation points
    2021-09-11T00:57:53.363+00:00

    I upgraded to "Pay as you Go" and I still get the same error message.


  4. Andrew Harris 96 Reputation points
    2021-09-10T20:59:55.917+00:00

    It forces me to log in to an Azure account first. There is no opportunity to specify the SQL database.