如何使用SQL Server导入和导出向导将数据导入/导出到SQL Server

This article will explain the steps for importing and exporting data using the SQL Server Import and Export Wizard.

本文将介绍使用SQL Server导入和导出向导导入和导出数据的步骤

Depending on the options that are selected in the SQL Server Import and Export Wizard, some steps may be different than those described in this article.

根据在SQL Server导入和导出向导中选择的选项,某些步骤可能与本文中介绍的步骤有所不同。

For the purpose of this example, exporting data from the SQL Server database to an Excel file will be shown.

就本示例而言,将显示将数据从SQL Server数据库导出到Excel文件的过程。

There are several ways to initiate the SQL Server Import and Export Wizard:

有几种方法可以启动SQL Server导入和导出向导:

开始菜单 (Start menu)

In the Start menu, type the word Import or Export and choose one of the offered:

在开始菜单中,输入单词Import或Export,然后选择以下选项之一:

Or, in the Start menu under the Microsoft SQL Server 2017, choose one of the offered options:

或者,在Microsoft SQL Server 2017下的“ 开始”菜单中,选择提供的选项之一:

  • SQL Server 2017 Import and Export Data (32-bit)

    SQL Server 2017导入和导出数据(32位)
  • SQL Server 2017 Import and Export Data (64-bit)

    SQL Server 2017导入和导出数据(64位)

命令提示符 (Command prompt)

In the Command prompt, type the following: C:\Program Files\Microsoft SQL Server\140\DTS\Binn\ DTSWizard.exe for the 64-bit version:

命令提示符下,键入以下内容:64位版本的C:\ Program Files \ Microsoft SQL Server \ 140 \ DTS \ Binn \ DTSWizard.exe

Or, type the following C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn DTSWizard.exe for the 32-bit version.

或者,为32位版本键入以下C:\ Program Files(x86)\ Microsoft SQL Server \ 140 \ DTS \ Binn DTSWizard.exe

Or, go to above mentioned locations and, from there, run DTSWizard.exe:

或者,转到上述位置,然后从那里运行DTSWizard.exe:

SQL Server管理Studio(SSMS) (SQL Server Management Studio (SSMS))

To start the SQL Server Import and Export Wizard using SSMS, go to Object Explorer, right click on a database for which want to export or import data; from the context menu under the Task sub-menu, choose the Import Data or Export Data option:

要使用SSMS启动SQL Server导入和导出向导,转到对象资源管理器中 ,为此要导出或导入数据的数据库上点击右键; 从“ 任务”子菜单下的上下文菜单中,选择“ 导入数据”或“ 导出数据”选项:

The latest version of SSMS can be downloaded from the Download SQL Server Management Studio (SSMS) page

可以从“ 下载SQL Server Management Studio(SSMS)”页面下载最新版本的SSMS。

SQL Server数据工具(SSDT) (SQL Server Data Tools (SSDT))

Another way to launch the SQL Server Import and Export Wizard is by using SQL Server Data Tools (SSDT) via Visual Studio.

启动SQL Server导入和导出向导的另一种方法是通过Visual Studio使用SQL Server数据工具(SSDT)。

SQL Server Data Tools (SSDT) can be downloaded from the Download SQL Server Data Tools (SSDT) page:

可以从“ 下载SQL Server数据工具(SSDT)”页面下载SQL Server数据工具(SSDT)

Under the Integration Services project:

在Integration Services项目下:

Go to the Project menu and choose the SSIS Import and Export Wizard option:

转到“ 项目”菜单,然后选择“ SSIS导入和导出向导”选项:

Or in Solution Explorer, right click the SSIS Packages folder and, from the context menu, choose the SSIS Import and Export Wizard option:

或在解决方案资源管理器中 ,右键单击“ SSIS软件包”文件夹,然后从上下文菜单中选择“ SSIS导入和导出向导”选项:

The common warning message that appears when using the SQL Server Import and Export Wizard is:

使用“ SQL Server导入和导出向导”时出现的常见警告消息是:

The operation could not be completed.

操作无法完成。

“ADDITIONAL INFORMATION:
The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine. (System.Data)”

“附加信息:
“ Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机上注册。 (系统数据)”

This happens because of the choice of the wrong version (32-bit or 64-bit) of the SQL Server Import and Export Wizard. For example, if exporting data from the 64-bit version of SQL Server and using the SQL Server Import and Export Wizard via SSMS which is 32-bit application and include 32-bit version of the SQL Server Import and Export Wizard and, because of that, the above warning message will appear. To resolve this, launch 64-bit version of the SQL Server Import and Export Wizard.

发生这种情况的原因是选择了错误SQL Server导入和导出向导版本(32位或64位)。 例如,如果从64位版本SQL Server导出数据并通过SSMS使用SQL Server导入和导出向导(SSMS是32位应用程序,并且包括32位版本SQL Server导入和导出向导),并且由于那,上面的警告信息将会出现。 若要解决此问题,启动SQL Server导入和导出向导的64位版本。

Bear in mind that SQL Server Data Tools (SSDT) is a 32-bit application, too.

请记住,SQL Server数据工具(SSDT)也是32位应用程序。

Also, when the SQL Server Import and Export Wizard is used, make sure that you have adequate permissions, otherwise one of the following messages may appear:

另外,使用“ SQL Server导入和导出向导”时,请确保您具有足够的权限,否则可能会出现以下消息之一:

More about necessary permissions in order to use the SQL Server Import and Expor

  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值