Home > Archive > SQL Anywhere database replication > November 2005 > DBTOOLS - dbremote









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 DBTOOLS - dbremote
TPS

2005-11-22, 3:23 am

Sybase Adaptive Server Anywhere Database Engine Version 8.0.2.4258

I am developing an application that will automatically replicate using
dbremote via the DBTOOLS dll.

When you run dbremote manually you see the progress receiving and applying
messages. Is there a way in DBTOOLS to capture this information so I can
show an accurate progress report as the replication is occurring. I do not
want my users to think that the application is locked up and terminate it
via task manager while the replication is occurring.

Thanks
TPS


Reg Domaratzki \(iAnywhere Solutions\)

2005-11-22, 9:23 am

You'd implement this functionality in the ProgIndexCallBack callback. A
simple text based implementation might look something like :

extern short _callback ProgIndexCallBack( a_sql_uint32 v1, a_sql_uint32 v2 )
{
fprintf( stdout, "ProgIndexCallBack -- Finished %d of %d", v1, v2 );
fprintf( stdout, "\n" );
fflush( stdout );
return 0;
}

--
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"


"TPS" <ts@scientexlc.com> wrote in message news:43828d7a@forums
-1-dub...
> Sybase Adaptive Server Anywhere Database Engine Version 8.0.2.4258
>
> I am developing an application that will automatically replicate using
> dbremote via the DBTOOLS dll.
>
> When you run dbremote manually you see the progress receiving and applying
> messages. Is there a way in DBTOOLS to capture this information so I can
> show an accurate progress report as the replication is occurring. I do not
> want my users to think that the application is locked up and terminate it
> via task manager while the replication is occurring.
>
> Thanks
> TPS
>
>



Reg Domaratzki \(iAnywhere Solutions\)

2005-11-22, 11:23 am

Argh, my last post was poorly worded. Let's try this again.

You'd implement this functionality in the progress_index_rtn callback. A
simple text based implementation might look something like :

extern short _callback ProgIndexCallBack( a_sql_uint32 v1, a_sql_uint32 v2 )
{
fprintf( stdout, "ProgIndexCallBack -- Finished %d of %d", v1, v2 );
fprintf( stdout, "\n" );
fflush( stdout );
return 0;
}

int main( ){
a_remote_sql rem_info;
memset( &rem_info, 0, sizeof( a_remote_sql ) );
// set other things
rem_info.progress_index_rtn = (SET_PROGRESS_CALLBA
CK)ProgIndexCallBack
;
// execute
}



--
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"


"Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
wrote in message news:43833111$1@foru
ms-2-dub...
> You'd implement this functionality in the ProgIndexCallBack callback. A
> simple text based implementation might look something like :
>
> extern short _callback ProgIndexCallBack( a_sql_uint32 v1, a_sql_uint32

v2 )
> {
> fprintf( stdout, "ProgIndexCallBack -- Finished %d of %d", v1,

v2 );
> fprintf( stdout, "\n" );
> fflush( stdout );
> return 0;
> }
>
> --
> 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"
>
>
> "TPS" <ts@scientexlc.com> wrote in message news:43828d7a@forums
-1-dub...
applying[color=darkr
ed]
not[color=darkred]
it[color=darkred]
>
>



TPS

2005-11-22, 8:23 pm

Thanks...

I noticed when running this the results of V1 and V2 seem a liitle
different.
On first entry of the callback V1 = 0 V2 = 100 I guess this is being
normalized on a scal to 1 to 100

following entries into the callback V2 is always 0 and V1 counts up to 100
at which point the replication is complete.

What is interesting V1 does not count up 1 at a time. It is somewhat random
to me. A sample run has V1:
(1,2,3,67,68,69,70,7
8,79,80,81,82,..93,97,98,99,100)

Is there any logic behind this like incoming / processing / sending ???

Thanks
TPS




"Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
wrote in message news:43834270@forums
-2-dub...
> Argh, my last post was poorly worded. Let's try this again.
>
> You'd implement this functionality in the progress_index_rtn callback. A
> simple text based implementation might look something like :
>
> extern short _callback ProgIndexCallBack( a_sql_uint32 v1, a_sql_uint32
> v2 )
> {
> fprintf( stdout, "ProgIndexCallBack -- Finished %d of %d", v1,
> v2 );
> fprintf( stdout, "\n" );
> fflush( stdout );
> return 0;
> }
>
> int main( ){
> a_remote_sql rem_info;
> memset( &rem_info, 0, sizeof( a_remote_sql ) );
> // set other things
> rem_info.progress_index_rtn = (SET_PROGRESS_CALLBA
CK)ProgIndexCallBack
;
> // execute
> }
>
>
>
> --
> 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"
>
>
> "Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
> wrote in message news:43833111$1@foru
ms-2-dub...
> v2 )
> v2 );
> http://www.ianywhere.com/developer/product_manuals
> applying
> not
> it
>
>



Reg Domaratzki \(iAnywhere Solutions\)

2005-11-23, 9:24 am

I believe v2 is only non-zero when v1 is zero, indicating the maximum value
that v1 will reach. My sample code was put together in about 45 seconds, so
I didn't bother keeping track of the maximum value and just printed what was
sent to the callback.

The v1 value being sent in is a percentage complete. If the numbers jump
it's only because the estimate we made to complete task X finished quicker
than expected.

--
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"


"TPS" <ts@scientexlc.com> wrote in message news:43837f8e@forums
-1-dub...
> Thanks...
>
> I noticed when running this the results of V1 and V2 seem a liitle
> different.
> On first entry of the callback V1 = 0 V2 = 100 I guess this is being
> normalized on a scal to 1 to 100
>
> following entries into the callback V2 is always 0 and V1 counts up to 100
> at which point the replication is complete.
>
> What is interesting V1 does not count up 1 at a time. It is somewhat

random
> to me. A sample run has V1:
> (1,2,3,67,68,69,70,7
8,79,80,81,82,..93,97,98,99,100)
>
> Is there any logic behind this like incoming / processing / sending ???
>
> Thanks
> TPS
>
>
>
>
> "Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
> wrote in message news:43834270@forums
-2-dub...
A[color=darkred]
(SET_PROGRESS_CALLBA
CK)ProgIndexCallBack
;[color=darkred]
<FirstName.LastName@ianywhere.com>[color=darkred]
A[color=darkred]
news:43828d7a@forums
-1-dub...[color=darkred]
using[color=darkred]

do[color=darkred]
terminate[color=dark
red]
>
>



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