Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 01:06 PM
Rahul Babbar
 
Posts: n/a
Default getting very cryptic error while inserting the records

Hi,

I am getting the following error, while executing the simple insert
script on a few tables.

INSERT INTO <table_name>(<col1>) VALUES (1);

DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
Message: No authorized routine named "=" of type "FUNCTION" having
compatible arguments was found.

The datatype of the column is integer and the table has a large number
of columns, however i am trying to insert only one column(same error
comes with more columns).

Further there is no trigger on that table.
What could be the possible causes of the issue?.

However, there may be some functions that might be used to insert the
records, when the table is altered, the functions could become
inconsistent/invalid. However, i am not sure how an invalid function
which inserts the records in a table can be the cause of failure of
this insert.

I regret giving only this much information but this is the info that i
have.

What could be the possible reasons of this error?

Thanks
Rahul

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 01:07 PM
Mark A
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

"Rahul Babbar" <rahul.babbar1@gmail.com> wrote in message
news:1191846366.479178.75820@57g2000hsv.googlegrou ps.com...
> Hi,
>
> I am getting the following error, while executing the simple insert
> script on a few tables.
>
> INSERT INTO <table_name>(<col1>) VALUES (1);
>
> DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> Message: No authorized routine named "=" of type "FUNCTION" having
> compatible arguments was found.
>
> The datatype of the column is integer and the table has a large number
> of columns, however i am trying to insert only one column(same error
> comes with more columns).
>
> Further there is no trigger on that table.
> What could be the possible causes of the issue?.
>
> However, there may be some functions that might be used to insert the
> records, when the table is altered, the functions could become
> inconsistent/invalid. However, i am not sure how an invalid function
> which inserts the records in a table can be the cause of failure of
> this insert.
>
> I regret giving only this much information but this is the info that i
> have.
>
> What could be the possible reasons of this error?
>
> Thanks
> Rahul


Please do a db2look and post the DDL for the table. You can do this with the
Control Center.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 01:07 PM
Rahul Babbar
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message
>
> news:1191846366.479178.75820@57g2000hsv.googlegrou ps.com...
>
>
>
> > Hi,

>
> > I am getting the following error, while executing the simple insert
> > script on a few tables.

>
> > INSERT INTO <table_name>(<col1>) VALUES (1);

>
> > DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> > Message: No authorized routine named "=" of type "FUNCTION" having
> > compatible arguments was found.

>
> > The datatype of the column is integer and the table has a large number
> > of columns, however i am trying to insert only one column(same error
> > comes with more columns).

>
> > Further there is no trigger on that table.
> > What could be the possible causes of the issue?.

>
> > However, there may be some functions that might be used to insert the
> > records, when the table is altered, the functions could become
> > inconsistent/invalid. However, i am not sure how an invalid function
> > which inserts the records in a table can be the cause of failure of
> > this insert.

>
> > I regret giving only this much information but this is the info that i
> > have.

>
> > What could be the possible reasons of this error?

>
> > Thanks
> > Rahul

>
> Please do a db2look and post the DDL for the table. You can do this with the
> Control Center.


Here's the DDL (got from Quest Central)

CREATE TABLE ABC_ADDRESS
(TC_ABC_ID VARCHAR(50) NOT NULL,
ABC_ID BIGINT NOT NULL,
O_LOCATION_ID BIGINT NOT NULL,
O_LOCATION_ALIAS_ID VARCHAR(16),
O_ADDRESS_LINE_1 VARCHAR(75),
O_ADDRESS_LINE_2 VARCHAR(75),
O_ADDRESS_LINE_3 VARCHAR(75),
O_CITY VARCHAR(40),
O_STATE_PROV VARCHAR(2),
O_COUNTY VARCHAR(40),
O_POSTAL_CODE VARCHAR(10),
O_COUNTRY_CODE VARCHAR(2),
C_LOCATION_ID BIGINT NOT NULL,
C_LOCATION_ALIAS_ID VARCHAR(16),
C_ADDRESS_LINE_1 VARCHAR(75),
C_ADDRESS_LINE_2 VARCHAR(75),
C_ADDRESS_LINE_3 VARCHAR(75),
C_CITY VARCHAR(40),
C_STATE_PROV VARCHAR(2),
C_COUNTY VARCHAR(40),
C_POSTAL_CODE VARCHAR(10),
C_COUNTRY_CODE VARCHAR(2),
D_LOCATION_ID BIGINT NOT NULL,
D_LOCATION_ALIAS_ID VARCHAR(16),
D_ADDRESS_LINE_1 VARCHAR(75),
D_ADDRESS_LINE_2 VARCHAR(75),
D_ADDRESS_LINE_3 VARCHAR(75),
D_CITY VARCHAR(40),
D_STATE_PROV VARCHAR(2),
D_COUNTY VARCHAR(40),
D_POSTAL_CODE VARCHAR(10),
D_COUNTRY_CODE VARCHAR(2),
HIBERNATE_VERSION BIGINT
)
DATA CAPTURE NONE
IN USERSPACE1;

ALTER TABLE ABC_ADDRESS
LOCKSIZE ROW
APPEND OFF
NOT VOLATILE;

ALTER TABLE ABC_ADDRESS
ADD CONSTRAINT ABC_ADDRESS_PK PRIMARY KEY
(ABC_ID
);

ALTER TABLE ABC_ADDRESS
ADD CONSTRAINT ABC_ADDRESS_FK FOREIGN KEY
(ABC_ID
)
REFERENCES ABC
(ABC_ID
)
ON DELETE NO ACTION
ON UPDATE NO ACTION
ENFORCED
ENABLE QUERY OPTIMIZATION;

The following insert gives the above error.
insert into abc_address(lpn_id) values(1);

However, the problem goes away after the table is dropped and
recreated.

Rahul

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 01:07 PM
m
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

Rahul Babbar wrote:
> On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
>> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message
>>
>> news:1191846366.479178.75820@57g2000hsv.googlegrou ps.com...
>>
>>
>>
>>> Hi,
>>> I am getting the following error, while executing the simple insert
>>> script on a few tables.
>>> INSERT INTO <table_name>(<col1>) VALUES (1);
>>> DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
>>> Message: No authorized routine named "=" of type "FUNCTION" having
>>> compatible arguments was found.
>>> The datatype of the column is integer and the table has a large number
>>> of columns, however i am trying to insert only one column(same error
>>> comes with more columns).
>>> Further there is no trigger on that table.
>>> What could be the possible causes of the issue?.
>>> However, there may be some functions that might be used to insert the
>>> records, when the table is altered, the functions could become
>>> inconsistent/invalid. However, i am not sure how an invalid function
>>> which inserts the records in a table can be the cause of failure of
>>> this insert.
>>> I regret giving only this much information but this is the info that i
>>> have.
>>> What could be the possible reasons of this error?
>>> Thanks
>>> Rahul

>> Please do a db2look and post the DDL for the table. You can do this with the
>> Control Center.

>
> Here's the DDL (got from Quest Central)
>
> CREATE TABLE ABC_ADDRESS
> (TC_ABC_ID VARCHAR(50) NOT NULL,
> ABC_ID BIGINT NOT NULL,
> O_LOCATION_ID BIGINT NOT NULL,
> O_LOCATION_ALIAS_ID VARCHAR(16),
> O_ADDRESS_LINE_1 VARCHAR(75),
> O_ADDRESS_LINE_2 VARCHAR(75),
> O_ADDRESS_LINE_3 VARCHAR(75),
> O_CITY VARCHAR(40),
> O_STATE_PROV VARCHAR(2),
> O_COUNTY VARCHAR(40),
> O_POSTAL_CODE VARCHAR(10),
> O_COUNTRY_CODE VARCHAR(2),
> C_LOCATION_ID BIGINT NOT NULL,
> C_LOCATION_ALIAS_ID VARCHAR(16),
> C_ADDRESS_LINE_1 VARCHAR(75),
> C_ADDRESS_LINE_2 VARCHAR(75),
> C_ADDRESS_LINE_3 VARCHAR(75),
> C_CITY VARCHAR(40),
> C_STATE_PROV VARCHAR(2),
> C_COUNTY VARCHAR(40),
> C_POSTAL_CODE VARCHAR(10),
> C_COUNTRY_CODE VARCHAR(2),
> D_LOCATION_ID BIGINT NOT NULL,
> D_LOCATION_ALIAS_ID VARCHAR(16),
> D_ADDRESS_LINE_1 VARCHAR(75),
> D_ADDRESS_LINE_2 VARCHAR(75),
> D_ADDRESS_LINE_3 VARCHAR(75),
> D_CITY VARCHAR(40),
> D_STATE_PROV VARCHAR(2),
> D_COUNTY VARCHAR(40),
> D_POSTAL_CODE VARCHAR(10),
> D_COUNTRY_CODE VARCHAR(2),
> HIBERNATE_VERSION BIGINT
> )
> DATA CAPTURE NONE
> IN USERSPACE1;
>
> ALTER TABLE ABC_ADDRESS
> LOCKSIZE ROW
> APPEND OFF
> NOT VOLATILE;
>
> ALTER TABLE ABC_ADDRESS
> ADD CONSTRAINT ABC_ADDRESS_PK PRIMARY KEY
> (ABC_ID
> );
>
> ALTER TABLE ABC_ADDRESS
> ADD CONSTRAINT ABC_ADDRESS_FK FOREIGN KEY
> (ABC_ID
> )
> REFERENCES ABC
> (ABC_ID
> )
> ON DELETE NO ACTION
> ON UPDATE NO ACTION
> ENFORCED
> ENABLE QUERY OPTIMIZATION;
>
> The following insert gives the above error.
> insert into abc_address(lpn_id) values(1);
>
> However, the problem goes away after the table is dropped and
> recreated.
>
> Rahul
>


I dont see a cloumn called lpn_id in the table....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 01:07 PM
m
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

Rahul Babbar wrote:
> On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
>> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message
>>
>> news:1191846366.479178.75820@57g2000hsv.googlegrou ps.com...
>>
>>
>>
>>> Hi,
>>> I am getting the following error, while executing the simple insert
>>> script on a few tables.
>>> INSERT INTO <table_name>(<col1>) VALUES (1);
>>> DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
>>> Message: No authorized routine named "=" of type "FUNCTION" having
>>> compatible arguments was found.
>>> The datatype of the column is integer and the table has a large number
>>> of columns, however i am trying to insert only one column(same error
>>> comes with more columns).
>>> Further there is no trigger on that table.
>>> What could be the possible causes of the issue?.
>>> However, there may be some functions that might be used to insert the
>>> records, when the table is altered, the functions could become
>>> inconsistent/invalid. However, i am not sure how an invalid function
>>> which inserts the records in a table can be the cause of failure of
>>> this insert.
>>> I regret giving only this much information but this is the info that i
>>> have.
>>> What could be the possible reasons of this error?
>>> Thanks
>>> Rahul

>> Please do a db2look and post the DDL for the table. You can do this with the
>> Control Center.

>
> Here's the DDL (got from Quest Central)
>
> CREATE TABLE ABC_ADDRESS
> (TC_ABC_ID VARCHAR(50) NOT NULL,
> ABC_ID BIGINT NOT NULL,
> O_LOCATION_ID BIGINT NOT NULL,
> O_LOCATION_ALIAS_ID VARCHAR(16),
> O_ADDRESS_LINE_1 VARCHAR(75),
> O_ADDRESS_LINE_2 VARCHAR(75),
> O_ADDRESS_LINE_3 VARCHAR(75),
> O_CITY VARCHAR(40),
> O_STATE_PROV VARCHAR(2),
> O_COUNTY VARCHAR(40),
> O_POSTAL_CODE VARCHAR(10),
> O_COUNTRY_CODE VARCHAR(2),
> C_LOCATION_ID BIGINT NOT NULL,
> C_LOCATION_ALIAS_ID VARCHAR(16),
> C_ADDRESS_LINE_1 VARCHAR(75),
> C_ADDRESS_LINE_2 VARCHAR(75),
> C_ADDRESS_LINE_3 VARCHAR(75),
> C_CITY VARCHAR(40),
> C_STATE_PROV VARCHAR(2),
> C_COUNTY VARCHAR(40),
> C_POSTAL_CODE VARCHAR(10),
> C_COUNTRY_CODE VARCHAR(2),
> D_LOCATION_ID BIGINT NOT NULL,
> D_LOCATION_ALIAS_ID VARCHAR(16),
> D_ADDRESS_LINE_1 VARCHAR(75),
> D_ADDRESS_LINE_2 VARCHAR(75),
> D_ADDRESS_LINE_3 VARCHAR(75),
> D_CITY VARCHAR(40),
> D_STATE_PROV VARCHAR(2),
> D_COUNTY VARCHAR(40),
> D_POSTAL_CODE VARCHAR(10),
> D_COUNTRY_CODE VARCHAR(2),
> HIBERNATE_VERSION BIGINT
> )
> DATA CAPTURE NONE
> IN USERSPACE1;
>
> ALTER TABLE ABC_ADDRESS
> LOCKSIZE ROW
> APPEND OFF
> NOT VOLATILE;
>
> ALTER TABLE ABC_ADDRESS
> ADD CONSTRAINT ABC_ADDRESS_PK PRIMARY KEY
> (ABC_ID
> );
>
> ALTER TABLE ABC_ADDRESS
> ADD CONSTRAINT ABC_ADDRESS_FK FOREIGN KEY
> (ABC_ID
> )
> REFERENCES ABC
> (ABC_ID
> )
> ON DELETE NO ACTION
> ON UPDATE NO ACTION
> ENFORCED
> ENABLE QUERY OPTIMIZATION;
>
> The following insert gives the above error.
> insert into abc_address(lpn_id) values(1);
>
> However, the problem goes away after the table is dropped and
> recreated.
>
> Rahul
>


I dont see a column called lpn_id in the table....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 01:07 PM
Knut Stolze
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

Rahul Babbar wrote:

> On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
>> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message
>>
>> news:1191846366.479178.75820@57g2000hsv.googlegrou ps.com...
>>
>>
>>
>> > Hi,

>>
>> > I am getting the following error, while executing the simple insert
>> > script on a few tables.

>>
>> > INSERT INTO <table_name>(<col1>) VALUES (1);

>>
>> > DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
>> > Message: No authorized routine named "=" of type "FUNCTION" having
>> > compatible arguments was found.

>>
>> > The datatype of the column is integer and the table has a large number
>> > of columns, however i am trying to insert only one column(same error
>> > comes with more columns).

>>
>> > Further there is no trigger on that table.
>> > What could be the possible causes of the issue?.

>>
>> > However, there may be some functions that might be used to insert the
>> > records, when the table is altered, the functions could become
>> > inconsistent/invalid. However, i am not sure how an invalid function
>> > which inserts the records in a table can be the cause of failure of
>> > this insert.

>>
>> > I regret giving only this much information but this is the info that i
>> > have.

>>
>> > What could be the possible reasons of this error?

>>
>> > Thanks
>> > Rahul

>>
>> Please do a db2look and post the DDL for the table. You can do this with
>> the Control Center.

>
> Here's the DDL (got from Quest Central)
>
> CREATE TABLE ABC_ADDRESS
> (TC_ABC_ID VARCHAR(50) NOT NULL,
> ABC_ID BIGINT NOT NULL,
> O_LOCATION_ID BIGINT NOT NULL,
> O_LOCATION_ALIAS_ID VARCHAR(16),
> O_ADDRESS_LINE_1 VARCHAR(75),
> O_ADDRESS_LINE_2 VARCHAR(75),
> O_ADDRESS_LINE_3 VARCHAR(75),
> O_CITY VARCHAR(40),
> O_STATE_PROV VARCHAR(2),
> O_COUNTY VARCHAR(40),
> O_POSTAL_CODE VARCHAR(10),
> O_COUNTRY_CODE VARCHAR(2),
> C_LOCATION_ID BIGINT NOT NULL,
> C_LOCATION_ALIAS_ID VARCHAR(16),
> C_ADDRESS_LINE_1 VARCHAR(75),
> C_ADDRESS_LINE_2 VARCHAR(75),
> C_ADDRESS_LINE_3 VARCHAR(75),
> C_CITY VARCHAR(40),
> C_STATE_PROV VARCHAR(2),
> C_COUNTY VARCHAR(40),
> C_POSTAL_CODE VARCHAR(10),
> C_COUNTRY_CODE VARCHAR(2),
> D_LOCATION_ID BIGINT NOT NULL,
> D_LOCATION_ALIAS_ID VARCHAR(16),
> D_ADDRESS_LINE_1 VARCHAR(75),
> D_ADDRESS_LINE_2 VARCHAR(75),
> D_ADDRESS_LINE_3 VARCHAR(75),
> D_CITY VARCHAR(40),
> D_STATE_PROV VARCHAR(2),
> D_COUNTY VARCHAR(40),
> D_POSTAL_CODE VARCHAR(10),
> D_COUNTRY_CODE VARCHAR(2),
> HIBERNATE_VERSION BIGINT
> )
> DATA CAPTURE NONE
> IN USERSPACE1;
>
>
> The following insert gives the above error.
> insert into abc_address(lpn_id) values(1);


The table contains 5 columns defined with NOT NULL. Your INSERT statement
specifies only 1 column (and one that doesn't even exist in the table).
How are the values for the other not-nullable columns provided? Maybe you
do have some triggers?

> However, the problem goes away after the table is dropped and
> recreated.


--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 01:07 PM
Serge Rielau
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

Rahul Babbar wrote:
> Hi,
>
> I am getting the following error, while executing the simple insert
> script on a few tables.
>
> INSERT INTO <table_name>(<col1>) VALUES (1);
>
> DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> Message: No authorized routine named "=" of type "FUNCTION" having
> compatible arguments was found.

This smells like an issue with a nested SQL object:
* Expression generated column
* check constraint
* trigger

I do recall an issue with generated column when a LOB was involved.

Either way this should be a PMR and if it's novel an APAR should be opened.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 01:07 PM
Rahul Babbar
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

On Oct 8, 8:31 pm, m <mdlspo...@yahoo.com> wrote:
> Rahul Babbar wrote:
> > On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
> >> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message

>
> >>news:1191846366.479178.75820@57g2000hsv.googlegr oups.com...

>
> >>> Hi,
> >>> I am getting the following error, while executing the simple insert
> >>> script on a few tables.
> >>> INSERT INTO <table_name>(<col1>) VALUES (1);
> >>> DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> >>> Message: No authorized routine named "=" of type "FUNCTION" having
> >>> compatible arguments was found.
> >>> The datatype of the column is integer and the table has a large number
> >>> of columns, however i am trying to insert only one column(same error
> >>> comes with more columns).
> >>> Further there is no trigger on that table.
> >>> What could be the possible causes of the issue?.
> >>> However, there may be some functions that might be used to insert the
> >>> records, when the table is altered, the functions could become
> >>> inconsistent/invalid. However, i am not sure how an invalid function
> >>> which inserts the records in a table can be the cause of failure of
> >>> this insert.
> >>> I regret giving only this much information but this is the info that i
> >>> have.
> >>> What could be the possible reasons of this error?
> >>> Thanks
> >>> Rahul
> >> Please do a db2look and post the DDL for the table. You can do this with the
> >> Control Center.

>
> > Here's the DDL (got from Quest Central)

>
> > CREATE TABLE ABC_ADDRESS
> > (TC_ABC_ID VARCHAR(50) NOT NULL,
> > ABC_ID BIGINT NOT NULL,
> > O_LOCATION_ID BIGINT NOT NULL,
> > O_LOCATION_ALIAS_ID VARCHAR(16),
> > O_ADDRESS_LINE_1 VARCHAR(75),
> > O_ADDRESS_LINE_2 VARCHAR(75),
> > O_ADDRESS_LINE_3 VARCHAR(75),
> > O_CITY VARCHAR(40),
> > O_STATE_PROV VARCHAR(2),
> > O_COUNTY VARCHAR(40),
> > O_POSTAL_CODE VARCHAR(10),
> > O_COUNTRY_CODE VARCHAR(2),
> > C_LOCATION_ID BIGINT NOT NULL,
> > C_LOCATION_ALIAS_ID VARCHAR(16),
> > C_ADDRESS_LINE_1 VARCHAR(75),
> > C_ADDRESS_LINE_2 VARCHAR(75),
> > C_ADDRESS_LINE_3 VARCHAR(75),
> > C_CITY VARCHAR(40),
> > C_STATE_PROV VARCHAR(2),
> > C_COUNTY VARCHAR(40),
> > C_POSTAL_CODE VARCHAR(10),
> > C_COUNTRY_CODE VARCHAR(2),
> > D_LOCATION_ID BIGINT NOT NULL,
> > D_LOCATION_ALIAS_ID VARCHAR(16),
> > D_ADDRESS_LINE_1 VARCHAR(75),
> > D_ADDRESS_LINE_2 VARCHAR(75),
> > D_ADDRESS_LINE_3 VARCHAR(75),
> > D_CITY VARCHAR(40),
> > D_STATE_PROV VARCHAR(2),
> > D_COUNTY VARCHAR(40),
> > D_POSTAL_CODE VARCHAR(10),
> > D_COUNTRY_CODE VARCHAR(2),
> > HIBERNATE_VERSION BIGINT
> > )
> > DATA CAPTURE NONE
> > IN USERSPACE1;

>
> > ALTER TABLE ABC_ADDRESS
> > LOCKSIZE ROW
> > APPEND OFF
> > NOT VOLATILE;

>
> > ALTER TABLE ABC_ADDRESS
> > ADD CONSTRAINT ABC_ADDRESS_PK PRIMARY KEY
> > (ABC_ID
> > );

>
> > ALTER TABLE ABC_ADDRESS
> > ADD CONSTRAINT ABC_ADDRESS_FK FOREIGN KEY
> > (ABC_ID
> > )
> > REFERENCES ABC
> > (ABC_ID
> > )
> > ON DELETE NO ACTION
> > ON UPDATE NO ACTION
> > ENFORCED
> > ENABLE QUERY OPTIMIZATION;

>
> > The following insert gives the above error.
> > insert into abc_address(lpn_id) values(1);

>
> > However, the problem goes away after the table is dropped and
> > recreated.

>
> > Rahul

>
> I dont see a column called lpn_id in the table....


Sorry,

The insert query is
insert into abc_address(abc_id) values(1);

Still it gives the same error.

Rahul

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 01:07 PM
Rahul Babbar
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

On Oct 9, 12:09 am, Knut Stolze <sto...@de.ibm.com> wrote:
> Rahul Babbar wrote:
> > On Oct 8, 6:32 pm, "Mark A" <nob...@nowhere.com> wrote:
> >> "Rahul Babbar" <rahul.babb...@gmail.com> wrote in message

>
> >>news:1191846366.479178.75820@57g2000hsv.googlegr oups.com...

>
> >> > Hi,

>
> >> > I am getting the following error, while executing the simple insert
> >> > script on a few tables.

>
> >> > INSERT INTO <table_name>(<col1>) VALUES (1);

>
> >> > DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> >> > Message: No authorized routine named "=" of type "FUNCTION" having
> >> > compatible arguments was found.

>
> >> > The datatype of the column is integer and the table has a large number
> >> > of columns, however i am trying to insert only one column(same error
> >> > comes with more columns).

>
> >> > Further there is no trigger on that table.
> >> > What could be the possible causes of the issue?.

>
> >> > However, there may be some functions that might be used to insert the
> >> > records, when the table is altered, the functions could become
> >> > inconsistent/invalid. However, i am not sure how an invalid function
> >> > which inserts the records in a table can be the cause of failure of
> >> > this insert.

>
> >> > I regret giving only this much information but this is the info that i
> >> > have.

>
> >> > What could be the possible reasons of this error?

>
> >> > Thanks
> >> > Rahul

>
> >> Please do a db2look and post the DDL for the table. You can do this with
> >> the Control Center.

>
> > Here's the DDL (got from Quest Central)

>
> > CREATE TABLE ABC_ADDRESS
> > (TC_ABC_ID VARCHAR(50) NOT NULL,
> > ABC_ID BIGINT NOT NULL,
> > O_LOCATION_ID BIGINT NOT NULL,
> > O_LOCATION_ALIAS_ID VARCHAR(16),
> > O_ADDRESS_LINE_1 VARCHAR(75),
> > O_ADDRESS_LINE_2 VARCHAR(75),
> > O_ADDRESS_LINE_3 VARCHAR(75),
> > O_CITY VARCHAR(40),
> > O_STATE_PROV VARCHAR(2),
> > O_COUNTY VARCHAR(40),
> > O_POSTAL_CODE VARCHAR(10),
> > O_COUNTRY_CODE VARCHAR(2),
> > C_LOCATION_ID BIGINT NOT NULL,
> > C_LOCATION_ALIAS_ID VARCHAR(16),
> > C_ADDRESS_LINE_1 VARCHAR(75),
> > C_ADDRESS_LINE_2 VARCHAR(75),
> > C_ADDRESS_LINE_3 VARCHAR(75),
> > C_CITY VARCHAR(40),
> > C_STATE_PROV VARCHAR(2),
> > C_COUNTY VARCHAR(40),
> > C_POSTAL_CODE VARCHAR(10),
> > C_COUNTRY_CODE VARCHAR(2),
> > D_LOCATION_ID BIGINT NOT NULL,
> > D_LOCATION_ALIAS_ID VARCHAR(16),
> > D_ADDRESS_LINE_1 VARCHAR(75),
> > D_ADDRESS_LINE_2 VARCHAR(75),
> > D_ADDRESS_LINE_3 VARCHAR(75),
> > D_CITY VARCHAR(40),
> > D_STATE_PROV VARCHAR(2),
> > D_COUNTY VARCHAR(40),
> > D_POSTAL_CODE VARCHAR(10),
> > D_COUNTRY_CODE VARCHAR(2),
> > HIBERNATE_VERSION BIGINT
> > )
> > DATA CAPTURE NONE
> > IN USERSPACE1;

>
> > The following insert gives the above error.
> > insert into abc_address(lpn_id) values(1);

>
> The table contains 5 columns defined with NOT NULL. Your INSERT statement
> specifies only 1 column (and one that doesn't even exist in the table).
> How are the values for the other not-nullable columns provided? Maybe you
> do have some triggers?
>
> > However, the problem goes away after the table is dropped and
> > recreated.

>
> --
> Knut Stolze
> DB2 z/OS Utilities Development
> IBM Germany


Hi,

I had mentioned in my first post that there are no triggers on the
table.
Further, if i don't give the not nullable columns then, it gives the
error, "cannot assign null value to a not null column"
Further, we have tried giving all the values for not nullable
columns(you can trust me for that) and it gives the same error.

It starts giving "cannot assign null value to a not null column" error
once the table is recreated, and everything works fine.

one more observation i found out, iniatially it was giving this error
for many tables, however, i was able to fix for a table or two after
doing a reorg on the table. However, Reorg did not work for any other
tables.

Rahul

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 01:07 PM
Rahul Babbar
 
Posts: n/a
Default Re: getting very cryptic error while inserting the records

On Oct 9, 8:25 am, Serge Rielau <srie...@ca.ibm.com> wrote:
> Rahul Babbar wrote:
> > Hi,

>
> > I am getting the following error, while executing the simple insert
> > script on a few tables.

>
> > INSERT INTO <table_name>(<col1>) VALUES (1);

>
> > DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION
> > Message: No authorized routine named "=" of type "FUNCTION" having
> > compatible arguments was found.

>
> This smells like an issue with a nested SQL object:
> * Expression generated column
> * check constraint
> * trigger
>
> I do recall an issue with generated column when a LOB was involved.
>
> Either way this should be a PMR and if it's novel an APAR should be opened.
>
> Cheers
> Serge
> --
> Serge Rielau
> DB2 Solutions Development
> IBM Toronto Lab


Hi,

A PMR has been raised for it.

Rahul

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250