Re: SET MAXERRORCOUNT problem with loadercli input file

Joël Reungoat <[email protected]>
Newsgroups gmane.comp.db.maxdb
Organization JOUVE SI Rennes
Message-ID <[email protected]>
Thank you Steffen, I now see the difference between -E option and 
MAXERRORCOUNT.

But this means that there is probably no solution to my problem. Am I 
right ?
I simply want in a script (as mentionned in my first mail) to create a 
BDPROC and then to call it, being sure that there is no error during 
these 2 actions. This can be done using the option "-E 1".
But before creating the DBPROC in the script, I must try to drop it, 
because the DBPROC may already exist.
So in this case, if the DBPROC does not exist, it will raise an error 
and will stop the script. I would like that it does not stop for this 
none fatal error and continue with next commands but stopping on next 
fatal error.
Does somebody see a possibility to do it in a same script ?
Thank you for your help.

Joël.

On 23/01/2007 17:59,  Schildberg, Steffen wrote :
> Hi Joel,
>
> Joël Reungoat [mailto:[email protected]] wrote:
>   
>> Hello,
>>
>> "SET MAXERRORCOUNT xx" seems to have no effect in loadercli 
>> input file 
>> (Used Maxdb version : 7.5)
>> Could somebody tell me if this is a known bug or if I 
>> incorrectly use an option ?
>>
>> Here is the sample script that I call with loadercli (without 
>> the option 
>> -E) :
>> //Folowing command should be to allow to drop myProc without 
>> stopping on 
>> error (but it has no effect !)
>> SET MAXERRORCOUNT 100
>> //
>> DROP DBPROC mySample
>> //Folowing command is then to force to stop at first error
>> SET MAXERRORCOUNT 1
>> //
>> CREATE DBPROC mySample  AS
>> BEGIN
>> SELECT * FROM domain.dbprocedures;
>> END;
>> //
>> CALL mySample
>> //
>>
>> The script produces following report that mentions the SET 
>> MAXERRORCOUNT 
>> 100 is successfull but it has no effect because it stops at the first 
>> encountered error. It does not when I use the option -E 100 
>> with loadercli.
>>
>>     
> Actually the MAXERRORCOUNT is evaluated for Loader commands only. This
> means this option takes effect only for EXTRACT/LOAD/EXPORT/IMPORT/DATAUPDATE commands
> at all. SQL commands are not affected by this option. Here the documentation is
> slightly inaccurate. We will fix this asap.
> MAXERRORCOUNT means that the Loader accepts up to this count of errors
> when processing a single Loader command. For instance if you LOAD a table with
> 1 Mio rows and set MAXERRORCOUNT to 1000 the Loader would stop inserting records into
> this table when encountering the 1001st error.
> Actually the -E option does what you want. The Loader can be thought of as a client and
> a server. The client reads the scripts and sends the commands to the server. So if you'd
> like to have the Loader don't stop on an error at a command in your script use the -E option. If
> you'd like to have the Loader accept a certain number of errors when processing a Loader command
> use the SET MAXERRORCOUNT command.
>
> Regards,
>  Steffen
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.