Answered by:
Synchronization from Oracle DB to SQL server DB

Question
-
Deal All,
Is there any way, that we can synchronize our oracle database tables to sql server 2008 database tables using Microsoft Synchronization Framework. I am unable to find the synchronization client for sql server (not Compact Edition or Express Edition).
Please help me in this regard.
Thanks.- Moved by Max Wang_1983 Thursday, April 21, 2011 10:57 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
Wednesday, October 21, 2009 1:10 PM
Answers
-
Hi,
SqlSyncProvider and ClientSyncProvider are totally different classes. SqlSyncProvider is a provider for collaboration scenarios (http://msdn.microsoft.com/en-us/library/bb902853(SQL.105).aspx), and it is derived from KnowledgeSyncProvider; ClientSyncProvider is the abstract base class of SqlCeClientSyncProvider which is for offline scenarios (http://msdn.microsoft.com/en-us/library/bb902819(SQL.105).aspx). In order to sync SQL Server 2008 with a Orcale database, we recommend you to use the database providers for collaboration scenarios. Both Patrick and Jess's comments targeted to the collaboration database providers.
In summary, what you need to do are:
1. use a DbSyncProvider or SqlSyncProvider for SQL Server 2008
2. Implement a DbSyncProvider for Oracle by providing the Oracle SQL commands
3. Use SyncOrchestrator to setup and init sync
Thanks,
Dong
This posting is provided AS IS with no warranties, and confers no rights.- Proposed as answer by Dong CaoMicrosoft employee, Moderator Monday, October 26, 2009 6:44 PM
- Marked as answer by Dong CaoMicrosoft employee, Moderator Tuesday, October 27, 2009 5:07 PM
Monday, October 26, 2009 6:44 PMModerator
All replies
-
If you look at http://msdn.microsoft.com/en-us/library/microsoft.synchronization.data.sqlserver(SQL.105).aspx
SqlSyncProvider class is the provider for sql server. Under Microsoft.Synchronization.Data.SqlServer namespace.
Hope this answers your question.
Thanks,
PatrickWednesday, October 21, 2009 6:26 PM -
For the Oracle side you will need to implement a DbSyncProvider. This involves writing all the Oracle provisioning triggers and insert/update/delete procs that the SqlSyncProvider does automatically for Sql Server.
Stay tuned for an upcoming sample that demonstrates this.
-JesseWednesday, October 21, 2009 8:18 PM -
Dear Patrick,
Thanks for your response.
I am trying to use this SDK for synchronization SQL Server at the client side. Its "SqlSyncProvider" is not compatible with "SyncProvider".
I am trying to convert it, but i am unable to find the right way till now.
Thanks,
ShakilThursday, October 22, 2009 12:44 PM -
Shakil,
SqlSyncProvider is a SyncProvider. I think we need more details about what you are trying do here.
-JesseThursday, October 22, 2009 6:45 PM -
Dear Jess,
Below is the code, in which, I am getting exception,
DbServerSyncProvider serverSyncProvider = new DbServerSyncProvider();
SqlSyncProvider clientSyncProvider = (ClientSyncProvider) new SqlSyncProvider();
SyncAgent syncAgent = new SyncAgent();
syncAgent.RemoteProvider = serverSyncProvider;
syncAgent.LocalProvider = clientSyncProvider;
When I assigned "clientSyncProvider" to "syncAgent.LocalProvider", it is giving me exception:
System.InvalidCastException was caught
Message="Microsoft.Synchronization.Data.ClientSyncProvider",
Source="Microsoft.Synchronization.Data"i think, because "SqlSyncProvider" is inherited from "RelationalSyncProvider", and not from "ClientSyncProvider", so this is the main reason for raising exception over here.
Please tell me, how to resolve this exception ?Monday, October 26, 2009 5:45 AM -
Hi,
SqlSyncProvider and ClientSyncProvider are totally different classes. SqlSyncProvider is a provider for collaboration scenarios (http://msdn.microsoft.com/en-us/library/bb902853(SQL.105).aspx), and it is derived from KnowledgeSyncProvider; ClientSyncProvider is the abstract base class of SqlCeClientSyncProvider which is for offline scenarios (http://msdn.microsoft.com/en-us/library/bb902819(SQL.105).aspx). In order to sync SQL Server 2008 with a Orcale database, we recommend you to use the database providers for collaboration scenarios. Both Patrick and Jess's comments targeted to the collaboration database providers.
In summary, what you need to do are:
1. use a DbSyncProvider or SqlSyncProvider for SQL Server 2008
2. Implement a DbSyncProvider for Oracle by providing the Oracle SQL commands
3. Use SyncOrchestrator to setup and init sync
Thanks,
Dong
This posting is provided AS IS with no warranties, and confers no rights.- Proposed as answer by Dong CaoMicrosoft employee, Moderator Monday, October 26, 2009 6:44 PM
- Marked as answer by Dong CaoMicrosoft employee, Moderator Tuesday, October 27, 2009 5:07 PM
Monday, October 26, 2009 6:44 PMModerator