Link to home
Start Free TrialLog in
Avatar of Yogendra Sahu
Yogendra SahuFlag for India

asked on

How to convert existing Sql server database to postgre database?

How to convert existing Sql server database to postgre database?
Avatar of noci
noci

1) get a description of all current tables
2) determine the order in which tables need to be processes; First all tables that don't refer to other tables,
   Then tables that refer to already existing tables from previous step
     and repeat this until all tables are specified.
3) create the data description for each of the tables for the Postgresql database (and take a note which conversions need to be done);
4) create a script that connectes to both databases and copies all data (in the table order determined in step 2) with the conversion rules determined in step 3
5) test the script built in step 4 on a separate database copy, if there are errors recheck/redo step 3 & step 4.  
6) convert the production database to production postgresql, in case of errors what went differently wrong compared to step 5, redo step 3-5.....

(use a copy of production data to not block any transaction there).
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.