473,473 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

error message DB2 UDB 8.1.5 LINUX

When trying an alter I am getting:

DB2 SQL error: SQLCODE: -20054, SQLSTATE: 55019, SQLERRMC:
IS3.SERVICE_OBS;22
Message: The table "IS3.SERVICE_OBS" is in an invalid state for the
operation. Reason code="22".

I thought 'db2 ? 55019' would give me an explanation, but it only
repeats 'The table is in an invalid state for the operation.' without
further explanation. I need either an explanation, or better, a hint of
where to look this up.
Nov 12 '05 #1
9 9463
In article <MF*******************@fe05.lga>, Bob Stearns
(rs**********@charter.net) says...
When trying an alter I am getting:

DB2 SQL error: SQLCODE: -20054, SQLSTATE: 55019, SQLERRMC:
IS3.SERVICE_OBS;22
Message: The table "IS3.SERVICE_OBS" is in an invalid state for the
operation. Reason code="22".

I thought 'db2 ? 55019' would give me an explanation, but it only
repeats 'The table is in an invalid state for the operation.' without
further explanation. I need either an explanation, or better, a hint of
where to look this up.


db2 ? sql20054
Nov 12 '05 #2
Gert van der Kooij wrote:
In article <MF*******************@fe05.lga>, Bob Stearns
(rs**********@charter.net) says...
When trying an alter I am getting:

DB2 SQL error: SQLCODE: -20054, SQLSTATE: 55019, SQLERRMC:
IS3.SERVICE_OBS;22
Message: The table "IS3.SERVICE_OBS" is in an invalid state for the
operation. Reason code="22".

I thought 'db2 ? 55019' would give me an explanation, but it only
repeats 'The table is in an invalid state for the operation.' without
further explanation. I need either an explanation, or better, a hint of
where to look this up.

db2 ? sql20054


Thanks. I tried db2 ? -20054, but forgot about the sql20054 format.

The question now occurs why? I don't see any function call in my statement:

alter table is3.service_obs
add column due_date date
generated always as (datex + 283 days)
go

I have also tried variants and they all give the same message.
Nov 12 '05 #3
In article <Bd*****************@fe06.lga>, Bob Stearns (rstearns1241
@charter.net) says...

The question now occurs why? I don't see any function call in my statement:

alter table is3.service_obs
add column due_date date
generated always as (datex + 283 days)
go

I have also tried variants and they all give the same message.


DId you try the suggested action:

22 Use SET INTEGRITY FOR <table-name> OFF before altering the
table. Then alter the table and use SET INTEGRITY FOR
<table-name> IMMEDIATE CHECKED FORCE GENERATED to generate the
values for the new or altered column.
Nov 12 '05 #4
Gert van der Kooij wrote:
In article <Bd*****************@fe06.lga>, Bob Stearns (rstearns1241
@charter.net) says...

The question now occurs why? I don't see any function call in my statement:

alter table is3.service_obs
add column due_date date
generated always as (datex + 283 days)
go

I have also tried variants and they all give the same message.

DId you try the suggested action:

22 Use SET INTEGRITY FOR <table-name> OFF before altering the
table. Then alter the table and use SET INTEGRITY FOR
<table-name> IMMEDIATE CHECKED FORCE GENERATED to generate the
values for the new or altered column.

Background: Adding/altering a generated column is the only table action
which physically updates the table. To be more precise it will likely
update all zillion rows of it (which can be a lot in Viper with range
partitioning).
So rather than quitely filling up peoples logspace (or stressing the
auto-archival option) we decided it would be appropriate to perform such
heavy operations while the table is in check pending.
All this is clearly documented by the way:

ALTER TABLE Statement:
....
AS (generation-expression)
Specifies that the definition of the column is based on an
expression. Requires that the table be put in check pending state, using
the SET INTEGRITY statement. After the ALTER TABLE statement, the SET
INTEGRITY statement with FORCE GENERATED must be used to update and
check all the values in that column against the new expression. For
details on specifying a column with a generation-expression, see "CREATE
TABLE".

Granted I was young.. but did I write it that badly?

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #5
Serge Rielau wrote:
Gert van der Kooij wrote:
In article <Bd*****************@fe06.lga>, Bob Stearns (rstearns1241
@charter.net) says...

The question now occurs why? I don't see any function call in my
statement:

alter table is3.service_obs
add column due_date date
generated always as (datex + 283 days)
go

I have also tried variants and they all give the same message.

DId you try the suggested action:

22 Use SET INTEGRITY FOR <table-name> OFF before altering the
table. Then alter the table and use SET INTEGRITY FOR
<table-name> IMMEDIATE CHECKED FORCE GENERATED to generate the
values for the new or altered column.


Background: Adding/altering a generated column is the only table action
which physically updates the table. To be more precise it will likely
update all zillion rows of it (which can be a lot in Viper with range
partitioning).
So rather than quitely filling up peoples logspace (or stressing the
auto-archival option) we decided it would be appropriate to perform such
heavy operations while the table is in check pending.
All this is clearly documented by the way:

ALTER TABLE Statement:
...
AS (generation-expression)
Specifies that the definition of the column is based on an
expression. Requires that the table be put in check pending state, using
the SET INTEGRITY statement. After the ALTER TABLE statement, the SET
INTEGRITY statement with FORCE GENERATED must be used to update and
check all the values in that column against the new expression. For
details on specifying a column with a generation-expression, see "CREATE
TABLE".

Granted I was young.. but did I write it that badly?

Cheers
Serge

I understand the problem now, but I think the error message could be
made much clearer. There should be no reference to a function in the
message. ( 22 The function cannot be used in a generated column.)

Also, this actually creates a physical column at ALTER time. What I was
looking for was a way to specify a "virtual" column which would be
instantiated at SELECT time, as needed. It would not be allowed in
UPDATE or INSERT statements, and its value would be based on the current
values in the row when selected, much the way an expression is evaluated
in a SELECT. Is there such a method, or must I create a VIEW with the
express in the SELECT part?
Nov 12 '05 #6
Bob Stearns wrote:
Serge Rielau wrote:
Gert van der Kooij wrote:
In article <Bd*****************@fe06.lga>, Bob Stearns (rstearns1241
@charter.net) says...
The question now occurs why? I don't see any function call in my
statement:

alter table is3.service_obs
add column due_date date
generated always as (datex + 283 days)
go

I have also tried variants and they all give the same message.

DId you try the suggested action:

22 Use SET INTEGRITY FOR <table-name> OFF before altering the
table. Then alter the table and use SET INTEGRITY FOR
<table-name> IMMEDIATE CHECKED FORCE GENERATED to generate the
values for the new or altered column.

Background: Adding/altering a generated column is the only table
action which physically updates the table. To be more precise it will
likely update all zillion rows of it (which can be a lot in Viper with
range partitioning).
So rather than quitely filling up peoples logspace (or stressing the
auto-archival option) we decided it would be appropriate to perform
such heavy operations while the table is in check pending.
All this is clearly documented by the way:

ALTER TABLE Statement:
...
AS (generation-expression)
Specifies that the definition of the column is based on an
expression. Requires that the table be put in check pending state,
using the SET INTEGRITY statement. After the ALTER TABLE statement,
the SET INTEGRITY statement with FORCE GENERATED must be used to
update and check all the values in that column against the new
expression. For details on specifying a column with a
generation-expression, see "CREATE TABLE".

Granted I was young.. but did I write it that badly?

Cheers
Serge


I understand the problem now, but I think the error message could be
made much clearer. There should be no reference to a function in the
message. ( 22 The function cannot be used in a generated column.)

Also, this actually creates a physical column at ALTER time. What I was
looking for was a way to specify a "virtual" column which would be
instantiated at SELECT time, as needed. It would not be allowed in
UPDATE or INSERT statements, and its value would be based on the current
values in the row when selected, much the way an expression is evaluated
in a SELECT. Is there such a method, or must I create a VIEW with the
express in the SELECT part?

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #7
Bob Stearns wrote:
I understand the problem now, but I think the error message could be
made much clearer. There should be no reference to a function in the
message. ( 22 The function cannot be used in a generated column.) Granted, I think with function ADD column was meant and not a function
foo(). Clumsy wording indeed.
Also, this actually creates a physical column at ALTER time. What I was
looking for was a way to specify a "virtual" column which would be
instantiated at SELECT time, as needed. It would not be allowed in
UPDATE or INSERT statements, and its value would be based on the current
values in the row when selected, much the way an expression is evaluated
in a SELECT. Is there such a method, or must I create a VIEW with the
express in the SELECT part?

That would be the non existent GENERATED BY REFERENCE. Incidentally the
idea was to make this the default since it's what SQL Server 2000
introduced using <colname> AS <expression>. (DB2 tried to play nice here
....)
However we were never able to figure out which purpose such a feature
has because a VIEW provides the same effect, so we never implemented it.
Later on I realized that SQL Server doesn't support INSERT into a VIEW
if any column is non updatable.. So may be that is the reason.
DB2 doesn't have the restriction. So.. why is it that a view is bad?
Note that DB2 is rtaher view-friendly there are few if any drawbacks to
using views.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #8
Serge Rielau wrote:
Bob Stearns wrote:
I understand the problem now, but I think the error message could be
made much clearer. There should be no reference to a function in the
message. ( 22 The function cannot be used in a generated column.)


Granted, I think with function ADD column was meant and not a function
foo(). Clumsy wording indeed.
Also, this actually creates a physical column at ALTER time. What I
was looking for was a way to specify a "virtual" column which would be
instantiated at SELECT time, as needed. It would not be allowed in
UPDATE or INSERT statements, and its value would be based on the
current values in the row when selected, much the way an expression is
evaluated in a SELECT. Is there such a method, or must I create a VIEW
with the express in the SELECT part?


That would be the non existent GENERATED BY REFERENCE. Incidentally the
idea was to make this the default since it's what SQL Server 2000
introduced using <colname> AS <expression>. (DB2 tried to play nice here
...)
However we were never able to figure out which purpose such a feature
has because a VIEW provides the same effect, so we never implemented it.
Later on I realized that SQL Server doesn't support INSERT into a VIEW
if any column is non updatable.. So may be that is the reason.
DB2 doesn't have the restriction. So.. why is it that a view is bad?
Note that DB2 is rtaher view-friendly there are few if any drawbacks to
using views.

Cheers
Serge

I am a little leery of views, probably because of lack of experience. Is
there some automatic way to have a view re-enabled when the underlying
table is modified? That is the basic reason I stay away from them.
Nov 12 '05 #9
Bob Stearns wrote:
I am a little leery of views, probably because of lack of experience. Is
there some automatic way to have a view re-enabled when the underlying
table is modified? That is the basic reason I stay away from them.

I see. Automated, no, not at this time. Maybe in the future ;-)
DB2 V8.2 provides both a wizard in control center as well a procedure to
modify tables without loosing track of views.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kamilla | last post by:
I have a mysql 3.5 server installed on a suse linux 8.1, with address 10.0.0.100. Now I want to access that db from a W2K pc, address 10.0.0.200. I am able to ping 10.0.0.100, but I cannot connect...
7
by: Greg Buchholz | last post by:
I'm wondering if anyone has advice for figuring out error messages produced by g++. The programs below works fine, until I uncomment out the two "transform" lines. Then it points me to line 24...
5
by: cranium.2003 | last post by:
hi, Here is my code #include <iostream.h> int main() { cout <<"HI"; return 0; } and using following command to compile a C++ program g++ ex1.cpp -o ex1
1
by: quigstah | last post by:
Hello Friends, Building my software on a standard Debian sarge 'testing' machine. Builds have been occuring with regular frequency for months without this error cropping up, but I now get a...
14
by: Darren L. Weber | last post by:
I am trying to compile a utility to create .avi files. See http://cpbotha.net/im2avi I'm working on Debian etch (a mix of testing/unstable). dweber@dnlweber:~/im2avi-0.4$ g++ --version g++...
3
by: oberon | last post by:
Hi When I try to install the db I get this : # ./db2_install /home/oberon/movie/exp/disk1/db2/linux/install/../bin/db2langdir: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found...
13
by: Kevin Liebowicz | last post by:
Yes, I wasted the past two days trying to fix this. Yes, this is on a Win2003 Server. Yes, this machine is a domain controller. Yes, I seen the dozens of KB articles like this one:...
2
by: Navaneet | last post by:
Hi, I am building a application on linux. I am getting an error which relates to undefined reference to a function. I had build same on other platform, no error comes. Here is whole error...
3
by: wxPythoner | last post by:
This really looks ugly for an error message: + Stopped python Please explain to me the role of the '+' sign. And why is there such a gap between 'Stopped' and 'python'?
2
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.