Product: | Syniti Data Replication, Syniti Replicate |
Version: | All |
ID: | 1670 |
Summary: | How to improve performance by using the BulkInsert setting for replications to PostgreSQL |
If replicating with PostgreSQL, use the .NET provider recommended by PostgreSQL. Syniti DR/Syniti Replicate supports use of the Bulk Insert feature to increase performance when replicating to PostgreSQL databases. To use the Bulk Insert feature:
- If using any .NET provider version other than 2.2.3.0, specify the "newVersion" in the DBReplicator.exe.config file (located in the Syniti DR/DBMoto install folder) as follows:
<dependentAssembly>
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral"
</assemblyIdentity>
<bindingRedirect oldVersion="2.2.3.0" newVersion="2.2.3.0"></bindingRedirect>
</dependentAssembly>
- Install the driver DLL using the Microsoft Global Assembly Cache Tool (GAC). If the provider is not registered, you will receive the following error when attempting to use the provider:
Error creating the command for writing to the target (Replication: 'EMP1' - Target table: 'public.test1')
System.IO.FileNotFoundException: Could not load file or assembly 'Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' or one of its dependencies. The system cannot find the file specified.
File name: 'Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'
at ....
The commands for installing the PostgreSQL DLLs are as follows when running from the location where the GAC is installed:
gacutil.exe -i C:\Npgsql-2.2.3-net40\Npgsql.dll
gacutil.exe -i C:\Npgsql-2.2.3-net40\Mono.Security.dll
- In the Replication Properties dialog, after setting up source and target connections, set the Refresh Options BulkInsert and Block Size.