当前位置:网站首页>Import and export data of SQL Server database

Import and export data of SQL Server database

2022-08-02 12:19:00 m0_67401228

Import and export data

1. Overview

Importing data is also a frequently used feature in database operations. The SQL Server database import and export wizards can copy data to a hosted **.ENT Framework** data provider or native OLE DB> Access any data source of the interface, and can copy data from these data sources;
A list of the interfaces that the user can access, the data sources include SQL Server, Flat File, Microsoft Office Access, Microsoft Office Excel;
To succeedTo complete the SQL Server Import and Export Wizard, you must have at least the following permissions:

  1. Permissions to connect to the source and target databases or file shares in Integration Services and require Login permissions for both server and database;
  2. Permission to read the database from the source database or file, in SQL Server databases this requires SELECT permission on the source tables and views;
  3. Permission to write data to the target database or file. In the SQL Server database, INSERT permission is required for the target table;
  4. If you wish to create a new target database, table, or file, you need sufficient permissions to create a new database, table, or file; in a SQL Server database, you need CREATE DATABASE or >CREATE TABLE permission;
  5. To save the wizard-created package, you need sufficient permissions to write to the msdbsystem or filesystem;

2. Import SQL Server data table

The Import and Export Service of the SQL Server database can realize data conversion of different types of database systems. In order to allow users to use the import and export service more intuitively, Micosoft provides an import and export service.Export Wizard;
The Import and Export Wizard provides an easy way to copy data from source to target, convert data between many common data formats, and create target databases and insert tables;
users canCopy data to and from these sources: SQL Server, text files, Access, Excel, other OLE DB providers; these data sources are both sources and targets, you can also use the ADO.NET access interface as the source; after specifying the source and target, you can select the data to import or export, and the user can set different wizard options according to the source and target type;
ImportThe specific steps for the SQL Server database are as follows:

  1. Select the database, right-click DatabaseImport DataSQL Server Import and Export InterfaceNext;20220321
  2. Select Data Source dialog box, select data source, server name, database → Next; 20220321

Note: The server name is the local server name, i.e. 20220321

  1. Select target, next; 20220321
  2. Specify table replication or query, select the data source to be replicated, specify table replication or query, next step; 20220321
    10. Select the table to be imported, you can also preview the data table, save and run the package, and finally click Finish; 2022032120220321

3. Import data from other data sources

Importing data from other data sources is similar to the above importing data table operations. Select a different data source in the step of selecting Data source, such as importing Access data, just select ""Microsoft Access”, other data sources can also be selected in the data source drop-down list;
20220321
Note: When importing Excel data, be careful to select the correct version of Excel;

4. Export SQL Server data table

Export data and import data types of SQL Server datasets;
The specific steps for importing SQL Server databases are as follows:

  1. Right click on the database to be exported → Export data; 20220321

  2. Select target, enter server name, database, next; 20220321

  3. Specify table copy or query, next step; 20220321,

  4. Select source table and source view, select the data table to be exported, next step; 20220321

  5. Save and run the package, next step, done; 2022032120220321

Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials

原网站

版权声明
本文为[m0_67401228]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/214/202208021217264845.html