Asked by:
SQL server 2016 Replication to Oracle 12102 Subscriber

Question
-
Hi,
I am getting the below error after adding Oracle subscriber.
"Agent message code 20029. The required parameter '-SubscriberDB' is missing. "
(Snapshot agent able to generate a snapshot under snapshot folder successfully. But only Distributor agent giving this error)
Could you please suggest me.
Details:
SQL server 2016 sp2 : Publisher & Distributor
Oracle 12102 : Oracle subscriber. I have installed full client of Oracle 12c1.
For adding Oracle subscriber:
From sqlcmd I ran,
>exec sys.sp_MSrepl_ORAdatatypes 'Oracle', '12'
>exec sys.sp_MSrepl_MSSQL_ORA_datatypemappings @source_dbms = N'MSSQLSERVER', @destination_dbms = N'ORACLE', @destination_version = '12'
From SSMS
use [DBname]
exec sp_addsubscription @publication = N'DB_To_oracle_<TNS name>_Trans_Publication', @subscriber = N'ORCLDC', @destination_db = N'(default destination)', @subscription_type = N'Push', @sync_type = N'replication support only', @article = N'all', @update_mode = N'read only', @subscriber_type = 3;
goAfter that by default, replication created new Linked server with provided @subscriber name and it is using the provider "Microsoft OLE DB Provider for SQL Server"
After that added subscriber connection (from subscriber property): SQL Server Authentication(user should have access on Oracle DB)
TNSPing : succesfull. (Tnsnames.ora file validated)
Provided Read & exec permissions to Distributor agent service account on Oracle directory.
Environment variable: Added Oracle home & bin path, TNS_admin path.
Publication Access list: Added agent service account & distributor_admin
Snapshot folder: service account has access to it.
Snapshot format: Character
Allow non-SQL server subscribers : True
ODBC Data source Admin 64bit : System DSN configuration : Test successful
If I configure new Linked server (with provider " Oracle Provider for OLE DB" and Remote login & password): It is successfully connecting to Oracle DB (on Linked server ).
- Edited by Kiran Rangu Tuesday, August 4, 2020 5:35 PM
Tuesday, August 4, 2020 5:22 PM
All replies
-
Hi Kiran,
can you get more messages from Replication Monitor or Job Activity Monitor in SSMS.
For the Oracle subscriber, please check the following MS documents for some references:
Oracle SubscribersCreate a Subscription for a Non-SQL Server Subscriber
Best Regards,
Cris
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.
- Edited by Cris ZhanMicrosoft contingent staff Wednesday, August 5, 2020 5:39 AM
- Proposed as answer by Cris ZhanMicrosoft contingent staff Thursday, August 13, 2020 2:43 AM
Wednesday, August 5, 2020 5:38 AM -
Hi Kiran,
Is there any update on this case?
Please feel free to drop us a note if there is any update.
Best Regards,
Cris""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.Friday, August 7, 2020 8:23 AM -
Hi Cris,
We raised case to Microsoft, still they are working on this.
1) If I use subscriber as System DSN (ORCLDC) then I am getting "Agent message code 20029. The required parameter '-SubscriberDB' is missing. " error.
2) If I use subscriber name as "<TNS Service name>" (without configuring system DSN), I am getting below error.
2020-08-14 11:40:11.689 Copyright (c) 2016 Microsoft Corporation
2020-08-14 11:40:11.689 Microsoft SQL Server Replication Agent: distrib
2020-08-14 11:40:11.689
2020-08-14 11:40:11.689 The timestamps prepended to the output lines are expressed in terms of UTC time.
2020-08-14 11:40:11.689 User-specified agent parameter values:
-Subscriber <TNS_SrvName>
-Publisher <Server\instname>
-Distributor <Server\instname>
-DistributorSecurityMode 1
-Publication <PubDB>_To_Oracle_<TNS_SrvName>_Trans_Publication
-PublisherDB <PubDB>
-SubscriberType 3
-Continuous
-XJOBID 0xE7431ABBA61AE3498D9B491156
-XJOBNAME <Server\instname>-<PubDB>-<PubDB>_To_Oracle_<TNS_SrvName>-<TNS_SrvName>-11
-XSTEPID 2
-XSUBSYSTEM Distribution
-XSERVER <Server\instname>
-XCMDLINE 0
-XCancelEventHandle 0000000000001908
-XParentProcessHandle 0000000000001904
2020-08-14 11:40:11.689 Startup Delay: 2832 (msecs)
2020-08-14 11:40:14.533 Connecting to Distributor '<Server\instname>'
2020-08-14 11:40:14.642 Parameter values obtained from agent profile:
-bcpbatchsize 2147473647
-commitbatchsize 100
-commitbatchthreshold 1000
-historyverboselevel 1
-keepalivemessageinterval 300
-logintimeout 15
-maxbcpthreads 1
-maxdeliveredtransactions 0
-pollinginterval 5000
-querytimeout 1800
-skiperrors
-transactionsperhistory 100
2020-08-14 11:40:14.642 Connecting to Subscriber '<TNS_SrvName>'
2020-08-14 11:40:30.862 Agent message code 20084. The process could not connect to Subscriber '<TNS_SrvName>'.
2020-08-14 11:40:30.862 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 53
Message: Named Pipes Provider: Could not open a connection to SQL Server [53].
2020-08-14 11:40:30.862 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 53
Message: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
2020-08-14 11:40:30.862 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: HYT00
Message: Query timeout expired, Failed Command:
2020-08-14 11:40:30.862 The agent failed with a 'Retry' status. Try to run the agent at a later time.Seems the issue is, SQL Server Replication unable to communicate with Oracle Provider.
Through GUI also unable to add Oracle subscriber.
Thank you.
Regards,
Kiran
Friday, August 14, 2020 1:01 PM -
Hi Kiran,
Thanks for your reply.
I will continue to follow and explore this issue.
Best regards,
Cris""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.Monday, August 17, 2020 2:38 AM