You synchronize a subscription in Microsoft SQL Server 2005.
You use an Oracle-based server as the subscription publisher.
You apply any hotfix to the instance of SQL Server 2005.
In this scenario, the subscription distribution may fail. Additionally, you may receive the following error message:
The version of SQL Server used to download the Oracle package code does not match the version of SQL Server running at the distributor. The replication support code at the Oracle publisher needs to be refreshed (Source MSSQL_REPL, Error number: MSSQL_REPL22202)
Heterogeneous Logreader encountered an error in call to LoadReplCmds when processing state ‘INITIALIZE’ (Source: MSSQL_REPL, Error Number:MSSQL_REPL22037)
You may experience this problem after you apply the hotfix to a computer that is running one of the following:
After you apply a hotfix to an instance of SQL Server, the @@VERSION function returns a value for the SQL Server build. The Oracle log reader compares the first 40 characters of the current value for @@VERSION with the first 40 characters of the value at the time that the Oracle package code was downloaded. This problem occurs when these two strings do not match.
To work around this problem, you must update the HREPL_VERSION table in the Oracle database to reflect the SQL Server value for @@VERSION after you apply the hotfix. To do this, use one of the following methods.
Reset the SQL Server version that is maintained at the Oracle publisher and then create a new linked server to access the Oracle database. To do this, run the following code.
To perform this update at the Oracle database, you cannot use the linked server that is used for Oracle publishing. You must create a new linked server. After you install the update, you must delete the new linked server.
Replace <ORASRV> with the name of new linked server.
Replace <ORCL> with the data source name that is associated with the new linked server.
Replace <YourDomain\YourLogin> with your domain logon information.
Replace <ADMINLOGIN> with the replication user for Oracle publishing.
Replace <ADMINPASSWORD> with the password that is associated with <ADMINLOGIN>.
Use the new linked server to update the HREPL_VERSION table. To do this, run the following code on the linked server.
declare @cmd nvarchar(max)
set @cmd = N'UPDATE HREPL_VERSION SET SQLSERVERVERSION = ' +
N'''' + SUBSTRING(@@version, 1, 40) + ''''
exec (@cmd) at [<ORASRV>]
Drop the new linked server. To do this, run the following code.
Update the HREPL_VERSION table by using SQL*Plus. Run the following select @cmd command to determine the command that you run in SQL*Plus in the Oracle database:
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.