OAT Error
Posted in 2013
Topics: Connectivity: ODBC / JDBC / .NET, Third-Party Tools & Monitoring
Hi, in OAT if I choose Replication/Replicates following error message appears: 256 : database: query failed: - Query: SELECT r.repid , r.primaryrepid , r.replsetid , r.repstate , r.flags , TRIM ( r.repname ) AS repname , r.cr_primary , r.cr_secondary , r.cr_spopt , TRIM ( r.cr_spname ) AS cr_spname , r.freqtype , r.create_time , r.modify_time , r.susp_time , p.repid , p.servid , p.partnum , p.partstate , p.partmode , p.flags AS partflags , p.start_time , p.stop_time , TRIM ( p.db ) AS db , TRIM ( p.owner ) AS owner , TRIM ( p.table ) AS table , TRIM ( p.selecstmt ) AS selecstmt , TRIM ( h.groupname ) AS groupname , exclusive , m.flags AS master_flags , TRIM ( m.tabserver ) AS master_server , TRIM ( m.tabdb ) AS master_database , TRIM ( m.tabowner ) AS master_owner , TRIM ( m.tabname ) AS master_table , f.objtype , f.hour , f.min , f.day , f.lastexec, BITAND(a.xtd_attr1,'0x0000001') as utf8_transport FROM repdef r, OUTER ( partdef p, OUTER ( servdef s, OUTER hostdef h ) ) , OUTER (select replsetpartdef.repid, 'E' as exclusive from replsetdef, replsetpartdef where replsetdef.replsetid = replsetpartdef.replsetid and bitval(replsetdef.replsetattr,'0x00000080')>0) e , OUTER mastered_replicates m , OUTER freqdef f , OUTER repxtdattr a WHERE r.repid = p.repid AND p.servid = s.servid AND s.servid = h.servid AND r.repid = e.repid AND r.repid = m.replid AND r.repid = f.repid AND r.repid = a.repid AND r.repname NOT LIKE '_ifx_%' AND r.repid NOT IN ( SELECT replid FROM templatetables WHERE replid NOT IN (SELECT repid FROM partdef) AND replid NOT IN (SELECT r1.repid FROM replsetpartdef r1, replsetdef r2 WHERE r1.replsetid = r2.replsetid AND bitval ( r2.replsetattr, 2097152 ) != 1) ) ORDER BY r.repname, db, groupname, owner, table Error: -206 [Informix][Informix ODBC Driver][Informix]The specified table (templatetables) is not in the database. (SQLPrepare[-206] at ext\\\\pdo_informix\\\\informix_driver.c:131) - C:\\\\Programme\\\\IBM Informix Client SDK\\\\OAT\\\\Apache_2.2.16\\\\htdocs\\\\openadmin\\\\lib What's wrong. TIA Reinhard
The 206 shows there is a table missing - are you using replication templates ?. In my experience OAT and ER are a good combination for testing your engine just crashed procedures :) Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Habichtsberg, Reinhard Sent: Thursday, January 03, 2013 11:53 AM To: ids@iiug.org Subject: OAT Error [29175] Hi, in OAT if I choose Replication/Replicates following error message appears: 256 : database: query failed: - Query: SELECT r.repid , r.primaryrepid , r.replsetid , r.repstate , r.flags , TRIM ( r.repname ) AS repname , r.cr_primary , r.cr_secondary , r.cr_spopt , TRIM ( r.cr_spname ) AS cr_spname , r.freqtype , r.create_time , r.modify_time , r.susp_time , p.repid , p.servid , p.partnum , p.partstate , p.partmode , p.flags AS partflags , p.start_time , p.stop_time , TRIM ( p.db ) AS db , TRIM ( p.owner ) AS owner , TRIM ( p.table ) AS table , TRIM ( p.selecstmt ) AS selecstmt , TRIM ( h.groupname ) AS groupname , exclusive , m.flags AS master_flags , TRIM ( m.tabserver ) AS master_server , TRIM ( m.tabdb ) AS master_database , TRIM ( m.tabowner ) AS master_owner , TRIM ( m.tabname ) AS master_table , f.objtype , f.hour , f.min , f.day , f.lastexec, BITAND(a.xtd_attr1,'0x0000001') as utf8_transport FROM repdef r, OUTER ( partdef p, OUTER ( servdef s, OUTER hostdef h ) ) , OUTER (select replsetpartdef.repid, 'E' as exclusive from replsetdef, replsetpartdef where replsetdef.replsetid = replsetpartdef.replsetid and bitval(replsetdef.replsetattr,'0x00000080')>0) e , OUTER mastered_replicates m , OUTER freqdef f , OUTER repxtdattr a WHERE r.repid = p.repid AND p.servid = s.servid AND s.servid = h.servid AND r.repid = e.repid AND r.repid = m.replid AND r.repid = f.repid AND r.repid = a.repid AND r.repname NOT LIKE '_ifx_%' AND r.repid NOT IN ( SELECT replid FROM templatetables WHERE replid NOT IN (SELECT repid FROM partdef) AND replid NOT IN (SELECT r1.repid FROM replsetpartdef r1, replsetdef r2 WHERE r1.replsetid = r2.replsetid AND bitval ( r2.replsetattr, 2097152 ) != 1) ) ORDER BY r.repname, db, groupname, owner, table Error: -206 [Informix][Informix ODBC Driver][Informix]The specified table (templatetables) is not in the database. (SQLPrepare[-206] at ext\\\\pdo_informix\\\\informix_driver.c:131) - C:\\\\Programme\\\\IBM Informix Client SDK\\\\OAT\\\\Apache_2.2.16\\\\htdocs\\\\openadmin\\\\lib What's wrong. TIA Reinhard **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
Now I tried to create a template consulting that fine manual: cdr define template -c hzv_tli Replicateset1 -M hzv_tli -C "always" -A -R -d hzv hzv_z_arzt_tm hzv_z_arzt hzv_z_arzt_bsnr cdr error: select count(*) from templatedef failed SQL code -206 :The specified table (templatedef) is not in the database. ISAM -111 :ISAM error: no record found. Informix 11.70.FC5. In syscdr I can't find any tables named template*. What is it that I'm missing. Any help is appriciated. TIA Reinhard. > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Paul > Watson > Sent: Thursday, January 03, 2013 7:34 PM > To: ids@iiug.org > Subject: RE: OAT Error [29176] > > The 206 shows there is a table missing - are you using replication templates ?. > > In my experience OAT and ER are a good combination for testing your engine just > crashed procedures :) > > Cheers > Paul > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > Habichtsberg, Reinhard > Sent: Thursday, January 03, 2013 11:53 AM > To: ids@iiug.org > Subject: OAT Error [29175] > > Hi, > > in OAT if I choose Replication/Replicates following error message > appears: > > 256 : database: query failed: - Query: SELECT r.repid , > r.primaryrepid , r.replsetid , r.repstate , r.flags , > TRIM ( r.repname ) AS repname , r.cr_primary , r.cr_secondary > , r.cr_spopt , TRIM ( r.cr_spname ) AS cr_spname , r.freqtype > , r.create_time , r.modify_time , r.susp_time , p.repid > , p.servid , p.partnum , p.partstate , p.partmode , > p.flags AS partflags , p.start_time , p.stop_time , TRIM ( > p.db ) AS db , TRIM ( p.owner ) AS owner , TRIM ( p.table ) AS > table , TRIM ( p.selecstmt ) AS selecstmt , TRIM ( h.groupname ) > AS groupname , exclusive , m.flags AS master_flags , TRIM ( > m.tabserver ) AS master_server , TRIM ( m.tabdb ) AS master_database > , TRIM ( m.tabowner ) AS master_owner , TRIM ( m.tabname ) AS > master_table , f.objtype , f.hour , f.min , f.day , > f.lastexec, BITAND(a.xtd_attr1,'0x0000001') as utf8_transport FROM > repdef r, OUTER ( partdef p, OUTER ( servdef s, OUTER hostdef h ) ) > , OUTER (select replsetpartdef.repid, 'E' as exclusive from replsetdef, > replsetpartdef where replsetdef.replsetid = replsetpartdef.replsetid > and bitval(replsetdef.replsetattr,'0x00000080')>0) e , OUTER > mastered_replicates m , OUTER freqdef f , OUTER repxtdattr a WHERE > r.repid = p.repid AND p.servid = s.servid AND s.servid = h.servid > AND r.repid = e.repid AND r.repid = m.replid AND r.repid = f.repid > AND r.repid = a.repid AND r.repname NOT LIKE '_ifx_%' AND r.repid > NOT IN ( SELECT replid FROM templatetables > WHERE replid NOT IN > (SELECT repid FROM partdef) AND replid NOT IN > (SELECT r1.repid FROM replsetpartdef r1, replsetdef r2 WHERE > r1.replsetid = r2.replsetid AND bitval ( r2.replsetattr, 2097152 ) != 1) > ) ORDER BY r.repname, db, groupname, owner, table Error: -206 > [Informix][Informix ODBC Driver][Informix]The specified table > (templatetables) is not in the database. (SQLPrepare[-206] at > ext\\\\pdo_informix\\\\informix_driver.c:131) - C:\\\\Programme\\\\IBM Informix > Client SDK\\\\OAT\\\\Apache_2.2.16\\\\htdocs\\\\openadmin\\\\lib > > What's wrong. > > TIA > > Reinhard > > ************************************************************************ **** > *** > Forum Note: Use "Reply" to post a response in the discussion forum. > > > ************************************************************************ ******* > Forum Note: Use "Reply" to post a response in the discussion forum.
Hi again,
Problem is solved:
I checked the file $INFORMIXDIR/etc/syscdr.sql which should create
syscdr database. I compared it with the syscdr database.
Following was missed in the syscdr database:
dba function informix.ifx_local2utf8
view templatedef
view templatetables
I copied these statements from syscdr.sql and ran it on the syscdr
database:
create dba function informix.ifx_local2utf8(
informix.lvarchar, informix.integer)
returns informix.lvarchar
with (HANDLESNULLS, PARALLELIZABLE, NOT VARIANT)
external name '(cdrUTF8_cvt2UTF8)'
language C;
grant execute on function informix.ifx_local2utf8(
informix.lvarchar, integer)
to public as informix;
create view templatedef
(replsetid, replsetname)
as select r.replsetid, r.replsetname
from replsetdef r
where bitval(r.replsetattr, 2097152) = 1;
revoke all on templatedef from public;
grant select on templatedef to public;
create view templatetables
(templatename, repname, replid, server, database,
owner, table)
as select t.replsetname, r.repname, m.replid, m.tabserver,
m.tabdb, m.tabowner, m.tabname
from templatedef t, outer (replsetpartdef p,
outer (mastered_replicates m, outer repdef r))
where t.replsetid = p.replsetid
and p.repid = m.replid
and m.replid = r.repid;
revoke all on templatetables from public;
grant select on templatetables to public;
Now it is possible to define templates and also OAT is satisfied :-)
The reason for the missing views and dba function may result from some
migrations of our database servers from IDS 9.xx over 11.50 to 11.70.FC5
(recent).
The IBM development team should have an eye on it.
Kind Regards,
Reinhard
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> Habichtsberg, Reinhard
> Sent: Friday, January 04, 2013 1:48 PM
> To: ids@iiug.org
> Subject: RE: OAT Error [29184]
>
> Now I tried to create a template consulting that fine manual:
>
> cdr define template -c hzv_tli Replicateset1 -M hzv_tli -C "always" -A
-R -d hzv
> hzv_z_arzt_tm hzv_z_arzt hzv_z_arzt_bsnr
>
> cdr error: select count(*) from templatedef failed SQL code -206 :The
specified
> table (templatedef) is not in the database.
>
> ISAM -111 :ISAM error: no record found.
>
> Informix 11.70.FC5.
>
> In syscdr I can't find any tables named template*. What is it that I'm
missing.
>
> Any help is appriciated.
>
> TIA
> Reinhard.
>
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
Of
> Paul
> > Watson
> > Sent: Thursday, January 03, 2013 7:34 PM
> > To: ids@iiug.org
> > Subject: RE: OAT Error [29176]
> >
> > The 206 shows there is a table missing - are you using replication
> templates ?.
> >
> > In my experience OAT and ER are a good combination for testing your
> engine just
> > crashed procedures :)
> >
> > Cheers
> > Paul
> >
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf
Of
> > Habichtsberg, Reinhard
> > Sent: Thursday, January 03, 2013 11:53 AM
> > To: ids@iiug.org
> > Subject: OAT Error [29175]
> >
> > Hi,
> >
> > in OAT if I choose Replication/Replicates following error message
> > appears:
> >
> > 256 : database: query failed: - Query: SELECT r.repid ,
r.primaryrepid
> > , r.replsetid , r.repstate , r.flags , TRIM ( r.repname ) AS repname
,
> > r.cr_primary , r.cr_secondary , r.cr_spopt , TRIM ( r.cr_spname ) AS
> > cr_spname , r.freqtype , r.create_time , r.modify_time , r.susp_time
,
> > p.repid , p.servid , p.partnum , p.partstate , p.partmode , p.flags
AS
> > partflags , p.start_time , p.stop_time , TRIM ( p.db ) AS db , TRIM
(
> > p.owner ) AS owner , TRIM ( p.table ) AS table , TRIM ( p.selecstmt
)
> > AS selecstmt , TRIM ( h.groupname ) AS groupname , exclusive ,
m.flags
> > AS master_flags , TRIM ( m.tabserver ) AS master_server , TRIM (
> > m.tabdb ) AS master_database , TRIM ( m.tabowner ) AS master_owner ,
> > TRIM ( m.tabname ) AS master_table , f.objtype , f.hour , f.min ,
> > f.day , f.lastexec, BITAND(a.xtd_attr1,'0x0000001') as
utf8_transport
> > FROM repdef r, OUTER ( partdef p, OUTER ( servdef s, OUTER hostdef h
)
> > ) , OUTER (select replsetpartdef.repid, 'E' as exclusive from
> replsetdef,
> > replsetpartdef where replsetdef.replsetid = replsetpartdef.replsetid
> > and bitval(replsetdef.replsetattr,'0x00000080')>0) e , OUTER
> > mastered_replicates m , OUTER freqdef f , OUTER repxtdattr a WHERE
> > r.repid = p.repid AND p.servid = s.servid AND s.servid = h.servid
AND
> > r.repid = e.repid AND r.repid = m.replid AND r.repid = f.repid AND
> > r.repid = a.repid AND r.repname NOT LIKE '_ifx_%' AND r.repid NOT IN
(
> > SELECT replid FROM templatetables WHERE replid NOT IN (SELECT repid
> > FROM partdef) AND replid NOT IN (SELECT r1.repid FROM replsetpartdef
> > r1, replsetdef r2 WHERE r1.replsetid = r2.replsetid AND bitval (> > r2.replsetattr, 2097152 ) !=
> 1)
> > ) ORDER BY r.repname, db, groupname, owner, table Error: -206
> > [Informix][Informix ODBC Driver][Informix]The specified table
> > (templatetables) is not in the database. (SQLPrepare[-206] at
> > ext\\\\pdo_informix\\\\informix_driver.c:131) - C:\\\\Programme\\\\IBM Informix
> > Client SDK\\\\OAT\\\\Apache_2.2.16\\\\htdocs\\\\openadmin\\\\lib
> >
> > What's wrong.
> >
> > TIA
> >
> > Reinhard
> >
> >
>
************************************************************************
> ****
> > ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
> >
>
************************************************************************
> *******
> > Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
************************************************************************
*******
> Forum Note: Use "Reply" to post a response in the discussion forum.