We are in involved in several projects with Azure, and in one of them, we need to create an Azure Database to use with an Application Web and restore some information that we have onPremises on Azure Databases.
So, as you can imagine, is it not possible to restore a OnPremises database to Azure, you have to do additional steps, so the goal of this post is to explain that process:
First, you’ll need to create a SQL Database in Azure:
Give a name for the database. Once it is created, you will see the servername listed in the dashboard:
So, we need to start the SQL Server Management Studio and connect to the Azure database, entering the server name and Login credentials:
In SQL Server Management Studio, will now be listed the database created:
Next Step is to connect to the Local SQL server instance and generate the scripts:
The script generator will now start. In this instance I have selected to script the entire database
Before you create the script, click on the ‘Advanced’ button
Under the advanced options, be sure to select to script the database for SQL Azure
In my example, I chose to only script the schema but you can script the schema and or data
After you are done, create the script
Next step is to select Azure database in Management Studio and execute the script file you have previously generated
Hit f5…
After doing this, the schema will be created in the Azure database
Easy, isn’t it?