The tool creates the tables in PostgreSQL database and copies data from SQL Server database into them.
When the copying is finished the tool verifies that the data in each field of each column
are the same in both databases (incuding the binary data using md5 hases).
The tool supports conversion of following:
- Columns (it converts the data types to the compatible ones)
- Identities (it creates sequences and configures columns to use them)
- Primary keys (including compositional keys)
- Indices (the included columns are ignored. If 2 indices have the same columns the 2nd one will not be created)
- Foregin keys (including the changes propagation mode (cascade/no action/set null))
To copy the database you should do following:
- Get credentials of both databases.
- Create a new database in PostgreSQL
- Modify the connection strings in
App.config
- Set the source database and schema in
App.config
- Change the other paramters in
App.config
(optional) - Run the application
In App.config
you can change following parameters:
- MsConStr - SQL Server connection string.
- PgConStr - PostgreSQL connection string.
- MsDbName - SQL Server source database.
- MsSchema - SQL Server source schema.
- ChunkSize - The size of the buffer in rows. The tool gets the source data in pages. This parameters sets the size of the page in rows.
- Fps - The progressbar update rate in Frames Per Second.
The default chunk value of 100 000 rows can cause memory consumption up to 2.5 GB
The tool was tested on a machine with following specs:
- i5 CPU
- 32GB RAM
- SATA SSD
- Windows 10
Both databases were installed at the same SSD (it was also the system drive).
The copying speed was ~ 1 GB / 1 minute.
The verification speed was about the same.