DacImportExportCli : Import / Export Data from SQL Azure to SQL Server (vice versa)

 

SQL Azure Database Import / Export v 2.0 is a command line interface to create DacPac for importing / exporting data from SQL Azure to SQL Server and vice versa.

Its available for download from https://www.sqlazurelabs.com/DacImportExportCli.zip (Note: You need to register for SQL Azure Labs for downloading beta programs)

This tool is built upon SQL Server “Denali”

It supports the following versions of SQL Servers

1. SQL Azure

2. SQL Server “Denali”

3. SQL Server 2008 SP1 or above / 2008 R2

4. SQL Server 2005 SP4 and above

5. SQL Server 2000 (Only Export is supported, Import is not supported)

To install and run this, you need the following list of components

1. .Net Framework 4.0

2. SQLSysClrTypes.msi – https://www.sqlazurelabs.com/SQLSysClrTypes.msi

3. SharedManagementObjects.msi – https://www.sqlazurelabs.com/SharedManagementObjects.msi

4. DACFramework.msi – https://www.sqlazurelabs.com/DACFramework.msi

5. SQLDom.msi – https://www.sqlazurelabs.com/SqlDom.msi

6. TSQLLanguageService.msi – https://www.sqlazurelabs.com/TSqlLanguageService.msi

After installing the prerequisites, extract the DacImportExportCli.zip to any directory ex. C:\DacImportExportCLI

Parameters Supported

-s – Server name

-d – Database name

-e – Integrated Authentication (For on-premise SQL Server)

-u – SQL User Name

-p – Password for SQL User name

-x – Export Schema and Data to bacpac file

-i – Import Schema and Data from bacpac file

-f – bacpac file , can be used as input and out based on –x or -i

-edition (Used for SQL Azure, Supported Values “business” or “web”)

-size – specify the Size of database in Gb ex. 1 (Used for SQL Azure to specify database size limit)

To Export Data and Schema

DacImportExportCli.exe –s ServerA.database.windows.net –d Northwind_DB –u dbuser –p password –f C:\DacImportExportCli\Northwind_DB_Backup.bacpac –x

image

To Import Data and Schema

DacImportExportCli.exe –s ServerB.database.windows.net –d Northwind_DB –u dbuser –p password –f C:\DacImportExportCli\Northwind_DB_Backup.bacpac –i

DacImportExportCli.exe –s ServerB.database.windows.net –d Northwind_DB –u dbuser –p password –f C:\DacImportExportCli\Northwind_DB_Backup.bacpac –i –edition web –size 1

image

To Remove a Database created using DAC Import

DacImportExportCli.exe –s ServerB.database.windows.net –drop Northwind_DB –u dbuser –p password

image

If you manually dropped a database using “DROP DATABASE” command for the database created using bacpac, the bacpac registration will still be available in server, you so you need to use –drop option to clear the registration, before reimporting it again

Advantages:

1. Helps automating backup and restore process for SQL Azure

2. Helps automatic synchronizing between SQL Azure and SQL Server (On Premise) easily

Disadvantages:

1. The exported bacpac file contains the schema and data, not the log files, so it’s a not a real backup like the regular SQL Server backup file

For more information about DAC read the below white paper http://msdn.microsoft.com/en-us/library/ff381683(SQL.100).aspx

Notes:

Do not install this if you have already installed SQL Server “Denali” CTP1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值