0

I built a Rails app that uses SQL SERVER 2008 because it was a business requirement. Fast forward a year later and now am starting to feel the deadlock pain. Whats the best way to migrate the production database to PostgreSQL?

ddavison
  • 28,221
  • 15
  • 85
  • 110
Carlos
  • 444
  • 4
  • 6
  • looks like there is already an open question about this - http://stackoverflow.com/questions/3859983/migrating-sql-server-2008-db-to-postgres – ddavison Jun 20 '13 at 15:13

1 Answers1

0

This is a broad question which cannot be answered quickly. Here are some basic things to consider however:

  1. No tool is going to handle every case.

  2. YMMV.

In general, I would recommend pursuing a migration as follows:

  1. Migrate schema (basic data types, etc). There are tools to help with this.

  2. Migrate data into a copy of the db. This is a test run at first.

  3. Migrate your stored procedures. Write test cases for all procedures in both platforms. Make sure they pass on both platforms. This can take some time.

  4. Test your app code against the new database.

  5. Migrate data for real.

Migrating dbs is almost never painless.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182