Point in time restore with archecker
Posted in 2008
A user on IDS 10.00.FC5 (AIX) ran archecker with a point-in-time 'restore to "2008-03-01 03:00:00"' clause in the schema file and got "GLS error 38 / Datetime conversion error -1 / Error parsing". Extraction without the restore line worked. The cause was the Italian locale (CLIENT_LOCALE/DB_LOCALE it_IT.1252): the timestamp had to be written in the locale's datetime format, not ISO. Setting CLIENT_LOCALE and USE_DTENV=1 and selecting CURRENT via dbaccess revealed the expected format; rewriting the clause as 'sabato, 23/02/2008 03:00:00' made archecker work.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hi all,
I'm trying to restore a table with archecker using the point in time
option.
I run the command 'archecker -bv -f test.txt' but it fails.
The archecker log says
2008-03-05 11:40:56
-----------------------------------------
STATUS: IBM Informix Dynamic Server Version 10.00.FC5
Program Name: archecker
Version: 8.0
Released: 2006-05-18 02:13:40
CSDK: IBM Informix CSDK Version 2.90
ESQL: IBM Informix-ESQL Version 2.90.FN458
Compiled: 05/18/06 02:15 on AIX 2 5
STATUS: Arguments [-bv -f test.txt]
STATUS: AC_STORAGE /tmp
STATUS: AC_MSGPATH /tmp/ac_msg.log
STATUS: AC_VERBOSE on
STATUS: AC_TAPEBLOCK 56 KB
STATUS: AC_IXBAR /u/informix/etc/ixbar.2
STATUS: AC_SCHEMA test.txt
TIME: [2008-03-05 11:40:56] All old validation files removed.
STATUS: Dropping old log control tables
ERROR: GLS error 38
ERROR: Datetime conversion error -1
ERROR: Internal error at line 17, column 32
ERROR: Error parsing "test.txt"
CRITICAL ERROR: Unable to initialize extraction
STATUS: archecker completed Physical Restore pid = 98330 exit code: 3
The script test.txt
database metal3;
create table sysprocbody
(
procid INTEGER,
datakey NCHAR(1),
seqno INTEGER,
data NCHAR(256)
) in datimetal1;create external table test (
procid INTEGER,
datakey NCHAR(1),
seqno INTEGER,
data NCHAR(256)
) using ("/tmp/marino.unl", delimited );
insert into test
select * from sysprocbody;restore to "2008-03-01 03:00:00";
and the configuration file for archecker ac_config.std
AC_MSGPATH /tmp/ac_msg.log # archecker message log
AC_STORAGE /tmp # Directory used for temp
storage
AC_VERBOSE 1 # 1 verbose messages 0 terse
messages
I tried without the restore option and it works fine but I need a
point in time restore.
It seems that the datetime field is wrong but GL_DATETIME and GL_DATE
are not set in our system and we have
CLIENT_LOCALE=it_IT.1252
DB_LOCALE=it_IT.1252
Can someone help me?
Thanks in advance,
Marino Decaro
Hi,
I think you need to change the format of your date.
In Italy the date format normally is not like
2008-03-01 03:00:00 (for 1st of March 2008)
or is it?
I don't know the correct date format now, but I think
you have to change it ...
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Entwicklung GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Herbert Kircher
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
informix-list-bounces@iiug.org wrote on 05.03.2008 12:07:46:
> Hi all,
>
> I'm trying to restore a table with archecker using the point in time
> option.
>
> I run the command 'archecker -bv -f test.txt' but it fails.
> The archecker log says
>
> 2008-03-05 11:40:56
> -----------------------------------------
> STATUS: IBM Informix Dynamic Server Version 10.00.FC5
> Program Name: archecker
> Version: 8.0
> Released: 2006-05-18 02:13:40
> CSDK: IBM Informix CSDK Version 2.90
> ESQL: IBM Informix-ESQL Version 2.90.FN458
> Compiled: 05/18/06 02:15 on AIX 2 5
>
> STATUS: Arguments [-bv -f test.txt]
> STATUS: AC_STORAGE /tmp
> STATUS: AC_MSGPATH /tmp/ac_msg.log
> STATUS: AC_VERBOSE on
> STATUS: AC_TAPEBLOCK 56 KB
> STATUS: AC_IXBAR /u/informix/etc/ixbar.2
> STATUS: AC_SCHEMA test.txt
> TIME: [2008-03-05 11:40:56] All old validation files removed.
> STATUS: Dropping old log control tables
> ERROR: GLS error 38
> ERROR: Datetime conversion error -1
> ERROR: Internal error at line 17, column 32
> ERROR: Error parsing "test.txt"
> CRITICAL ERROR: Unable to initialize extraction
> STATUS: archecker completed Physical Restore pid = 98330 exit code: 3
>
> The script test.txt
> database metal3;
> create table sysprocbody
> (
> procid INTEGER,
> datakey NCHAR(1),
> seqno INTEGER,
> data NCHAR(256)
> ) in datimetal1;> create external table test (
> procid INTEGER,
> datakey NCHAR(1),
> seqno INTEGER,
> data NCHAR(256)
> ) using ("/tmp/marino.unl", delimited );
> insert into test
> select * from sysprocbody;> restore to "2008-03-01 03:00:00";
>
> and the configuration file for archecker ac_config.std
> AC_MSGPATH /tmp/ac_msg.log # archecker message log
> AC_STORAGE /tmp # Directory used for temp
> storage
> AC_VERBOSE 1 # 1 verbose messages 0 terse
> messages
>
> I tried without the restore option and it works fine but I need a
> point in time restore.
> It seems that the datetime field is wrong but GL_DATETIME and GL_DATE
> are not set in our system and we have
> CLIENT_LOCALE=it_IT.1252
> DB_LOCALE=it_IT.1252>
> Can someone help me?
>
> Thanks in advance,
> Marino Decaro
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
On Wednesday 05 March 2008 12:07, Marino Decaro wrote:
> Hi all,
>
> I'm trying to restore a table with archecker using the point in time
> option.
>
> I run the command 'archecker -bv -f test.txt' but it fails.
> The archecker log says
>
> 2008-03-05 11:40:56
> -----------------------------------------
> STATUS: IBM Informix Dynamic Server Version 10.00.FC5
> Program Name: archecker
> Version: 8.0
> Released: 2006-05-18 02:13:40
> CSDK: IBM Informix CSDK Version 2.90
> ESQL: IBM Informix-ESQL Version 2.90.FN458
> Compiled: 05/18/06 02:15 on AIX 2 5
>
> STATUS: Arguments [-bv -f test.txt]
> STATUS: AC_STORAGE /tmp
> STATUS: AC_MSGPATH /tmp/ac_msg.log
> STATUS: AC_VERBOSE on
> STATUS: AC_TAPEBLOCK 56 KB
> STATUS: AC_IXBAR /u/informix/etc/ixbar.2
> STATUS: AC_SCHEMA test.txt
> TIME: [2008-03-05 11:40:56] All old validation files removed.
> STATUS: Dropping old log control tables
> ERROR: GLS error 38
> ERROR: Datetime conversion error -1
> ERROR: Internal error at line 17, column 32
> ERROR: Error parsing "test.txt"
> CRITICAL ERROR: Unable to initialize extraction
> STATUS: archecker completed Physical Restore pid = 98330 exit code: 3
>
> The script test.txt
> database metal3;
> create table sysprocbody
> (
> procid INTEGER,
> datakey NCHAR(1),
> seqno INTEGER,
> data NCHAR(256)
> ) in datimetal1;> create external table test (
> procid INTEGER,
> datakey NCHAR(1),
> seqno INTEGER,
> data NCHAR(256)
> ) using ("/tmp/marino.unl", delimited );
> insert into test
> select * from sysprocbody;> restore to "2008-03-01 03:00:00";
>
> and the configuration file for archecker ac_config.std
> AC_MSGPATH /tmp/ac_msg.log # archecker message log
> AC_STORAGE /tmp # Directory used for temp
> storage
> AC_VERBOSE 1 # 1 verbose messages 0 terse
> messages
>
> I tried without the restore option and it works fine but I need a
> point in time restore.
> It seems that the datetime field is wrong but GL_DATETIME and GL_DATE
> are not set in our system and we have
> CLIENT_LOCALE=it_IT.1252
> DB_LOCALE=it_IT.1252Try format the datetime field to the set locale it_IT.1252 . To find the
right format following steps can be used in a separate shell:
export CLIENT_LOCALE=it_IT.1252export USE_DTENV=1
echo 'select current from systables;' | dbaccess sysmaster -
Andreas
>
> Can someone help me?
>
> Thanks in advance,
> Marino Decaro
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
--
Andreas Breitfeld; Informix Development Munich
IBM Deutschland GmbH; Vorsitzender des Aufsichtsrats: Hans Ulrich
Maerki; Geschäftsführung: Martin Jetter (Vorsitzender), Christian
Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell,
Michael Diemer; Sitz der Gesellschaft: Stuttgart; Registergericht:
Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE 99369940
On 5 Mar, 13:30, Andreas Breitfeld <abrei...@de.ibm.com> wrote:
> On Wednesday 05 March 2008 12:07, Marino Decaro wrote:
>
> > Hi all,
>
> > I'm trying to restore a table with archecker using the point in time
> > option.
>
> > I run the command 'archecker -bv -f test.txt' but it fails.
> > The archecker log says
>
> > 2008-03-05 11:40:56
> > -----------------------------------------
> > STATUS: IBM Informix Dynamic Server Version 10.00.FC5
> > Program Name: archecker
> > Version: 8.0
> > Released: 2006-05-18 02:13:40
> > CSDK: IBM Informix CSDK Version 2.90
> > ESQL: IBM Informix-ESQL Version 2.90.FN458
> > Compiled: 05/18/06 02:15 on AIX 2 5
>
> > STATUS: Arguments [-bv -f test.txt]
> > STATUS: AC_STORAGE /tmp
> > STATUS: AC_MSGPATH /tmp/ac_msg.log
> > STATUS: AC_VERBOSE on
> > STATUS: AC_TAPEBLOCK 56 KB
> > STATUS: AC_IXBAR /u/informix/etc/ixbar.2
> > STATUS: AC_SCHEMA test.txt
> > TIME: [2008-03-05 11:40:56] All old validation files removed.
> > STATUS: Dropping old log control tables
> > ERROR: GLS error 38
> > ERROR: Datetime conversion error -1
> > ERROR: Internal error at line 17, column 32
> > ERROR: Error parsing "test.txt"
> > CRITICAL ERROR: Unable to initialize extraction
> > STATUS: archecker completed Physical Restore pid = 98330 exit code: 3
>
> > The script test.txt
> > database metal3;
> > create table sysprocbody
> > (
> > procid INTEGER,
> > datakey NCHAR(1),
> > seqno INTEGER,
> > data NCHAR(256)
> > ) in datimetal1;> > create external table test (
> > procid INTEGER,
> > datakey NCHAR(1),
> > seqno INTEGER,
> > data NCHAR(256)
> > ) using ("/tmp/marino.unl", delimited );
> > insert into test
> > select * from sysprocbody;> > restore to "2008-03-01 03:00:00";
>
> > and the configuration file for archecker ac_config.std
> > AC_MSGPATH /tmp/ac_msg.log # archecker message log
> > AC_STORAGE /tmp # Directory used for temp
> > storage
> > AC_VERBOSE 1 # 1 verbose messages 0 terse
> > messages
>
> > I tried without the restore option and it works fine but I need a
> > point in time restore.
> > It seems that the datetime field is wrong but GL_DATETIME and GL_DATE
> > are not set in our system and we have
> > CLIENT_LOCALE=it_IT.1252
> > DB_LOCALE=it_IT.1252>
> Try format the datetime field to the set locale it_IT.1252 . To find the
> right format following steps can be used in a separate shell:
> export CLIENT_LOCALE=it_IT.1252> export USE_DTENV=1
> echo 'select current from systables;' | dbaccess sysmaster -
>
> Andreas
>
>
>
> > Can someone help me?
>
> > Thanks in advance,
> > Marino Decaro
> > _______________________________________________
> > Informix-list mailing list
> > Informix-l...@iiug.org
> >http://www.iiug.org/mailman/listinfo/informix-list
>
> --
> Andreas Breitfeld; Informix Development Munich
> IBM Deutschland GmbH; Vorsitzender des Aufsichtsrats: Hans Ulrich
> Maerki; Geschäftsführung: Martin Jetter (Vorsitzender), Christian
> Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell,
> Michael Diemer; Sitz der Gesellschaft: Stuttgart; Registergericht:
> Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE 99369940
Thank you very much, Andreas.
With your help I found the correct format of datetime field.
I changed the last line of my script in
restore to 'sabato, 23/02/2008 03:00:00';
and it works correctly.
Thank you
Marino Decaro