473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ALTER TABLE ERROR

I am trying to change a column to NOT NULLABLE and I get the following
message.

=SQL
GENERATED========================================= =======================
CONNECT TO TEST;
CALL SYSPROC.ALTOBJ ( 'APPLY_CONTINUE_ON_ERROR', 'CREATE TABLE
RANDMAN.ACCTADDRESS ( ACCT BIGINT NOT NULL , FY BIGINT NOT NULL , PROV
CHARACTER (2) , AMT DECIMAL (8, 2) ) IN DB2_GAST_DATA ', -1, ? );
;
CONNECT RESET;

=ERR MESSAGE
================================================== =================

[IBM][CLI Driver][DB2/NT] SQL0443N Routine "ALTOBJ" (specific
name "") has returned an error SQLSTATE with diagnostic text
"SQL0443 Reason code or token:
SYSPROC.DB2LK_TBLNDEP|DB2LK_TBL". SQLSTATE=38553

Explanation:

An SQLSTATE was returned to DB2 by routine "<routine-name>"
(specific name "<specific-name>"), along with message text
"<text>". The routine could be a user-defined function or a
user-defined method.

User Response:

The user will need to understand the meaning of the error. See
your Database Administrator, or the author of the routine.

Errors that are detected by the IBM supplied functions in the
SYSFUN schema all return the SQLSTATE 38552. The message text
portion of the message is of the form:
SYSFUN:nn
where nn is a reason code meaning:
01 Numeric value out of range

02 Division by zero

03 Arithmetic overflow or underflow

04 Invalid date format

05 Invalid time format

06 Invalid timestamp format

07 Invalid character representation of a timestamp duration

08 Invalid interval type (must be one of 1, 2, 4, 8, 16, 32, 64,
128, 256)

09 String too long

10 Length or position in string function out of range

11 Invalid character representation of a floating point number

12 Out of memory

13 Unexpected error

Errors that are detected by the IBM supplied routines in the
SYSIBM or SYSPROC schemas and IBM supplied procedures in the
SYSFUN schema all return the SQLSTATE 38553. The message text
portion of the message contains a message number that may be an
SQLCODE, (for example, SQL0572N), a DBA error message (for
example, DBA4747), or some other indication from the routine as
to what error was encountered. Note that if the message for the
message number would normally contain tokens, these token values
are only available in the db2diag.log file.

sqlcode : -443

sqlstate : (the SQLSTATE returned by the routine).

Feb 13 '06 #1
3 4745
I have the same errors when any existing stored procedure used this
table. Additionally alter operation will not succeed when altered table
is used in a function. It seems like ALT_OBJ procedure doesn't get
into consideration such objects.
List of objects using a table can be get by function
sysproc.db2lk_dep_of.
i.e.: SELECT * FROM TABLE (sysproc.db2lk_dep_of('T', 'schema',
'table_name')).

You can write a SP which saves all SP's and functions that are
referencing the table being altered. Then you can save SP's and
functions, call ALT_OBJ and recreate saved objects.

I wrote some procedures that generate all DDL for specified table and
insert this into tmp tables (something like copy of syscat views). I
can use DML on this tmp tables to i.e. remove column from table. Then I
regenerate DDL for table from this tmp tables and put into ALT_OBJ
stored procedures. This is very useful when change must be propagated
in many databases. If you want to more details, please, let me know.

Regards,
Adrian

Feb 13 '06 #2
The problem is the extra space between after altobj ( if you can the
statement to altobj( then it will work this is a bug with altobj and is
fixed in fixpak 11

Mar 2 '06 #3
This is a bug with atlobj if you change the command to remove the space
between altobj ( to read altobj( this will then work. This bug is fixed
in fixpak 11

Mar 2 '06 #4

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

Similar topics

8
by: Maximilian Scherf | last post by:
Hello, I have two problems with the ALTER TABLE command (Warning: I'm not exactly an Oracle expert): First Problem: I want to change the name of a column. I've tried the following: ALTER...
1
by: Lannsjo | last post by:
I need to change my primary key column type from smallint to int. I have tried: ALTER TABLE livegroup MODIFY id INT UNSIGNED NOT NULL AUTO_INCREMENT; But get an error message certainly since my...
1
by: Stephen Miller | last post by:
Is it possible to ALTER a temporary table in TSQL (SQL2000)? The following TSQL reports a syntax error at the ALTER TABLE line: DECLARE @Test TABLE( NOT NULL , NOT NULL ) ALTER TABLE...
1
by: Rajesh Kumar Mallah | last post by:
Hi , Looks like ADD UNIQUE( some_fuc( some_feild) ) is not supported with add constraint. the only way is to add the constriant is using UNIQUE INDEX . Is it a bug or intended behaviour? ...
10
by: BuddhaBuddy | last post by:
Platform is DB2/NT 7.2.9 The table was created like this: CREATE TABLE MYTEST ( MYTESTOID bigint not null primary key, FK_OTHEROID bigint not null references other, FK_ANOTHEROID bigint not...
2
by: RamaKrishna Narla | last post by:
In MS SQL Server, I have the following tables with some data in it. create table table1 ( column1 varchar(32), column2 int not null, column10 varchar(255), ..... primary key (column1,...
1
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
5
by: Giacomo | last post by:
Hi, I’ve the following error message: --------------- ALTER TABLE . ALTER COLUMN varchar(10) Go Server: messaggio 4929, livello 16, stato 1, riga 1
11
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug...
3
by: Deano | last post by:
Hi, I just want to add a text column to a table in my code. I can't find a simple example of this. dbs.Execute ("ALTER tblCCOccurrences ADD COLUMN Year1 Text;"). This gives me; Syntax...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.