如何将数据从SQL Server导出到平面文件

In this article, we will illustrate how to export SQL Server data into a Flat file, by using the SQL Server Import and Export Wizard. We will also explain some of the problems that may appear during the process of exporting SQL Server data into a Flat file.

在本文中,我们将说明如何使用SQL Server导入和导出向导将SQL Server数据导出到平面文件中。 我们还将解释在将SQL Server数据导出到平面文件的过程中可能出现的一些问题。

To start the SQL Server Import and Export Wizard, use one of the following ways form the How to import/export data to SQL Server using the SQL Server Import and Export Wizard page.

若要启动SQL Server导入和导出向导,请使用“ 如何使用SQL Server导入和导出向导”页面将数据导入/导出到SQL Server中的以下方法之一。

汇出资料 (Exporting data)

After choosing how the SQL Server Import and Export Wizard will be started, the first page will be the Welcome page:

选择启动SQL Server导入和导出向导的方式之后,第一页将成为“ 欢迎”页面:

Press the Next button to proceed.

下一步按钮继续。

The Choose a Data Source page will be shown:

将显示“选择数据源”页面:

On this page, the source from which will be copied data can be chosen.

在此页面上,可以选择从中复制数据的源。

In the Data source drop-down, select the provider that can connect to a data source, in this case, to a SQL Server database.

在“ 数据源”下拉列表中,选择可以连接到数据源(在本例中为SQL Server数据库)的提供程序。

From the list, pick the SQL Server Native Client 11.0 provider.

从列表中,选择“ SQL Server Native Client 11.0提供程序”。

Under the Server name drop-down box, choose SQL Server where a desired database is located from which want to export data.

在“ 服务器名称”下拉框中,选择要从中导出数据的所需数据库所在SQL Server。

In the Authentication section, choose how a connection to a data source will be established, by using Windows or SQL Server authentication and under the Database drop-down box, choose a database from which will be exported data.

在“ 身份验证”部分中,选择使用Windows或SQL Server身份验证建立与数据源的连接的方式,并在“ 数据库”下拉框下,选择将从中导出数据的数据库。

Also, check a minimum permissions in order to use the SQL Server Import and Export Wizard successfully.

另外,请检查最低权限 ,以便成功使用SQL Server导入和导出向导。

When all that is set press the Next button. The next of the pages in the SQL Server Import and Export Wizard is the following one Choose a Destination page:

完成所有设置后,按“ 下一步”按钮。 SQL Server导入和导出向导中的下一页是以下“选择目标”页:

On this page, specify where data from the SQL Server database will be copied. In the Destination drop-down box, select the adequate data provider that can copy (import) data to the destination (.txt) file. That will be the Flat File Destination provider:

在此页面上,指定将从SQL Server数据库复制数据的位置。 在“ 目标”下拉框中,选择可以将数据复制(导入)到目标(.txt)文件的适当数据提供程序。 那将是平面文件目标提供者:

As soon as the Flat File Destination provider is chosen, additional options for settings a destination file under the Destination drop-down box will show:

选择“ 平面文件目标”提供程序后,将在“ 目标”下拉框下显示用于设置目标文件的其他选项:

In the File name box, enter location of the flat file. Also, the Browse button can be used to locate the flat file.

在“ 文件名”框中,输入平面文件的位置。 同样, 浏览按钮可用于定位平面文件。

From the Locale drop-down box, pick the language for sorting and for date and time formats.

从“ 区域设置”下拉框中,选择排序语言以及日期和时间格式。

Check the Unicode check box if want to use Unicode, but if this check box is checked then the Code page drop-down box is disabled:

如果要使用Unicode,请选中Unicode复选框,但是如果选中此复选框,则“ 代码页”下拉框将被禁用:

When the language is chosen, be sure that language is available on your system:

选择语言后,请确保系统上提供该语言:

Otherwise, when trying to export data from a SQL Server to a flat file, the following error may appear:

否则,当尝试将数据从SQL Server导出到平面文件时,可能会出现以下错误:

– Validating (Error)
Messages

–验证(错误)
留言内容

  • Error 0xc00470b6: Data Flow Task 1: The LocaleID 4096 is not installed on this system.
    (SQL Server Import and Export Wizard)
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值