|
Home > Archive > SQL Anywhere database replication > February 2006 > Re: dbxtract and Syntax error near 'if' (Solved)
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 |
Re: dbxtract and Syntax error near 'if' (Solved)
|
|
| Oliver Schulze L. 2006-02-15, 3:23 am |
| Hi Reg,
solved, don't know why this code can reproduce the bug in dbxtract.
I try to make a testcase with no luck, I used 'select 1 from sys.dummy'
instead of my tables, using 'numeric(10)' instead of datatype 'T_LONG_T'
but have no luck. It has to be this exact code.
I had to deleted this 2 lines to make dbxtract work:
//raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
//return
The command I used was:
dbxtract.exe -an user3 -v -f -j 2 -c " eng=test;uid=dba;pwd
=sql" user3
Here is the code, HTH, Many Thanks Reg!
Oliver
alter procedure dba. sp_fix_load_prod_inf
o()
begin
declare codigo_tmp T_UINT_T;
declare precio_tmp T_MONEY_T;
declare prod_info_id_tmp T_FK_T;
// ciclar prod_info_tmp
for for_prod_info as cur_prod_info dynamic scroll cursor for
select codigo,precio from
dba.prod_info_tmp do
// guardar los datos nuevos
set codigo_tmp=codigo;
set precio_tmp=precio;
// buscar el prod_info
set prod_info_id_tmp=nul
l;
select prod_info_id into prod_info_id_tmp
from dba.prod_info where
codigo = codigo_tmp;
if(prod_info_id_tmp is null) then
message 'sp_fix_load_prod_in
fo: No se encuentra el
codigo:',codigo_tmp type info to console
else //raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
//return
// actualizar el precio
update dba.prod_info set
precio_tienda = precio_tmp where
prod_info_id = prod_info_id_tmp;
message 'sp_fix_load_prod_in
fo: codigo:',codigo_tmp,
'
actualizado' type info to console
end if end for
end
Reg Domaratzki (iAnywhere Solutions) wrote:
> I can see a whole bunch of fixes to dbunload -an/-ar/-ac that were never
> fixed in v604, since they were discovered after v604 was End-of-lifed.
>
> Do you have any comments (single or multi-line) in your stored procedures
> that include "go" in the comment? This could be causing your problem, and
> was never fixed in v604.
>
| |
| Oliver Schulze L. 2006-02-15, 3:23 am |
| I little typo, I had to remove these 3 lines to make dbxtract work:
//raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
//return
// actualizar el precio
That is, changing this:
else //raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
//return
// actualizar el precio
update dba.prod_info set
to this:
else
update dba.prod_info set
Oliver
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2006-02-15, 9:24 am |
| Do you know if this problem exists in current ASA builds? If you could send
me the DB and dbxtract command line you use, I could verify that this isn't
a problem that you'll run into later (when you upgrade from v604).
--
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/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"
"Oliver Schulze L." <news.oliver@samera.com.py> wrote in message
news:43f2c809@forums
-2-dub...
> I little typo, I had to remove these 3 lines to make dbxtract work:
> //raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
> //return
> // actualizar el precio
>
> That is, changing this:
> else //raiserror 90001 'No se encuentra el codigo:%1!',codigo_t
mp;
> //return
> // actualizar el precio
> update dba.prod_info set
>
> to this:
> else
> update dba.prod_info set
>
> Oliver
| |
| Oliver Schulze L. 2006-02-17, 7:24 am |
| I can try to download a trial version of ASA 9.x
Should I migrate the DB first?
Thanks
Oliver
Reg Domaratzki (iAnywhere Solutions) wrote:
> Do you know if this problem exists in current ASA builds? If you could send
> me the DB and dbxtract command line you use, I could verify that this isn't
> a problem that you'll run into later (when you upgrade from v604).
>
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2006-02-17, 9:23 am |
| If I were doing this myself, I'd take baby steps and test along the way.
1) First try running the v6 database file on the v902 engine, use the v902
dbxtract and see if it fails.
2) Next, run v902 dbupgrad on the v6 database, then use the v902 dbxtract
and see if it fails.
3) Finally, run v902 dbunload -an on the upgraded database from step 2, then
use the v902 dbxtract and see if it fails.
If any of them fail, I'd be interested in seeing the database.
--
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/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"
"Oliver Schulze L." <news.oliver@samera.com.py> wrote in message
news:43f506f3@forums
-2-dub...[color=darkred]
> I can try to download a trial version of ASA 9.x
> Should I migrate the DB first?
>
> Thanks
> Oliver
>
> Reg Domaratzki (iAnywhere Solutions) wrote:
send[color=darkred]
isn't[color=darkred]
| |
| Oliver Schulze L. 2006-02-17, 11:23 am |
| Hi Reg,
the bug is not in dbeng9.exe 9.0.0.1118 on WinXP SP2!
I think it is solved in ASA 9.0.2 too.
I used:
Adaptive Server Anywhere Extraction Utility Version 9.0.0.1108
and run the test using your suggestion #1
HTH
Oliver
Reg Domaratzki (iAnywhere Solutions) wrote:
> If I were doing this myself, I'd take baby steps and test along the way.
>
> 1) First try running the v6 database file on the v902 engine, use the v902
> dbxtract and see if it fails.
> 2) Next, run v902 dbupgrad on the v6 database, then use the v902 dbxtract
> and see if it fails.
> 3) Finally, run v902 dbunload -an on the upgraded database from step 2, then
> use the v902 dbxtract and see if it fails.
>
> If any of them fail, I'd be interested in seeing the database.
>
|
|
|
|
|