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

Home Posts Topics Members FAQ

RTFM, but which one?

I got this while reorganizing a database after doing perhaps a million
INSERTs. Not the best way to populate a relation, but the most practical.
Then I did a REORG and got this (looked up SQL2215N)

SQL2215N SQL error sqlcode occurred while committing previous work for the
database.

Explanation: The user was already connected to the database specified in
the Reorganize Table command. An error occurred while committing the
previous work in progress for the database. The utility stops processing
with no attempt to roll back the work or break the database connection.
User Response: Look at the SQLCODE (message number) in the message for
more information. Make changes and resubmit the command.

But where do I look up the SQLCODES? I got something like -1304 (but do
not believe this number: I am just guessing what it was). I thought there
was a place to look those up, but I can no longer find it.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 23:10:00 up 11 days, 12:06, 5 users, load average: 0.16, 0.12, 0.10

Nov 12 '05 #1
8 3962
Jean-David Beyer wrote:
I got this while reorganizing a database after doing perhaps a million
INSERTs. Not the best way to populate a relation, but the most
practical. Then I did a REORG and got this (looked up SQL2215N)

SQL2215N SQL error sqlcode occurred while committing previous work for
the database.

Explanation: The user was already connected to the database specified
in the Reorganize Table command. An error occurred while committing the
previous work in progress for the database. The utility stops processing
with no attempt to roll back the work or break the database connection.
User Response: Look at the SQLCODE (message number) in the message for
more information. Make changes and resubmit the command.

But where do I look up the SQLCODES? I got something like -1304 (but do
not believe this number: I am just guessing what it was). I thought
there was a place to look those up, but I can no longer find it.


See the SQL2215N in the message above? This message is reporting SQL
Code -2215.
You can get the explanation you are quoting simply by issuing this:

db2 ? sql2215n

and to lookup "sqlcode" you are quoting

db2 ? sql1304

which tells us that this is probably not the number you think you had:

SQL1304N The TCP/IP security type SOCKS is not valid.

Explanation:

The TCP/IP security type SOCKS in the TCP/IP protocol structure
of the Catalog Node command is invalid with authentication type
DCE.

User Response:

Make sure you do not use the combination of TCP/IP protocol with
security type SOCKS and authentication type DCE.

sqlcode : -1304

sqlstate : 08001

All SQLnnnnnn messages are doumented in Messages and Codes manual
available online or as PDF file.

Jan M. Nelken
Nov 12 '05 #2
Jan M. Nelken wrote:
Jean-David Beyer wrote:
I got this while reorganizing a database after doing perhaps a million
INSERTs. Not the best way to populate a relation, but the most
practical. Then I did a REORG and got this (looked up SQL2215N)

SQL2215N SQL error sqlcode occurred while committing previous work for
the database.

Explanation: The user was already connected to the database specified
in the Reorganize Table command. An error occurred while committing
the previous work in progress for the database. The utility stops
processing with no attempt to roll back the work or break the database
connection. User Response: Look at the SQLCODE (message number) in the
message for more information. Make changes and resubmit the command.

But where do I look up the SQLCODES? I got something like -1304 (but
do not believe this number: I am just guessing what it was). I thought
there was a place to look those up, but I can no longer find it.

See the SQL2215N in the message above? This message is reporting SQL
Code -2215.
You can get the explanation you are quoting simply by issuing this:

db2 ? sql2215n


I looked the 2215N in the SQL manual.
and to lookup "sqlcode" you are quoting

db2 ? sql1304

which tells us that this is probably not the number you think you had:
I know it is not, but I did not know how to look that one up and it is now
long gone. I just ran the REORGANIZE over and it worked the second time.

But I did not know you could look up the codes the same way you looked up
the SQL2215N (typical) messages. Surely there is overlap between them? How
does it know the difference?
SQL1304N The TCP/IP security type SOCKS is not valid.

Explanation:

The TCP/IP security type SOCKS in the TCP/IP protocol structure
of the Catalog Node command is invalid with authentication type
DCE.

User Response:

Make sure you do not use the combination of TCP/IP protocol with
security type SOCKS and authentication type DCE.

sqlcode : -1304

sqlstate : 08001

All SQLnnnnnn messages are doumented in Messages and Codes manual
available online or as PDF file.
There are two whole PDF files for Messages and Codes and I could not find
the -nnnn (SQL codes) in there.
Jan M. Nelken

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 07:50:00 up 11 days, 20:46, 3 users, load average: 0.07, 0.07, 0.01

Nov 12 '05 #3
Jean-David Beyer wrote:
But I did not know you could look up the codes the same way you looked
up the SQL2215N (typical) messages. Surely there is overlap between
them? How does it know the difference?
Don't understand. db2 ? XXXnnnnn command is described in the Message
Reference manual.

From the Message Reference:

Message Structure
Message identifiers consist of a three character message prefix,
followed by a four or five digit message number, followed by a single
letter suffix. For example, SQL1042C. For a list of message prefixes,
see “Information Available Online” and “Other DB2 Messages” on page 3.
The single letter suffix describes the severity of the error message.

In general, message identifiers ending with a C are severe messages.
Those ending with an E are urgent messages. Message identifiers ending
with an N are error messages, those ending with a W are warning
messages and an I indicates an informational message.

For ADM messages, message identifiers ending with a C are severe
messages. Those ending with an E are urgent messages. Message
identifiers ending with a W are important messages and an I are
indicates an informational messages.

For SQL messages, message identifiers ending with an N are error
messages. Those ending with a W indicate warning or informational
messages. Message identifiers ending with a C indicate critical system
errors.
....
....
The message number is also referred to as the SQLCODE. The SQLCODE is
passed to the application as a positive or negative number, depending
on its message type (N, W, or C). N and C yield negative values,
whereas W yields a positive value.
There are two whole PDF files for Messages and Codes and I could not
find the -nnnn (SQL codes) in there.


Really - did you use Acrobat Reader?

Here is Cut and Paste from the Table of Contents of the scond manual
(the one I was referring to) - which contains SQLCODE and SQLSTATE
messages:

Chapter 2. SQL Messages . . . . . . . 5
SQL0000 - SQL0099 . . . . . . . . . . 5
SQL0100 - SQL0199 . . . . . . . . . 14
SQL0200 - SQL0299 . . . . . . . . . 31
SQL0300 - SQL0399 . . . . . . . . . 55
SQL0400 - SQL0499 . . . . . . . . . 72
SQL0500 - SQL0599 . . . . . . . . . 98
SQL0600 - SQL0699 . . . . . . . . . 119
SQL0700 - SQL0799 . . . . . . . . . 132
SQL0800 - SQL0899 . . . . . . . . . 140
SQL0900 - SQL0999 . . . . . . . . . 149
SQL1000 - SQL1099 . . . . . . . . . 168
SQL1100 - SQL1199 . . . . . . . . . 189
SQL1200 - SQL1299 . . . . . . . . . 207
SQL1300 - SQL1399 . . . . . . . . . 227
SQL1400 - SQL1499 . . . . . . . . . 241
SQL1500 - SQL1599 . . . . . . . . . 254
SQL1600 - SQL1699 . . . . . . . . . 260
SQL1700 - SQL1799 . . . . . . . . . 267
SQL1800 - SQL1899 . . . . . . . . . 274
SQL1900 - SQL1999 . . . . . . . . . 279
SQL2000 - SQL2099 . . . . . . . . . 280
SQL2100 - SQL2199 . . . . . . . . . 291
SQL2200 - SQL2299 . . . . . . . . . 293
SQL2300 - SQL2399 . . . . . . . . . 297
SQL2400 - SQL2499 . . . . . . . . . 299
SQL2500 - SQL2599 . . . . . . . . . 304
SQL2600 - SQL2699 . . . . . . . . . 317
SQL2700 - SQL2799 . . . . . . . . . 319
SQL2800 - SQL2899 . . . . . . . . . 326
SQL3000 - SQL3099 . . . . . . . . . 330
SQL3100 - SQL3199 . . . . . . . . . 345
SQL3200 - SQL3299 . . . . . . . . . 361
SQL3300 - SQL3399 . . . . . . . . . 369

Look it online in:
http://publib.boulder.ibm.com/infoce...help/index.jsp

Visit occasionally here:
http://www-306.ibm.com/software/data/db2/library/

Nov 12 '05 #4
Jan M. Nelken wrote:
Jean-David Beyer wrote:
But I did not know you could look up the codes the same way you looked
up the SQL2215N (typical) messages. Surely there is overlap between
them? How does it know the difference?

Don't understand. db2 ? XXXnnnnn command is described in the Message
Reference manual.


I know it is. I am not having trouble decoding the XXXnnnnA messages, but
the sub-message of certain XXXnnnnA messages that are characterized by SQL
CODES.
From the Message Reference:

Message Structure
Message identifiers consist of a three character message prefix,
followed by a four or five digit message number, followed by a single
letter suffix. For example, SQL1042C. For a list of message prefixes,
see “Information Available Online” and “Other DB2 Messages” on page 3.
The single letter suffix describes the severity of the error message.

In general, message identifiers ending with a C are severe messages.
Those ending with an E are urgent messages. Message identifiers ending
with an N are error messages, those ending with a W are warning messages
and an I indicates an informational message.

For ADM messages, message identifiers ending with a C are severe
messages. Those ending with an E are urgent messages. Message
identifiers ending with a W are important messages and an I are
indicates an informational messages.

For SQL messages, message identifiers ending with an N are error
messages. Those ending with a W indicate warning or informational
messages. Message identifiers ending with a C indicate critical system
errors.
...
...
The message number is also referred to as the SQLCODE. The SQLCODE is
passed to the application as a positive or negative number, depending on
its message type (N, W, or C). N and C yield negative values, whereas W
yields a positive value.
I KNOW ALL THAT. Where do I look for SQL CODES (i.e., the "positive or
negative numbers"?
There are two whole PDF files for Messages and Codes and I could not
find the -nnnn (SQL codes) in there.

Really - did you use Acrobat Reader?


Yes.
Here is Cut and Paste from the Table of Contents of the scond manual
(the one I was referring to) - which contains SQLCODE and SQLSTATE
messages:

Chapter 2. SQL Messages . . . . . . . 5
SQL0000 - SQL0099 . . . . . . . . . . 5
SQL0100 - SQL0199 . . . . . . . . . 14
SQL0200 - SQL0299 . . . . . . . . . 31
SQL0300 - SQL0399 . . . . . . . . . 55
SQL0400 - SQL0499 . . . . . . . . . 72
SQL0500 - SQL0599 . . . . . . . . . 98
SQL0600 - SQL0699 . . . . . . . . . 119
SQL0700 - SQL0799 . . . . . . . . . 132
SQL0800 - SQL0899 . . . . . . . . . 140
SQL0900 - SQL0999 . . . . . . . . . 149
SQL1000 - SQL1099 . . . . . . . . . 168
SQL1100 - SQL1199 . . . . . . . . . 189
SQL1200 - SQL1299 . . . . . . . . . 207
SQL1300 - SQL1399 . . . . . . . . . 227
SQL1400 - SQL1499 . . . . . . . . . 241
SQL1500 - SQL1599 . . . . . . . . . 254
SQL1600 - SQL1699 . . . . . . . . . 260
SQL1700 - SQL1799 . . . . . . . . . 267
SQL1800 - SQL1899 . . . . . . . . . 274
SQL1900 - SQL1999 . . . . . . . . . 279
SQL2000 - SQL2099 . . . . . . . . . 280
SQL2100 - SQL2199 . . . . . . . . . 291
SQL2200 - SQL2299 . . . . . . . . . 293
SQL2300 - SQL2399 . . . . . . . . . 297
SQL2400 - SQL2499 . . . . . . . . . 299
SQL2500 - SQL2599 . . . . . . . . . 304
SQL2600 - SQL2699 . . . . . . . . . 317
SQL2700 - SQL2799 . . . . . . . . . 319
SQL2800 - SQL2899 . . . . . . . . . 326
SQL3000 - SQL3099 . . . . . . . . . 330
SQL3100 - SQL3199 . . . . . . . . . 345
SQL3200 - SQL3299 . . . . . . . . . 361
SQL3300 - SQL3399 . . . . . . . . . 369


I have seen that table, and looked up SQL2215N in there. It is there. But
the explanation says:

SQL2215N SQL error sqlcode occurred while committing previous work for the
database.

Explanation: The user was already connected to the database specified in the
Reorganize Table command. An error occurred while committing the
previous work
in progress for the database. The utility stops processing with no
attempt to
roll back the work or break the database connection.

User Response: Look at the SQLCODE (message number) in the message for more
information. Make changes and resubmit the command.

We both agree that the correct SQLCODE I got could not have been -1304,
but I need a way to look that up, and it is not SQL1304N or anything like
it. I need a separate table for the SQL CODES. And I do not think it is an
SQLSTATE message (though it might be). Too bad it scrolled off the screen.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 15:05:00 up 12 days, 4:01, 3 users, load average: 1.13, 1.07, 0.97

Nov 12 '05 #5
Jean-David Beyer wrote:
I know it is. I am not having trouble decoding the XXXnnnnA messages,
but the sub-message of certain XXXnnnnA messages that are characterized
by SQL CODES. .... I KNOW ALL THAT. Where do I look for SQL CODES (i.e., the "positive or
negative numbers"? .... User Response: Look at the SQLCODE (message number) in the message for
more information. Make changes and resubmit the command.

We both agree that the correct SQLCODE I got could not have been -1304,
but I need a way to look that up, and it is not SQL1304N or anything
like it. I need a separate table for the SQL CODES. And I do not think
it is an SQLSTATE message (though it might be). Too bad it scrolled off
the screen.


OK let me try one more time:

IF you have a SQL Code of -nnnnn or +nnnnn) where n represent numeric
digit between 0 and 9 inclusive,

THEN
there are two cases:

Case 1: it is a valid SQL code;
Look up message SQLnnnnn (without - or + in front of nnnnnn
part - either in the Messages manual or by issuing
db2 ? sqlnnnnn
Case 2: it is invalid or internal SQL code;
You would not find corresponding SQLnnnnn message in the
Messages manual and
db2 ? sqlnnnnn
would return SQL CODE -10007

Here is an exercise for you:
using above algorithm look up SQL Code -10007.

Jan M. Nelken
Nov 12 '05 #6
Jan M. Nelken wrote:
Jean-David Beyer wrote:
I know it is. I am not having trouble decoding the XXXnnnnA messages,
but the sub-message of certain XXXnnnnA messages that are
characterized by SQL CODES.
...
I KNOW ALL THAT. Where do I look for SQL CODES (i.e., the "positive
or negative numbers"?


...
User Response: Look at the SQLCODE (message number) in the message
for more information. Make changes and resubmit the command.

We both agree that the correct SQLCODE I got could not have been
-1304, but I need a way to look that up, and it is not SQL1304N or
anything like it. I need a separate table for the SQL CODES. And I do
not think it is an SQLSTATE message (though it might be). Too bad it
scrolled off the screen.

OK let me try one more time:

IF you have a SQL Code of -nnnnn or +nnnnn) where n represent numeric
digit between 0 and 9 inclusive,

THEN there are two cases:

Case 1: it is a valid SQL code; Look up message SQLnnnnn (without - or
+ in front of nnnnnn part - either in the Messages manual or by issuing
db2 ? sqlnnnnn

Case 2: it is invalid or internal SQL code; You would
not find corresponding SQLnnnnn message in the Messages manual and db2
? sqlnnnnn would return SQL CODE -10007
For the purpose of the example, let us say I got error SQL2215N or
whatever it was and it included an SQL CODE -10007. I do not need it to
tell me -10007 again: I need the explanation of what the -10007 means so I
can fix the problem and retry it as the explanation for SQL2215N requires.
Here is an exercise for you: using above algorithm look up SQL Code
-10007.

Example does not seem to work well.

trillian:jdbeyer[~]$ echo $DB2INSTANCE
db2inst1
(This is a valid instance.)
trillian:jdbeyer[~]$ echo $LANG
POSIX
trillian:jdbeyer[~]$ echo $DB2CODEPAGE

[i.e., blank]
db2 => ? sql10007;
SQL10007N Message "<msgno>" could not be retrieved. Reason
code: "<code>".

Explanation:

The requested message <msgno> could not be retrieved from the
message file. Reason code <code> is one of the following:

1. The environment variable "DB2INSTANCE" is either not set, or
is set to an invalid instance. Correct it and try again.

2. The message file was found, but the file could not be opened
because of permissions. Check the file permissions of the
files under the message directory.

3. The message file could not be found. Either the file does
not exist, or the directory the message file should be in
does not exist. Check that a either a 'prime' directory (the
default) or a directory with the same name as the 'LANG'
environment variable exists under the message directory.

If I understand this correctly, by "message directory" they mean
/opt/IBM/db2/V8.1/msg/en_US.iso88591. Is this correct?

Now it is really impractical to change $LANG for this since it would trash
other programs that rely on its being POSIX.

4. The requested message does not exist in the message file.
Either the message file is outdated, or it is the wrong
one.

5. Either DB2CODEPAGE is set to a code page which the database
does not support, or the client's locale is not supported by
the database.

6. An unexpected system error occurred. Try execution again.
If problem persists, contact your IBM representative.

7. Not enough memory. An attempt to get private memory failed.
Try again.

I have 4 Gigabytes RAM, mostly available.

User Response:

Reissue the command after verifying the following:

o ensure that the DB2INSTANCE environment variable is set to
the correct literal string for the username attempting this
command

o ensure that correct home directory is specified for the
username attempting this command (i.e. in the /etc/passwd
file)

o ensure that the LANG environment variable is set to the
correct value for the installed language, or is set to 'C'
(defaults to whatever is in the 'prime' directory), on the
username attempting this command

If all of the above are correct and the error still occurs,
reinstall DB2.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 22:15:00 up 12 days, 11:11, 4 users, load average: 4.36, 4.31, 4.19

Nov 12 '05 #7
Jean-David Beyer wrote:
Example does not seem to work well.

trillian:jdbeyer[~]$ echo $DB2INSTANCE
db2inst1
(This is a valid instance.)
trillian:jdbeyer[~]$ echo $LANG
POSIX
trillian:jdbeyer[~]$ echo $DB2CODEPAGE

[i.e., blank]
db2 => ? sql10007;
SQL10007N Message "<msgno>" could not be retrieved. Reason
code: "<code>".


Actually example is somehow working ... here is another part of this
puzzle:

D:\SQLLIB\BIN>db2 ? sql1234
SQL10007N Message "1234" could not be retrieved. Reason code: "4".

Reason code 4 combined with -10007 SQL code is sufficient to figure out
that there is no such thing like -1234 SQL Code.

A Db2 component X calls DB2 component Y - which can and frequently is -
another program called internally; when component Y returns to caller
SQL code -yyyy then component X has to return it's SQL Code -xxxx and
also pass -yyyy as part of the tokenized error message.

Jan M. Nelken
Nov 12 '05 #8
Jan M. Nelken wrote:
Jean-David Beyer wrote:
Example does not seem to work well.

trillian:jdbeyer[~]$ echo $DB2INSTANCE
db2inst1
(This is a valid instance.)
trillian:jdbeyer[~]$ echo $LANG
POSIX
trillian:jdbeyer[~]$ echo $DB2CODEPAGE

[i.e., blank]
db2 => ? sql10007;
SQL10007N Message "<msgno>" could not be retrieved. Reason
code: "<code>".


Actually example is somehow working ... here is another part of this
puzzle:

D:\SQLLIB\BIN>db2 ? sql1234
SQL10007N Message "1234" could not be retrieved. Reason code: "4".

Reason code 4 combined with -10007 SQL code is sufficient to figure out
that there is no such thing like -1234 SQL Code.

A Db2 component X calls DB2 component Y - which can and frequently is -
another program called internally; when component Y returns to caller
SQL code -yyyy then component X has to return it's SQL Code -xxxx and
also pass -yyyy as part of the tokenized error message.

Jan M. Nelken


Well, I actually restored the (test) database from a backup tape and redid
the operation that got the original message. I wanted to get the offending
SQL CODE instead of just guessing the number. Unfortunately, it just
worked as it was supposed to, so the problem, whatever it was, did not
repeat. I hate when that happens (which is extremely rare).

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 05:20:03 up 13 days, 18:16, 3 users, load average: 4.14, 4.17, 4.14

Nov 12 '05 #9

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

Similar topics

2
by: Raymond H. | last post by:
Hello, I create a vb4 project which can also naviger on Internet via the WebBrowser control which I put on my form. My question is: if this program is installed on a station having already...
17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
3
by: Edward | last post by:
ASP.NET / VB.NET SQL Server 7.0 Our client has insisted that we change our established practice of building SQL in-line and move it all to SPROCs. Not a problem for 80% of the app. However,...
133
by: Jane Withnolastname | last post by:
I have a web page that uses an unordered list (<UL>) and the LH (list header) tag. I know LH is a valid tag because it is clearly defined by the W3C here:...
29
by: guru.slt | last post by:
"the c++ standard library, tutorial and reference" book, it says: ++i is faster than i++. the latter involves a temporary object because it must return the old value/object of i. for this reason,...
17
by: lawrence | last post by:
How is it possible that the question "How do I detect which browser the user has" is missing from this FAQ: http://www.faqts.com/knowledge_base/index.phtml/fid/125 and is only here on this...
1
by: E. Robert Tisdale | last post by:
Acronym Finder: http://it.acronymfinder.com/af-query.asp?string=exact&acronym=rtfm
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
17
by: clintonG | last post by:
I'm using an .aspx tool I found at but as nice as the interface is I think I need to consider using others. Some can generate C# I understand. Your preferences please... <%= Clinton Gallagher ...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.