You migrated your labeling solution to Loftware Cloud, and you would also like to back up your existing SQL database to the SQL Azure database on . SQL Azure database has some limitations regarding user rights, so the standard SQL backup procedure won't work.
Generate scripts to create a backup of your local SQL database. Then, execute the scripts in the Azure SQL Database to restore your local database.
To backup your database:
-
Open SQL Server Management Studio (SSMS) and connect to your SQL Server instance.
-
Expand the Databases node in Object Explorer.
-
Right-click your database, hover over Tasks, and click Generate Scripts....
-
The Generate Scripts window opens. Click Choose Objects, then select the database objects you want to backup.
-
Click Next. The Set Scripting Options window opens. Click Advanced.
-
The Advanced Scripting options window opens. Click Types of data to script, then select Schema and data in a drop-down menu.
Click OK.
-
In the Set Scripting Options window, select Save as script file, define file path, then click Next.
Note
If you back up a big database, select the One script file per object option. SSMS will generate a separate export file for each table in your database.
-
The Summary window opens. Verify your settings, then click Next.
-
In the Save Scripts window, verify that all actions were successfully executed, then click Finish.
Your backup scripts are now generated and saved as .sql
files.
To restore your backup scripts in the Azure SQL database:
-
Open SQL Server Management Studio (SSMS) and connect to your Azure SQL database.
-
Click File > Open > File... and navigate to your backup
.sql
files on your local disc. -
Select your backup
.sql
file, then click Execute. -
If you created backup files for each table, repeat steps 2-3.
Your local SQL database is now restored on Azure SQL database.