다음을 통해 공유


SQL Server 2008 transactional replication to DB2 subscriber can fail with: DB2OLEDBV2: Error "System.DllNotFoundException: Unable to load DLL 'mseidrda.dll': The specified module could not be found

Recently came across a situation where the DB2 subscriber was failing with the below
<error>DB2OLEDBV2: Error "System.DllNotFoundException: Unable to load DLL 'mseidrda.dll': The specified module could not be found</error>

DB2 provider was installed from the SQL Server 2008's feature pack-https://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b33d2c78-1059-4ce2-b80d-2343c099bcb4

To resolve this, we removed the Microsoft.HostIntegration.DataAccessLibrary.dll file located in the C:\Windows\assembly directory
After this, we were able to resolve the connectivity issue.

But we ran into another issue with applying the initial snapshot in this transactional replication. When the snapshot was applied on the subscriber, the table names, column names and schema name used to have double quotes around them.

The root cause of this was DB2 does not understand the square brackets [] that table names and column names in the schema script produced by snapshot agent have (in the .sql file) and it interprets them to be quoted
After we added the -QuotedIdentifier to the distribution agent's command line, the issue with table name and column names went away.
But we were still left with the issue of double quotes in the schema name. To resolve this issue, we found that when the schema name (this is the db schema name) was specified in the connection string (while setting up subscriber) was replaced with default, the issue went away