Import SQL server data to Mongodb

Source: Internet
Author: User
Tags mysql text
SQL Server data import to Mongodb 1. Idea: MySQL can be imported into Mongodb in the free version of MySQL. Therefore, the idea is to import SQL Server to MySQL and then import Mongo from MySQL. 2. Prepare 1. Install the mysql database (WAMP is used for integration with mysql and phpadmin). If necessary, create your own database, such as MyData2, and download mysql-connecto.

SQL Server data import to Mongodb 1. Idea: MySQL can be imported into Mongodb in the free version of MySQL. Therefore, the idea is to import SQL Server to MySQL and then import Mongo from MySQL. 2. Prepare 1. Install the mysql database (WAMP is used for integration with mysql and phpadmin). If necessary, create your own database such as MyData 2 and download mysql-connecto.

Import SQL server data to Mongodb

I. Ideas

The free version of MongoVUE supports importing Mongo from MySQL, so the idea is to import MySQL from SQL server and then Mongo from MySQL.

2. Preparation

1. Install the mysql database (I used WAMP to integrate mysql and phpadmin). If necessary, create your own database, such as MyData.

2, download mysql-connector-odbc-5.1.12-win32.msi, install

3. Start ---> Administrative Tools ---> data source (ODBC) ---> User DSN, add MySQL ODBC 5.1 Driver

4. In SQLServer, link to the server and right-click to create a server.

5. Create a table for data import in the MySQL database. For example, the table name is t.

6. Write and import SQL statements in sqlserver, such as insert into openquery (mysql, 'select * from t') select * from t

7. Use vue to import data in mysql

Wait!

Attention

1. SQL server does not use window Authentication

2. Sort Chinese fields with mysql gb2312

3. Modify the mssql bit to mysql tinyint (1), mssql tinyint --> mysql int, mssql varchar (max) --> mysql text cannot be the last field. (It turns out that I don't understand it. If it is the last one, insert all the values in the ID column of the first column as 0)

Posted on

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.