firebirddata-dumpfbexport

FBexport - isc_dsql_prepare failed - cant make an output


I'm using firebird tool called fbexport to make a dump of table data from DB. What I've did is to:

  1. launch cmd, navigate to the directory where fbexport is
  2. put a command:

    FBExport.exe -D "c:\DB.GDB" -U sysdba –P masterkey -Si -V WIZYTY -F test.out

Unfortunatelly I received an error:

F:\FBX\exe>fbexport -D "C:\DB.gdb" -U sysdba -P masterkey -
Si -V WIZYTY -F test.out
Checking database charset...WIN1250.
Connecting to: 'LOCALHOST' as 'sysdba'...Connected.
Creating and starting transaction...Done.
Create statement...Done.
Doing verbatim export of table: WIZYTY
SQL: SELECT AMOUNT,ANI_DESC,ANI_ID,AUJESZKY,BADANIE_ID,BADANIE_OPIS,BUDYNEK_ID,C
HEMIA_OPIS,CUST_ID,DATA,DATA_UR,DATA_ZAK,DATA_ZGLOSZ,DOCTOR_ID,DOC_ID,DOC_NR,DOC
_TYPE_ID,DOC_YEAR,DUZE_TYP,DYSPLAZJA_RES,DYSP_UWAGI,EDIT_STATUS,FERMA_ID,GODZ_ZG
LOSZ,GRUZ_OPIS,HAS_ATTACH,HAS_LB_ORDERS,HAS_WIZ_SUB,HOTEL_ID,HOUR,IL_ZWIERZAT,IN
FORM_RES,INSEMI_OPIS,INV_ID,IS_DYSPLAZJA,IS_EPIKRYZA,IS_EXTERNAL,IS_FINISH,IS_LA
B_NEW,IS_WSCIEKL,LECZENIE_ID,L_SZPITALNE,MANY_BUD,MSC_POBYTU,NR_KS_LECZ,OBSER_ID
,OBSER_NR,OBSER_OPIS,ODDZIAL,POTW_ID,PRIV_NOTES,PROF_OPIS,RECEPTA_ID,RECEPT_OPIS
,REPS_PRINTED,SHIFT_CODE,SPECIAL_DESC,SPECIAL_STAT,SUB_ID,SZCZEP_ID,TEMP,TEMPER,
TIME_CHG,TO_KSIAZKA,TYP_WIZ,WAGA,WIZ_GOSP,WIZ_ID,WIZ_SRC,WYWIAD,ZALECENIA,ZALEC_
DPRIV FROM WIZYTY
Prepare statement...ERROR!
*** IBPP::SQLException ***
Context: Statement::Prepare( SELECT AMOUNT,ANI_DESC,ANI_ID,AUJESZKY,BADANIE_ID,B
ADANIE_OPIS,BUDYNEK_ID,CHEMIA_OPIS,CUST_ID,DATA,DATA_UR,DATA_ZAK,DATA_ZGLOSZ,DOC
TOR_ID,DOC_ID,DOC_NR,DOC_TYPE_ID,DOC_YEAR,DUZE_TYP,DYSPLAZJA_RES,DYSP_UWAGI,EDIT
_STATUS,FERMA_ID,GODZ_ZGLOSZ,GRUZ_OPIS,HAS_ATTACH,HAS_LB_ORDERS,HAS_WIZ_SUB,HOTE
L_ID,HOUR,IL_ZWIERZAT,INFORM_RES,INSEMI_OPIS,INV_ID,IS_DYSPLAZJA,IS_EPIKRYZA,IS_
EXTERNAL,IS_FINISH,IS_LAB_NEW,IS_WSCIEKL,LECZENIE_ID,L_SZPITALNE,MANY_BUD,MSC_PO
BYTU,NR_KS_LECZ,OBSER_ID,OBSER_NR,OBSER_OPIS,ODDZIAL,POTW_ID,PRIV_NOTES,PROF_OPI
S,RECEPTA_ID,RECEPT_OPIS,REPS_PRINTED,SHIFT_CODE,SPECIAL_DESC,SPECIAL_STAT,SUB_I
D,SZCZEP_ID,TEMP,TEMPER,TIME_CHG,TO_KSIAZKA,TYP_WIZ,WAGA,WIZ_GOSP,WIZ_ID,WIZ_SRC
,WYWIAD,ZALECENIA,ZALEC_DPRIV FROM WIZYTY  )
Message: isc_dsql_prepare failed

SQL Message : -104
Invalid token

Engine Code    : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 297
HOUR

Any ideas how to make it working?


Solution

  • HOUR became a reserved word since FB 2.5 and can not be used as a column name. Rename the column and try again. If a server you use will not allow you to rename the column do it in older version.