简体   繁体   中英

How to migrate Data from SQL Server to PostgreSQL

I know that is a lot of manual work to translate the SQL queries from SQL Server to PostgreSQL. But I was wondering, if there is the more effective way to insert DateTime values from SQL Server to timestamp format in PostgreSQL. Because I need to work with 900 entries.

SQL Server format:

CAST(0x00009DFE00000000 AS DateTime)

POSTGRESQL format:

???

I'd use any kind of neutral dump tool, I've personally used this one:

https://github.com/yamldb/yaml_db

for migrations between databases, never used it with SQL Server but provided there is an active record adapter for SQL SERVER it should work too.

I don't know if you are limited to use only queries or commands, but if not you may wanna try do some ETL. There are many tools you could use. I did some simple data migration from SQL server to PostgreSQL a few years ago with Pentaho ETL.

Pentaho Kettle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM