thready
asked on
Migrating from SQL Server to Postgres advice
Hi Experts,
I'm looking for advice on migrating from SQL server to Postgres. Basically there will be a few areas to work on:
- Changing the database connector
- I will create the exact same database in Postgres with the equivalent tables/columns/index values
- update/insert queries will be stubbed to check that tables in both tables are exactly the same (we'll continue to work in parallel until we can pull all queries in a model and switch (as they should have been) depending on which database we're currently using, but we'll avoid that until it's absolutely necessary).
- result sets from queries will be compared from both databases to detect differences there
So that's our plan for now. Other ideas please?
Thanks!
Mike
I'm looking for advice on migrating from SQL server to Postgres. Basically there will be a few areas to work on:
- Changing the database connector
- I will create the exact same database in Postgres with the equivalent tables/columns/index values
- update/insert queries will be stubbed to check that tables in both tables are exactly the same (we'll continue to work in parallel until we can pull all queries in a model and switch (as they should have been) depending on which database we're currently using, but we'll avoid that until it's absolutely necessary).
- result sets from queries will be compared from both databases to detect differences there
So that's our plan for now. Other ideas please?
Thanks!
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm hoping for a quick sanity test that will help me find possible errors in hundreds of queries.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
ASKER
question about my method:
Will I be able to read result sets twice? If I get a query, I will execute it on SQL server. I will also execute it on postgres. I'll loop through both simultaneously, verifying that both rows match. If not, I found a problem with a query. If all match, I need to be able to rewind the result set from SQL server so that the client continues on like nothing happened....