Am Donnerstag, 16. Dezember 2004 14:28 schrieb Schildberg, Steffen:
> Hi Herman-Josef,
>
> Hermann-Josef Krings [mailto:[EMAIL PROTECTED] wrote:
> > I try to give loadercli a command file which has been
> > extracted from the DB table triggers in UTF-8 format.
> > On Linux:
> > file  TRIGGER.001
> > TRIGGER.001: UTF-8 Unicode text
> >
> > Since the file has 3 Bytes in front (ef bb bf) which indicate
> > it is an UTF-8 File,
> > loadercli -u $ADMU,$ADMPW -d $DB -b $TRIGGER  returns with:
> > Error during execution
> > -->-25010
> > SQL error -3005 = Invalid SQL statement (error position: 1)
> >
> > If I remove the 3 leading bytes, the command-file is
> > processed without problems.
> >
> > Is there a way to let loadercli know that the command file is
> > of type UTF-8 ?
>
> Not yet. With one of the next versions (>= 7.5.00.23) the Loader
> will detect it automatically. We're currently working on this.
>
> > Is there a way to get DATAEXTRACT TRIGGERNAME,DEFINITION from
> > TRIGGERS to ASCII format?
>
> Well, it depends on how you got the definitions. I'm pretty sure
> you used a command like this:
> DATAEXTRACT TRIGGERNAME,DEFINITION from TRIGGERS
>  OUTFILE 'some_name'
>  LONGFILE DEFINITION 'TRIGGER.001'
>
> (at least on my system the DEFINITION column is of type LONG).
>
> If you did not let me know the command you used.
>
> If yes you could add the keyword ASCII to the LONGFILE def as here:
>  LONGFILE DEFINITION 'TRIGGER.001' ASCII
>
> If you unfortunately have an UNICODE DB there is no chance to get the
> definition in ASCII. The Loader would always stop with an error message
> 'Errors checking compatibility of external and db data types. ...'
> It forbids at the moment to convert data from UCS2 to ASCII because of
> the possible loss of data.
> So in case of UNICODE DB the only chance to get it loaded is
> to remove the marker :-(
>
> BTW: How did you get the definition UTF8? You must have specified this
> in
>      the command or have used a CATALOGEXTRACT command. Only for the
> latter
>      the default codetype is set to UTF8.
Hello Steffen,
this is the code I used:
#----
cat <<EOF >> $EXTRACT_TRG
DATAEXTRACT TRIGGERNAME,DEFINITION from TRIGGERS
OUTFILE './erg/TRIGGER.txt' UTF8
SEPARATOR ';'
DELIMITER ''
LONGFILE "DEFINITION" './erg/TRIGGER.###' UTF8
EOF
loadercli -u $ADMU,$ADMPW -d $DB -b $EXTRACT_TRG
#----
The Database is in UNICODE Mode
param_put _UNICODE YES
param_put DEFAULT_CODE UNICODE

The Parameter ASCII is not supported on the LONGFILE def
Its in the Documentation, but also gives an error if used (sorry I dont 
remember the error message).

The reason i used the DATAEXTRACT, is that as mentioned in my Mail of 29.11.
(Extracting triggers with sql statement)
I can not read more than 300 Characters with unixODBC isql using
select DEFINITION from triggers where triggername='$TRGN'
I used isql to read the structure of the DB to build DATAEXTRACT  and DATALOAD 
statements to get to a UNICODE DB.
In the meantime we used the creation scripts for the triggers, loadercli SQL 
for sequences  and the Dataextract / Dataload to move Data successfull with 
some handwork.
from 7.4.0.32 (ASCII) to 7.5.0.19 (UNICODE)

I am looking forward to find the solution in >= 7.5.00.23
Thank you for the information.

Hermann-Josef Krings
--
Business Keeper AG


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to