DacImportExportCli : Import / Export Data from SQL Azure to SQL Server (vice versa)
来源:互联网 发布:oracle建表sql语句 编辑:程序博客网 时间:2024/04/28 19:35
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 –drop Northwind_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 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
- DacImportExportCli : Import / Export Data from SQL Azure to SQL Server (vice versa)
- Export data from SQL Server to Excel
- Import Data from Excel to SQL Server
- Import Data from csv file to Azure SQL DATABASE
- Simple way to export SQL Server data to Text Files
- R12 - GL / XLA / FAH - How to link GL data to the subledger data or vice versa
- import export data from DataTable
- How to Copy Archivelog Files From ASM to Filesystem and vice versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- wstring to string and vice versa
- c# - string to byte[] and vice versa
- Designing Data Storage Architecture- How to Sync Large SQL Server Databases to SQL Azure
- sql server 2008 copy data from one table to another
- How to recover deleted data from SQL Server 暴强
- asp and javascript: sql server export data to csv and to xls
- asp and javascript: sql server export data to csv and to xls
- Export IIS Log to SQL Server
- android google地图上overlay显示位置,路线
- Oracle的日志挖掘
- MSN安装不了
- 乔帮主逝去了……
- FPDF 1.52 參考手冊
- DacImportExportCli : Import / Export Data from SQL Azure to SQL Server (vice versa)
- 组合数奇偶性判断 应用位运算方法
- accept非阻塞
- Count Color
- AT91Bootstrap1.16第一阶段汇编程序详解
- 百度三维地图体验(坑爹啊有图有真相)
- 一波三折——危险的“未分配”引脚
- 10个管理工作时间的小技巧
- C语言:运行中获取宏名字的技巧