ssms怎么导入sql文件_使用SSMS将数据从MySQL导入SQL Server

  • Post author:
  • Post category:mysql


ssms怎么导入sql文件

This article shows the best way to import a copy of your MySQL database table to SQL Server using the SQL Server import data feature. We’ll demonstrate how to perform data import and export using a query with the assistance of SQL Server Management Studio.

本文介绍了使用SQL Server导入数据功能将MySQL数据库表的副本导入SQL Server的最佳方法。 我们将演示如何在SQL Server Management Studio的帮助下使用查询执行数据导入和导出。

While individual database technologies are proprietary, they operate on common principles that give them the ability to import from and export to other database engines. Microsoft SQL Server can import data from and export it to MySQL. SQL Server import data activity is an easy and efficient way to copy tables or explicit columns into a SQL Server table from MySQL. Indeed, any user can do this it using a query execution, although not automatically.

尽管个别数据库技术是专有的,但它们以共同的原理运行,从而使它们能够从其他数据库引擎导入和导出到其他数据库引擎。 Microsoft SQL Server可以从MySQL导入数据并将其导出到MySQL。 SQL Server导入数据活动是一种从MySQL复制表或显式列到SQL Server表中的简便有效的方法。 确实,任何用户都可以使用查询执行来执行此操作,尽管不是自动执行。

A SQL Server import can be performed using a linked server with Open Query as well; although most developers prefer the straightforward steps, we’ll show below.

也可以使用带有Open Query的链接服务器来执行SQL Server导入。 尽管大多数开发人员都喜欢简单的步骤,但我们将在下面显示。

配置数据源

(

Configure a data source

)

From within the SQL Server import and export wizard, choose MySQL Data Provider. In the

Tasks

options, the

Import Data

wizard makes an SSIS bundle for you. The SSIS bundle can be run immediately or may be saved to edit or execute later.

在SQL Server导入和导出向导中,选择MySQL数据提供程序。 在“

任务”

选项中,“

导入数据”

向导会为您创建一个SSIS捆绑包。 SSIS包可以立即运行,也可以保存以供以后编辑或执行。

We have databases named

user_portal

in MySQL and

pub_db

in SQL Server. Multiple tables exist with the MySQL database (user_portal), such as privileges_mst, privileges_api_link, privileges_api_link and others. For this example, we will copy a number of columns from a few tables to the

pub_db

database and

priv_emp_detail

tabl