Dacimportexportcli: import/export data from SQL azure to SQL Server (vice versa)

Source: Internet
Author: User

 

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

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

To remove a database created using DAC Import

Dacimportexportcli.exe-s serverb.database.windows.net-DropNorthwind_db-u dbuser-P Password

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 registry, before reimporting it again

Advantages:

1. Helps Automatic 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
The 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.