在SQL Server中批量复制,导入和导出的技术

The process of importing or exporting large amounts of data into a SQL Server database, is referred to as bulk import and export respectively. Fortunately, we are provided with a plethora of native tools for managing these tasks incluing

将大量数据导入或导出到SQL Server数据库的过程分别称为批量导入和导出。 幸运的是,我们提供了许多本机工具来管理这些任务,包括

  • bcp utility

    bcp实用程序
  • Openrowset (Bulk) function Openrowset(批量)功能
  • SQL Server import and export wizard

    SQL Server导入和导出向导
  • Bulk insert statement 批量插入语句
  • Select into statement 选择进入声明

In this article, we’ll review various methods for accomplishing bulk data moving operations from one database to another.

在本文中,我们将介绍用于完成将大量数据从一个数据库移动到另一个数据库的各种方法。

SQL Server导入和导出向导 (SQL Server import and export wizard)

The SQL Server Import and export wizard provides a graphical user interface onto a SQL Server Integration Services (SSIS) package. Once created the package can be automated, to run on a schedule. It can be further configured and modified by using SQL Server Data Tools (SSDT)

SQL Server 导入和导出向导在SQL Server Integration Services(SSIS)程序包上提供了图形用户界面。 创建包后,可以将其自动化,以按计划运行。 可以使用SQL Server数据工具(SSDT)对其进行进一步配置和修改。

To begin, open the Import and export wizard, right-click a database and select the Tasks sub-menu -> Export data command:

首先,打开导入和导出向导,右键单击数据库,然后选择任务子菜单-> 导出数据命令:

  1. Connect to a source database via the Choose a data source step.

    通过“ 选择数据源”步骤连接到源数据库。

    Permissions: You will need the following permissions to for the source data source/instance

    权限:对于源数据源/实例,您需要具有以下权限

    1. read data from the database or file

      从数据库或文件中读取数据
    2. Insert permission on the msdb database to save the SSIS package插入权限以保存SSIS包


  2. Connect to a destination SQL Server database in the Choose a destination step.

    在“ 选择目标”步骤中连接到目标SQL Server数据库。

    Permissions: The following permissions are required for the destination instance:

    权限:目标实例需要以下权限:

    1. write data to the database or file

      将数据写入数据库或文件
    2. permissions to create a database

      创建数据库的权限
    3. if necessary, permission to create table

      如有必要,允许创建表


  3. Choose the Copy data from one or more tables or views option, In the Specify table copy or query step:

    在“ 指定表副本或查询”步骤中,选择“ 从一个或多个表或视图复制数据”选项:

  4. In the Select source tables and views step, choose the table(s) for which you want to export data from:

    在“ 选择源表和视图”步骤中,选择要从中导出数据的表:

  5. In the Save and run package step, choose the Run immediately option:

    在“ 保存并运行程序包”步骤中,选择“立即运行”选项:

  6. in the Complete the wizard step, Click Finish

    在“ 完成向导”步骤中,单击“ 完成”。

  7. Once completed, the following dialog will be displayed:

    完成后,将显示以下对话框:

Troublesho

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值