To import SQL Server data into MongoDB using Mongovue _mssql

Source: Internet
Author: User
Tags mongodb odbc mssql mysql text mysql import

First, train of thought

Mongovue free version support MySQL import MONGO, so the idea is that SQL Server import MySQL, and then import MONGO from MySQL.

Second, prepare

1, install MySQL database (I am using Wamp, integrated mysql,phpadmin), if necessary, build your own database such as MyData

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

3, Start---> admin tools---> Data source (ODBC)---> User DSN, add MySQL ODBC 5.1 Driver

4, in SQL Server object, linked server, right key new

5, in the MySQL database to build the table to import data, such as table name is T

6. Write import SQL statements in SQL Server such as INSERT into OPENQUERY (MySQL, ' select * from t ') select * from t

7, using Mongovue to import data in MySQL

Wait.... Complete!

Pay attention.

1,sqlserver Don't use window authentication

2, the Chinese text segment to use the MySQL gb2312 collation

3,mssql bit to be modified to MySQL tinyint (1), MSSQL tinyint-->mysql int,mssql varchar (max)-->mysql text and cannot be the last field (practice proves , I also puzzled, if is the last one, the first column ID column inserts all is 0)

Related Article

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.