Finding SQL Replication errors

113 views
Skip to first unread message

Chris Mondok

unread,
Sep 22, 2014, 2:41:08 PM9/22/14
to rav...@googlegroups.com
We are currently researching using SQL Replication for reporting. While it's great when it works, we've run into a few problems. The biggest concern right now is that it is difficult to know when something is not being replicated.

Example:
In our test data set, customers have several addresses. Our schema for address was using NVARCHAR(25) for state. Somehow, we end up with "Federated States of Micronesia" as a state. Granted, data validation can prevent this problem, but that's not the point. Our addresses in the Federated States of Micronesia simply don't replicate. We were able to narrow it down to this problem by writing some queries to find what was missing. Next, we edited those addresses so they'd be re-replicated, grabbed the command from the SQL profiler, ran it manually, and lo and behold, the command errors out since the data would be truncated. There was nothing in Raven's logs about this error occurring.

Most SQL-based solutions we've been able to find so far require executing some SQL statement when we open the connection, but that's not exactly under our control in this scenario. Is there some way of knowing when things are failing that we've just been unable to find?

Oren Eini (Ayende Rahien)

unread,
Sep 23, 2014, 5:20:42 AM9/23/14
to ravendb
The logs should absolutely have this information, as well as the alerts page.

Also look at the 3.0 features around that area:

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vlad Kosarev

unread,
Sep 23, 2014, 8:34:08 AM9/23/14
to rav...@googlegroups.com
We had the same issue. No errors/alerts in raven UI (file log was not enabled) but some things didn't replicate. Ended up being nvarchar size. Once we figured that out and increased column size it replicated after a save. That was in 2916.

Chris Mondok

unread,
Sep 24, 2014, 12:22:40 PM9/24/14
to rav...@googlegroups.com
We're testing on two servers, build # 2908 and 2910. On both machines, we only receive logs when the script is malformed. The only alerts we've managed to find are "Sql Replication write error hit ratio too high". When many documents are failing to replicate, we get this alert. However, when a few documents are failing to replicate, we're not seeing any logs or alerts. Is there a configuration option we're missing somewhere?

Chris Mondok

unread,
Sep 24, 2014, 2:36:10 PM9/24/14
to rav...@googlegroups.com
Additionally, on the topic of Raven 3.0 replication features, this looks extremely promising. The debug info looks awesome. That said, we tried Raven 3 (build 3488), and cannot use SQL Replication at all. Instead, we get the following error:


 System.NullReferenceException: Object reference not set to an instance of an object.
 at Raven.Database.Bundles.SqlReplication.SqlReplicationTask.<>c__DisplayClass4c.<GetConfiguredReplicationDestinations>b__4a(IStorageActionsAccessor accessor) in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Bundles\SqlReplication\SqlReplicationTask.cs:line 624
 at Raven.Storage.Voron.TransactionalStorage.ExecuteBatch(Action`1 action) in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Storage\Voron\TransactionalStorage.cs:line 190
 at Raven.Storage.Voron.TransactionalStorage.Batch(Action`1 action) in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Storage\Voron\TransactionalStorage.cs:line 173
 at Raven.Database.Bundles.SqlReplication.SqlReplicationTask.GetConfiguredReplicationDestinations() in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Bundles\SqlReplication\SqlReplicationTask.cs:line 635
 at Raven.Database.Bundles.SqlReplication.SqlReplicationTask.BackgroundSqlReplication() in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Bundles\SqlReplication\SqlReplicationTask.cs:line 147
 at Raven.Database.Bundles.SqlReplication.SqlReplicationTask.<>c__DisplayClass4.<Execute>b__2() in c:\Builds\RavenDB-3.0-PreRelease\Raven.Database\Bundles\SqlReplication\SqlReplicationTask.cs:line 96


On Tuesday, September 23, 2014 5:20:42 AM UTC-4, Oren Eini wrote:

Oren Eini (Ayende Rahien)

unread,
Sep 26, 2014, 3:21:01 PM9/26/14
to ravendb
No, that is by design. But I'm not sure that is such a good idea.
You might have docs that fail to run, so we only alert if we can't connect to the source, or all the statements are failing.

Oren Eini (Ayende Rahien)

unread,
Sep 26, 2014, 3:21:46 PM9/26/14
to ravendb
Can you send us a way to reproduce this?

Oren Eini (Ayende Rahien)

unread,
Sep 26, 2014, 3:22:26 PM9/26/14
to ravendb
Reply all
Reply to author
Forward
0 new messages