Home > Archive > SQL Anywhere database replication > January 2006 > Displaying only failed statements









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Displaying only failed statements
Veselin Ivanov

2006-01-11, 3:23 am

Hi,
using ASA 9.0.2.3198 with DBRemote. The command line is :
dbremote -m 32M -c "dbn=Sp" -rd 2 -rp 5 -q -os 5M -o C:\Remote\Remote.log
C:\Sp\Data\
This is part of log file, created by -o option

I. 01/05 12:04:37. Applying message from "office"
(0-0012563077-0012727816-0)
E. 01/05 12:04:37. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
I. 01/05 12:04:38. Applying message from "office"
(0-0012563077-0012727816-0)
E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
I. 01/05 12:08:38. Sending message to "office" (2-0008011294-0008075123-0)
I. 01/05 12:14:39. Received message from "office"
(0-0012727816-0012801118-0)
I. 01/05 12:14:39. Applying message from "office"
(0-0012727816-0012801118-0)
E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
I. 01/05 12:14:39. Applying message from "office"
(0-0012727816-0012801118-0)
E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'
I. 01/05 12:23:40. Sending message to "office" (2-0008075123-0008080765-0)
I. 01/05 12:38:41. Sending message to "office" (2-0008080765-0008107590-0)
I. 01/05 12:44:42. Received message from "office"
(0-0012801118-0012801118-0)
I. 01/05 12:44:42. Applying message from "office"
(0-0012801118-0012801118-0)

Is there any option to write to log file failed statement, not only
E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
foreign key 'Vend_Art' in table 'Art'

TIA
Vesselin

www.siopro.com
office@siopro.com


Rob Waywell

2006-01-11, 7:23 am

The problem with the SQLCode -194 is that referrential integrity checks
occur at the time of the COMMIT operation. SQL Remote explicitly sets the
WAIT_FOR_COMMIT database option.

ASA Database Administration Guide

Database Options

Alphabetical list of options

WAIT_FOR_COMMIT option [database]

This is important to allow for the order of operations within
transactions when replicating data. For example, with this option set it is
legal to insert a child record followed by the parent record within a single
transaction. Since most of the work to move related records together between
database nodes is done in triggers, then whenever the ownership/distribution
of related records depends on a characteristic of the child record the
replicated operations will fall into the child first pattern.

The result you are seeing is that since the error is detected on the
COMMIT, the original operation that caused the RI error is no longer known
to DBRemote. The only way to get the statements output is to use the -v
switch on dbremote.


--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports:
http://case-express.sybase.com/cx/c...sc?CASETYPE=Bug

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

"Veselin Ivanov" <vs@sonita.com> wrote in message
news:43c4b49b@forums
-2-dub...
> Hi,
> using ASA 9.0.2.3198 with DBRemote. The command line is :
> dbremote -m 32M -c "dbn=Sp" -rd 2 -rp 5 -q -os 5M -o C:\Remote\Remote.log
> C:\Sp\Data\
> This is part of log file, created by -o option
>
> I. 01/05 12:04:37. Applying message from "office"
> (0-0012563077-0012727816-0)
> E. 01/05 12:04:37. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> I. 01/05 12:04:38. Applying message from "office"
> (0-0012563077-0012727816-0)
> E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> E. 01/05 12:04:38. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> I. 01/05 12:08:38. Sending message to "office" (2-0008011294-0008075123-0)
> I. 01/05 12:14:39. Received message from "office"
> (0-0012727816-0012801118-0)
> I. 01/05 12:14:39. Applying message from "office"
> (0-0012727816-0012801118-0)
> E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> I. 01/05 12:14:39. Applying message from "office"
> (0-0012727816-0012801118-0)
> E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
> I. 01/05 12:23:40. Sending message to "office" (2-0008075123-0008080765-0)
> I. 01/05 12:38:41. Sending message to "office" (2-0008080765-0008107590-0)
> I. 01/05 12:44:42. Received message from "office"
> (0-0012801118-0012801118-0)
> I. 01/05 12:44:42. Applying message from "office"
> (0-0012801118-0012801118-0)
>
> Is there any option to write to log file failed statement, not only
> E. 01/05 12:14:39. SQL statement failed: (-194) No primary key value for
> foreign key 'Vend_Art' in table 'Art'
>
> TIA
> Vesselin
>
> www.siopro.com
> office@siopro.com
>



Veselin Ivanov

2006-01-13, 7:23 am

> The problem with the SQLCode -194 is that referrential integrity checks
> occur at the time of the COMMIT operation. SQL Remote explicitly sets the
> WAIT_FOR_COMMIT database option.


Does SQL Remote explicitly set the WAIT_FOR_COMMIT database option to 'ON' ?

Vesselin


Reg Domaratzki \(iAnywhere Solutions\)

2006-01-13, 11:23 am

Yes, SQL Remote sets the option to 'ON'. You cannot, and would not want to
change this.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"


"Veselin Ivanov" <vs@sonita.com> wrote in message
news:43c7a20b$1@foru
ms-1-dub...
the[color=darkred]
>
> Does SQL Remote explicitly set the WAIT_FOR_COMMIT database option to 'ON'

?
>
> Vesselin
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com