Project Description
The Windows Azure SQL Database Import/Export Service supports creating bacpac files from Azure.
This site contains information on using the service programmatically.
You will need to create a client application that performs the import/export action. Your application should also include exception handling and retry logic for certain error codes. The retry logic should retry a finite
number of times and building an increasing delay in between retries may help in the case of throttling and timeouts.
Here are some of the options available to create your client application.
1) Use the Data-Tier Application Framework (DACFx) client tool - sqlpackage.exe
Example for import
"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\sqlpackage.exe" /a:Import /tdn:"your database to create" /tp:"your password here" /tsn:"yourserver.database.windows.net" /tu:"yourdbuser"
/sf:"bacpac on local disk"
Example for export
"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\sqlpackage.exe" /a:Export /ssn:yourserver.database.windows.net /sdn:"your database to export" /su:"yourdbuser" /sp:"your password"
/tf:"bacpac file to create on local disk"
You can download the latest version of the Data-Tier Application Framework
here and find sqlpackage documentation
here.
2) Use the Data-Tier Application Framework (DACFx) public API
Add a reference to
Microsoft.SqlServer.Dac
Create a
DacServices instance, call appropriate method to import (ImportBacpac)
or export (ExportBacpac).
You can download the latest version of the Data-Tier Application Framework
here and find the DACFx public API documentation
here.
Link to
code samples.
3) Use the Import/Export REST Endpoints
Create a service reference to one of the following service endpoints (depending on your datacenter).
Use the appropriate methods to import, export, selective export, and check status.
|
DataCenter
|
Endpoint
|
|
North Central US
|
https://ch1prod-dacsvc.azure.com/DACWebService.svc/
|
|
South Central US
|
https://sn1prod-dacsvc.azure.com/DACWebService.svc/
|
|
North Europe
|
https://db3prod-dacsvc.azure.com/DACWebService.svc/
|
|
West Europe
|
https://am1prod-dacsvc.azure.com/DACWebService.svc/
|
|
East Asia
|
https://hkgprod-dacsvc.azure.com/DACWebService.svc/
|
|
Southeast Asia
|
https://sg1prod-dacsvc.azure.com/DACWebService.svc/
|
|
East US
|
https://bl2prod-dacsvc.azure.com/DACWebService.svc/
|
|
West US
|
https://by1prod-dacsvc.azure.com/DACWebService.svc/
|
Link to
Code samples.
For questions and community support, please use the
Windows Azure SQL Database Forums.
FAQ
Technet DAC Import Export FAQ has the complete FAQ.