Several Problems During sqlserver2postgresql migration

Source: Internet
Author: User

1. PostgreSQL cross-platform migration tool migration
Toolkit User Guide: http://www.enterprisedb.com/docs/en/8.4/mtkguide/Table%20of%20Contents.htm#TopOfPage

2. It may beProgramThe migration tool considers the jtds driver connection string as Oracle to be connected:

Java-dprop = toolkit. properties-jar lib/edb-migrationtoolkit.jar-sourcedbtype sqlserver-targetdbtype postgresql-alltables-Targetschema
Public DBO

3. During the migration using the above tools, the type matching problem that can impede the migration of the entire table is discovered, the bit type of MSSQL is created as a Boolean field during table creation in PostgreSQL, but an error is reported during data loading: the BIT data is converted into a boolean data by legal means. I was just preparing to write a Python script to migrate these tables. Later I found that the problem was relatively simple. I directly converted the bit type in the source table to the smartint type and then migrated it, prepare to go back to PostgreSQL.

4. After the above problem is mentioned, 3. After the data migration is completed, the configuration file of the Web application data source is modified, the Web application is started, and the Read and Write tests of tables of the type changed earlier are performed, normal availability was found. Previously, the bit type in the hibernate ORM configuration file automatically generated by the bit type in sqlserver was Java. lang. byte and byte are 8-bit bytes, and smallint is exactly 8-bit, which is compatible and available. It is an accidental luck event.

5. Let's talk about another problem. When the tool data was migrated, the system often reminded me of the UTF-8 encoding problem. I thought that all the string data will be automatically converted to the UTF-8 data during the migration, before the web application is GBK encoding, so I guess it is not the completion of the migration has to do the replica set all converted to UTF-8, but the actual discovery is not like this, I used python to query the string with the U character header in sqlserver. It seems that the U character header is no longer included in PostgreSQL.



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.