There is a lot of information and technology for users of DB2 for Linux, Unix, and Windows to learn and master in order to be an effective DBA or SQL developer. At a minimum, you will need to understand relational database design, SQL, and the basics of DB2 like how to issue a command, how to use Control Center, and the like. But you will also need to know what to do when you are working with DB2 and you get an error message. What does that message mean? Is there more information than the terse pseudo-sentence that sometimes accompanies the message? How can I interpret this string of characters and numbers?
Most senior DB2 technicians and DBA can relate to the frustration of trying to decipher a cryptic error message. Such messages can cause novices to run screaming down the aisles "My application failed!", or even worse “There’s something wrong with DB2!” Armed with an understanding of the way DB2 delivers its error messages users can avoid panic because they will know what the message means, or will at least have the skills to discover what the message means.
Help is on the way! DB2 messages are always returned in the same format: CCCnnnnnS. The CCC identifies the DB2 component returning the message, the nnnnn is a four or five digit error code, and the S indicates the severity of the error. Table 1 identifies the possible DB2 components for the first three characters of the error message (up-to-date for DB2 10.5).
Administration Notification messages
Messaging messages
Replication messages
Client Configuration Assistant messages
DB2 Text Search messages
Call Level Interface messages
Net Search Extender messages
Command Line Processor (CLP) messages 
Database Administration tools messages
Installation or configuration messages
Tool and database messages
Query Patroller messages
Explain messages
DB2 Spatial Extender and Geodetic Data Management Feature messages
Information Catalog Manager messages
Licensing messages
MQListener messages
Satellite messages
Database Manager/SQL messages
Synch Point Manager messages
Table 1: DB2 Components
For example, consider the DB2 message SQL0289N. This component identifier is SQL, which means that this message came from the Database Manager. You can completely identify any DB2 return code message using the DB2 command line by separating the db2 command and the error code with a question mark:
C:\>db2 "? sql0289"
 SQL0289N Unable to allocate new pages in table space
This is a start. Sometimes, the information returned by this simple help message will be sufficient for you to resolve the problem and move along your merry way. But perhaps you need more help. This is when you will need to pull out your trusty IBM error manual; well, actually manuals is more like it. The manuals you will need is titled DB2 for Linux, Unix, and Windows Messages Reference, Volumes 1 & 2. These manuals can be easily obtained (if you do not already have copies) by downloading them from the IBM web site. For DB2 for LUW start at,_unix_and_windows?productContext=1690484112  and follow the links to the appropriate version of DB2 you are using.
NOTE: DB2 for z/OS product manuals are also available for free over the web at:

The Messages Reference manuals are broken down into separate chapters by component code. Find the proper component, and then within that chapter the messages are in numerical order. Currently, the second volume is dedicated to SQL messages, all other messages are in the first volume. So, for our SQL0289N message, we can refer to the second volume and obtain additional information including an in-depth explanation of the problem as well as possible user responses to rectify the problem. Doing so provides us with the information as shown in Figure 1.
SQL0289N Unable to allocate new pages in
table space ?<TABLESPACE-NAME>?.
Explanation: One of the following conditions is true:

1. One of the containers assigned to this SMS table space has
reached the maximum file size. This is the likely cause of the
2. All the containers assigned to this DMS table space are
full. This is the likely cause of the error.
3. A rebalance is in progress, but has not progressed far
enough to enable the newly added space to be used.
4. A redirected restore is being done to containers that are too
5. A rollforward is being done following a redirected restore
and all the containers assigned to this tablespace are full.
6. A rollforward skipping add containers is being done and all
the containers assigned to this tablespace are full.
7. An attempt was made to create a table space with less than 5
usable extents.
8. An auto-resize table space has reached its maximum size and
All of the containers are full. Alternately, there is not enough
space between the current size and maximum size for container
to be extended or added so an automatic increase in space is
not possible.
9. An automatic storage table space is being created with a
value for initial size that does not result in an equal
distribution of container space. As a result, a higher value
is being used but this value is larger than the maximum size
10. A DMS table space enabled for auto-resize has not reached
its maximum size but one of the file systems on which the
containers exists is full and the container cannot grow.
11. A DMS table space enabled for auto-resize has not reached
its maximum size and the file systems on which the table space
resides are not full. However, a container operation (or a
subsequent rebalance) is in progress and the auto-resize
capability is suspended until it is complete.
User Response: Perform the action corresponding to the
cause of the error:
1. Re-create as an AUTOMATIC STORAGE table space or an SMS
table space with more directories (PATHs) such that: (number of
directories) >= (max tablesize / maxfilesize) or re-create.
Note that maximum file size is operating system dependent.
Re-creating the table space as AUTOMATIC STORAGE allows
you use storage groups.
2. Add new container(s) to the DMS table space and try the
operation again, after the rebalancer has made the new pages
available for use.
3. Wait for the rebalancer to finish.
4. Perform the redirected restore again to larger containers.
5. Perform the redirected restore again to larger containers.
6. Perform the rollforward again allowing add containers, or
perform a redirected restore to larger containers.
7. Resubmit the CREATE TABLESPACE statement, ensuring that the
table space has at least 5 usable extents.
8. Increase the maximum size for the table space.
9. Reduce the initial size or increase the maximum size for
the table space.
10. Add a new stripe set of containers to the table space.
Existing containers will no longer grow, only those new
containers in the last range of the table space are
extended when an automatic resize occurs.
11. Wait for the operation and subsequent rebalance to
sqlcode: -289
sqlstate: 57011
Figure 1: Sample error message detail
Armed with this additional information you are well on your way to resolving the problem. The manual has even pointed us to the most likely cause of this problem in point 1 of the explanation section (“One of the containers assigned to this SMS table space has reached the maximum file size. This is the likely cause of the error.”) Of course, any of the 11 listed explanations could be the cause, so you will need to interpret the information from the manual in context of your systems and situation.
Now you need to fix the problem. The user response section provides guidance here. This particular error will likely require DBA assistance to resolve because it probably requires making changes to database structures. Of course, an error of this type probably means that you will not be the only application experiencing problems (unless, of course, yours is the only application using this table space).
Or, maybe you’ll be lucky and point 3 under user response applies – in which case the “wait and run it again to see if it works now” approach (which usually does not work) could work! Of course, I do not recommend such an approach but we’ve all been there before and tried this approach – and heck, we try it because sometimes miracles do seem to happen, right?
But the whole point of this little article is “Don’t rely on miracles, rely on messages and manuals!”
IBM provides a plethora of valuable information to help us debug problem situations. Learning how to use that information will make you a more valuable DB2 user.