db2 sql errors

574
IBM ® DB2 ® Universal Database Message Reference Volume 2 Version 7 GC09-2979-00

Upload: psdrox

Post on 12-Nov-2014

26.607 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Db2 SQL Errors

IBM®

DB2®

Universal Database

Message ReferenceVolume 2Version 7

GC09-2979-00

���

Page 2: Db2 SQL Errors
Page 3: Db2 SQL Errors

IBM®

DB2®

Universal Database

Message ReferenceVolume 2Version 7

GC09-2979-00

���

Page 4: Db2 SQL Errors

Before using this information and the product it supports, be sure to read the general information under“Appendix C. Notices” on page 555.

This document contains proprietary information of IBM. It is provided under a license agreement and is protected bycopyright law. The information contained in this publication does not include any product warranties, and anystatements provided in this manual should not be interpreted as such.

Order publications through your IBM representative or the IBM branch office serving your locality or by calling1-800-879-2755 in the United States or 1-800-IBM-4YOU in Canada.

When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in anyway it believes appropriate without incurring any obligation to you.

© Copyright International Business Machines Corporation 1993, 2000. All rights reserved.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Page 5: Db2 SQL Errors

Contents

About This Guide . . . . . . . . . . vWho Should Use This Guide . . . . . . . vHow This Guide Is Structured . . . . . . v

Organization . . . . . . . . . . . vConventions . . . . . . . . . . . v

Chapter 1. Introduction to Messages . . . 1Information Available Online. . . . . . . 1

Other DB2 Messages . . . . . . . . 3Other Message Sources. . . . . . . . 3

Chapter 2. SQL Messages . . . . . . . 5SQL0000 - SQL0099 . . . . . . . . . . 5SQL0100 - SQL0199 . . . . . . . . . 15SQL0200 - SQL0299 . . . . . . . . . 32SQL0300 - SQL0399 . . . . . . . . . 51SQL0400 - SQL0499 . . . . . . . . . 64SQL0500 - SQL0599 . . . . . . . . . 90SQL0600 - SQL0699 . . . . . . . . . 110SQL0700 - SQL0799 . . . . . . . . . 123SQL0800 - SQL0899 . . . . . . . . . 128SQL0900 - SQL0999 . . . . . . . . . 136SQL1000 - SQL1099 . . . . . . . . . 154SQL1100 - SQL1199 . . . . . . . . . 175SQL1200 - SQL1299 . . . . . . . . . 188SQL1300 - SQL1399 . . . . . . . . . 208SQL1400 - SQL1499 . . . . . . . . . 222SQL1500 - SQL1599 . . . . . . . . . 234SQL1600 - SQL1699 . . . . . . . . . 239SQL1700 - SQL1799 . . . . . . . . . 246SQL1800 - SQL1899 . . . . . . . . . 252SQL1900 - SQL1999 . . . . . . . . . 257SQL2000 - SQL2099 . . . . . . . . . 257SQL2100 - SQL2199 . . . . . . . . . 268SQL2200 - SQL2299 . . . . . . . . . 269SQL2300 - SQL2399 . . . . . . . . . 272SQL2400 - SQL2499 . . . . . . . . . 275SQL2500 - SQL2599 . . . . . . . . . 278SQL2600 - SQL2699 . . . . . . . . . 290SQL2700 - SQL2799 . . . . . . . . . 292SQL2800 - SQL2899 . . . . . . . . . 300SQL3000 - SQL3099 . . . . . . . . . 303SQL3100 - SQL3199 . . . . . . . . . 318SQL3200 - SQL3299 . . . . . . . . . 334SQL3300 - SQL3399 . . . . . . . . . 342

SQL3400 - SQL3499 . . . . . . . . . 348SQL3500 - SQL3599 . . . . . . . . . 351SQL3600 - SQL3699 . . . . . . . . . 359SQL3700 - SQL3799 . . . . . . . . . 361SQL3800 - SQL3899 . . . . . . . . . 363SQL3900 - SQL3999 . . . . . . . . . 364SQL4000 - SQL4099 . . . . . . . . . 370SQL4100 - SQL4199 . . . . . . . . . 373SQL4300 - SQL4399 . . . . . . . . . 382SQL4400 - SQL4499 . . . . . . . . . 384SQL4900 - SQL4999 . . . . . . . . . 386SQL5000 - SQL5099 . . . . . . . . . 394SQL5100 - SQL5199 . . . . . . . . . 400SQL6000 - SQL6099 . . . . . . . . . 406SQL6100 - SQL6199 . . . . . . . . . 423SQL6500 - SQL6599 . . . . . . . . . 425SQL7000 - SQL7099 . . . . . . . . . 434SQL8000 - SQL8099 . . . . . . . . . 437SQL8100 - SQL8199 . . . . . . . . . 441SQL9300 - SQL9399 . . . . . . . . . 442SQL10000 - SQL10099 . . . . . . . . 443SQL20000 - SQL20099 . . . . . . . . 447SQL20100 - SQL20199 . . . . . . . . 469SQL20200 - SQL20299 . . . . . . . . 472SQL29000 - SQL29100 . . . . . . . . 473SQL30000 - SQL30099 . . . . . . . . 476SQL30100 - SQL30199 . . . . . . . . 489

Chapter 3. SQLSTATE Messages . . . . 491Class Code 00 Unqualified SuccessfulCompletion . . . . . . . . . . . . 492Class Code 01 Warning . . . . . . . . 492Class Code 02 No Data . . . . . . . . 495Class Code 07 Dynamic SQL Error . . . . 496Class Code 08 Connection Exception . . . 496Class Code 09 Triggered Action Exception 496Class Code 0A Feature Not Supported . . . 497Class Code 0D Invalid Target TypeSpecification . . . . . . . . . . . 497Class Code 0F Invalid Token . . . . . . 497Class Code 0K Invalid RESIGNAL statement 497Class Code 20 Case Not Found for CaseStatement . . . . . . . . . . . . 497Class Code 21 Cardinality Violation. . . . 498Class Code 22 Data Exception. . . . . . 498

© Copyright IBM Corp. 1993, 2000 iii

Page 6: Db2 SQL Errors

Class Code 23 Constraint Violation . . . . 499Class Code 24 Invalid Cursor State . . . . 500Class Code 25 Invalid Transaction State . . 500Class Code 26 Invalid SQL StatementIdentifier. . . . . . . . . . . . . 501Class Code 28 Invalid AuthorizationSpecification . . . . . . . . . . . 501Class Code 2D Invalid TransactionTermination . . . . . . . . . . . . 501Class Code 2E Invalid Connection Name . . 501Class Code 34 Invalid Cursor Name . . . 502Class Code 38 External Function Exception 502Class Code 39 External Function CallException . . . . . . . . . . . . 503Class Code 3B Invalid SAVEPOINT . . . . 503Class Code 40 Transaction Rollback . . . . 504Class Code 42 Syntax Error or Access RuleViolation . . . . . . . . . . . . . 504Class Code 44 WITH CHECK OPTIONViolation . . . . . . . . . . . . . 515Class Code 46 Java DDL . . . . . . . 515Class Code 51 Invalid Application State . . 516Class Code 54 SQL or Product LimitExceeded . . . . . . . . . . . . 516Class Code 55 Object Not in PrerequisiteState . . . . . . . . . . . . . . 518Class Code 56 Miscellaneous SQL or ProductError . . . . . . . . . . . . . . 519Class Code 57 Resource Not Available orOperator Intervention . . . . . . . . 519

Class Code 58 System Error . . . . . . 521

Appendix A. Communications Errors . . 523TCP/IP . . . . . . . . . . . . . 523APPC . . . . . . . . . . . . . . 527NETBIOS . . . . . . . . . . . . 529IPX/SPX . . . . . . . . . . . . . 531

Appendix B. Using the DB2 Library . . . 537DB2 PDF Files and Printed Books . . . . 537

DB2 Information . . . . . . . . . 537Printing the PDF Books . . . . . . . 546Ordering the Printed Books . . . . . 547

DB2 Online Documentation . . . . . . 548Accessing Online Help . . . . . . . 548Viewing Information Online . . . . . 550Using DB2 Wizards . . . . . . . . 552Setting Up a Document Server . . . . 553Searching Information Online . . . . . 554

Appendix C. Notices . . . . . . . . 555Trademarks . . . . . . . . . . . . 558

Index . . . . . . . . . . . . . 561

Contacting IBM . . . . . . . . . . 563Product Information . . . . . . . . . 563

iv Message Reference, Volume 2

Page 7: Db2 SQL Errors

About This Guide

The purpose of this book is to list the messages returned by variouscomponents of DB2.

Who Should Use This Guide

The Message Reference is designed to be used by anyone using DB2 andrequiring more detailed information about returned messages.

How This Guide Is Structured

This guide lists all the possible error messages returned by the variouscomponents of DB2.

OrganizationThis book contains the following sections:v Chapter 1. Introduction to Messages, describes how to access and interpret

error messages.v Chapter 2. SQL Messages, describes the messages (SQLCODE values)

generated by the database manager when a warning or error condition isdetected.

v Chapter 3. SQLSTATE Messages, describes the meaning of each SQLSTATEvalue.

v Appendix A. Communications Errors, describes communications error codesassociated with sqlcode -30081.

ConventionsThe format for date and time, and the characters used as separators for dateand time, are intended for a system configured to use the United Statesnational language format. These may be different on your display, dependingon the national language format used by your system.

© Copyright IBM Corp. 1993, 2000 v

Page 8: Db2 SQL Errors

vi Message Reference, Volume 2

Page 9: Db2 SQL Errors

Chapter 1. Introduction to Messages

It is assumed that you are familiar with the functions of the operating systemwhere DB2 is installed. You can use the information contained in thefollowing chapters to identify an error or problem and resolve the problem byusing the appropriate recovery action. This information can also be used tounderstand where messages are generated and logged.

Information Available Online

The following DB2 messages are accessible from the operating systemcommand line:

Prefix Description

ASN messages generated by DB2 Replication

CCA messages generated by the Client Configuration Assistant

CLI messages generated by Call Level Interface

DBA messages generated by the Control Center and the DatabaseAdministration Utility

DBI messages generated by installation and configuration

DB2 messages generated by the command line processor

DWC messages generated by the Data Warehouse Center

FLG messages and reason codes generated by the Information CatalogManager

GSE messages generated by the DB2 Spatial Extender

SAT messages generated by DB2 Satellite Edition

SPM messages generated by the sync point manager

SQJ messages generated by Embedded SQL in Java (SQLJ)

SQL messages generated by the database manager when a warning orerror condition has been detected.

As well, the message text associated with SQLSTATE values is availableon-line.

Message identifiers consist of a three character message prefix (see above list),followed by a four or five digit message number. The single digit letter at theend which describes the severity of the error message is optional.

© Copyright IBM Corp. 1993, 2000 1

Page 10: Db2 SQL Errors

To access help on these error messages, enter the following at the operatingsystem command prompt:

db2 “? XXXnnnnn”

where XXX represents the message prefixand where nnnnn represents the message number.

Note: The message identifier accepted as a parameter of the db2 command isnot case sensitive, and the terminating letter is not required.

Therefore, the following commands will produce the same result:v db2 “? SQL0000N”v db2 “? sql0000”v db2 “? SQL0000n”

If the message text is too long for your screen, use the following command(on unix-based systems and others which support ’more’):

db2 “? XXXnnnnn” | more

Help can also invoked in the interactive input mode. To enter the interactiveinput mode, enter the following at the operating system command prompt:

db2

Once in the interactive input mode, you can enter commands at the followingcommand prompt:

db2 =>

To get DB2 message help in this mode, type the following at the commandprompt:

? XXXnnnnn

Note: If the message text exceeds the length of the screen, users withnon-graphical workstations can pipe the output to the ’more’ (onunix-based systems) program or redirect the output to a file which canthen be browsed.

The message text associated with a given SQLSTATE value can be retrievedby issuing:

2 Message Reference, Volume 2

Page 11: Db2 SQL Errors

db2 “? nnnnn”

or

db2 “? nn”

where nnnnn is a five digit SQLSTATE (alphanumeric) and nn is the two digitSQLSTATE class code (first two digits of the SQLSTATE value).

Other DB2 MessagesSome DB2 components return messages that are not described in this manual,or online. Some of the message prefixes may include:

AUD messages generated by the DB2 Audit facility.

DIA diagnostics messages generated by many DB2 components. Thesemessages are written in the diagnostics log file db2diag.log, and areintended to provide additional information for users and DB2 servicepersonnel when investigating errors.

GOV messages generated by the DB2 governor utility.

In most cases, these messages provide sufficient information to determine thecause of the warning or error. For more information on the command orutility that generated the messages, please refer to the appropriate manualwhere the command or utility is documented.

Other Message SourcesWhen running other programs on the system, you may receive messages withprefixes other than those mentioned in this reference.

For information on these messages, refer to the publications that you receivedfor that program product.

Chapter 1. Introduction To Messages 3

Page 12: Db2 SQL Errors

4 Message Reference, Volume 2

Page 13: Db2 SQL Errors

Chapter 2. SQL Messages

Each message has a message identifier that consists of a prefix (SQL) and amessage number. Messages are listed in numeric sequence based upon themessage number. There are three message types: notification, warning, andcritical. Message identifiers ending with an N are error messages. Thoseending with a W indicate warning or informational messages. Messageidentifiers ending with a C indicate critical system errors.

The message number is also referred to as the SQLCODE. The SQLCODE ispassed to the application as a positive or negative number, depending on itsmessage type (N, W, or C). N and C yield negative values whereas W yields apositive value. DB2 returns the SQLCODE to the application and theapplication can get the message associated with the SQLCODE. DB2 alsoreturns an SQLSTATE value for conditions that could be the result of an SQLstatement. SQLSTATE values are listed in Chapter 3. SQLSTATE Messages.Some SQLCODE values have associated SQLSTATE values. SQLSTATE valuesassociated with a given SQLCODE (if applicable) have been documented witheach message in this chapter.

Variable parameters for SQL messages are shown as descriptive names.

SQL0000 - SQL0099

SQL0000W Statement processing wassuccessful.

Explanation: The SQL statement executedsuccessfully, unless a warning conditionoccurred.

User Response: Check SQLWARN0 to ensurethat it is blank. If it is blank, the statementexecuted successfully. If it is not blank, awarning condition exists. Check the otherwarning indicators to determine the particularwarning condition. For example, if SQLWARN1is not blank, a string was truncated.

Refer to the Application Development Guide.

sqlcode: 0

sqlstate: 00000, 01003, 01004, 01503, 01504, 01506,1509, 01517

SQL0001N Binding or precompilation did notcomplete successfully.

Explanation: For reasons specified in theprevious messages, the bind or precompilerequest was unsuccessful.

No package is created.

User Response: Refer to the messages in themessage file. Resubmit the command.

If installing the sample database, drop it andinstall the sample database again.

SQL0002N The bind file name is not valid.

Explanation: For reasons specified in theprevious messages, the bind file name cannot beused as specified.

© Copyright IBM Corp. 1993, 2000 5

Page 14: Db2 SQL Errors

No package is created.

User Response: Refer to the messages in themessage file. Resubmit the command.

If installing the sample database, drop it andinstall the sample database again.

SQL0003N The database name is not valid.

Explanation: For reasons specified in theprevious messages, the database name cannot beused as specified.

No package is created.

User Response: Refer to the messages in themessage file. Resubmit the command.

SQL0004N The password is not valid.

Explanation: The password contains charactersthat are not valid or the password is too long.

No package is created.

User Response: Resubmit the command with avalid password.

SQL0005N The message file name is notvalid.

Explanation: For reasons specified in theprevious messages, the message file name cannotbe used as specified.

No package is created.

User Response: Refer to the messages in themessage file. Check the name of the message file.Check the attributes of the message file if itexists. Resubmit the command.

SQL0006N The datetime format parameter isnot valid.

Explanation: The value of the datetime formatparameter is not in the valid range of 0 through3.

No package is created.

User Response: Resubmit the command with avalid format parameter.

SQL0007N The character “<character>”following “<text>” is not valid.

Explanation: The specified “<character>” is nota valid character in SQL statements. The “<text>”field indicates the 20 characters of the SQLstatement that preceded the character that is notvalid.

Federated system users: some data sources donot provide the appropriate values for the“<character>” and “<text>” message tokens. Inthese cases, “<character>” and “<text>” willhave the following format: “<datasource>:UNKNOWN”, indicating that the actualvalues for the specified data source areunknown.

The statement cannot be processed.

User Response: Remove or replace the characterthat is not valid.

sqlcode: -7

sqlstate: 42601

SQL0008N The token “<token>” found in ahost variable declaration is notvalid.

Explanation: A host variable declaration hasinvalid syntax. The precompiler cannot identifythe host variable.

The statement cannot be processed. None of thehost variables declared in the statement (up tothe semicolon) are accepted.

User Response: Examine the syntax of the hostvariable declaration.

SQL0009W An attempt to override aprecompiler option was ignored.

Explanation: An attempt was made to overridea precompiler option.

The option is ignored.

User Response: Ensure that all precompileroptions are specified correctly.

6 Message Reference, Volume 2

Page 15: Db2 SQL Errors

SQL0010N The string constant beginningwith “<string>” does not have anending string delimiter.

Explanation: The statement contains a stringconstant, beginning with “<string>”, that is notterminated properly.

The statement cannot be processed.

User Response: Examine the statement formissing apostrophes in the indicated stringconstant.

sqlcode: -10

sqlstate: 42603

SQL0011N The comment is not terminated.

Explanation: The comment is not terminatedproperly.

The statement cannot be processed.

User Response: Examine the statement for amissing or extra comment delimiter in theindicated comment.

SQL0012W Correlation without qualificationhas occurred for the column“<column>”.

Explanation: The named column occurs in aSELECT statement, is not explicitly qualified, andoccurs in a table specified in the FROM clause ofan outer select. Consequently, the reference to thecolumn in the SELECT statement has been takento be an outer reference and correlation willoccur.

The statement was processed under theassumption that correlation was intended.

User Response: Ensure that correlation wasintended. It is a good practice to explicitlyqualify intended outer references.

sqlcode: +12

sqlstate: 01545

SQL0013N An empty delimited identifier isnot valid.

Explanation: During precompilation, either acursor name, statement name, database name, orauthorization ID, specified as an empty string,was found. This is not valid. The statementcannot be processed.

User Response: Provide a valid cursor name,statement name, database name, or authorizationID.

SQL0014N The source file name is not valid.

Explanation: The source file name specified inthe call to the precompiler contains invalidcharacters or the pointer to the source file nameis invalid.

No package was created.

User Response: Ensure that the source filename is correct.

SQL0015N The host variable data type″<token_1>″ is not valid. Use″<token_2>″ instead.

Explanation: If the WCHARTYPE CONVERTprecompile option is in effect then the graphichost variable must be declared with the datatype ’wchar_t’, not ’sqldbchar’.

If the WCHARTYPE NOCONVERT precompileoption is in effect (the default) and ’wchar_t’ isdefined as a 4-byte integer on this platform, thenthe graphic host variable must be declared withthe data type ’sqldbchar’, not ’wchar_t’.

User Response: Replace the current data type ofthe host variable with the data type specified inthe message.

SQL0020W Bind or precompile option(s)“<option-name(s)/option-number(s)>” are not supported bythe target database and will beignored.

Explanation: This warning is returned in thefollowing situations:

Chapter 2. SQL Messages 7

Page 16: Db2 SQL Errors

v one or more options that were specified atprecompile/bind time are not supported bythe target DBMS

v the option value(s) of one or more options thatwere specified at precompile/bind time are notsupported by the target DBMS

The unsupported options/values will be ignored.The most probable cause is that an option oroption value which is only supported whileconnected to a DRDA application server has beenspecified while connected to a non-DRDA server.

Enter ″db2 ? bind″ or ″db2 ? prep″ for a list ofwhich options are supported only by a DRDAapplication server.

Possible option numbers and their correspondingoption names include:

1 DATETIME

2 LANGLEVEL

4 ISOLATION

5 BLOCKING

6 GRANT

8 SQLFLAG

16 CONNECT

17 SQLRULES

18 DISCONNECT

19 SYNCPOINT

20 ISOLATION

21 BINDFILE

22 SQLCA

23 PACKAGE

24 OPTLEVEL

25 SYNTAX or SQLERROR

26 NOLINEMACRO

30 LEVEL

31 COLLECTION

32 VERSION

33 OWNER

34 QUALIFIER

35 TEXT

40 VALIDATE

41 EXPLAIN

42 ACTION

44 REPLVER

45 RETAIN

46 RELEASE

47 DEGREE

50 STRDEL

51 DECDEL

55 CHARSUB

56 CCSIDS

57 CCSIDM

58 CCSIDG

59 DEC

60 WCHARTYPE

61 DYNAMICRULES

62 INSERT

63 EXPLSNAP

64 FUNCPATH

65 SQLWARN

66 QUERYOPT

User Response: Ensure the specification of bindor precompile “<option-name(s)/option-number(s)>” was intended while connected tothis DBMS.

SQL0021W Invalid precompiler option“<option>” is ignored.

Explanation: The option specified in themessage is not a valid precompiler option.

The option is ignored.

User Response: Ensure that all precompiler

8 Message Reference, Volume 2

Page 17: Db2 SQL Errors

options are specified correctly.

SQL0022W Duplicate precompiler option“<option>” is ignored.

Explanation: The precompiler option“<option>” is a duplicate.

The option is ignored.

User Response: Ensure that all precompileroptions are specified only once.

SQL0023N The database name is not valid.

Explanation: The specified database name is nota valid name.

Precompilation is terminated.

User Response: Ensure that the database nameis spelled correctly and follows the rules forshort identifiers.

SQL0024N A database name was notspecified.

Explanation: No database name was providedto proceed with precompilation.

Precompilation is terminated.

User Response: Provide a database name.

SQL0025W Binding or precompilationcompleted with warnings.

Explanation: Binding or precompilationsucceeded, but warnings were issued. A packageand/or bindfile was created as requested in thecommand.

User Response: Refer to the messages in themessage file. If necessary, correct the problemsand resubmit the command.

SQL0026N The password is not valid.

Explanation: The specified password is not avalid password.

Precompilation is terminated.

User Response: Ensure that the password

provided follows the rules for valid passwords.

SQL0028C The release number of the bindfile is not valid.

Explanation: The release number of the bindfile is not compatible with the release number ofthe installed version of the database manager.

The bind file cannot be used with the currentversion of the database manager. The commandcannot be processed.

User Response: If possible, repeat theprecompile process with the current databasemanager. Otherwise, use only bind files createdwith a compatible release level of the databasemanager.

SQL0029N INTO clause required.

Explanation: Non-cursor SELECT or VALUESstatements embedded in an application programmust have an INTO clause to denote where theresults of the statement are to be placed.Dynamic SELECT statements do not permit theINTO clause.

User Response: Add the INTO clause to theSELECT or VALUES statement and precompilethe application program again.

sqlcode: -29

sqlstate: 42601

SQL0030N A source file name was notspecified.

Explanation: A source file name was notprovided to proceed with precompilation.

Precompilation is terminated.

User Response: Specify a source file name.

SQL0031C File “<name>” could not beopened.

Explanation: The file “<name>” is required butcould not be opened.

Precompilation is terminated.

Chapter 2. SQL Messages 9

Page 18: Db2 SQL Errors

User Response: Ensure that the file namespecified is correct and exists in the file system,and that the file permissions are correct.

If installing the sample database, drop it andinstall the sample database again. If the errorcontinues, reinstall the database manager andthen install the sample database.

SQL0032C Unable to use file “<name>”.

Explanation: While reading or writing file“<name>”, an error was encountered.

Precompilation is terminated.

User Response: Retry the precompilation.

SQL0033N “<name>” is not a valid bind file.

Explanation: The bind file “<name>” specifiedis not a bind file.

Binding is terminated.

User Response: Ensure that the correct filename was specified.

SQL0034N A bind file name was notspecified.

Explanation: No bind file name was specified toproceed with binding.

Binding is terminated.

User Response: Provide a bind file name.

SQL0035N The file “<name>” cannot beopened.

Explanation: The message file “<name>” couldnot be opened.

Binding or precompilation has been terminated.

User Response: Ensure that the system canaccess the file.

SQL0036N The syntax of the file name“<name>” is not valid.

Explanation: If the file is input to theprecompiler, it must have an extension with the

correct extension for the language being used. Ifthe file is input to the binder, it must have anextension of .bnd. Also, a fully resolved file namewhich is over the platform maximum length willcause this error.

Precompilation or binding is terminated.

User Response: Ensure that the specified filename is correct.

SQL0037W The syntax of the message file“<name>” is not valid.

Explanation: The message file name “<name>”is not syntactically correct for this function.

The system redirects the output to the standardoutput device.

User Response: Ensure that the specified filename is correct.

SQL0038W The bind option SQLERRORCONTINUE has been activatedsince it is required when bindingthis DB2-supplied list file toDB2/MVS, SQL/DS, or OS/400.

Explanation: The SQLERROR CONTINUE bindoption is required when binding the followingDB2-supplied list files:

v ddcsmvs.lst

v ddcsvm.lst

v ddcsvse.lst

v ddcs400.lst

This option instructs a DRDA server to create apackage even if there are SQL statements in abind file which it considers invalid. Since not allof the DRDA servers support all of the SQLstatements contained in the DB2-supplied bindfiles, the SQLERROR CONTINUE bind optionmust be used to guarantee that packages arecreated for all of the bind files in the list file.

User Response: No response is necessary. Therequired bind option, SQLERROR CONTINUE,has been specified for you. To avoid receivingthis warning in the future specify theSQLERROR CONTINUE bind option.

10 Message Reference, Volume 2

Page 19: Db2 SQL Errors

SQL0039N The binder did not finishprocessing because the bind file isnot valid.

Explanation: The binder could not process thebind file. The bind file may not be valid becausethe bind file contents were altered accidentally.

The bind file is not processed.

User Response: If possible, repeat theprecompile process to create a new bind file.Otherwise, obtain a new copy of the bind file.

SQL0040N An error occurred on one or morebind files in the list “<name>”.The following files were notbound: “<list>”.

Explanation: For reasons specified in theprevious messages in the message file, one ormore bind files were not bound. The list of filesthat were not bound is composed of digits,starting from 1, that indicate the relative positionof the unbound files in the list file. “<name>”does not include the path specification of the listfile.

Only the first 20 bind files in error are listed inthe message. If there were more than 20 bindfiles in error, ellipses (...) are inserted after thelast bind file name in the list.

One or more packages were not created.

User Response: Refer to the messages in themessage file. Check the list file to verify that itcontains valid names. Resubmit the command.

SQL0041N No attempt was made to bind thefiles following file number″<number>″ in list ″<name>″because a fatal error occurredwhich terminated processing.

Explanation: Some errors encountered duringthe binding process are considered fatal (i.e.system errors, memory errors). If one of theseerrors occurs while processing a file in a list file,processing terminates. No attempt is made tobind the remaining files in the list file.

Such an error occurred while binding the

specified bind file in the list. Note that the digitused to identify the bind file indicates therelative position of the file in the list file.

User Response: Refer to the other messageswhich accompanied this one to resolve the errorswhich occurred. Resubmit the command.

SQL0051N The maximum number of SQLstatements was exceeded in theprogram.

Explanation: Too many SQL statements are inthe program to fit into one package in thedatabase.

Precompilation is terminated.

User Response: Either simplify the program, orsplit the program into smaller, separateprograms, or do both.

SQL0053W No SQL statements were found inthe program.

Explanation: The specified source file containsno SQL statements.

If binding, an empty package is created.

User Response: Ensure that you areprecompiling or binding the correct program.

SQL0055N Source input file is empty.

Explanation: The program source input filecontained no data.

Precompilation is terminated.

User Response: Ensure that the correct inputfile was specified.

SQL0056N An SQLSTATE or SQLCODEvariable declaration is in a nestedcompound statement.

Explanation: An SQLSTATE or SQLCODEvariable declaration is in a nested compoundstatement instead of the outermost compoundstatement in the SQL routine.

The statement cannot be processed.

Chapter 2. SQL Messages 11

Page 20: Db2 SQL Errors

User Response: Declare the SQLSTATE andSQLCODE variables only in the outermostcompound statement of the SQL routine.

sqlcode: -56

sqlstate: 42630

SQL0057N A RETURN statement in an SQLfunction or method must includea return value.

Explanation: A RETURN statement is specifiedin the SQL function or method withoutspecifying a value to return.

The statement cannot be processed.

User Response: Specify a value on the RETURNstatement.

sqlcode: -57

sqlstate: 42631

SQL0058N The data type of the RETURNstatement value in an SQLprocedure must be INTEGER.

Explanation: A RETURN statement is specifiedin the SQL procedure with a value or expressionthat is not of the INTEGER data type.

The statement cannot be processed.

User Response: Specify a value on the RETURNstatement that has a data type of INTEGER.

sqlcode: -58

sqlstate: 428F2

SQL0060W The “<name>” precompiler is inprogress.

Explanation: This message is written to thestandard output device when the precompilerbegins processing. The token “<name>” refers tothe particular language precompiler which wasinvoked.

Processing continues.

User Response: No action is required.

SQL0061W The binder is in progress.

Explanation: This message is written to thestandard output device when the binder beginsprocessing.

Processing continues.

User Response: No action is required.

SQL0062W Starting INCLUDE of file″<name>″.

Explanation: An INCLUDE statement has beenencountered. The precompiler is now processingthe INCLUDE file.

User Response: No action is required.

SQL0063W Completed INCLUDE of file″<name>″.

Explanation: The precompiler has completedprocessing the INCLUDE file. It will resumeprocessing the file which contained theINCLUDE statement.

User Response: No action is required.

SQL0064N File ″<name>″ directly orindirectly INCLUDEs itself.

Explanation: A cyclic INCLUDE has beenencountered. A precompiler input file cannotINCLUDE itself, nor be INCLUDEd by a file itINCLUDEs.

The specified file is not INCLUDEd.

User Response: Check the nesting of theINCLUDE files, and remove any cycles.

SQL0065N An unexpected end-of-line wasencountered in a host variabledeclaration.

Explanation: A host variable declaration has aninvalid syntax. An end-of-line was encounteredbefore the declaration was complete.

The statement cannot be processed.

12 Message Reference, Volume 2

Page 21: Db2 SQL Errors

User Response: Examine the syntax of the hostvariable declaration.

SQL0078N Parameter names must bespecified for routine“<routine-name>”.

Explanation: The routine “<routine-name>”does not have parameter names specified for allparameters. When the routine is defined withLANGUAGE SQL or SQLMACRO a parametername is required for each parameter defined.

The statement cannot be processed.

User Response: Ensure that each definedparameter includes a parameter name.

sqlcode: -78

sqlstate: 42629

SQL0079N Schema name for DECLAREGLOBAL TEMPORARY TABLE“<name>” must be SESSION, not“<schema-name>”.

Explanation: The schema name for a declaredtemporary table must be SESSION. TheDECLARE GLOBAL TEMPORARY TABLEstatement defines a new declared temporarytable named “<name>” with an explicitschema-name of “<schema-name>”. This is notallowed.

The statement cannot be processed.

User Response: Change the statement in one ofthe following ways:

v Change the schema name to SESSION.

v Remove the schema name and let DB2 use thedefault value, SESSION.

sqlcode: -79

sqlstate: 428EK

SQL0081N SQLCODE “<sqlcode>” returnedduring precompilation/bind.

Explanation: While precompiling or binding theprogram, an unexpected SQLCODE “<sqlcode>”

was returned from the database manager.

The statement cannot be processed.

User Response: Inspect the SQLCODE todetermine the problem and take the appropriateaction.

SQL0082C An error has occurred which hasterminated processing.

Explanation: A previous, non-SQL error hascaused processing to terminate.

Precompile/bind/rebind is terminated. Nopackage was created.

User Response: Correct the situation thatcaused the previous error and retry theoperation.

SQL0083C A memory allocation error hasoccurred.

Explanation: During processing, there was notenough memory to continue processing.

User Response: Possible solutions include:

v Ensure that your system has sufficient real andvirtual memory.

v Remove background processes.

SQL0084N An EXECUTE IMMEDIATEstatement contains a SELECT orVALUES statement.

Explanation: A SELECT or VALUES statementwas used in an EXECUTE IMMEDIATEstatement.

The statement cannot be processed.

User Response: The implied function is notsupported. Prepare the SELECT or VALUESstatement. Then use OPEN, FETCH, and CLOSE.

sqlcode: -84

sqlstate: 42612

Chapter 2. SQL Messages 13

Page 22: Db2 SQL Errors

SQL0085N The statement name “<name>” isalready defined.

Explanation: A previous DECLARE statementalready used the statement name specified in thecurrent DECLARE statement.

The current DECLARE statement is notprocessed. The previous DECLARE statementretains use of the statement name.

User Response: Use a different name for thestatement.

SQL0086C A memory allocation error hasoccurred.

Explanation: During processing, there was notenough memory to continue processing.

User Response: Possible solutions include:

v Verify that your system has the requiredmemory.

v Remove background processes.

SQL0087N Host variable ″<name>″ is astructure used where structurereferences are not permitted.

Explanation: When a structure reference is usedin an SQL statement, it is treated as if acomma-separated list of its component fields hadbeen used instead. Since a list of host variables isnot permitted in SQL statements such asPREPARE, neither is a reference to a structurewith multiple fields.

User Response: Replace the structure referencewith an atomic host variable, or with a fullyqualified structure field name.

SQL0088N Host variable “<name>” isambiguous.

Explanation: Host variable “<name>” cannot beuniquely identified. More than one host variablewith the same qualification can be found.

The statement cannot be processed.

User Response: Qualify the host variable

further, or rename it if it is already fullyqualified.

SQL0089N Processing ended after 100 errorswere found.

Explanation: The precompiler or binder quitsprocessing after 100 errors were found.

User Response: Fix the errors indicated in themessage log and resubmit the command.

SQL0091W Precompilation or binding wasended with “<number-1>” errorsand “<number-2>” warnings.

Explanation: The precompilation or binding hasterminated with the stated number of warningsand errors.

Precompilation or binding is terminated.

User Response: If warnings or errors occurred,correct the program, if necessary, and retry theprecompilation or binding.

SQL0092N No package was created becauseof previous errors.

Explanation: Because of previous errors, nopackage was created.

User Response: Correct the errors and retry theprecompilation or bind.

SQL0093N The end-of-input was encounteredbefore the statement terminatorfor EXEC SQL.

Explanation: While processing an SQLstatement, the end of source was encounteredbefore the statement terminated.

Precompilation is terminated.

User Response: Ensure that the SQL statementterminates properly.

14 Message Reference, Volume 2

Page 23: Db2 SQL Errors

SQL0094N Binding was ended because ofuser interrupt request.

Explanation: Binding was terminated becausethe user may have pressed the interrupt keysequence.

Processing is terminated. No package is created.

User Response: Resubmit the bind, if needed.

If installing the sample database, drop it andinstall the sample database again.

SQL0095N No bind file was created becauseof previous errors.

Explanation: Because of previous errors, nobind file was created.

No bind file is created.

User Response: Correct the errors and retry theprecompilation.

SQL0097N Variables or parameters of LONGVARCHAR or LONGVARGRAPHIC data types are notsupported in SQL routines.

Explanation: SQL routines (procedures,functions or methods) do not support variablesor parameters of LONG VARCHAR or LONGVARGRAPHIC data types.

User Response: Do not use variables orparameters of LONG VARCHAR or LONGVARGRAPHIC data types in SQL routines. ForLONG VARCHAR, use VARCHAR with anexplicit length. For LONG VARGRAPHIC, useVARGRAPHIC with an explicit length.

sqlcode: -97

sqlstate: 42601

SQL0100 - SQL0199

SQL0100W No row was found for FETCH,UPDATE or DELETE; or the resultof a query is an empty table.

Explanation: One of the following conditions istrue:

v No row was found that meets the searchconditions specified in an UPDATE orDELETE statement.

v The result of a SELECT statement was anempty table.

v A FETCH statement was executed when thecursor was positioned after the last row of theresult table.

v The result of the SELECT used in an INSERTstatement is empty.

No data was retrieved, updated, or deleted.

User Response: No action is required.Processing can continue.

sqlcode: +100

sqlstate: 02000

SQL0101N The statement is too long or toocomplex.

Explanation: The statement could not beprocessed because it exceeds a system limit foreither length or complexity, or because too manyconstraints or triggers are involved.

If the statement is one that creates or modifies apacked description, the new packed descriptionmay be too large for its corresponding column inthe system catalogs.

Federated system users should also check to seeif the statement:

v Exceeds either a federated server system limitor a data source system limit for length orcomplexity.

v Violates some other data source specific limit.

The statement cannot be processed.

Note: Where character data conversions areperformed for applications and databases

Chapter 2. SQL Messages 15

Page 24: Db2 SQL Errors

running under different codepages, theresult of the conversion is exceeding thelength limit.

User Response: Either:

v Break the statement up into shorter or lesscomplex SQL statements.

v Increase the size of the statement heap(stmtheap) in the database configuration file.

v Reduce the number of check or referentialconstraints involved in the statement or reducethe number of indexes on foreign keys.

v Reduce the number of triggers involved in thestatement.

v Federated system users: determine which datasource is failing the statement (see the problemdetermination guide for procedures to followto identify the failing data source) anddetermine the cause of the rejection. If therejection is coming from the federated server,increase the size of the statement heap(stmtheap) in the database configuration file.

sqlcode: -101

sqlstate: 54001

SQL0102N The string constant beginningwith “<string>” is too long.

Explanation: One of the following has occurred:

v The comment in the COMMENT ONstatement is greater than 254 bytes.

v The application server name specified in theSQL CONNECT statement is greater than 18characters.

v The string constant beginning with ″<string>″has a length greater than 32672 bytes.Character strings with lengths greater than32672 bytes or graphic strings with lengthsgreater than 16336 characters can be specifiedonly through assignment from host variables.Note that other servers in the DB2 family ofproducts may specify a different size limit forcharacter strings. Consult the documentationfor the appropriate DB2 product for details.

v Federated system users: the datasource-specific limits must not be exceeded in

a pass-through session. For example, acharacter literal larger than 254 bytes includedin a statement sent to DB2 for MVS/ESA in apass-through session would cause this error.

It may be that data conversion is occurring andthe resultant string is too long. For connectionsbetween applications and databases runningunder different codepages, string constants areconverted from the application codepage to thedatabase codepage. In certain situations, graphicstring constants may be further converted fromthe database codepage to a UCS-2 (UNICODE)encoding, for example when the database hasbeen created with an EUC codepage. This meansthat it is possible to have a resultant string whichis longer than the input string.

The statement cannot be processed.

User Response: For Comment on Table orComment on Column, reduce the size of thecomment. For the SQL CONNECT statement,reduce the length of the application server name.For other string constants, the requested functionis not available interactively. For an erroroccurring in the context of a non-CONNECTSQL statement embedded in an applicationprogram, assign the long string to a host variableand substitute that variable for the string literalin the SQL statement.

Federated system users: for a pass-throughsession, determine what data source is causingthe error (see the problem determination guidefor the failing data sources). Examine the SQLdialect for that data source to determine whichspecific limit has been exceeded, and adjust thefailing statement as needed.

sqlcode: -102

sqlstate: 54002

SQL0103N The numeric literal “<literal>” isnot valid.

Explanation: The indicated “<literal>” beginswith a digit but is not a valid integer, decimal, orfloating point literal.

Federated system users: a data source-specific

16 Message Reference, Volume 2

Page 25: Db2 SQL Errors

literal representation error has occurred in apass-through session.

The statement cannot be processed.

User Response: Correct the invalid numericliteral. Federated system users, if the erroroccurred in a pass-through session, determinewhat data source is causing the error (see theproblem determination guide for the failing datasources). Examine the SQL dialect for that datasource to determine which literal representationrule has been violated, and adjust the failingstatement as needed.

sqlcode: -103

sqlstate: 42604

SQL0104N An unexpected token “<token>”was found following “<text>”.Expected tokens may include:“<token-list>”.

Explanation: A syntax error in the SQLstatement was detected at the specified tokenfollowing the text “<text>”. The “<text>” fieldindicates the 20 characters of the SQL statementthat preceded the token that is not valid.

As an aid to the programmer, a partial list ofvalid tokens is provided in the SQLERRM fieldof the SQLCA as “<token-list>”. This listassumes the statement is correct to that point.

The statement cannot be processed.

User Response: Examine and correct thestatement in the area of the specified token.

sqlcode: -104

sqlstate: 42601

SQL0105N The string constant beginningwith “<string>” is not valid.

Explanation: The statement contains a stringconstant beginning with “<string>” that is notvalid.

The statement cannot be processed.

User Response: Specify the correct format ofthe string constant. Check for graphic string,

paired delimiters, and an even number of byteswithin the string.

Federated system users, see the problemdetermination guide to determine which datasource is causing the error.

sqlcode: -105

sqlstate: 42604

SQL0106N SQL statement begins properlybut is incomplete.

Explanation: The SQL statement was correct upto the point where no more input was found.This may be caused by failure to properly end aliteral. String literals need a final quote mark.

Processing of this SQL statement has ended.

User Response: Check that the statement has allthe necessary parts to complete the desiredfunction and that all clauses are complete.

For PL/I: Check that the SQL statement iscomplete before the semicolon. For Assembler:Check that the continuation rules are properlyfollowed. (A nonblank character must be incolumn 72, and continued lines must start incolumn 16 or beyond.)

For COBOL: Check that the SQL statement iscomplete before END-EXEC.

sqlcode: -106

sqlstate: 42601, 42603

SQL0107N The name “<name>” is too long.The maximum length is“<length>”.

Explanation: The name returned as ″<name>″ istoo long. The maximum length permitted fornames of that type is indicated by ″<length>″.

The names for indexes and constraints can be amaximum length of 18 bytes. The names forcolumns can be a maximum length of 30 bytes.The names for savepoints, tables, views andaliases can be a maximum length of 128 bytes.(This does not include any escape characters, ifpresent.)

Chapter 2. SQL Messages 17

Page 26: Db2 SQL Errors

A maximum of 30 bytes is permitted for aschema name (object qualifier), with theexception of user-defined types, which allow amaximum of 8 bytes for a schema name.

Host variable names must not exceed 30 bytes inlength.

For the SQL CONNECT statement, anapplication server name of up to 18 characters inlength will be accepted at pre-compilation time.However, at runtime, an application server namewhich is greater than 8 characters in length willcause an error.

Also, a password of up to 18 characters in lengthand an authorization ID of up to 8 characters inlength will be accepted in the SQL CONNECTstatement.

Federated system users: if in a pass-throughsession, a data source-specific limit might havebeen exceeded.

The statement cannot be processed.

Note: Where character data conversions areperformed for applications and databasesrunning under different codepages, theresult of the conversion is exceeding thelength limit.

User Response: Choose a shorter name orcorrect the spelling of the object name.

Federated system users: for a pass-throughsession, determine what data source is causingthe error (see the problem determination guidefor the failing data sources). Examine the SQLdialect for that data source to determine whichspecific limit has been exceeded, and adjust thefailing statement as needed.

sqlcode: -107

sqlstate: 42622

SQL0108N The name “<name>” has thewrong number of qualifiers.

Explanation: The name “<name>” is improperlyqualified.

The object given the name “<name>” can onlyhave one qualifier.

A column name is qualified with a table name,which is either qualified or unqualified, or acorrelation name. In some contexts, a columnname requires a table name qualifier.

The statement cannot be processed.

User Response: Ensure that the name for theobject is qualified correctly.

sqlcode: -108

sqlstate: 42601

SQL0109N The “<clause>” clause is notallowed.

Explanation: The indicated clause is notallowed in the context where it appears in theSQL statement.

A subquery, an INSERT statement, or a CREATEVIEW statement cannot have INTO, ORDER BY,or FOR UPDATE clauses. An embedded SELECTstatement cannot have ORDER BY or FORUPDATE clauses. An embedded SELECTstatement cannot contain a set operator except ina subquery. SELECT or VALUES statements usedin cursor declarations cannot have an INTOclause. A RAISE_ERROR function can only beused as a select list item if it is cast to some datatype using the CAST specification.

Federated system users: In a pass-throughsession, a data source-specific restriction mighthave been violated.

The statement cannot be processed.

User Response: Correct the SQL statement byremoving the clause.

Federated system users: For a pass-throughsession, determine what data source is causingthe error (see the problem determination guidefor the failing data sources). Examine the SQLdialect for that data source to determine whichspecific restriction has been violated, and adjustthe failing statement as needed.

sqlcode: -109

sqlstate: 42601

18 Message Reference, Volume 2

Page 27: Db2 SQL Errors

SQL0110N “<string>” is an invalidhexadecimal constant.

Explanation: The hexadecimal constant“<string>” is invalid. The problem is one of thefollowing:

v An invalid hexadecimal digit was specified.Only ’0 to 9’, ’A to F’, and ’a to f’ are allowed.

v An uneven number of hexadecimal digits wasspecified.

v More than 8000 hexadecimal digits werespecified.

User Response: Correct the constant andresubmit the statement.

sqlcode: -110

sqlstate: 42606

SQL0111N The column function “<name>”does not include a column name.

Explanation: The specification of the columnfunction “<name>” (AVG, MIN, MAX, SUM, orCOUNT(DISTINCT)) was not specified correctlybecause such functions must include a columnname in the operand.

The statement cannot be processed.

User Response: Specify a column name in theexpression that is the operand to the columnfunction.

NOTE: This error is only applicable to releases ofDB2 prior to Version 2.

sqlcode: -111

sqlstate: 42901

SQL0112N The operand of the columnfunction “<name>” includes acolumn function, a scalarfullselect, or a subquery.

Explanation: The operand of a column functioncannot include a:

v column function

v scalar fullselect

v subquery.

In a SELECT list, the operand of an arithmeticoperator cannot be a column function thatincludes the DISTINCT keyword.

The statement cannot be processed.

User Response: Correct the use of the columnfunction to eliminate the invalid expression andtry again.

sqlcode: -112

sqlstate: 42607

SQL0113N “<identifier>” contains a characterthat is not allowed or does notcontain any characters.

Explanation: An SQL-variable-name,parameter-name or condition-name“<identifier>” contains an invalid character. Onlycharacters that are valid for an SQL ordinaryidentifier are allowed. Note that because theidentifier is delimited, folding is not performedand uppercase and lowercase letters are treatedas distinct from each other.

User Response: Correct the identifier andresubmit the statement.

sqlcode: -113

sqlstate: 42601

SQL0117N The number of values assigned isnot the same as the number ofspecified or implied columns.

Explanation:

v The number of insert values in the value list ofthe INSERT statement is not the same as thenumber of columns specified or implied. If nocolumn list is specified, a column list thatincludes all columns of the table or view isimplied.

v The number of values on the right hand sideof an assignment in a SET transition-variablestatement or SET clause of an UPDATEstatement does not match the number ofcolumns on the left hand side.

The statement cannot be processed.

Chapter 2. SQL Messages 19

Page 28: Db2 SQL Errors

User Response: Correct the statement to specifyone value for each of the specified or impliedcolumns.

sqlcode: -117

sqlstate: 42802

SQL0118N The table or view that is thetarget of the INSERT, DELETE, orUPDATE statement is alsospecified in a FROM clause.

Explanation: The table or view specified as thetarget of an INSERT, DELETE, or UPDATEstatement also appears in the FROM clause of asubquery within the statement.

The table or view that is the target of an INSERT,UPDATE, or DELETE cannot also be used tosupply the values to be inserted or to qualify therows to be inserted, updated, or deleted.

The statement cannot be processed.

This message is only applicable to Version 1.2servers and earlier, and hosts accessed throughDB2 Connect.

User Response: The implied function is notsupported. To attempt to obtain the desiredresult, create a temporary copy of the object tableor view and address the subselect to that copy.

sqlcode: -118

sqlstate: 42902

SQL0119N An expression starting with“<expression-start>” specified in aSELECT clause, HAVING clause,or ORDER BY clause is notspecified in the GROUP BYclause or it is in a SELECT clause,HAVING clause, or ORDER BYclause with a column functionand no GROUP BY clause isspecified.

Explanation: The SELECT statement has one ofthe following errors:

v The identified expression and a columnfunction are contained in the SELECT clause,

HAVING clause, or ORDER BY clause butthere is no GROUP BY clause

v The identified expression is contained in theSELECT clause, HAVING CLAUSE, or ORDERBY clause but is not in the GROUP BY clause.

The identified expression is an expression thatstarts with “<expression-start>”. The expressionmay be a single column name.

If the NODENUMBER or PARTITION functionsare specified in the HAVING clause, then allpartitioning key columns of the underlying tableare considered to be in the HAVING clause.

The statement cannot be processed.

User Response: Correct the statement byincluding the expression in the GROUP BYclause that are in the SELECT clause, HAVINGclause, or ORDER BY clause or by removing thecolumn function from the SELECT statement.

sqlcode: -119

sqlstate: 42803

SQL0120N A WHERE clause, GROUP BYclause, SET clause, or SETtransition-variable statementcontains a column function.

Explanation: A WHERE clause can contain acolumn function only if that clause appearswithin a subquery of a HAVING clause and theargument of the column function is a correlatedreference to a group. A GROUP BY clause cancontain a column function only if the argumentof the column function is a correlated referenceto a column in a different subselect than the onecontaining the GROUP BY clause. A SET clauseof an UPDATE statement or a SETtransition-variable statement can only include acolumn function within a fullselect on the righthand side of an assignment.

The statement cannot be processed.

User Response: Change the statement so thatthe column function is not used or used onlywhere it is supported.

sqlcode: -120

20 Message Reference, Volume 2

Page 29: Db2 SQL Errors

sqlstate: 42903

SQL0121N The column “<name>” isspecified more than once in theINSERT, UPDATE or SETtransition-variable statement.

Explanation: The same column “<name>” isspecified more than once in the list of columns ofan INSERT statement, the left hand side ofassignments in the SET clause of an UPDATEstatement, or the left hand side of assignments inthe SET transition-variable statement. Note thatthis error may occur when updating or insertinginto a view where more than one column of theview is based on the same column of a basetable.

The statement cannot be processed.

User Response: Correct the syntax of thestatement so each column name is specified onlyonce.

sqlcode: -121

sqlstate: 42701

SQL0122N A SELECT statement with noGROUP BY clause contains acolumn name and a columnfunction in the SELECT clause, ora column name is contained in theSELECT clause but not in theGROUP BY clause.

Explanation: The SELECT statement has one ofthe following errors:

v A column name and a column function arecontained in the SELECT clause but there is noGROUP BY clause.

v A column name is contained in the SELECTclause but not in the GROUP BY clause.

The column may be contained in a scalarfunction.

If the NODENUMBER or PARTITION functionsare specified in the SELECT clause, then allpartitioning key columns of the underlying tableare considered to be in the SELECT clause.

The statement cannot be processed.

User Response: Correct the statement byincluding the columns in the GROUP BY clausethat are in the SELECT clause or by removingthe columns from the SELECT clause.

sqlcode: -122

sqlstate: 42803

SQL0123N The parameter in position ″<n>″in the function ″<name>″ must bea constant or a keyword.

Explanation: The parameter in position ″<n>″ inthe function ″<name>″ is not a constant when itis required to be a constant or a keyword when itis required to be a keyword.

User Response: Ensure that each argument ofthe function conforms to the definition of thecorresponding parameter.

sqlcode: -123

sqlstate: 42601

SQL0125N The column number in theORDER BY clause is either lessthan one or greater than thenumber of columns in the resulttable.

Explanation: The ORDER BY clause in thestatement contains a column number that iseither less than 1 or greater than the number ofcolumns in the result table (the number of itemsin the SELECT clause).

The statement cannot be processed.

User Response: Correct the syntax of theORDER BY clause so each column identifierproperly identifies a column of the result table.

sqlcode: -125

sqlstate: 42805

Chapter 2. SQL Messages 21

Page 30: Db2 SQL Errors

SQL0127N DISTINCT is specified more thanonce.

Explanation: The DISTINCT qualifier cannot beused:

v In both the SELECT clause and a columnfunction

v In two or more column functions in the sameSELECT statement.

The statement cannot be processed.

User Response: This error is only applicable toreleases of DB2 prior to DB2 Version 2 and hostsaccessed through DB2 Connect.

sqlcode: -127

sqlstate: 42905

SQL0129N The statement contains too manytable names (the maximum is 15).

Explanation: The SQL statement contains toomany table names. A single SQL statement canreference up to 15 tables. Each table in any viewreferenced is included in this limit.

The statement cannot be processed.

User Response: Break the SQL statement intotwo or more simple statements with 15 or fewertable references.

This message is only applicable to Version 1.2servers and earlier, and hosts accessed throughDB2 Connect.

sqlcode: -129

sqlstate: 54004

SQL0130N The ESCAPE clause is not a singlecharacter, or the pattern stringcontains an invalid occurrence ofthe escape character.

Explanation: The escape character must be asingle character no more than two bytes inlength. It can only appear in the pattern string ifit is followed by itself, a percent sign, or anunderscore. For more information about theESCAPE clause on the LIKE predicate, refer tothe SQL Reference.

User Response: Correct the pattern string or theescape character accordingly.

sqlcode: -130

sqlstate: 22019, 22025

SQL0131N The operands of a LIKE predicatehave incompatible data types.

Explanation: If the expression to the left of aLIKE or NOT LIKE is of type character, theexpression to the right must be of type character.

If the expression to the left is of type graphic, theexpression to the right must be of type graphic.

If the expression to the left is of type BLOB, theexpression to the right must be of type BLOB.

The statement cannot be processed.

User Response: Correct the expressions of theLIKE predicate to be the same data type.

sqlcode: -131

sqlstate: 42818

SQL0132N A LIKE predicate or POSSTRscalar function is not validbecause the first operand is not astring expression or the secondoperand is not a string.

Explanation: A LIKE predicate or POSSTRscalar function appearing in the statement is notvalid because either the first operand is not astring expression or the second operand is not astring.

The operand appearing to the left of a LIKE orNOT LIKE predicate or the first operand ofPOSSTR must be a string expression. The valueappearing to the right of the predicate or thesecond operand of POSSTR can be one of:

v a constant

v a special register

v a host variable

v a scalar function whose operands are any ofthe above

v an expression concatenating any of the above

22 Message Reference, Volume 2

Page 31: Db2 SQL Errors

with the restrictions that:

v no element in the expression can be of typeLONG VARCHAR, CLOB, LONGVARGRAPHIC, or DBCLOB. In addition itcannot be a BLOB file reference variable.

v the actual length of the expression cannot bemore than 4000 bytes.

A LIKE predicate or POSSTR scalar functioncannot be used with DATE, TIME, orTIMESTAMP.

The statement cannot be processed.

User Response: Check and correct the syntax ofLIKE and POSSTR

sqlcode: -132

sqlstate: 42824

SQL0134N Improper use of a string column,host variable, constant, orfunction “<name>”.

Explanation: The use of the string “<name>” isnot permitted.

An expression resulting in a string data typewith a maximum length greater than 255 bytes isnot permitted in:

v A SELECT DISTINCT statement

v A GROUP BY clause

v An ORDER BY clause

v A column function with DISTINCT

v A SELECT or VALUES statement of a setoperator other than UNION ALL.

An expression resulting in a LONG VARCHARor LONG VARGRAPHIC data type is notpermitted in:

v A predicate other than EXISTS or NULL

v A column function

v The SELECT clause of a subquery of apredicate other than EXISTS or NULL

v The SELECT clause of a subselect in anINSERT statement

v The value expression of a SET clause in anUPDATE statement unless the expression is aLONG VARCHAR or LONG VARGRAPHIChost variable

v A SELECT statement of a set operator (exceptUNION ALL)

v VARGRAPHIC scalar function.

Federated system users: in a pass-throughsession, a data source-specific restriction cancause this error. See the SQL Referencedocumentation for the failing data sources.

The statement cannot be processed.

User Response: The requested operation on thestring is not supported.

Note: If it is unclear as to how the 255 byte limitis being exceeded, consider that codepageconversion operations may be required toevaluate the string expression. Dependingon the source and target codepages, thetarget may have a greater length attributethan the source. For more information,refer to the SQL Reference for discussionson string restrictions and stringconversions.

sqlcode: -134

sqlstate: 42907

SQL0135N The input for a long stringcolumn in an INSERT statementor UPDATE statement must befrom a host variable or be thekeyword NULL.

Explanation: The UPDATE or INSERT is usingconstants, column names, or subqueries where itshould be using NULL or a host variable.

A long string column is either a LONGVARCHAR, LONG VARGRAPHIC,VARCHAR(n) where n is greater than 254 butless than or equal to 32767, or VARGRAPHIC(n)where n is greater than 127 but less than or equalto 16383.

User Response: Refer to the DB2 for VM

Chapter 2. SQL Messages 23

Page 32: Db2 SQL Errors

Application Programming manual forinformation on the use of long strings. Correctthe statement. Try again.

sqlcode: -135

sqlstate: 56033

SQL0137N The length resulting from″<operation>″ is greater than″<maximum value>″.

Explanation: The result of concatenating thegiven operands was longer than what issupported by the result type.

Character string results are limited to 32,700bytes unless one of the operands is a CLOB andthen the limit is 2 gigabytes.

Graphic string results are limited to 16,350characters unless one of the operands is aDBCLOB and then the limit is 1,073,741,823 (1less than 1 gigabyte) double byte characters.

Binary string results (operands are BLOB) arelimited to 2 gigabytes.

User Response: Ensure that the sum of thelengths of the operands does not exceed thesupported maximum and try the operation again.

sqlcode: -137

sqlstate: 54006

SQL0138N The second or third argument ofthe SUBSTR function is out ofrange.

Explanation: One of the following conditionsoccurred:

v The second argument of the SUBSTR functionis less than 1 or greater than M.

v The third argument of the SUBSTR function isan expression with a value less than 0 orgreater than M−N+1.

M is the length of the first argument if it is fixedlength or the maximum length of the firstargument if it is varying length. N is the value ofthe second argument.

The statement cannot be processed.

User Response: Ensure that the second andthird arguments of the SUBSTR function havevalues that conform to the above rules.

sqlcode: -138

sqlstate: 22011

SQL0139W A redundant clause appears in thespecification for column“<column>”.

Explanation: The clause in the columnspecification is redundant.

The statement was processed successfully, butthe redundant clause was ignored.

User Response: Correct the columnspecification.

sqlcode: +139

sqlstate: 01589

SQL0142N The SQL statement is notsupported.

Explanation: An embedded SQL statement thatmay be valid for other IBM relational databaseproducts is not supported by the databasemanager.

Federated system users: check to see if an SQLstatement was directed at a data source that doesnot support the SQL statement.

The statement cannot be processed.

User Response: Change the syntax of the SQLstatement or remove the statement from theprogram.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine theSQL dialect for that data source.

24 Message Reference, Volume 2

Page 33: Db2 SQL Errors

SQL0143W The SQL statement is notsupported; invalid syntax isignored.

Explanation: An embedded SQL statement thatmay be valid for other IBM relational databaseproducts is understood but is not supported bythe database manager.

The statement may produce inconsistent orunwanted results.

User Response: Change the syntax of the SQLstatement or remove the statement from theprogram.

SQL0150N The view, typed table, orsummary table in the INSERT,DELETE, or UPDATE statement isa view, typed table, or summarytable for which the requestedoperation is not permitted.

Explanation: The view, typed table, or summarytable named in the INSERT, UPDATE, orDELETE statement is defined so that therequested insert, update, or delete operationcannot be performed.

A view is read only if the SELECT statementcontains any of the following:

v A DISTINCT keyword

v A column function in the select list

v A GROUP BY or HAVING clause

v A FROM clause that identifies one of thefollowing:

– More than one table or view

– A read-only view (READONLY column ofSYSCAT.SYSVIEWS is set to ’Y’)

– A table or view that is also identified in theFROM clause of a subquery of the SELECTstatement. (NOTE: This only applies toreleases prior to DB2 Version 2.)

v A set operator (other then UNION ALL).

v Federated system users: a data source specificlimitation that causes the column not to beupdateable

Note that these conditions do not apply tosubqueries of the SELECT statement.

You cannot insert rows directly into a typed tabledefined on a not instantiable structured type.Subtables of this table may allow inserts.

Summary tables do not allow the insert, updateor delete operations.

The statement cannot be processed.

User Response: The requested function cannotbe performed on the view or summary table.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine theobject definition and the update restrictions forthat data source.

sqlcode: -150

sqlstate: 42807

SQL0151N The column “<name>” cannot beupdated.

Explanation: The specified column cannot beupdated because one of the following wasattempted.

v the object table is a view, and the specifiedcolumn is derived from a scalar function,expression, keyword, constant, or column of aview where that column cannot be updated.

v the specified column is a non-updateablecolumn of a system catalog.

Federated system users should check to see ifsome other data source specific limitationprevents the column from being updated.

The statement cannot be processed.

User Response: The requested function is notsupported. For a list of updateable catalogs (andthe updateable columns) see the SQL Reference.

Federated system users: if the reason isunknown, isolate the problem to the data source

Chapter 2. SQL Messages 25

Page 34: Db2 SQL Errors

failing the request (see the problemdetermination guide) and examine the objectdefinition and the update restrictions for thatdata source.

sqlcode: -151

sqlstate: 42808

SQL0153N The CREATE VIEW statement orcommon table expression does notinclude a column list.

Explanation: A column list must be specified ina CREATE VIEW statement or a common tableexpression when:

v any element of the SELECT list in the fullselectis other than a column name and is not namedusing the AS clause

v any two elements are the same column namethat were not renamed using the AS clause.

The statement cannot be processed. For aCREATE VIEW statement, the view was notcreated.

User Response: Provide a column name list inthe CREATE VIEW statement or common tableexpression or name the columns in the SELECTlist of the fullselect using the AS clause.

sqlcode: -153

sqlstate: 42908

SQL0155N A trigger transition table cannotbe modified.

Explanation: The trigger includes aREFERENCING clause with an OLD_TABLE orNEW_TABLE identified. A DELETE, INSERT orUPDATE triggered SQL statement has used thename specified as the OLD_TABLE orNEW_TABLE as the table to modify.

User Response: Remove the DELETE, INSERTor UPDATE triggered SQL statement from thetriggered action or change the name of thetransition table so that it does not conflict withthe table you are attempting to modify.

sqlcode: -155

sqlstate: 42807

SQL0156N The name used for this operationis not a table.

Explanation: The SQL statements ALTERTABLE, DROP TABLE, SET CONSTRAINTS,CREATE TRIGGER, CREATE INDEX, LOCKTABLE, and RENAME TABLE are applicableonly to tables, not to views. The RUNSTATS andLOAD utilities are also applicable only to tables,not to views.

Federated system users: Some utilities andstatements are not supported in a federatedenvironment. See the Administration Guide formore information.

The statement or utility cannot be processed.

User Response: Verify that the correct tablename is specified in the statement. If an aliasname was supplied, ensure that the alias resolvesto a table.

Federated system users: Verify that the object isnot a nickname.

sqlcode: -156

sqlstate: 42809

SQL0157N “<name>” is not allowed in aFOREIGN KEY clause because itdoes not identify a base table.

Explanation: The object “<name>” wasidentified in a FOREIGN KEY clause of aCREATE or ALTER TABLE statement. AFOREIGN KEY clause must identify a base table.

The statement cannot be processed. The specifiedtable is not created or altered.

User Response: Correct the statement to specifya base table name in the FOREIGN KEY clause.

If an alias name was supplied, ensure that thealias resolves to a base table.

sqlcode: -157

sqlstate: 42810

26 Message Reference, Volume 2

Page 35: Db2 SQL Errors

SQL0158N The number of columns specifiedfor “<name>” is not the same asthe number of columns in theresult table of the associatedfullselect.

Explanation: The identifier “<name>” couldidentify:

v a view named in a CREATE VIEW statement

v a table name of a common table expression

v a correlation name of a nested table expression

v a summary table named in a CREATE TABLEor ALTER TABLE statement

v a function named in a CREATE FUNCTIONstatement

v a method named in a CREATE METHODstatement.

The number of column names specified must beequal to the number of columns in the resulttable of the associated fullselect.

The statement cannot be processed.

User Response: Correct the syntax so that thelist of column names defined for “<name>”specify a name for each column of the resulttable in the associated fullselect.

sqlcode: -158

sqlstate: 42811

SQL0159N The statement references“<object>” which identifies a(n)“<object-type>” rather than a(n)“<expected-object-type>”.

Explanation: The object “<object>” specified aspart of the statement or command refers to anobject of type “<object-type>” instead of theexpected type “<expected-object-type>”.

The type of the object provided with thestatement or command must match the typeidentified by “<expected-object-type>”. Forexample, if the statement is DROP ALIASPBIRD.T1, then PBIRD.T1 must be an alias name.

User Response: Change the statement orcommand to properly match the type of object

identified by “<expected-object-type>”.

sqlcode: -159

sqlstate: 42809

SQL0160N The WITH CHECK OPTIONclause is not valid for thespecified view.

Explanation: The WITH CHECK OPTIONclause cannot be used in a view definition if:

v The view is defined as read only. The view isread only if the SELECT statement containsany of the following. (Note that theseconditions do not apply to subqueries of theSELECT statement.)

– A DISTINCT keyword

– A column function in the selected list

– A GROUP BY or HAVING clause

– A FROM clause that identifies either:

- More than one table or view

- A read-only view

– A set operator (other than UNION ALL).

v The SELECT statement in the CREATE VIEWstatement includes a subquery (except forspecific statistic columns of some catalogtables).

Federated system users: the WITH CHECKoption is not supported on views that referenceupdateable nicknames.

The statement cannot be processed. The specifiedview was not created.

User Response: Remove the WITH CHECKOPTION clause or change the view definition soit conforms to the rules above.

sqlcode: -160

sqlstate: 42813

SQL0161N The resulting row of the INSERTor UPDATE does not conform tothe view definition.

Explanation: The WITH CHECK OPTIONclause was specified in the view definition that is

Chapter 2. SQL Messages 27

Page 36: Db2 SQL Errors

the object of the INSERT or UPDATE statement.Consequently, all attempts to insert or updaterows in that view are checked to ensure that theresults conform to the view definition.

The statement cannot be processed. No inserts orupdates are performed, and the contents of theview and underlying base table remainunchanged.

User Response: Examine the view definition todetermine why the requested INSERT orUPDATE was rejected. Note that this may be adata-dependent condition.

Requested INSERT or UPDATE may be trying toput out of range value(s) in the target column(s).For system catalog updates, see the SQL Referencefor valid ranges of values in various updateablecolumns of catalogs.

Federated system users, if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide) and examine the objectdefinition and the view definition for that datasource.

sqlcode: -161

sqlstate: 44000

SQL0170N The number of arguments forfunction “<name>” is incorrect.

Explanation: The specified scalar function“<name>” has either too few or too manyarguments.

The statement cannot be processed.

User Response: Ensure that the correct numberof arguments is specified for the scalar function.

sqlcode: -170

sqlstate: 42605

SQL0171N The data type, length or value ofargument “<n>” of routine“<name>” is incorrect.

Explanation: The data type, length or value ofargument “<n>” of routine “<name>” isincorrect.

The statement cannot be processed.

User Response: Ensure the arguments of theroutine conform to the rules of the routine.

sqlcode: -171

sqlstate: 42815

SQL0172N “<name>” is not a valid functionname.

Explanation: The SQL statement includes anunknown scalar function.

The statement cannot be processed.

User Response: Ensure that you correctly spellthe function name.

sqlcode: -172

sqlstate: 42601

SQL0176N The second, third or fourthargument of the TRANSLATEscalar function is incorrect.

Explanation: The statement is not correct forone or more of the following reasons:

v The translate scalar function does not allowreplacement of a character by anothercharacter which is encoded using a differentnumber of bytes. For example, a single-bytecharacter cannot be replaced with adouble-byte character nor can a double-bytecharacter be replaced with a single-bytecharacter.

v The second and third arguments of thetranslate scalar function must end withcorrectly formed characters.

v The fourth argument of the translate scalarfunction must be a correctly formedsingle-byte character if the first argument isCHAR or VARCHAR.

v The fourth argument of the translate scalarfunction must be a correctly formeddouble-byte character if the first argument isGRAPHIC or VARGRAPHIC.

The statement cannot be processed.

User Response: Ensure that the second, third,

28 Message Reference, Volume 2

Page 37: Db2 SQL Errors

and fourth arguments of the translate scalarfunction have correct values.

sqlcode: -176

sqlstate: 42815

SQL0180N The syntax of the stringrepresentation of a datetime valueis incorrect.

Explanation: The string representation of a date,time, or timestamp value does not conform tothe syntax for the specified or implied data type.

The statement cannot be processed.

User Response: Ensure that the syntax of thedate, time, or timestamp value conforms to thesyntax for its data type. If the string is notintended to be a date, time, or timestamp value,ensure that when used, it does not imply thatdata type.

Federated system users: the problem might bedue to a date/time representation problem at thedata source. If the reason is unknown, isolate theproblem to the data source failing the requestTroubleshooting Guide and examine thedate/time representation restrictions for that datasource.

sqlcode: -180

sqlstate: 22007

SQL0181N The string representation of adatetime value is out of range.

Explanation: The string representation of a date,time or timestamp value contains a value that isout of range.

This error could be caused by accessing adatetime value from an application using acountry code whose datetime format is differentthan the one used by the application that createdit. For example, a string datetime value stored inthe format dd/mm/yyyy will not be valid whenread by an application expecting its format to bemm/dd/yyyy.

The correct ranges for date, time, or timestampvalues are as follows:

v 0001 to 9999 for years.

v 1 to 12 for months.

v 1 to 31 for days when the month is 1, 3, 5, 7, 8,10, and 12.

v 1 to 30 for days when the month is 4, 6, 9, 11.

v 1 to 28 for days when the month is 2 in anon-leap year.

v 1 to 29 for days when the month is 2 in a leapyear.

v 0 to 24 for hours. If the hour is 24, the otherparts of the time are 0. If the format is USA,the hour cannot be greater than 12.

v 0 to 59 for minutes.

v 0 to 59 for seconds.

v 0 to 999999 for microseconds.

v 001 to 365 for the day portion of a Juliancalendar date when the year is not a leap year.

v 001 to 366 for the day portion of a Juliancalendar date when the year is a leap year.

Federated system users: the problem might bedue to a date/time representation problem at thedata source. Refer to the data source’sdocumentation for the ranges for date and timevalues at the data source. If the reason isunknown, isolate the problem to the data sourcefailing the request (see the TroubleshootingGuide) and examine the date/time representationrestrictions for that data source.

The statement cannot be processed.

User Response: Ensure that the value is withinthe valid range, and the application’s datetimeformat is the same as the string value.

sqlcode: -181

sqlstate: 22007

SQL0182N An expression with a datetimevalue or a labeled duration is notvalid.

Explanation: The specified expression containsan improperly used date, time, or timestampvalue or labeled duration.

The statement cannot be processed.

Chapter 2. SQL Messages 29

Page 38: Db2 SQL Errors

User Response: Examine the SQL statement todetermine the cause of the problem and correctthe statement.

sqlcode: -182

sqlstate: 42816

SQL0183N A datetime arithmetic operation ordatetime scalar function has aresult that is not within the validrange of dates.

Explanation: The result of an arithmeticoperation is a date or timestamp duration whichis outside the range 0001-01-01 through9999-12-31.

The statement cannot be executed.

User Response: Examine the SQL statement todetermine the cause of the problem. If theproblem is data-dependent, examine the dataprocessed when the error occurred.

sqlcode: -183

sqlstate: 22008

SQL0187N A reference to a current date/timespecial register is invalid.

Explanation: An error indication from theoperating system was detected while retrievingdate/time information.

User Response: Ensure that the system TODclock and timezone settings are correct.

sqlcode: -187

sqlstate: 22506

SQL0190N ALTER TABLE “<table-name>”specified attributes for column“<column-name>” that are notcompatible with the existingcolumn.

Explanation: The attributes specified in theALTER COLUMN clause for the column“<column-name>” of the table “<table-name>” inan ALTER TABLE statement are not compatiblewith the attributes of the existing column. The

error was returned for one of the followingreasons.

v If a SET DATA TYPE clause is specified, theexisting column:

– is not of data type VARCHAR or

– has a length that is greater than the lengthspecified in the clause.

v If a SET EXPRESSION clause is specified, theexisting column is not defined as generatedusing an expression.

The statement cannot be processed.

User Response: Make the attributes specifiedcompatible with the existing column, remove theattribute specification, or specify a differentcolumn name.

sqlcode: -190

sqlstate: 42837

SQL0191N Error occurred because of afragmented MBCS character.

Explanation: Possible causes:

1. User data contained an improperly formedmulti-byte character. For example, the firstbyte of a DBCS character was found, but thesecond character was not.

2. A scalar function, such as SUBSTR orPOSSTR has truncated a multi-bytes stringincorrectly. For these functions, start andlength values must be correct in terms ofbytes, in the context of the database codepage. For a Unicode database, a commoncause of this could be that the start or lengthfor a UTF-8 string are incorrect.

3. A scalar function such as TRANSLATE hasmay have changed the multi-byte string.

Federated system users: this situation can also bedetected by the data source.

User Response:

1. Correct the input data and try again.

2. Change the start and length values such thatwhen characters are converted to thedatabase code page, the multi-byte charactersare not truncated incorrectly.

30 Message Reference, Volume 2

Page 39: Db2 SQL Errors

3. Correct the TRANSLATE in error.

Federated system users: if the data is correct,isolate the problem to the data source failing therequest (see the Troubleshooting Guide) andexamine the DBCS restrictions of that datasource. If the data appears to be correct, contactIBM service for assistance.

sqlcode: -191

sqlstate: 22504

SQL0193N In an ALTER TABLE statement,the column “<column-name>” hasbeen specified as NOT NULL andeither the DEFAULT clause wasnot specified or was specified asDEFAULT NULL.

Explanation: When new columns are added to atable that already exists, a value must beassigned to that new column for all existingrows. By default, the null value is assigned.However, since the column has been defined asNOT NULL, a default value other than null mustbe defined.

User Response: Either remove the NOT NULLrestriction on the column or provide a defaultvalue other than null for the column.

sqlcode: -193

sqlstate: 42601

SQL0197N A qualified column name is notallowed in the ORDER BY clause.

Explanation: The ORDER BY clause of afullselect that includes a set operator (UNION,EXCEPT, INTERSECT) cannot have qualifiedcolumn names.

User Response: Ensure that all column namesin the ORDER BY clause are unqualified.

sqlcode: -197

sqlstate: 42877

SQL0198N The statement string of thePREPARE or EXECUTEIMMEDIATE statement is blankor empty.

Explanation: The host variable that was theobject of the PREPARE or EXECUTEIMMEDIATE statement either contained allblanks or was an empty string.

The PREPARE or EXECUTE IMMEDIATE couldnot be completed.

User Response: Correct the logic of theprogram to ensure that a valid SQL statement isprovided in the operand of the PREPARE orEXECUTE IMMEDIATE statement before it isexecuted.

sqlcode: -198

sqlstate: 42617

SQL0199N The use of reserved word“<keyword>” following “<text>”is not valid. Expected tokens mayinclude: “<token-list>”.

Explanation: A syntax error in the SQLstatement was detected at the point in thestatement when the reserved word “<keyword>”appears following “<text>”. The “<text>” fieldindicates the 20 characters of the SQL statementthat preceded the reserved word. Clauses in thestatement may be in the wrong order.

As an aid to the programmer, a partial list ofvalid tokens is provided in the SQLERRM fieldof the SQLCA as “<token-list>”. This listassumes the statement is correct to that point.

The statement cannot be processed.

User Response: Examine the statement in thekeyword area. Add a colon or SQL delimiter, ifmissing. Verify that the clauses are in the correctorder. If the reserved word identified in themessages is listed as a reserved word, make theword a delimited identifier.

NOTE: This error is only applicable to releases ofDB2 prior to Version 2.

sqlcode: -199

Chapter 2. SQL Messages 31

Page 40: Db2 SQL Errors

sqlstate: 42601

SQL0200 - SQL0299

SQL0203N A reference to column “<name>”is ambiguous.

Explanation: The column “<name>” is used inthe statement and there is more than onepossible column to which it could refer. Thiscould be the result of:

v two tables specified in a FROM clause thathave columns with the same name

v the ORDER BY clause refers to a name thatapplies to more than one column in the selectlist

v a reference to a column from the subject tablein a CREATE TRIGGER statement does notuse the correlation name to indicate if it refersto the old or new transition variable.

The column name needs further information toestablish which of the possible table columns itis.

The statement cannot be processed.

User Response: Add a qualifier to the columnname. The qualifier is the table name orcorrelation name. A column may need to berenamed in the select list.

sqlcode: -203

sqlstate: 42702

SQL0204N “<name>” is an undefined name.

Explanation: This error is caused by one of thefollowing:

v The object identified by “<name>” is notdefined in the database.

v A data type is being used. This error can occurfor the following reasons:

– If ″<name>″ is qualified, then a data typewith this name does not exist in thedatabase.

– If ″<name>″ is unqualified, then the user’sfunction path does not contain the schemato which the desired data type belongs.

– The data type does not exist in the databasewith a create timestamp earlier than thetime the package was bound (applies tostatic statements).

– If the data type is in the UNDER clause of aCREATE TYPE statement, the type namemay be the same as the type being defined,which is not valid.

v A function is being referenced in one of:

– a DROP FUNCTION statement

– a COMMENT ON FUNCTION statement

– the SOURCE clause of a CREATEFUNCTION statement

If ″<name>″ is qualified, then the functiondoes not exist. If ″<name>″ is unqualified,then a function of this name does not existin any schema of the current function path.Note that a function cannot be sourced onthe COALESCE, NULLIF, or VALUEbuilt-in functions.

This return code can be generated for any typeof database object.

Federated system users: the object identified by“<name>” is not defined in the database or“<name>” is not a nickname in a DROPNICKNAME statement.

Some data sources do not provide theappropriate values for “<name>”. In these cases,the message token will have the followingformat: “OBJECT:<data source> TABLE/VIEW”,indicating that the actual value for the specifieddata source is unknown.

The statement cannot be processed.

User Response: Ensure that the object name(including any required qualifiers) is correctlyspecified in the SQL statement and it exists. Formissing data type or function in SOURCE clause,it may be that the object does not exist, OR itmay be that the object does exist in some

32 Message Reference, Volume 2

Page 41: Db2 SQL Errors

schema, but the schema is not present in yourfunction path.

Federated system users: if the statement is DROPNICKNAME, make sure the object is actually anickname. The object might not exist in thefederated database or at the data source. Verifythe existence of the federated database objects (ifany) and the data source objects (if any).

sqlcode: -204

sqlstate: 42704

SQL0205N Column or attribute “<name>” isnot defined in “<object-name>”.

Explanation: If “<object-name>” is a table orview, then “<name>” is a column that is notdefined in “<object-name>”. If “<object-name>”is a structured type, then “<name>” is anattribute that is not defined in “<object-name>”.

Federated system users: “<object-name>” couldrefer to a nickname.

The statement cannot be processed.

User Response: If “<object-name>” is a table orview, verify that the column and table or viewnames (including any required qualifiers) arespecified correctly in the SQL statement. If“<object-name>” is a structured type, verify thatthe attribute and type names (including anyrequired qualifiers) are specified correctly in theSQL statement.

Also, if you receive this error during a REORGor an IMPORT, the column names in the indexmay violate the database manager naming rulesas defined in the Administration Guide.

sqlcode: -205

sqlstate: 42703

SQL0206N “<name>” is not valid in thecontext where it is used.

Explanation: This error can occur in thefollowing cases:

v For an INSERT or UPDATE statement, thespecified column is not a column of the table,or view that was specified as the object of theinsert or update.

v For a SELECT or DELETE statement, thespecified column is not a column of any of thetables or views identified in a FROM clause inthe statement.

v For an ORDER BY clause, the specified columnis a correlated column reference in a subselect,which is not allowed.

v For a CREATE TRIGGER statement:

– A reference is made to a column of thesubject table without using an OLD orNEW correlation name.

– The left hand side of an assignment in theSET transition-variable statement in thetriggered action specifies an old transitionvariable where only a new transitionvariable is supported.

v For a CREATE FUNCTION statement:

– The RETURN statement of the SQL functionreferences a variable that is not a parameteror other variable that is in the scope of theRETURN statement.

– The FILTER USING clause references avariable that is not a parameter name or anexpression name in the WHEN clause.

– The search target in an index exploitationrule does not match some parameter nameof the function that is being created.

– A search argument in an index exploitationrule does not match either an expressionname in the EXPRESSION AS clause or aparameter name of the function beingcreated.

v For a CREATE INDEX EXTENSION statement,the RANGE THROUGH clause or the FILTERUSING clause references a variable that is nota parameter name that can be used in theclause.

The statement cannot be processed.

User Response: Verify that the names arespecified correctly in the SQL statement. For aSELECT statement, ensure that all the requiredtables are named in the FROM clause. For a

Chapter 2. SQL Messages 33

Page 42: Db2 SQL Errors

subselect in an ORDER BY clause, ensure thatthere are no correlated column references. If acorrelation name is used for a table, verify thatsubsequent references use the correlation nameand not the table name.

For a CREATE TRIGGER statement, ensure thatonly new transition variables are specified on theleft hand side of assignments in the SETtransition-variable statement and that anyreference to columns of the subject table have acorrelation name specified.

sqlcode: -206

sqlstate: 42703

SQL0207N A column name is not allowed inthe ORDER BY clause of aSELECT statement used with a setoperator.

Explanation: A SELECT statement with a setoperator contains an ORDER BY clause, whichspecifies column names. In this case, the list ofcolumns in the ORDER BY clause must containonly integers.

The statement cannot be processed.

User Response: Specify only integers in the listof columns in the ORDER BY clause.

NOTE: This error is only applicable to releases ofDB2 prior to Version 2 and hosts accessedthrough DB2 Connect.

sqlcode: -207

sqlstate: 42706

SQL0208N The ORDER BY clause is notvalid because column “<name>”is not part of the result table.

Explanation: The statement is not valid becausea column “<name>” specified in the ORDER BYlist is not specified in the SELECT list and is notin the result table. Only columns in the resulttable can be used to order that result when thefullselect of the select-statement is not asubselect.

The statement cannot be processed.

User Response: To correct the syntax of thestatement, either add the specified column to theresult table or delete it from the ORDER BYclause.

sqlcode: -208

sqlstate: 42707

SQL0212N “<name>” is a duplicate tabledesignator or is specified morethan once in the REFERENCINGclause of a trigger definition.

Explanation: The exposed table, view, alias, orcorrelation name specified by “<name>” isidentical to another exposed table, view, alias, orcorrelation name in the same FROM clause.

If the statement is a CREATE TRIGGER, theREFERENCING clause may have specified thesame name as the subject table or may have thesame name for more than one of the OLD orNEW correlation names or the NEW_TABLE orOLD_TABLE identifiers.

The statement cannot be processed.

User Response: Rewrite the FROM clause of theSELECT statement. Associate correlation nameswith table, view, or alias names so no exposedtable, view, alias, or correlation name is identicalto any other exposed table, view, alias, orcorrelation name in the FROM clause.

For a CREATE TRIGGER statement, change thenames in the REFERENCING clause so that thereare no duplicates.

sqlcode: -212

sqlstate: 42712

SQL0214N An expression starting with“<expression-start>” in the“<clause-type>” clause is notvalid. Reason code =“<reason-code>”.

Explanation: The expression identified by thefirst part of the expression “<expression-start>”in the “<clause-type>” clause is not valid for thereason specified by the “<reason-code>” asfollows:

34 Message Reference, Volume 2

Page 43: Db2 SQL Errors

1 The fullselect of the select-statement isnot a subselect. Expressions are notallowed in the ORDER BY clause forthis type of select-statement. This reasoncode occurs only when “<clause-type>”is ORDER BY.

2 DISTINCT is specified in the selectclause and the expression cannot bematched exactly with an expression inthe select list. This reason code occursonly when “<clause-type>” is ORDERBY.

3 Grouping is caused by the presence of acolumn function in the ORDER BYclause. This reason code occurs onlywhen “<clause-type>” is ORDER BY.

4 Expression in a GROUP BY clausecannot be a scalar-fullselect. This reasoncode occurs only when “<clause-type>”is GROUP BY.

5 The left side of a dereference operator ina GROUP BY clause cannot be a variantfunction. This reason code occurs onlywhen “<clause-type>” is GROUP BY.

The statement cannot be processed.

User Response: Modify the select-statementbased on the reason specified by the“<reason-code>” as follows:

1 Remove the expression from the ORDERBY clause. If attempting to reference acolumn of the result, change the sortkey to the simple-integer orsimple-column-name form.

2 Remove DISTINCT from the selectclause or change the sort key to thesimple-integer or simple-column-nameform.

3 Add a GROUP BY clause or remove thecolumn function from the ORDER BYclause.

4 Remove any scalar-fullselect from theGROUP BY clause. If grouping isdesired on a column of the result that isbased on a scalar-fullselect use a nested

table expression or a common tableexpression to first provide a result tablewith the expression as a column of theresult.

5 Remove any variant function from theleft side of the dereference operators inthe GROUP BY clause.

sqlcode: -214

sqlstate: 42822

SQL0216N The number of elements on eachside of a predicate operator doesnot match. Predicate operator is“<predicate-operator>”.

Explanation: A predicate includes a list ofelements on the right or left side (or both sides)of the predicate operator. The number ofelements must be the same on both sides. Theseelements may appear in a list of expressionsenclosed in parentheses or as elements of a selectlist in a fullselect.

The statement cannot be processed.

User Response: Correct the predicate withmismatched number of elements on each side ofthe predicate operator.

sqlcode: -216

sqlstate: 428C4

SQL0217W The statement was not executed asonly Explain information requestsare being processed.

Explanation: The current value of one of theExplain special registers has been set toEXPLAIN. This value allows dynamic SQLstatements to be prepared and explained butprevents any dynamic statement from beingexecuted.

User Response: Change the value of theappropriate Explain special register to a settingother than EXPLAIN by issuing the appropriateSET statement from the interface or applicationthat is encountering this condition.

Chapter 2. SQL Messages 35

Page 44: Db2 SQL Errors

sqlcode: +217

sqlstate: 01604

SQL0219N The required Explain table“<name>” does not exist.

Explanation: The Explain facility has beeninvoked but was unable to find the requiredExplain table “<name>”. The Explain tables mustbe created prior to invoking Explain.

User Response: Create the required Explaintables. The SQL Data Definition Languagestatements needed to create the Explain tablesare available in the file called EXPLAIN.DDL inthe misc directory under sqllib.

sqlcode: -219

sqlstate: 42704

SQL0220N The Explain table “<name>”,column “<name2>” does not havethe proper definition or ismissing.

Explanation: The Explain facility has beeninvoked but the Explain table “<name>” did nothave the expected definition. The definitioncould be incorrect due to:

v Incorrect number of columns defined (if“<name2>” is numeric)

v Incorrect data type assigned to columns (if“<name2>” is a column name).

User Response: Correct the definitions of thespecified Explain table. The SQL Data DefinitionLanguage statements needed to create theExplain tables are available in the file calledEXPLAIN.DDL in the misc directory undersqllib.

sqlcode: -220

sqlstate: 55002

SQL0236W SQLDA has only provided“<integer1>” SQLVAR entries.“<integer2>” SQLVAR entries arerequired for “<integer3>”columns. No SQLVAR entrieshave been set.

Explanation: The value of the SQLN field of theSQLDA should be at least as large as the numberof columns in the result set.

The database manager has not set any SQLVARentries (and the SQLDOUBLED flag has been setto ″off″ (i.e. to the space character)).

User Response: Increase the value of the SQLNfield in the SQLDA to the value indicated in themessage (making sure the SQLDA is largeenough to support that amount) and resubmitthe statement.

sqlcode: +236

sqlstate: 01005

SQL0237W SQLDA has only provided“<integer1>” SQLVAR entries.Since at least one of the columnsbeing described is a distinct type,“<integer2>” SQLVAR entriesshould have been specified. Noneof the Secondary SQLVAR entrieshave been set.

Explanation: Since at least one of the columnsin the result set is a distinct type, space shouldbe provided for twice as many SQLVAR entriesas the number of columns in the result set. Thedatabase manager has only set the Base SQLVARentries (and the SQLDOUBLED flag has been setoff (i.e. to the space character).

User Response: If there is no need for theadditional information about the distinct type(s)in the result set, then no action is required. If thedistinct type information is needed, the value ofthe SQLN field in the SQLDA should beincreased to the value indicated in the message(after making sure that the SQLDA is largeenough to support that amount) and thestatement should be resubmitted.

sqlcode: +237

36 Message Reference, Volume 2

Page 45: Db2 SQL Errors

sqlstate: 01594

SQL0238W SQLDA has only provided“<integer1>” SQLVAR entries.Since at least one of the columnsbeing described is a LOB orstructured type, “<integer2>”SQLVAR entries are required for“<integer3>” columns. NoSQLVAR entries have been set.

Explanation: Since at least one of the columnsin the result set is a LOB or structured type,space must be provided for twice as manySQLVAR entries as the number of columns in theresult set. Note also that one or more of thecolumns in the result set may be a distinct type.

The database manager has not set any SQLVARentries (and the SQLDOUBLED flag has been setoff (i.e. to the space character).

User Response: Increase the value of the SQLNfield in the SQLDA to the value indicated in themessage (after making sure that the SQLDA islarge enough to support that amount) andresubmit the statement.

sqlcode: +238

sqlstate: 01005

SQL0239W SQLDA has only provided“<integer1>” SQLVAR entries.Since at least one of the columnsbeing described is a distinct typeor reference type, “<integer2>”SQLVAR entries are required for“<integer3>” columns. NoSQLVAR entries have been set.

Explanation: If any of the columns in the resultset is a distinct type or reference type, then spaceshould be provided for twice as many SQLVARentries as the number of columns in the resultset.

The database manager has not set any SQLVARentries (and the SQLDOUBLED flag has been setoff (i.e. to the space character).

User Response: If the distinct type or referencetype information is needed, the value of the

SQLN field in the SQLDA should be increased tothe value indicated in the message (after makingsure the SQLDA is large enough to support thatamount) and the statement should beresubmitted. If there is no need for the additionalinformation about the distinct type(s) orreference type(s) in the result set, then it ispossible to resubmit the statement onlyproviding enough SQLVAR entries toaccommodate the number of columns in theresult set.

sqlcode: +239

sqlstate: 01005

SQL0242N The object named“<object-name>” of type“<object-type>” was specifiedmore than once in the list ofobjects.

Explanation: In a list of object names of type“<object-type>”, the object named“<object-name>” was specified more than once.The operation of the statement cannot beperformed on the object more than once.

User Response: Correct the duplicated object inthe list removing duplicate occurrences.

sqlcode: -242

sqlstate: 42713

SQL0257N Raw DEVICE containers arecurrently not supported on thisplatform.

Explanation: An attempt was made to useDEVICE containers. These are not currentlysupported on this platform.

User Response: Use FILE containers orsystem-managed table spaces instead.

sqlcode: -257

sqlstate: 42994

Chapter 2. SQL Messages 37

Page 46: Db2 SQL Errors

SQL0258N Containers cannot be added whilea rebalance of the table space ispending or in progress.

Explanation: One of the following conditions istrue:

1. An ALTER TABLESPACE to add containers tothe same table space (on the same node) haspreviously been issued in the same unit ofwork. Containers for a table space can onlybe added to one node in one ALTERTABLESPACE statement in a unit of work.

2. The table space to which you are addingcontainers is currently being rebalanced.Details can be found in the system error logand/or the database manager error log.

User Response:

1. If possible, roll back the unit of work andissue a single ALTER TABLESPACE to add allthe containers. Otherwise, wait until therebalance has completed and then try theoperation again.

2. Wait until the rebalance has completed andthen try the operation again.

sqlcode: -258

sqlstate: 55041

SQL0259N Container map for table space istoo complicated.

Explanation: The map structure keeps a recordof how the table space address space is mappedto the various containers. If this gets toocomplicated, it does not fit in the table space file.

Details can be found in the system error logand/or the database manager error log.

User Response: The table space may need to berebalanced to more evenly distribute the dataamong the containers. This may simplify themapping.

If this does not work, try making as manycontainers as possible the same size. Existingcontainer sizes can be changed by backing up thetable space and then using the databaseadministration utility to change the containers.

Restore the table space to the new containers.

sqlcode: -259

sqlstate: 54037

SQL0260N Column “<column-name>” cannotbelong to the partitioning keybecause it is either a LONGcolumn, DATALINK column, orstructured type column.

Explanation: A partitioning key cannot have aLONG-type column, DATALINK column, orstructured type column.

The statement cannot be processed.

User Response: Do not use LONG columns,DATALINK columns, or structured type columnsfor the partitioning key.

If the table only has LONG columns, DATALINKcolumns, or structured type columsn, either adda column that can be used for the partitioningkey to the table, or define the table without apartitioning key in a single-node nodegroup.

sqlcode: -260

sqlstate: 42962

SQL0262N Table “<table-name>” cannot becreated in multinode nodegroup“<nodegroup-name>” because itcontains only LONG-typecolumns. No partitioning key canbe created.

Explanation: The table “<table-name>”consisting of only LONG-type columns cannot becreated in a multinode nodegroup. The tablemust have at least one non-LONG type columnfor use in a partitioning key.

The statement cannot be processed.

User Response: Either create the table with oneor more non-LONG type columns, or create thetable in a single-node nodegroup.

sqlcode: -262

sqlstate: 428A2

38 Message Reference, Volume 2

Page 47: Db2 SQL Errors

SQL0263N Node range from“<node-number-1>” to“<node-number-2>” is not valid.Second node number must begreater than or equal to first nodenumber.

Explanation: The specified node range is notvalid.

The statement cannot be processed.

User Response: Correct the node range in thestatement, then try the request again.

sqlcode: -263

sqlstate: 428A9

SQL0264N Partitioning key cannot be addedor dropped because table residesin a table space defined on themulti-node nodegroup “<name>”.

Explanation: You can only add or drop apartitioning key on a table in a single-nodenodegroup.

The statement cannot be processed.

User Response: Do one of the following and trythe request again:

v Define an identical table with a partitioningkey.

v Redistribute the nodegroup to a single-nodenodegroup.

sqlcode: -264

sqlstate: 55037

SQL0265N Node “<node-number>” is aduplicate node.

Explanation: For the CREATE NODEGROUPstatement, a node can only appear once in theON NODES clause.

For the CREATE TABLESPACE and ALTERTABLESPACE statement, a node can appear onlyonce and in only one ON NODES clause.

For the ALTER NODEGROUP statement or

REDISTRIBUTE NODEGROUP command, one ofthe following occurred:

v The node appeared more than once in theADD NODES or the DROP NODES clause.

v The node appeared in both the ADD NODESand the DROP NODES clause.

v The node to be added is already a member ofthe nodegroup.

The statement cannot be processed.

User Response: Ensure that the node names ornode numbers in the ON NODES, ADD NODES,or DROP NODES clause are unique. For theCREATE TABLESPACE and ALTERTABLESPACE statements, ensure that a nodeappears in no more than one ON NODES clause.

In addition, for the ALTER NODEGROUPstatement or REDISTRIBUTE NODEGROUPcommand:

v Do not specify a node in both the ADDNODES and the DROP NODES clause.

v Remove the node from the ADD NODESclause if the node is already defined in thenodegroup.

sqlcode: -265

sqlstate: 42728

SQL0266N Node “<node-number>” is notdefined.

Explanation: The node “<node-number>” is notvalid for one of the following reasons:

v the node number is not in the valid range of 0to 999

v the node is not in the node configuration file

v the node is not part of the nodegroup,therefore the requested operation cannot beprocessed.

The statement cannot be processed.

User Response: Depending on the condition:

v issue the statement, command or API withnode numbers in the valid range.

v follow the procedure to add a node to thesystem.

Chapter 2. SQL Messages 39

Page 48: Db2 SQL Errors

v remove the node from the specified nodes inthe statement, command or API.

sqlcode: -266

sqlstate: 42729

SQL0268N “<operation>” cannot beperformed while nodegroup isbeing redistributed.

Explanation: One of the following:

v The nodegroup is being redistributed. Itcannot be altered, dropped or redistributedagain until the current operation is complete.

v The partitioning key of a table cannot bedropped while the nodegroup of the table isbeing redistributed.

The statement cannot be processed.

User Response: Wait until the redistribution iscomplete, then try the request again.

sqlcode: -268

sqlstate: 55038

SQL0269N Database contains maximumnumber of partitioning maps.

Explanation: Because the database contains themaximum number of partitioning maps (32,768),you cannot create a new nodegroup, alter anodegroup, or redistribute an existing one.

The statement cannot be processed.

User Response: Drop one or more nodegroupsin the database.

Note: Dropping a nodegroup drops all databaseobjects such as table spaces, tables and viewsthat reside in the nodegroup.

sqlcode: -269

sqlstate: 54033

SQL0270N Function not supported (Reasoncode = “<reason-code>”).

Explanation: The statement cannot be processedbecause it violates a restriction as indicated by

the following reason code:

1 The primary key, each uniqueconstraint, and each unique index mustcontain all partitioning columns of thetable (columns may appear in anyorder).

2 Update of the partitioning key columnvalue is not supported.

3 A foreign key cannot include anynullable partitioning key columns whendefined with ON DELETE SET NULL.This is a special case of reason code 2since defining such a constraint wouldresult in attempting to update apartitioning key column.

4 A table defined using a multipartitionnodegroup or a single-partitionnodegroup on other than the catalogpartition does not support DATACAPTURE CHANGES.

5 View created with the WITH CHECKOPTION clause should not usefunctions (or reference views that usefunctions ) that:

v are non-deterministic

v have side effects

v are related to the placement of data(for example nodenumber or partitionfunctions).

These functions must also not bepresent within referenced views if thenew view is created with theCASCADED check option.

6 A transform cannot be defined for auser-defined distinct type.

7 Long fields can only be defined using atable space with a page size that is 4K.A LONG TABLESPACE can only becreated using a 4K page size.

8 Structured types are not supported ascolumns of a table or structured typeattribute data types prior to DB2 Version7.1.

40 Message Reference, Volume 2

Page 49: Db2 SQL Errors

9 Triggers are not supported on typedtables.

10 A single default table space cannot beselected since the table has one or moreLOB columns which must be placed in atable space with a 4K page size and therowsize or number of columns in thetable requires a table space with an 8Kpage size.

11 A typed table or typed view cannot becreated using a structured type that hasno attributes.

12 The type of a source key parametermust be a user-defined structured typeor a distinct type that is not sourced onLOB, DATALINK, LONG VARCHAR, orLONG VARGRAPHIC.

13 Check constraints cannot be defined ona typed table or the WITH CHECKOPTION clause cannot be specified on atyped view.

14 Referential constraints cannot be definedon a typed table or to a parent table thatis a typed table.

15 A default value cannot be defined forreference type columns.

16 A reference data type or structured datatype cannot be used as a parameter datatype or a returns data type of a userdefined function prior to DB2 Version7.1. Otherwise, a scoped reference datatype cannot be used as a parameter datatype or returns data type of a routine. Astructured type cannot be used as areturn column of a table or rowfunction.

17 The SET CONSTRAINTS statementcannot be used for a typed table.

18 Column level UPDATE andREFERENCES privileges cannot begranted on a typed table or typed view.

19 A specific default value must bespecified when defining a default for acolumn of a typed table.

20 ALTER TABLE is not supported for asummary table.

21 Column length cannot be altered on atable which is a base table for asummary table.

22 Summary tables cannot be defined in aCREATE SCHEMA statement.

23 REPLICATED can only be specified fora summary table defined with REFRESHDEFERRED.

24 The triggered-action in a BEFOREtrigger cannot reference a summarytable defined with REFRESHIMMEDIATE.

25 Only one summary table can bespecified for a SET CONSTRAINTSstatement.

26 The nodegroup being redistributedcontains at least one replicatedsummary table.

27 Replicated summary tables cannot bedefined on a table that does not have aunique index existing on one or morecolumns that make up the replicatedsummary table.

28 A typed table or summary table cannotbe renamed.

29 FOR EXCEPTION clause cannot bespecified with a summary table in theSET CONSTRAINTS statement.

30 Typed tables and typed views cannot bedefined in a CREATE SCHEMAstatement.

31 A partitioning key cannot be definedwith more than 500 columns.

32 A table defined using a multipartitionnodegroup or a single-partitionnodegroup on other than the catalogpartition does not support DATALINKcolumns defined with FILE LINKCONTROL.

33 An underlying table of a summary tabledefined with REFRESH IMMEDIATE

Chapter 2. SQL Messages 41

Page 50: Db2 SQL Errors

cannot be the child of a referentialconstraint with cascading effect (i.e.with option ON DELETE CASCADE orON DELETE SET NULL).

34 The underlying object relational featureis not supported in the current release.

35 An identity column cannot be created ina multi-node database environment.

36 Database activation of a multi-nodedatabase is not allowed if identitycolumns exist.

38 An index using an index extension isnot supported in a multiple partitionnodegroup.

39 Nicknames or OLE DB table functionscannot be referenced directly orindirectly in the body of an SQLfunction or SQL method.

User Response: The action corresponding to thereason code is:

1 Correct the CREATE TABLE, ALTERTABLE or CREATE UNIQUE INDEXstatement.

2 Do not attempt to update thepartitioning key columns for amultipartition table or consider deletingand then inserting the row with the newvalues in the partitioning columns.

3 Make the partitioning key column notnullable, specify a different ON DELETEaction, or change the partitioning key ofthe table so that the foreign does notinclude any columns of the partitioningkey.

4 Either specify DATA CAPTURE NONEor ensure that the table is placed in atable space on a single-partitionnodegroup that specifies the catalogpartition.

5 Do not use the WITH CHECK OPTIONclause or remove the function or viewfrom the view definition.

6 Transforms are automatic foruser-defined distinct types. Use the

CREATE TRANSFORM statement foruser-defined structured types only.

7 Use a table space with 4K page size forany table that includes long fields. Ifusing DMS table spaces, long fields canbe placed in a table space with 4K pagesize with other table or index data intable spaces with a different page size.When defining a LONG TABLESPACE,use PAGESIZE 4K.

8 For servers prior to DB2 Version 7.1,ensure that no column data types arestructured types in the CREATE TABLEstatement or ALTER TYPE ADDCOLUMN statement. Ensure that noattribute data types are structured typesin the CREATE TYPE statement orALTER TYPE ADD ATTRIBUTEstatement.

9 Do not define triggers on typed tables.

10 Either reduce the row size or number ofcolumns in the table or specify 2 tablespaces such that the long data is in atable space with a 4K page size and thebase data is in a table space with an 8Kpage size.

11 When creating a typed table or typedview, specify a structured type that hasat least one attribute defined.

12 For the type of a source key parameter,use only a user-defined structured typeor a distinct type that is not sourced onLOB, DATALINK, LONG VARCHAR, orLONG VARGRAPHIC.

13 In a CREATE TABLE or ALTER TABLEstatement for a typed table, do notspecify check constraints. In a CREATEVIEW statement of a typed view, do notspecify the WITH CHECK OPTIONclause.

14 Do not specify referential constraintsinvolving typed tables in a CREATETABLE or ALTER TABLE statement.

15 Do not specify a DEFAULT clause for a

42 Message Reference, Volume 2

Page 51: Db2 SQL Errors

column with a reference data type in aCREATE TABLE or ALTER TABLEstatement.

16 For servers prior to DB2 Version 7.1, donot specify a structured type parameteror returns type when creating a userdefined function. Otherwise, do notspecify a scoped reference type as aparameter or returns type. Do notspecify a structured type as a returncolumn of a table or row function.

17 Do not specify a typed table in the SETCONSTRAINTS statement.

18 Do not include specific column nameswhen granting REFERENCES orUPDATE privileges on a typed table ortyped view.

19 Include a specific value when specifyingthe DEFAULT clause on a column of atyped table.

20 Drop the summary table and recreate itwith the desired attributes.

21 Drop the summary table(s), alter thecolumn length of the base table andthen recreate the summary table(s).

22 Issue the CREATE SUMMARY TABLEstatement outside of the CREATESCHEMA statement.

23 Either remove the REPLICATEDspecification or ensure that REFRESHDEFERRED is specified for thesummary table definition.

24 Remove the reference to the summarytable in the triggered-action in theBEFORE trigger.

25 Issue separate SET CONSTRAINTSIMMEDIATE CHECKED statements foreach summary table.

26 Drop all replicated summary tables inthe nodegroup and then issue theREDISTRIBUTE NODEGROUPcommand again. Recreate the replicatedsummary table(s).

27 Ensure that a subset of the columns

defined for the summary table also arethe set of columns that make up aunique index on the base table.

28 A typed table or summary table namecan only be changed by dropping thetable and creating it again with the newname. Dropping the table may haveimplications on other objects thatdepend on the table and the privilegeson the table are lost.

29 Remove the FOR EXCEPTION clausefrom the SET CONSTRAINTS statement.

30 Issue the CREATE statement for thetyped view or typed table outside of theCREATE SCHEMA statement.

31 Reduce the number of columns in thepartitioning key.

32 Either specify NO LINK CONTROL forthe DATALINK column or ensure thatthe table is placed in a table space on asingle-partition nodegroup that specifiesthe catalog partition. If redistributing toa multiple-partition nodegroup, thetable needs to be dropped to continuewith the redistribute.

33

v Do not define a referential constraintwith cascading effect (i.e. with optionON DELETE CASCADE or ONDELETE SET NULL) with anunderlying table of a summary tabledefined with REFRESH IMMEDIATEas the child, or

v do not define a REFRESHIMMEDIATE summary table whoseunderlying table is the child of areferential constraint with cascadingeffect (i.e. with option ON DELETECASCADE or ON DELETE SETNULL).

34 The error can be corrected by removingthe use of any unsupported objectrelational features.

35 Remove the “GENERATED [ALWAYS |

Chapter 2. SQL Messages 43

Page 52: Db2 SQL Errors

BY DEFAULT] AS IDENTITY ...”attribute from the column.

36 Drop the new node(s) to go back to asingle node configuration. If more nodesare required, then the tables withidentity columns need to be droppedbefore new nodes are added.

38 An index using an index extensioncannot be created on a table in amultiple partition nodegroup. Anodegroup cannot become a multiplepartition nodegroup while an indexusing an index extension exists on atable in the nodegroup. Either drop anysuch indexes and add the partition tothe nodegroup, in which case theindexes cannot be re-created, or leavethe nodegroup unchanged.

39 Remove the reference to a nickname orOLE DB table function or remove thereference to the object that indirectlyreferences one of these.

sqlcode: -270

sqlstate: 42997

SQL0271N Index file for table with fid″<fid>″ is either missing, or is notvalid.

Explanation: The index file for the table withfid ″<fid>″ is required during processing. The fileis either missing, or it is not valid.

The statement cannot be processed, and theapplication is still connected to the database. Thiscondition does not affect other statements that donot use the index on this table.

User Response: Ensure that all users aredisconnected from the database, then issue theRESTART DATABASE command on all nodes.Then try the request again.

The index (or indexes) is re-created when thedatabase is restarted.

sqlcode: -271

sqlstate: 58004

SQL0276N Connection to database ″<name>″cannot be made because it is inthe restore pending state.

Explanation: The database must be restoredbefore a connection can be done.

No connection was made.

User Response: Restore the database, then issuethe CONNECT statement again.

sqlcode: -276

sqlstate: 08004

SQL0279N The database connection has beenterminated during COMMITprocessing. The transaction couldbe in doubt. Reason code =“<reason-code>”.

Explanation: Commit processing encounteredan error. The transaction has been put in thecommit state, but the commit processing may nothave completed. The application’s databaseconnection has been terminated.

The cause of the error is indicated by the″<reason-code>″:

1 A node involved in the transaction hasfailed.

2 Commit was rejected on one for thenodes. Check the db2diag.log file fordetails.

User Response: Determine the cause of theerror. It may be necessary to contact the systemadministrator for assistance since the mostcommon cause of the error is node failure orconnection failure. The RESTART DATABASEcommand will complete the commit processingfor this transaction.

sqlcode: -279

sqlstate: 08007

44 Message Reference, Volume 2

Page 53: Db2 SQL Errors

SQL0280W View, trigger or summary table“<name>” has replaced anexisting inoperative view, triggeror summary table.

Explanation: An existing inoperative view,trigger or summary table “<name>” wasreplaced by:

v the new view definition as a result of aCREATE VIEW statement

v the new trigger definition as a result of aCREATE TRIGGER statement

v the new summary table definition as a resultof a CREATE SUMMARY TABLE statement.

User Response: None required.

sqlcode: +280

sqlstate: 01595

SQL0281N Table space ″<tablespace-name>″cannot be altered with additionalcontainers because it is a systemmanaged table space.

Explanation: Additional containers cannot beadded to a system managed table space. Theexception to this is when a nodegroup wasmodified to add a node without table spaces,then containers can be added once on the newnode using the ALTER TABLESPACE command.In general, the table space must be managed bythe database in order to add additionalcontainers.

The statement cannot be processed.

User Response: To add more containers to asystem managed table space, drop and recreatethe table space with more containers, ensuringthat each container is of the same size and lessthan the container size limit, or change to a DMStable space.

sqlcode: -281

sqlstate: 42921

SQL0282N Table space ″<tablespace-name>″cannot be dropped because atleast one of the tables in it,″<table-name>″, has one or moreof its parts in another table space.

Explanation: A table in the specified table spacedoes not contain all of its parts in that tablespace. If more than one table spaces arespecified, then a table in one of the specifiedtable spaces does not contain all of its parts inthe list. The base table, indexes, or long data maybe in another table space, so dropping the tablespace(s) will not completely drop the table. Thiswould leave the table in an inconsistent state andtherefore the table space(s) cannot be dropped.

User Response: Ensure that all objectscontained in table space ″<tablespace-name>″contain all their parts in this table space beforeattempting to drop it, or include those tablespaces containing the parts in the list to bedropped.

This may require dropping the table″<table-name>″ before dropping the table space.

sqlcode: -282

sqlstate: 55024

SQL0283N System temporary table space″<tablespace-name>″ cannot bedropped because it is the onlysystem temporary table space witha “<page-size>” page size in thedatabase.

Explanation: A database must contain at leastone system temporary table space with the samepage size as the page size of the catalogtablespace. Dropping table space“<tablespace-name>” would remove the lastsystem temporary tablespace with a“<page-size>” page size from the database.

User Response: Ensure there will be anothersystem temporary table space with a“<page-size>” page size in the database beforeattempting to drop this table space.

sqlcode: -283

Chapter 2. SQL Messages 45

Page 54: Db2 SQL Errors

sqlstate: 55026

SQL0284N The table was not created becausethe table space“<tablespace-name>” followingthe clause “<clause>” is a“<tablespace-type>” table space.

Explanation: The CREATE TABLE or DECLAREGLOBAL TEMPORARY TABLE statementspecified a table space named“<tablespace-name>” following the clause“<clause>” that is not a valid type of table spacefor this clause.

This can occur in the following situations:

v for regular tables, “<tablespace-name>” wasspecified on the IN clause and the table spaceis not a REGULAR table space.

v for declared temporary tables,“<tablespace-name>” was specified on the INclause and the table space is not a USERTEMPORARY table space.

v “<tablespace-name>” was specified on theLONG IN clause and the table space is not aLONG, managed by database table space.

v “<tablespace-name>” was specified on theINDEX IN clause and the table space is not aREGULAR, managed by database, table space.

User Response: Correct the CREATE TABLEstatement to specify a table space with thecorrect type for the “<clause>” clause.

sqlcode: -284

sqlstate: 42838

SQL0285N The indexes and/or long columnsfor table ″<table-name>″ cannotbe assigned to separate tablespaces because the primary tablespace ″<tablespace-name>″ is asystem managed table space.

Explanation: If the primary table space is asystem managed table space, all table parts mustbe contained in that table space. A table can haveparts in separate table spaces only if the primarytable space, index table space and long tablespace are database managed table spaces.

User Response: Either specify a databasemanaged table space for the primary table space,or do not assign the table parts to another tablespace.

sqlcode: -285

sqlstate: 42839

SQL0286N A default table space could not befound with a pagesize of at least“<pagesize>” that authorizationID “<user-name>” is authorizedto use.

Explanation: The CREATE TABLE or DECLAREGLOBAL TEMPORARY TABLE statement didnot specify a table space, and a table space of theright type (USER TEMPORARY for declaredtemporary table) with sufficient page size (atleast “<pagesize>”), over which authorization ID“<user-name>” has USE privilege, could not befound.

Sufficient page size for a table is determined byeither the byte count of the row or the number ofcolumns.

User Response: Ensure the existence of a tablespace of the correct type (REGULAR or USERTEMPORARY) with a page size of at least“<pagesize>” and that authorization ID“<user-name>” has USE privilege on this tablespace.

sqlcode: -286

sqlstate: 42727

SQL0287N SYSCATSPACE cannot be usedfor user objects.

Explanation: The CREATE TABLE or GRANTUSE OF TABLESPACE statement specified atable space named SYSCATSPACE which isreserved for catalog tables.

User Response: Specify a different table spacename.

sqlcode: -287

sqlstate: 42838

46 Message Reference, Volume 2

Page 55: Db2 SQL Errors

SQL0288N A long table space cannot bedefined using MANAGED BYSYSTEM.

Explanation: The table space being defined isfor use with large objects and long strings. Thesecan only be stored in table spaces that aredefined in database managed space. Thus a longtable space cannot be defined to use systemmanaged space.

User Response: Remove the keyword LONG orchange to MANAGED BY DATABASE in theCREATE TABLESPACE statement.

sqlcode: -288

sqlstate: 42613

SQL0289N Unable to allocate new pages intable space ″<tablespace-name>″.

Explanation: One of the following conditions istrue:

1. One of the containers assigned to this SMStable space has reached the maximum filesize. This is the likely cause of the error.

2. All the containers assigned to this DMS tablespace are full. This is the likely cause of theerror.

3. The table space object table for this DMStable space is full.

4. A rebalance is in progress, but has notprogressed far enough to enable the newlyadded space to be used.

5. A redirected restore is being done tocontainers that are too small.

6. A rollforward is being done following aredirected restore and all the containersassigned to this tablespace are full.

7. A rollforward skipping add containers isbeing done and all the containers assigned tothis tablespace are full.

Details can be found in the system error logand/or the database manager error log.

User Response: Perform the actioncorresponding to the cause of the error:

1. either switch to a DMS TABLESPACE orrecreate the SMS TABLESPACE with moredirectories (PATHs) such that: (number ofdirectories) >= (max tablesize / maxfilesize).Note that maximum file size is operatingsystem dependent.

2. add new container(s) to the DMS table spaceand try the operation again, after therebalancer has made the new pages availablefor use.

3. drop unnecessary tables from this DMS tablespace.

4. wait for the rebalancer to make moreprogress.

5. perform the redirected restore again to largercontainers.

6. perform the redirected restore again to largercontainers.

7. perform the rollforward again allowing addcontainers, or perform a redirected restore tolarger containers.

sqlcode: -289

sqlstate: 57011

SQL0290N Table space access is not allowed.

Explanation: A process attempted to access atable space which is in an invalid state for whichthe intended access is not allowed.

v If the table space is in a quiesced state, onlyprocesses which also hold the table space in aquiesced state are allowed access to the tablespace.

v If the table space is in any other state, only theprocess which is performing the actionspecified is allowed access to the table space.

v A system or user temporary table space cannotbe dropped which contains active system ordeclared temporary tables.

v The SET CONTAINER api cannot be used toset the container list unless the table space isin a ″restore pending″ state.

Details can be found in the system error logand/or the database manager error log.

User Response: Possible actions include:

Chapter 2. SQL Messages 47

Page 56: Db2 SQL Errors

v If the table space is in a quiesced state,attempt to acquire a quiesced share orquiesced update state on the table space. Or,attempt to quiesce reset the table space.

v If the table space is in any other state, waituntil the table space has returned to normalstate before attempting to access the tablespace.

Refer to the Administration Guide for furtherinformation about the table space states.

sqlcode: -290

sqlstate: 55039

SQL0291N State transition not allowed ontable space.

Explanation: An attempt was made to changethe state of a table space. Either the new state isnot compatible with the current state of the tablespace, or an attempt was made to turn off aparticular state and the table space was not inthat state.

Details can be found in the system error logand/or the database manager error log.

User Response: Table space states change whena backup is taken, the load completes, therollforward completes, etc., depending on thecurrent state of the table spaces. Refer to thesystems administration guide for furtherinformation about the table space states.

sqlcode: -291

sqlstate: 55039

SQL0292N An internal database file couldnot be created.

Explanation: An internal database file could notbe created. Details can be found in the systemerror log and/or the database manager error log.

User Response: Check that the directorycontaining the file is accessible (e.g. mounted)and writeable by the database instance owner.

sqlcode: -292

sqlstate: 57047

SQL0293N Error accessing a table spacecontainer.

Explanation: This error may be caused by oneof the following conditions:

v A container (directory, file or raw device) wasnot found.

v A container is not tagged as being owned bythe proper table space.

v A container tag is corrupt.

This error can be returned during databasestartup and during the processing of the ALTERTABLESPACE SQL statement.

Details can be found in the system error logand/or the database manager error log.

User Response: Try the following actions:

1. Check that the directory, file, or device existsand that the file system is mounted (if it is ona separate file system). Containers must bereadable and writable by the databaseinstance owner.

2. If you have a recent backup, try restoring thetable space or database. If that fails becauseof the bad container and the container is nota DEVICE type, try manually removing thecontainer first.

If the error was returned from the processing ofan ALTER TABLESPACE SQL statement with theSWITCH ONLINE option, then re-issue thestatement after correcting the problem asdescribed above.

If the error persists, call your IBM servicerepresentative.

sqlcode: -293

sqlstate: 57048

SQL0294N The container is already in use.

Explanation: Table space containers may not beshared. The possible causes of this error includethe following.

48 Message Reference, Volume 2

Page 57: Db2 SQL Errors

v A CREATE TABLESPACE or ALTERTABLESPACE statement included a containerthat is already in use by another table space.

v A CREATE TABLESPACE or ALTERTABLESPACE statement included a containerfrom a table space that has been dropped butthe drop statement has not been committed.

v An ALTER NODEGROUP statement used toadd a node used the containers of a LIKEnode that is on the same physical node. Thesecontainers would therefore already be in use.

v A CREATE TABLESPACE or ALTERTABLESPACE statement is attempting to usethe same container on more than one logicalnode on a single physical node. The samecontainers cannot be used for more than onenode on the same physical node.

v An ADD NODE command or API used thecontainers from the system temporary tablespaces of a LIKE node that is on the samephysical node. These containers wouldtherefore already be in use.

v A CREATE TABLESPACE or ALTERTABLESPACE statement included a DMScontainer from another database that no longerexists but was not dropped properly. Thecontainer is not actually in use but it is taggedas being in use. Therefore, DB2 will not allowit to be used until it is untagged. However, itis very important to verify that the container isnot in use by the same database or anotherdatabase when untagging it. If the container isin use when you untag it, the database(s)involved will be corrupted.

Details can be found in the system error logand/or the database manager error log.

User Response: Ensure the containers areunique.

v For the CREATE or ALTER TABLESPACEstatement, specify a different container for thetable space.

v For the CREATE or ALTER TABLESPACEstatement including a container from adropped table space, try again after the dropstatement is committed or specify a differentcontainer.

v For the ALTER NODEGROUP statement,reissue the statement using the WITHOUTTABLESPACES clause, and then use theALTER TABLESPACE statement to createunique containers for the new node.

v For CREATE or ALTER TABLESPACEstatements where the environment includesmore than one logical node on a physicalnode, ensure that the same containers are notspecified for such logical nodes.

v For an ADD NODE command or API, reissuethe statement using the WITHOUTTABLESPACES clause, and then use theALTER TABLESPACE statement to createunique containers at the new node for thesystem temporary table spaces.

v If you are trying to use a DMS container thatbelonged to a database that no longer existsbut was not dropped properly, then thedb2untag utility can be used to remove theDB2 container tag from it. When this tag isremoved DB2 considers the container to befree and the container can be used in aCREATE TABLESPACE or ALTERTABLESPACE statement.

NOTE: Use extreme caution with db2untag. Ifyou issue a db2untag command against acontainer that is still in use by a database, thenboth the database that originally used thecontainer and the database that is now usingthe container will be corrupted.

sqlcode: -294

sqlstate: 42730

SQL0295N The combined length for allcontainer names for the tablespace is too long.

Explanation: The total space required to storethe list of containers exceeds the space allottedfor this table space in the table space file.

Details can be found in the system error logand/or the database manager error log.

User Response: Try one or more of thefollowing:

Chapter 2. SQL Messages 49

Page 58: Db2 SQL Errors

v Use symbolic links, mounted file systems, etc.to shorten the new container names.

v Back up the table space and then use thedatabase administration utility to reduce thenumber and/or name lengths of thecontainers. Restore the table space to the newcontainers.

sqlcode: -295

sqlstate: 54034

SQL0296N Table space limit exceeded.

Explanation: This database contains themaximum number of table spaces. No more canbe created.

Details can be found in the system error logand/or the database manager error log.

User Response: Delete table spaces that are notbeing used any more. Combine small tablespaces by moving all data into one of them anddeleting the other.

sqlcode: -296

sqlstate: 54035

SQL0297N Pathname for container is toolong.

Explanation: The full path specifying thecontainer name exceeds the maximum lengthallowed. If the container was specified as a pathrelative to the database directory, theconcatenation of these two values must notexceed the maximum length.

Details can be found in the system error logand/or the database manager error log.

User Response: Shorten the path length.

sqlcode: -297

sqlstate: 54036

SQL0298N Bad container path.

Explanation: The container path violates one ofthe following requirements:

v Container paths must be valid fully-qualifiedabsolute paths or valid relative paths. Thelatter are interpreted relative to the databasedirectory.

v For EXTEND or RESIZE operations thespecified container path must exist.

v The path must be read/write accessible to theinstance id (check file permissions onUNIX-based systems).

v Containers must be of the type specified in thecommand (directory, file or device).

v Containers (directories) in system managedtable spaces must be empty when designatedas containers and must not be nestedunderneath other containers.

v The containers for one database must not belocated underneath the directory of anotherdatabase, and they may not be underneath anydirectory that appears to be for anotherdatabase. This rules out any directory of theform SQLnnnnn, where ’n’ is any digit.

v The container must be within the file size limitfor the operating system.

v Containers (files) for dropped databasemanaged table spaces can only be reused ascontainers (directories) for system managedtable spaces after all agents terminate and viceversa.

v During a redirected restore, an SMS containerwas specified for a DMS table space or a DMScontainer was specified for an SMS tablespace.

v The specified type of the container for anEXTEND or RESIZE operation does not matchthe type of the container (FILE or DEVICE)that was specified when the container wascreated.

This message will also be returned if any otherunexpected error occurred which prevents DB2from accessing the container.

Details can be found in the system error logand/or the database manager error log.

User Response: Specify another containerlocation or change the container to make itacceptable to DB2 (such as changing filepermissions) and try again.

50 Message Reference, Volume 2

Page 59: Db2 SQL Errors

sqlcode: -298

sqlstate: 428B2

SQL0299N Container is already assigned tothe table space.

Explanation: The container that you areattempting to add has already been assigned tothe table space.

Details can be found in the system error logand/or the database manager error log.

User Response: Choose another container andtry again.

sqlcode: -299

sqlstate: 42731

SQL0300 - SQL0399

SQL0301N The value of a host variable in theEXECUTE or OPEN statementcannot be used because of its datatype.

Explanation: A host variable could not be usedas specified in the statement because its datatype is incompatible with the intended use of itsvalue.

This error can occur as a result of specifying anincorrect host variable or an incorrect SQLTYPEvalue in a SQLDA on an EXECUTE or OPENstatement.

The statement cannot be processed.

User Response: Verify that the data types of allhost variables in the statement are compatiblewith the manner in which they are used.

sqlcode: -301

sqlstate: 07006

SQL0302N The value of a host variable in theEXECUTE or OPEN statement istoo large for its correspondinguse.

Explanation: The value of an input hostvariable was found to be too large for its use inthe SELECT, VALUES, or prepared statement.One of the following occurred:

v The corresponding host variable or parametermarker used in the SQL statement is definedas string, but the input host variable contains astring that is too long.

v The corresponding host variable or parametermarker used in the SQL statement is definedas numeric, but the input host variablecontains a numeric value that is too large.

v The terminating NUL character is missingfrom the C language NUL-terminatedcharacter string host variable.

v Federated system users: in a pass-throughsession, a data source-specific restriction mighthave been violated.

This error occurs as a result of specifying eitheran incorrect host variable or an incorrectSQLLEN value in an SQLDA on an EXECUTE orOPEN statement.

The statement cannot be processed.

User Response: Ensure that the input hostvariable value is the correct type and length. Ifthe input host variables supply values toparameter markers, match values with theimplied data type and length of the parametermarker.

Federated system users: for a pass-throughsession, determine what data source is causingthe error (see the problem determination guidefor procedures to follow to identify the failingdata source). Examine the SQL dialect for thatdata source to determine which specificrestriction has been violated, and adjust thefailing statement as needed.

sqlcode: -302

sqlstate: 22001, 22003

Chapter 2. SQL Messages 51

Page 60: Db2 SQL Errors

SQL0303N A value cannot be assigned to ahost variable in the SELECT,VALUES, or FETCH statementbecause the data types are notcompatible.

Explanation: An imbedded SELECT or VALUESstatement selects into a host variable, but thedata type of the variable is not compatible withthe data type of the corresponding SELECT-listor VALUES-list element. Both must be numeric,character, or graphic. For example, if the datatype of the column is date or time, the data typeof the variable must be character with anappropriate minimum length.

The statement cannot be processed.

User Response: Verify that the table definitionsare current and that the host variable has thecorrect data type.

sqlcode: -303

sqlstate: 42806

SQL0304N A value cannot be assigned to ahost variable because the value isnot within the range of the hostvariable’s data type.

Explanation: A FETCH, VALUES, or SELECTinto a host variable list failed because the hostvariable was not large enough to hold theretrieved value.

The statement cannot be processed. No data wasretrieved.

User Response: Verify that table definitions arecurrent and that the host variable has the correctdata type. For the ranges of SQL data types, referto the SQL Reference.

Federated system users: for the ranges of datatypes that are returned from a data source, referto the documentation for that data source.

sqlcode: -304

sqlstate: 22001, 22003

SQL0305N The NULL value cannot beassigned to a host variable in theSELECT or FETCH statementbecause no indicator variable isspecified.

Explanation: A FETCH or embedded SELECTor VALUES operation resulted in the retrieval ofa NULL value to be inserted into a host variablefor which no indicator variable was provided. Anindicator variable must be supplied if a columncan return a NULL value.

The statement cannot be processed. No data wasretrieved.

User Response: Examine the definition of theFETCH or SELECT object table or the elementsof the VALUES list. Correct the program toprovide indicator variables for all host variableswhere NULL values from those columns can beretrieved.

sqlcode: -305

sqlstate: 22002

SQL0306N The host variable “<name>” isundefined.

Explanation: The host variable “<name>” is notdeclared in any DECLARE SECTION.

The statement cannot be processed.

User Response: Ensure that the host variable isdeclared and the name spelled correctly.

SQL0307N The host variable “<name>” isalready defined.

Explanation: The host variable “<name>” hasalready been declared in a DECLARE SECTION.

The definition is ignored. The previous definitionis used.

User Response: Ensure that the host variablename is spelled correctly and the name isdefined only once for each program.

52 Message Reference, Volume 2

Page 61: Db2 SQL Errors

SQL0308N The limit on the number of hostvariables has been reached.

Explanation: The limit on the number of hostvariables is dependent on how many will fit inthe HOST_VARS column of SYSPLAN. This limithas been reached.

The remaining variable declarations are ignored.

User Response: Either simplify the program,split the program into smaller, separateprograms, or do both.

SQL0309N The value of a host variable in theOPEN statement is NULL, but itscorresponding use cannot beNULL.

Explanation: The value of an input hostvariable was found to be NULL but thecorresponding use in the SELECT, VALUES, orprepared statement did not specify an indicatorvariable.

The statement cannot be processed.

User Response: Ensure you need a USINGclause. Otherwise, ensure an indicator variable isspecified only if required.

sqlcode: -309

sqlstate: 07002

SQL0310N SQL statement contains too manyhost variables.

Explanation: The maximum number of hostvariables was exceeded in the statement.

The statement cannot be processed.

User Response: Ensure the statement has fewerhost variables or is less complex.

SQL0311N The length of string host variablenumber ″<var-number>″ isnegative or greater than themaximum.

Explanation: When evaluated, the lengthspecification for the string host variable, whoseentry in the SQLDA is indicated by

<var-number> (based at 1), was negative orgreater than the maximum defined for that hostvariable.

The statement cannot be processed.

User Response: Correct the program to ensurethat the lengths of all string host variables arenot negative or that they are not greater than themaximum allowed length.

sqlcode: -311

sqlstate: 22501

SQL0312N The host variable “<host-name>”is used in a dynamic SQLstatement, a view definition, or atrigger definition.

Explanation: The host variable “<host-name>”appears in the SQL statement, but host variablesare not allowed in dynamic SQL statements, inthe SELECT statement of a view definition, or inthe triggered action of a trigger definition.

The statement cannot be processed.

User Response: Use parameter markers (?)instead of host variables for dynamic SQLstatements. Do not use host variables andparameter markers in view or trigger definitions.

sqlcode: -312

sqlstate: 42618

SQL0313N The number of host variables inthe EXECUTE or OPEN statementis not equal to the number ofinput values required.

Explanation: The number of host variablesspecified in the EXECUTE or OPEN statement isnot the same as the number of host variables orparameter markers (?) appearing in the SQLstatement.

The statement cannot be processed.

User Response: Correct the application programso the number of host variables specified in theEXECUTE or OPEN statement and the numberof host variables or parameter markers in theSQL statement are the same.

Chapter 2. SQL Messages 53

Page 62: Db2 SQL Errors

sqlcode: -313

sqlstate: 07001, 07004

SQL0314N The host variable “<name>” isincorrectly declared.

Explanation: The host variable “<name>” is notdeclared correctly for one of the followingreasons:

v The type specified is not one that is supported.

v The length specification is 0, negative, or toolarge.

v An initializer is used.

v An incorrect syntax is specified.

The variable remains undefined.

User Response: Ensure that you correctlyspecify only the declarations the databasemanager supports.

SQL0315N The host variable is incorrectlydeclared.

Explanation: The host variable is not declaredcorrectly for one of the following reasons:

v The type specified is not one that is supported.

v The length specification is 0, negative or toolarge.

v An incorrect syntax is specified.

The variable remains undefined.

User Response: Ensure that you correctlyspecify only the declarations the databasemanager supports.

SQL0317N No END DECLARE SECTIONwas found after a BEGINDECLARE SECTION.

Explanation: The end of input was reachedduring processing of a DECLARE SECTION.

Precompilation is terminated.

User Response: Add an END DECLARESECTION statement to end a DECLARESECTION.

SQL0318N An END DECLARE SECTIONwas found without a previousBEGIN DECLARE SECTION.

Explanation: An END DECLARE SECTIONstatement was found, but there was no previousBEGIN DECLARE SECTION.

The statement cannot be processed.

User Response: Enter a BEGIN DECLARESECTION before an END DECLARE SECTION.

SQL0324N The “<usage>” variable “<name>”is the wrong type.

Explanation: Either the INDICATOR variable“<name>” is not a small integer or theSTATEMENT variable “<name>” is not acharacter data type.

The statement cannot be processed.

User Response: Ensure that the variable is thecorrect type and is specified correctly.

SQL0332N There is no available conversionfor the source code page “<codepage>” to the target code page“<code page>”. Reason code“<reason-code>”.

Explanation: No conversion of data issupported from the source code page to thetarget code page. This error can occur under thefollowing conditions:

v An error has occurred executing an SQLstatement. The data cannot be processed bythe database manager.

v An error has occurred when trying to importor export a WSF or an IXF file. The import orexport will fail.

v Federated system users: the data source doesnot support the specified code pageconversion.

v DB2 Connect users: both ″source code page″and ″target code page″ may refer to a CCSIDon the host or AS/400 system.

The reason codes are as follows:

54 Message Reference, Volume 2

Page 63: Db2 SQL Errors

1 source and target code pagecombination is not supported by thedatabase manager.

2 source and target code pagecombination is either not supported bythe database manager or by theoperating system character conversionutility on the client node.

3 source and target code pagecombination is either not supported bythe database manager or by theoperating system character conversionutility on the server node.

User Response: Possible solutions include:

v Verify that data conversion between the sourceand target code page is supported by thedatabase manager. For database manager codepage support, check the Quick Beginnings. IfDB2 Connect is being used, check the DB2Connect Quick Beginnings.

v Data conversion for some code pagecombinations may be supported throughdatabase manager install options, dependingon the language group of the source or targetcode page. Ensure that the appropriate onesare installed and accessible to the databasemanager and the client application, asindicated by the reason code returned. For alist of install options, consult the QuickBeginnings or the DB2 Connect QuickBeginnings.

v Data conversion for some code pagecombinations may be supported by thedatabase manager through an operatingsystem-provided character conversion utility,depending on the language group of thesource or target code page. Check youroperating system documentation for a list ofsupported conversions and ensure that theappropriate ones are installed and accessible tothe database manager and the clientapplication, as indicated by the reason codereturned. For a list of operating systemconversion utilities used, consult the QuickBeginnings or the DB2 Connect QuickBeginnings.

v Change the unsupported code page(s) to oneof the documented pairs.

AS/400 users should be aware that AS/400CCSID 65535 is not supported. AS/400 dataencoded using CCSID 65535 must be convertedto a supported CCSID before it can be accessedusing DB2 Connect.

Federated system users: for data source codepage support, see the Installation andConfiguration Supplement.

sqlcode: -332

sqlstate: 57017

SQL0334N Overflow occurred whileperforming conversion fromcodepage ″<source>″ to codepage″<target>″. The maximum size ofthe target area was ″<max-len>″.The source string length was″<source-len>″ and itshexadecimal representation was″<string>″.

Explanation: During the execution of the SQLstatement, a code page conversion operation hasresulted in a string that is longer than themaximum size of the target object.

User Response: Modify the data to avoid theoverflow condition, depending on thecircumstances, by:

v decreasing the length of the source string orincreasing the size of the target object (pleaserefer to the note below),

v altering the operation, or,

v ensuring that the application codepage and thedatabase codepage are the same. Thiseliminates the need for codepage conversionsfor most connections.

Note: Automatic promotion of character orgraphic string data types will not occur aspart of character conversion. If theresultant string length exceeds themaximum length of the data type of thesource string then an overflow has

Chapter 2. SQL Messages 55

Page 64: Db2 SQL Errors

occurred. To correct this situation eitherchange the data type of the source stringor use data type casting to allow for anincrease in the string length due toconversion.

sqlcode: -334

sqlstate: 22524

SQL0338N An ON clause associated with aJOIN operator is not valid.

Explanation: An ON clause associated with aJOIN operator is not valid for one of thefollowing reasons.

v The join condition cannot include anysubqueries.

v Column references in an ON clause must onlyreference columns of tables that are in thescope of the ON clause (included in the samejoined-table clause as the ON clause).

v Scalar fullselects are not allowed in theexpressions of an ON clause.

v A function referenced in an ON clause of a fullouter join must be deterministic and have noexternal action.

v A dereference operation (->) cannot be used.

v A SQL function or SQL method cannot beused.

The statement cannot be processed.

User Response: Correct the ON clause toreference appropriate columns or delete anysubqueries or scalar fullselects. Remove anydereference operations, SQL functions, or SQLmethods from the ON clause.

If using full outer join ensure that all functions inthe ON clause are deterministic and have noexternal action.

sqlcode: -338

sqlstate: 42972

SQL0340N The common table expression“<name>” has the same identifieras another occurrence of acommon table expressiondefinition within the samestatement.

Explanation: The common table expressionname “<name>” is used in the definition of morethan one common table expressions in thestatement. The name used to describe a commontable expression must be unique within the samestatement.

The statement cannot be processed.

User Response: Change the name of one of thecommon table expressions.

sqlcode: -340

sqlstate: 42726

SQL0341N A cyclic reference exists betweenthe common table expressions“<name1>” and “<name2>”.

Explanation: The common table expression“<name1>” refers to “<name2>” in a FROMclause within its fullselect and “<name2>” refersto “<name1>” in a FROM clause within itsfullselects. Such forms of cyclic references are notallowed.

The statement cannot be processed.

User Response: Remove the cyclic referencefrom one of the common table expressions.

sqlcode: -341

sqlstate: 42835

SQL0342N The common table expression“<name>” cannot use SELECTDISTINCT and must use UNIONALL because it is recursive.

Explanation: There are two possibleexplanations:

56 Message Reference, Volume 2

Page 65: Db2 SQL Errors

v A fullselect within the common tableexpression “<name>” cannot start withSELECT DISTINCT because the common tableexpression is recursive.

v A fullselect within the common tableexpression “<name>” specified UNIONinstead of UNION ALL as required forrecursive common table expressions.

The statement cannot be processed.

User Response: Remove the keywordDISTINCT from the common table expression,add the keyword ALL following UNION, orremove the recursive reference within thecommon table expression.

sqlcode: -342

sqlstate: 42925

SQL0343N The column names are requiredfor the recursive common tableexpression “<name>”.

Explanation: The recursive common tableexpression “<name>” must include thespecification of the column names following theidentifier of the common table expression.

The statement cannot be processed.

User Response: Add column names followingthe identifier of the common table expression.

sqlcode: -343

sqlstate: 42908

SQL0344N The recursive common tableexpression “<name>” hasmismatched data types, lengths orcode pages for column“<column-name>”.

Explanation: The recursive common tableexpression “<name>” has a column“<column-name>” that is referred to in theiterative fullselect of the common tableexpression. The data type, length and code pageare set based on the initialization fullselect forthis column. The result of the expression for thecolumn “<column-name>” in the iterative

fullselect has a different data type, length or codepage that may result in failure to assign thevalue for the column.

The statement cannot be processed.

User Response: Correct the column used in thefullselects of the recursive common tableexpression so that the initialization columnmatches the iterative columns.

sqlcode: -344

sqlstate: 42825

SQL0345N The fullselect of the recursivecommon table expression“<name>” must be the UNION oftwo or more fullselects and cannotinclude column functions,GROUP BY clause, HAVINGclause, or an explicit joinincluding an ON clause.

Explanation: The common table expression“<name>” includes a reference to itself andtherefore:

v must be the union of two or more fullselects

v cannot include a GROUP BY clause

v cannot have column functions

v cannot include a HAVING clause

v and cannot include an explicit join with an ONclause.

The statement cannot be processed.

User Response: Change the common tableexpression by:

v making it a union of two or more fullselects

v removing any column functions, GROUP BYclause, HAVING clause, or explicit JOINincluding an ON clause.

v removing the recursive reference.

sqlcode: -345

sqlstate: 42836

Chapter 2. SQL Messages 57

Page 66: Db2 SQL Errors

SQL0346N An invalid reference to commontable expression “<name>” occursin the first fullselect, as a secondoccurrence in the same FROMclause, or in the FROM clause ofa subquery.

Explanation: The common table expression“<name>” includes an invalid reference to itselfas described by one of the following.

v A recursive reference in the first fullselectbefore the UNION ALL set operator. The firstfullselect must be an initialization and cannotinclude a recursive reference.

v More than one reference to the same commontable expression in the same FROM clause.Such references are not permitted in recursivecommon table expression.

v A recursive reference in the FROM clause of asubquery. A recursion cycle cannot be definedusing a subquery.

The statement cannot be processed.

User Response: Change one of the following:

v the fullselect prior to the union operator sothat it does not include a recursive reference

v the FROM clause containing more than onereference to the same common table expressionto just one reference

v the FROM clause of the subquery so that itdoes not reference the common tableexpression.

sqlcode: -346

sqlstate: 42836

SQL0347W The recursive common tableexpression “<name>” may containan infinite loop.

Explanation: The recursive common tableexpression called “<name>” may not complete.This warning is based on not finding specificsyntax as part of the iterative portion of therecursive common table expression. The expectedsyntax includes:

v incrementing an INTEGER column in theiterative select list by 1.

v a predicate in the where clause of the iterativeportion of the form ″counter_col < constant″ or″counter_col < :hostvar″.

The absence of this syntax in the recursivecommon table expression may result in aninfinite loop. The data or some othercharacteristic of the recursive common tableexpression may allow the successful completionof the statement anyway.

User Response: To prevent an infinite loop,include the expected syntax as described.

sqlcode: +347

sqlstate: 01605

SQL0350N LOB, DATALINK, or structuredtype column “<column-name>”cannot be used in an index, a key,a unique constraint, a generatedcolumn, or a declared temporarytable.

Explanation: Even in cases where it would notviolate the maximum size of an index, key, orunique constraint, a LOB column, DATALINKcolumn, or structured type column cannot beused in an index, key or unique constraint. Thesedata types are also not supported as columntypes of a generated column or a declaredtemporary table. This restriction includes the useof distinct type column based on a LOB orDATALINK.

The statement cannot be processed.

User Response: Remove the LOB, DATALINKor structured type column from the specificationof the index, key, unique constraint, generatedcolumn, or declared temporary table. An indexdefined on a structured type column may bedefined using an index extension.

sqlcode: -350

sqlstate: 42962

58 Message Reference, Volume 2

Page 67: Db2 SQL Errors

SQL0351N An unsupported SQLTYPE wasencountered in position“<position-number>” of theoutput SQLDA (select list).

Explanation: The element of the SQLDA atposition “<position-number>” is for a data typethat either the application requestor or theapplication server does not support. If theapplication is not using the SQLDA directly,“<position-number>” could represent theposition of an element in the select list or aparameter of a CALL statement.

The statement cannot be processed.

User Response: Change the statement toexclude the unsupported data type. For a selectstatement, remove the names of any columns inthe select-list with the unsupported data type oruse a cast in the query to cast the column to asupported data type.

sqlcode: -351

sqlstate: 56084

SQL0352N An unsupported SQLTYPE wasencountered in position“<position-number>” of the inputlist (SQLDA).

Explanation: The element of the SQLDA atposition “<position-number>” is for a data typethat either the application requestor or theapplication server does not support. If theapplication is not using the SQLDA directly,“<position-number>” could represent theposition of an input host variable, parametermarker, or a parameter of a CALL statement.

The statement cannot be processed.

User Response: Change the statement toexclude the unsupported data type.

sqlcode: -352

sqlstate: 56084

SQL0355N The column ″<column-name>″, asdefined, is too large to be logged.

Explanation: Large Object data types (BLOB,CLOB, and DBCLOB) may be created in sizes upto 2 gigabytes (2147483647 bytes). Logging ofdata values is allowed only upon objects whichare less than or equal to than 1 gigabyte(1073741823 bytes) in size. Therefore, largeobjects greater than 1 gigabyte in size can not belogged.

User Response: Either explicitly indicatelogging of data is not required, by using theNOT LOGGED phrase during column creation,or reduce the maximum size of the column to 1gigabyte or below.

sqlcode: -355

sqlstate: 42993

SQL0357N The DB2 Data Links Manager“<name>” is not currentlyavailable. Reason code =“<reason-code>”.

Explanation:

The statement requires processing on the DB2Data Links Manager “<name>”. The DB2 DataLinks Manager is not currently available asindicated by the reason code.

01 The DB2 Data Links Manager is notavailable.

02 The database server, instance, ordatabase from which the operation wasattempted is not registered with theappropriate DB2 Data Links Manager.

03 Access to the DB2 Data Links Manageris currently disallowed.

04 The DB2 Data Links Manager isregistered with the database but is anunknown server.

05 An error occurred while communicatingwith the DB2 Data Links Manager.

06 The installation type of the DB2 DataLinks Manager is not compatible withthat registered to the database.

Chapter 2. SQL Messages 59

Page 68: Db2 SQL Errors

The statement cannot be processed.

User Response: The action depends on thereason code as follows.

01 The DB2 Data Links Manager or acommunication link may be down. Waita while and try again, or check with theDB2 Data Links Manager administrator.If the problem persists, disconnect theapplication from the database, and retryafter connecting again.

02 Register the database server, instance, ordatabase with the DB2 Data LinksManager.

03 Access to the DB2 Data Links Manageris disallowed until DB2 can ensure thatit is in a consistent state. Wait until DB2does this asynchronously. It is possiblethat DB2 is unable to do this because ofconditions in other reason codes. So, ifthe problem persists, check thedb2diag.log file of the instance to findout the condition and correct thatcondition. For more information, refer tothe Administration Guide forinformation on crash recovery for DB2Data Links Managers.

04 Check that the DB2 Data Links Managerconfigured to the database is availableon the network.

05 Check that the DB2 Data Links Managerand the communication link are up. Ifthe problem persists, disconnect theapplication from the database, and retryafter connecting again.

06 If the DB2 Data Links Manager wasinstalled for DFS, then it must added asa CELL to the database. If it wasinstalled for native file systems, then itmust be added as a NODE. Refer to theCommand Reference for details on ADDDATALINKS MANAGER command.

sqlcode: -0357

sqlstate: 57050

SQL0358N Unable to access file referencedby a DATALINK value. Reasoncode = “<reason-code>”.

Explanation: A DATALINK value could not beassigned. The possible reason codes are asfollows:

21 DATALINK value data location formatis not valid.

22 DATALINK value DB2 Data Linksmanager is not registered with thedatabase.

23 DATALINK linktype value is not valid.

24 DATALINK value referenced file cannotbe found by a DB2 Data Links Manager.

25 DATALINK value referenced file isalready linked to a database.

26 DATALINK value referenced file cannotbe accessed for linking. It may be adirectory, a symbolic link or a file withpermission bit for set user ID (SUID) onor set group ID (SGID) on.

27 DATALINK value data location orcomment is too long.

28 Existing registry on the DB2 Data LinksManager does not allow this file to belinked (No matching prefix on DLFM).

29 The DB2 Data Links Manager does notauthorize the DB2 user to link this file.

30 A link is already in progress for the fileby another application.

31 File copy by the DB2 Data LinksManager is not complete for the file tobe unlinked. The statement cannot beprocessed.

User Response: The action is based on thereason code as follows.

21 Correct the data location format. Ifhostname is not specified, DB2 can usethe local hostname as default only if thedatabase manager configurationparameter Datalinks is set to YES.

22 Ensure that the correct DB2 Data Links

60 Message Reference, Volume 2

Page 69: Db2 SQL Errors

Manager is specified and if so have itregistered to the database. RegisteredDB2 Data Links Managers are ignoredunless the database managerconfiguration parameter Datalinks is setto YES.

23 Correct the linktype value.

24 Check that the correct file is specifiedand that the file exists.

25 Either unlink the existing reference tothe file or do not specify the file in thisstatement.

26 Linking of directories is not allowed.Use the actual file name, not thesymbolic link. If SUID or SGID is on,this file cannot be linked using aDATALINK type.

27 Reduce the length of the data locationvalue or the comment.

28 Contact the DB2 Data Links Mangeradministrator to add the registrationnecessary to link this file.

29 Contact the DB2 Data Links Manageradministrator to get the necessaryauthorization.

30 Do not link this file or retry later.

31 Allow some time for the file copy tocomplete and retry later.

sqlcode: -0358

sqlstate: 428D1

SQL0359N The range of values for theidentity column is exhausted.

Explanation: DB2 attempted to generate a valuefor an identity column, however all allowablevalues for the identity column have already beenassigned.

The statement cannot be processed.

User Response: Redefine the table with a largerrange of values for the identity column. To dothis, drop the existing table. Recreate the table

with a different data type for the identitycolumn, specifying a data type that has a largerrange of values than the current data type for theidentity column.

sqlcode: -359

sqlstate: 23522

SQL0360W DATALINK values may not bevalid because the table“<table-name>” is in DatalinkReconcile Pending (DRP) orDatalink Reconcile Not Possible(DRNP) state.

Explanation: DATALINK values in table“<table-name>” may not be valid because thetable is either in Datalink Reconcile Pending(DRP) or Datalink Reconcile Not Possible(DRNP) state. While in either of these states,control of the files on the DB2 Data LinksManager is not guaranteed.

Statement processing continues.

User Response: Refer to the AdministrationGuide for information on Datalink ReconcilePending (DRP) and Datalink Reconcile NotPossible (DRNP) states to take appropriateaction.

sqlcode: +360

sqlstate: 01627

SQL0368N The DB2 Data Links Manager“<name>” is not registered to thedatabase.

Explanation: A DATALINK value already existsthat references the DB2 Data Links Manager“<name>” that is not registered to the database.

The statement cannot be processed.

User Response: Contact the databaseadministrator to determine why the DB2 DataLinks Manager is no longer registered.

sqlcode: -0368

sqlstate: 55022

Chapter 2. SQL Messages 61

Page 70: Db2 SQL Errors

SQL0370N The parameter in position “<n>”must be named in the CREATEFUNCTION statement forLANGUAGE SQL function“<name>”.

Explanation: All parameters for functionsdefined with LANGUAGE SQL must have aparameter-name for each parameter.

The statement cannot be processed.

User Response: Include a parameter name foreach parameter of the function.

sqlcode: -370

sqlstate: 42601

SQL0372N Only one IDENTITY or ROWIDcolumn is allowed in a table.

Explanation: An attempt was made to do oneof the following:

v Create a table with more than one IDENTITYcolumn.

v Add an IDENTITY column to a table whichalready has one.

v Create a table with more than one ROWIDcolumn.

v Add a ROWID column to a table whichalready has one.

The statement cannot be processed.

User Response: For a CREATE TABLEstatement, select only one column to have theROWID data type or the IDENTITY attribute. Foran ALTER TABLE statement, a ROWID columnor IDENTITY column already exists for the table.Do not attempt to add another column with datatype ROWID or with the IDENTITY attribute tothe table.

sqlcode: -372

sqlstate: 428C1

SQL0373N The DEFAULT clause cannot bespecified for GENERATEDcolumn “<column-name>”.

Explanation: A DEFAULT clause may not bespecified for a column which has been identifiedas a GENERATED column.

The statement cannot be processed.

User Response: Remove the DEFAULT clauseand resubmit the statement.

sqlcode: -373

sqlstate: 42623

SQL0374N The “<clause>” clause has notbeen specified in the CREATEFUNCTION statement forLANGUAGE SQL function“<function name>” but anexamination of the function bodyreveals that it should be specified.

Explanation: The following situations may bethe cause of this error.

NOT DETERMINISTIC must be specified ifeither of the following conditions apply withinthe body of the function:

v a function that has the NOT DETERMINISTICproperty is called,

v a special register is accessed.

READS SQL DATA must be specified if the bodyof the function defined with LANGUAGE SQLcontains a subselect or if it calls a function thatcan read sql data.

EXTERNAL ACTION must be specified if thebody of the function defined with LANGUAGESQL calls a function that has the EXTERNALACTION property.

The statement cannot be processed.

User Response: Either specify the clause orchange the function body.

sqlcode: -374

sqlstate: 428C2

62 Message Reference, Volume 2

Page 71: Db2 SQL Errors

SQL0385W Assignment to an SQLSTATE orSQLCODE variable in an SQLroutine may be over-written anddoes not activate any handler.

Explanation: The SQL routine includes at leastone statement that assigns a value to theSQLSTATE or SQLCODE special variables. Thesevariables are assigned values by processing ofSQL statements in the SQL routine. The valueassigned may therefore be over-written as aresult of the SQL statement processing.Furthermore, the assignment of a value to theSQLSTATE special variable does not activate anyhandlers.

The routine definition was processedsuccessfully.

User Response: None required. Remove anyassignments to the SQLSTATE or SQLCODEspecial variable to prevent the warning.

sqlcode: +385

sqlstate: 01643

SQL0388N In a CREATE CAST statement forfunction “<function-name>”,either the source “<source datatype name>” and target“<target-data-type-name>” areboth built-in types or they are thesame type.

Explanation: One of the data types must be auser-defined type. The source type and the targettype cannot be the same data type.

The statement cannot be processed.

User Response: Change the data type of eitherthe source or the target.

sqlcode: -388

sqlstate: 428DF

SQL0389N The specific function instance“<specific name>” identified in aCREATE CAST statement eitherhas more than one parameter, hasa parameter that does not matchthe source data type, or returns adata type that does not match thetarget.

Explanation: A cast function must

v have exactly one parameter,

v the data type of the parameter must be thesame as the source data type,

v the result data type must be the same as thetarget data type.

The statement cannot be processed.

User Response: Either chose a different functioninstance, change the source data type, or changethe target data type.

sqlcode: -389

sqlstate: 428DG

SQL0390N The function ″<function-name>″resolved to specific function″<specific-name>″ that is not validin the context where it is used.

Explanation: A function resolved to a specificfunction that is not valid in the context where itis used. If ″<specific-name>″ is an empty string,then the function resolved to the built-in functionidentified by ″<function-name>″. Some of thepossible situations include:

v the specific function is a table function whereonly a scalar, column, or row function isexpected (such as creating a sourced scalarfunction).

v the specific function is a scalar, column, or rowfunction where only a table function isexpected (such as in the FROM clause of aquery).

v the specific function is a row function whereonly a scalar or column function is expected.

The statement cannot be processed.

User Response: Ensure that the correct function

Chapter 2. SQL Messages 63

Page 72: Db2 SQL Errors

name and arguments are specified and that thecurrent path includes the schema where thecorrect function is defined. You may need tochange the function name, the current path(using SET CURRENT FUNCTION PATH or theFUNCPATH bind option), or change the contextin which the function is used.

sqlcode: -390

sqlstate: 42887

SQL0391N Invalid use of the row basedfunction ″<function_name>″.

Explanation: The statement uses a row basedfunction ″<function_name>″ that cannot be usedfor one of the following reasons:

v The function is used in a GROUP BY or aHAVING clause but is not also included in theselect list.

v The function cannot be used in this contextbecause of the recursive nature of thestatement.

v The function cannot be used in a checkconstraint.

v The function cannot be used in a generatedcolumn.

v The function cannot be used in a viewdefinition where the WITH CHECK OPTIONclause is specified or any view dependent onsuch a view having the WITH CHECKOPTION clause specified.

v The function has an argument that does notresolve to a row of a base table. This would

include the situation involving a result columnof an outer join where NULL producing rowsare possible.

v The function cannot be used on rows from areplicated summary table.

The statement cannot be processed.

User Response: Remove ″<function-name>″from the context where it is not allowed.

sqlcode: -391

sqlstate: 42881

SQL0392N SQLDA provided for cursor″<cursor>″ has been changed fromthe previous fetch.

Explanation: The application is running withDB2 rules, and has requested that LOB data bereturned as a LOB in one FETCH statement, andas a locator in another FETCH statement. This isnot permitted.

User Response: The statement cannot beexecuted.

Either do not use DB2 rules, or change theapplication to not change the data type codefrom LOB to locator (or the reverse) in theSQLDA between successive fetches.

sqlcode: -392

sqlstate: 42855

SQL0400 - SQL0499

SQL0401N The data types of the operands forthe operation “<operator>” are notcompatible.

Explanation: The operation “<operator>”appearing within the SQL statement has amixture of numeric and nonnumeric operands, orthe operation operands are not compatible.

Federated system users: this data type violationcan be at the data source or at the federatedserver.

Some data sources do not provide theappropriate values for “<operator>”. In thesecases the message token will have the followingformat: “<data source>:UNKNOWN”, indicatingthat the actual value for the specified data sourceis unknown.

The statement cannot be processed.

User Response: Check all operand data types toensure that they are comparable and compatiblewith the statement usage.

64 Message Reference, Volume 2

Page 73: Db2 SQL Errors

If all the SQL statement operands are correct andaccessing a view, check the data types of all theview operands.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the Problem DeterminationGuide for procedures to follow to identify thefailing data source) and examine the data typerestrictions for that data source.

sqlcode: -401

sqlstate: 42818

SQL0402N The data type of an operand of anarithmetic function or operation“<operator>” is not numeric.

Explanation: A nonnumeric operand is specifiedfor the arithmetic function or operator“<operator>”.

The statement cannot be processed.

User Response: Correct the SQL statementsyntax so all specified function or operatoroperands are numeric.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine theoperators applied to that data source.

sqlcode: -402

sqlstate: 42819

SQL0403W The newly defined alias″<name>″ resolved to the object″<name2>″ which is currentlyundefined.

Explanation: The alias <name> has beendefined upon:

v a table or view which currently is not definedin the database

v another alias which resolves to a table or viewwhich is not defined in the database.

The object <name2> is the undefined object. Thisobject must exist before any SQL statement

(other than CREATE ALIAS) can successfully usethe newly created alias. The specified alias<name> is created.

An inoperative view is considered to beundefined for the purposes of creating an alias.

User Response: Ensure that the undefinedobject <name2> is defined prior to using thenewly created alias in an SQL statement (otherthan CREATE ALIAS).

sqlcode: +403

sqlstate: 01522

SQL0404N A string in the UPDATE orINSERT statement is too long forcolumn “<name>”.

Explanation: An INSERT or UPDATE statementspecifies a value that is longer than themaximum-length string that can be stored in thecolumn indicated.

The statement cannot be processed.

Note: “<name>” may or may not be returned inSQLCA, depending on the INSERT orUPDATE statement syntax.

User Response: Check the length of the objectcolumn and correct the program or SQLstatement so the insert or update string does notexceed the maximum length.

sqlcode: -404

sqlstate: 22001

SQL0405N The numeric literal “<literal>” isnot valid because its value is outof range.

Explanation: The specified numeric literal is notin the acceptable range.

The proper ranges for SQL values are as follows:

v For FLOAT values:

– 0

– In the positive range of +2.225E-307 to+1.79769E+308

Chapter 2. SQL Messages 65

Page 74: Db2 SQL Errors

– In the negative range of -1.79769E+308 to-2.225E-307.

v -9999999999999999999999999999999. to9999999999999999999999999999999. forDECIMAL values

v -2147483647 to 2147483647 for INTEGERvalues

v -32768 to +32767 for small integer(SMALLINT) values.

In certain contexts the literal may have furtherrestrictions that result in this error. For moreinformation, look up the statement or clause inthe SQL Reference.

Federated system users: this range violation canbe at the data source or at the federated server.The proper ranges for SQL values located in datasource tables depend on the data source. Todetermine the correct range, see the appropriatedocumentation for the data source. Some datasources do not provide the appropriate values for“<literal>”. In these cases the message token willhave the following format: “<datasource>:UNKNOWN”, indicating that the actualvalue for the specified data source is unknown.

The statement cannot be processed.

User Response: Reduce the literal value to theappropriate size.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine thedata range restrictions for that data source.

sqlcode: -405

sqlstate: 42820

SQL0406N A numeric value in the UPDATEor INSERT statement is notwithin the range of its targetcolumn.

Explanation: The value of a host variable or anumeric value calculated during processing ofthe UPDATE or INSERT SQL statement is

outside the target column range. This problemmay be caused by the values occurring in theobject column, the SQL operation beingperformed on those values, or both.

The statement cannot be processed.

User Response: See the explanation of messageSQL0405 for ranges allowed for numeric datatypes.

NOTE: For system catalog updates, see the SQLReference for valid ranges in various columns ofupdateable catalogs.

sqlcode: -406

sqlstate: 22003

SQL0407N Assignment of a NULL value to aNOT NULL column “<name>” isnot allowed.

Explanation: One of the following occurred:

v The update or insert value was NULL, but theobject column was declared as NOT NULL inthe table definition. Consequently:

– NULL values cannot be inserted into thatcolumn.

– An update cannot set values in that columnto NULL.

– A SET transition-variable statement in atrigger cannot set values in that column toNULL.

v The update or insert value was DEFAULT, butthe object column was declared as NOT NULLwithout WITH DEFAULT in the tabledefinition. Consequently:

– A default value of NULL cannot be insertedinto that column.

– An update cannot set default values ofNULL in that column.

– A SET transition-variable statement in atrigger cannot set default values of NULL inthat column.

v The column name list for the INSERTstatement omits a column declared NOTNULL and without WITH DEFAULT in thetable definition.

66 Message Reference, Volume 2

Page 75: Db2 SQL Errors

v The view for the INSERT statement omits acolumn declared NOT NULL and withoutWITH DEFAULT in the base table definition.

If the value for “<name>” is of the form“TBSPACEID=n1, TABLEID=n2, COLNO=n3”,then the column name from the SQL statementwas not available when the error was issued. Thevalues provided identify the tablespace, table,and column number of the base table that doesnot allow NULL value.

Federated system users: this situation can bedetected by the federated server or by the datasource. Some data sources do not provide theappropriate values for “<name>”. In these casesthe message token will have the followingformat: “<data source>:UNKNOWN”, indicatingthat the actual value for the specified data sourceis unknown.

The statement cannot be processed.

Note: Under some circumstances, the token“<name>” may not be filled in (sqlerrmcfield of the SQLCA not filled in).

User Response: Correct the SQL statement afterexamining the object table definition todetermine which columns of the table have theNOT NULL attribute and do not have the WITHDEFAULT attribute.

If the value for “<name>” is of the form“TBSPACEID=n1, TABLEID=n2, COLNO=n3”,you can determine the table name and columnname using the following query:

SELECT C.TABSCHEMA, C.TABNAME, C.COLNAMEFROM SYSCAT.TABLES AS T,

SYSCAT.COLUMNS AS CWHERE T.TBSPACEID = n1AND T.TABLEID = n2AND C.COLNO = n3AND C.TABSCHEMA = T.TABSCHEMAAND C.TABNAME = T.TABNAME

The table and column identified by this querymay be the base table of a view for which theSQL statement failed.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine theobject definition for that data source. Rememberthat the defaults (NULL and NOT NULL) are notnecessarily the same between data sources.

sqlcode: -407

sqlstate: 23502

SQL0408N A value is not compatible withthe data type of its assignmenttarget. Target name is “<name>”.

Explanation: The data type of the value to beassigned to the column, parameter, SQL variable,or transition variable by the SQL statement isincompatible with the declared data type of theassignment target. Both must be:

v Numeric

v Character

v Graphic

v Dates or character

v Times or character

v Timestamps or character

v Datalinks

v The same distinct types

v Reference types where the target type of thevalue is a subtype of the target type of thecolumn.

v The same user-defined structured types. Or,the static type of the value must be a subtypeof the static type (declared type) of the target.

The statement cannot be processed.

User Response: Examine the statement andpossibly the target table or view to determine thetarget data type. Ensure the variable, expression,or literal value assigned has the proper data typefor the assignment target.

sqlcode: -408

sqlstate: 42821

Chapter 2. SQL Messages 67

Page 76: Db2 SQL Errors

SQL0409N The operand of a COUNTfunction is not valid.

Explanation: As specified in the SQL statement,the operand of the COUNT function does notconform to the rules of SQL syntax. OnlyCOUNT(*) and COUNT(DISTINCT column) areallowed.

The statement cannot be processed.

User Response: Specify COUNT(*) orCOUNT(DISTINCT column).

NOTE: This message is only applicable toversions of DB2 prior to Version 2.

sqlcode: -409

sqlstate: 42607

SQL0410N The floating point literal“<literal>” contains more than 30characters.

Explanation: The specified floating point literalis more than 30 characters in length, excludingleading zeros. A floating point literal has amaximum length of 30 characters.

The statement cannot be processed.

User Response: Shorten the specified literal.

sqlcode: -410

sqlstate: 42820

SQL0412N Multiple columns are returnedfrom a subquery that is allowedonly one column.

Explanation: In the context of the SQLstatement, a fullselect is specified that can haveonly one column as a result.

The statement cannot be processed.

User Response: Specify only one column whenonly a scalar fullselect is allowed.

sqlcode: -412

sqlstate: 42823

SQL0413N Overflow occurred duringnumeric data type conversion.

Explanation: During processing of the SQLstatement, an overflow condition arose whenconverting from one numeric type to another.Numeric conversion is performed according tothe standard rules of SQL.

Federated system users: numeric conversion canoccur at the federated server, at data sources, orboth.

The statement cannot be processed. No data wasretrieved, updated, or deleted.

User Response: Examine the syntax of the SQLstatement to determine the cause of the error. Ifthe problem is data-dependent, it may benecessary to examine the data processed at thetime of the error.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine thedata range restrictions for that data source.

sqlcode: -413

sqlstate: 22003

SQL0415N The data types of correspondingcolumns are not compatible in afullselect that includes a setoperator or in the multiple rowsof a VALUES clause of anINSERT or fullselect.

Explanation: There are various statementswhere this error may occur.

v It may occur within a SELECT or VALUESstatement that includes set operations(UNION, INTERSECT, or EXCEPT). Thecorresponding columns of the subselects orfullselects that make up the SELECT orVALUES statements are not compatible.

v It may occur within an INSERT statement thatis inserting multiple rows. In this case, thecorresponding columns of the rows specifiedin the VALUES clause are not compatible.

68 Message Reference, Volume 2

Page 77: Db2 SQL Errors

v It may occur within a SELECT or VALUESstatement where the VALUES clause is usedwith multiple rows. In this case, thecorresponding columns of the rows specifiedin the VALUES clause are not compatible.

The columns are incompatible for one of thefollowing reasons:

v Both columns are not characters

v Both columns are not numbers

v Both columns are not dates

v Both columns are not times

v Both columns are not timestamps

v Both columns are not graphic

v Both columns are not the same user-defineddistinct type.

If the data type of a column is character, date,time, or timestamp the corresponding columnmay be a character string constant.

The statement cannot be processed.

User Response: Correct the column names usedin the SELECT statements or the expressions inthe VALUES clause so that all correspondingcolumns are compatible types.

sqlcode: -415

sqlstate: 42825

SQL0416N You cannot specify a resultcolumn longer than 254 bytes inthe SELECT or VALUESstatements connected by a setoperator other than UNION ALL.

Explanation: One of the SELECT or VALUESstatements connected by a set operator specifiesa result column that is longer than 254 bytes.VARCHAR or VARGRAPHIC result columnslonger than 254 bytes can be used only with theUNION ALL set operator.

The statement cannot be processed.

User Response: Either use the UNION ALLoperator instead of UNION, or remove the resultcolumns longer than 254 bytes from the SELECTor VALUES statements.

sqlcode: -416

sqlstate: 42907

SQL0417N A statement string to be preparedcontains parameter markers as theoperands of the same operator.

Explanation: The statement string specified asthe object of a PREPARE or EXECUTEIMMEDIATE contains a predicate or expressionin which parameter markers have been used asoperands of the same operator without a CASTspecification. For example:

? > ?

The statement cannot be processed.

User Response: This syntax is not supported.Use a CAST specification to give at least one ofthe parameter markers a data type.

sqlcode: -417

sqlstate: 42609

SQL0418N A statement contains a use of aparameter marker that is notvalid.

Explanation: Untyped parameter markerscannot be used:

v in a SELECT list

v as the sole argument of a datetime arithmeticoperation

v in some cases as the sole argument of a scalarfunction

Parameter markers can never be used:

v in a statement that is not a prepared statement

v in the fullselect of a CREATE VIEW statement

v in the triggered action of a CREATE TRIGGERstatement

v in a query captured by DB2 Query Patroller

The statement cannot be processed.

User Response: Correct the syntax of thestatement. If untyped parameter markers are notallowed, use the CAST specification to give theparameter marker a data type.

Chapter 2. SQL Messages 69

Page 78: Db2 SQL Errors

sqlcode: -418

sqlstate: 42610

SQL0419N A decimal divide operation is notvalid because the result wouldhave a negative scale.

Explanation: A specified decimal division is notvalid because it will result in a negative scale.

The formula used internally to calculate the scaleof the result for decimal division is:

Scale of result = 31 - np + ns - ds

where np is the precision of the numerator, ns isthe scale of the numerator, and ds is the scale ofthe denominator.

Federated system users: Decimal division canoccur at the federated server, at data sources, orboth. The specified decimal division results in aninvalid scale for that data source.

The statement cannot be processed.

User Response: Examine and ensure theprecision and scale of all columns that mayparticipate in a decimal division. Note that aninteger or small integer value may be convertedto a decimal for this calculation.

Federated system users: if the reason isunknown, isolate the problem to the data sourcefailing the request (see the problemdetermination guide for procedures to follow toidentify the failing data source) and examine thedata range restrictions for that data source.

sqlcode: -419

sqlstate: 42911

SQL0420N Invalid character found in acharacter string argument of thefunction “<function-name>”.

Explanation: The function “<function-name>”has a character string argument that contains acharacter that is not valid in a numeric SQLconstant. The function may have been called as aresult of using the CAST specification with

“<function-name>” as the target data type. Thefunction or data type used in the SQL statementmay be a synonym for “<function-name>”.

If a decimal character is specified in theDECIMAL function then that is the character thatmust be used in place of the default decimalcharacter.

User Response: Ensure that the characterstrings that are being converted to numeric typescontain only characters that are valid in numericSQL constants, using the decimal character, ifspecified.

sqlcode: -420

sqlstate: 22018

SQL0421N The operands of a set operator ora VALUES clause do not have thesame number of columns.

Explanation: The operands of a set operatorsuch as UNION, EXCEPT, or INTERSECT musthave the same number of columns. The rows in aVALUES clause must have the same number ofcolumns.

The statement cannot be processed.

User Response: Change the SQL statement soeach operand, or each row of a VALUES clause,has exactly the same number of columns.

sqlcode: -421

sqlstate: 42826

SQL0423N LOB locator variable“<variable-position>” does notcurrently represent any value.

Explanation: A locator variable is in error.Either it has not had a LOB value assigned to it,or the locator associated with the variable hasbeen freed.

If ″<variable-position>″ is provided, it gives theordinal position of the variable in error in the setof variables specified. Depending on when theerror is detected, the database manager may notbe able to determine ″<variable-position>″.

Instead of an ordinal position,

70 Message Reference, Volume 2

Page 79: Db2 SQL Errors

″<variable-position>″ may have the value″function-name RETURNS″, which means thatthe locator value returned from the user-definedfunction identified by function-name is in error.

User Response: Correct the program so that theLOB locator variables used in the SQL statementhave valid LOB values before the statement isexecuted. A LOB value can be assigned to alocator variable by means of a SELECT INTOstatement, a VALUES INTO statement, or aFETCH statement.

sqlcode: -423

sqlstate: 0F001

SQL0426N Dynamic commit invalid forapplication executionenvironment.

Explanation: An application executing in aCONNECT TYPE 2 environment or DistributedTransaction Processing (DTP) environment suchas CICS has attempted to execute an SQLdynamic COMMIT statement. The SQL dynamicCOMMIT statement cannot be executed in thisenvironment.

Federated system users: SQL dynamic COMMITstatements cannot be executed during apass-through session.

User Response:

v Use the commit statement provided by theDTP environment to perform the commit. Forexample, in a CICS environment this would bethe CICS SYNCPOINT command.

v If this statement was executed within a storedprocedure, remove the statement entirely.

Federated system users: Either comment out theCOMMIT statement or code it as a staticstatement. Then resubmit your program.

sqlcode: -426

sqlstate: 2D528

SQL0427N Dynamic rollback invalid forapplication executionenvironment.

Explanation: An application executing in aCONNECT TYPE 2 environment or DistributedTransaction Processing (DTP) environment suchas CICS has attempted to execute an SQLdynamic ROLLBACK statement. The SQLdynamic ROLLBACK statement cannot beexecuted in this environment.

Federated system users: SQL dynamicROLLBACK statements cannot be executedduring a pass-through session.

User Response:

v Use the rollback statement provided by theDTP environment to perform the rollback. Forexample, in a CICS environment this would bethe CICS SYNCPOINT ROLLBACK command.

v If this statement was executed within a storedprocedure, remove the statement entirely.

Federated system users: Either comment out theROLLBACK statement or code it as a staticstatement. Then resubmit your program.

sqlcode: -427

sqlstate: 2D529

SQL0428N The SQL statement is onlyallowed as the first statement in aunit of work.

Explanation: The SQL statement that wasissued is required to execute before any otherSQL statement that initiates a unit of work.Following are possible situations:

v The SQL statement must be first in the unit ofwork and SQL has been issued against theconnection within the unit of work.

v The SQL statement must be first in the unit ofwork and a WITH HOLD cursor is currentlyopen for the connection.

Note that when the statement is DISCONNECTALL, it causes the DISCONNECT to be directed

Chapter 2. SQL Messages 71

Page 80: Db2 SQL Errors

against all connections, so the request will fail ifany of the connections violate the aboverestrictions.

User Response: Issue a COMMIT orROLLBACK prior to processing the SQLstatement. If there are any WITH HOLD cursors,these will need to be closed. If the statement isSET INTEGRITY, remove the COMMITTHRESHOLD clause.

sqlcode: -428

sqlstate: 25001

SQL0429N The maximum number ofconcurrent LOB locators has beenexceeded.

Explanation: A maximum of 32,000 concurrentLOB locators per unit of work, is supported byDB2.

User Response: Modify the program so that itrequires fewer concurrent LOB locators and tryagain.

sqlcode: -429

sqlstate: 54028

SQL0430N User defined function“<function-name>” (specific name“<specific-name>”) hasabnormally terminated.

Explanation: An abnormal termination hasoccurred while the named UDF was in control.

User Response: The UDF needs to be fixed.Contact the author of the UDF or your databaseadministrator. Until it is fixed, the UDF shouldnot be used.

sqlcode: -430

sqlstate: 38503

SQL0431N User defined function“<function-name>” (specific name“<specific-name>”) has beeninterrupted by the user.

Explanation: A user/client interrupt hasoccurred while the named UDF was in control.

User Response: This could indicate someproblem in the UDF, such as an infinite loop orwait. If the problem persists, (i.e. the need tointerrupt results in the same error condition),then contact the author of the UDF or yourdatabase administrator. Until the problem isfixed, the UDF should not be used.

sqlcode: -431

sqlstate: 38504

SQL0432N A parameter marker cannot havethe user defined type name orreference target type name“<udt-name>”.

Explanation: A parameter marker in thestatement has been determined as having theuser-defined type “<udt-name>” or a referencetype with the target type “<udt-name>” basedon the context in which it is used. A parametermarker cannot have a user-defined type orreference type as its data type unless it is part ofan assignment (VALUES clause of INSERT orSET clause of UPDATE) or it is being explicitlycast to a user-defined distinct data type orreference data type using the CAST specification.

The statement cannot be processed.

User Response: Use an explicit cast to theuser-defined distinct data type or reference datatype for the parameter marker. An alternative isto cast the columns that are user-defined distinctdata types to their corresponding source datatype or columns that are reference data types totheir corresponding representation type.

sqlcode: -432

sqlstate: 42841

72 Message Reference, Volume 2

Page 81: Db2 SQL Errors

SQL0433N Value “<value>” is too long.

Explanation: The value “<value>” requiredtruncation by a system (built-in) cast oradjustment function, which was called totransform the value in some way. The truncationis not allowed where this value is used.

The value being transformed is one of thefollowing:

v an argument to a user defined function (UDF)

v an input to the SET clause of an UPDATEstatement

v a value being INSERTed into a table

v an input to a cast or adjustment function insome other context.

v a recursively referenced column whose datatype and length is determined by theinitialization part of recursion and may growin the iterative part of the recursion.

The statement has failed.

User Response: If “<value>” is a literal stringin the SQL statement, it is too long for itsintended use.

If “<value>” is not a literal string, examine theSQL statement to determine where thetransformation is taking place. Either the input tothe transformation is too long, or the target is tooshort.

Correct the problem and rerun the statement.

sqlcode: -433

sqlstate: 22001

SQL0434W An unsupported value for clause“<clause>” has been replaced bythe value “<value>”.

Explanation: The value that was specified forclause “<clause>” is not supported and has beenreplaced with the identified supported value“<value>”.

User Response: No change is required if theselected value is acceptable. Otherwise, specify avalue that is valid for “<clause>”.

sqlcode: +434

sqlstate: 01608

SQL0435N An invalid SQLSTATE“<sqlstate>” is specified in thefunction RAISE_ERROR.

Explanation: The SQLSTATE specified in theRAISE_ERROR function does not conform to therules for an application defined SQLSTATE.

User Response: Correct the SQLSTATE specifiedin the function RAISE_ERROR. The SQLSTATEmust be a character string containing exactly 5characters. It must be of type CHAR definedwith a length of 5, or type VARCHAR definedwith a length of 5 or greater. The SQLSTATEvalue must follow the rules forapplication-defined SQLSTATEs as follows:

v Each character must be from the set of digits(’0’ through ’9’) or non-accented upper caseletters (’A’ through ’Z’)

v The SQLSTATE class (first two characters)cannot be ’00’, ’01’, or ’02’ since these are noterror classes.

v If the SQLSTATE class (first two characters)starts with the character ’0’ through ’6’ or ’A’through ’H’, then the subclass (last threecharacters) must start with a character in therange ’I’ through ’Z’

v If the SQLSTATE class (first two characters)starts with the character ’7’, ’8’, ’9’ or ’I’though ’Z’, then the subclass (last threecharacters) can be any of ’0’ through ’9’ or ’A’through ’Z’.

sqlcode: -435

sqlstate: 428B3

SQL0436N The terminating NULL characteris missing from the C languageNULL-terminated character stringhost variable.

Explanation: The value of an input hostvariable code in the C programming languagerequires a NULL-terminator character at the endof the string.

The statement cannot be processed.

Chapter 2. SQL Messages 73

Page 82: Db2 SQL Errors

User Response: Ensure that the value of theinput host variable is terminated by theNULL-terminator character.

sqlcode: -436

sqlstate: 22024

SQL0437W Performance of this complexquery may be sub-optimal.Reason code: “<reason-code>”.

Explanation: The statement may achievesub-optimal performance since the complexity ofthe query requires resources that are notavailable or optimization boundary conditionswere encountered. The following is a list ofreason codes:

1 The join enumeration method wasaltered due to memory constraints

2 The join enumeration method wasaltered due to query complexity

3 Optimizer cost underflow

4 Optimizer cost overflow

5 Query optimization class was too low

6 Optimizer ignored an invalid statistic

The statement will be processed.

User Response: One or more of the following:

v Increase the size of the statement heap(stmtheap) in the database configuration file.(Reason code 1)

v Break the statement up into less complex SQLstatements. (Reason codes 1,2,3,4)

v Ensure predicates do not over-specify theanswer set (Reason code 3)

v Change the current query optimization class toa lower value (Reason codes 1,2,4)

v Issue Runstats for the tables involved in thequery (Reason codes 3,4)

v Change the current query optimization class toa higher value (Reason code 5)

v Reissue RUNSTATS for both the tablesinvolved in the query and their correspondingindexes, i.e. use the AND INDEXES ALL

clause so that table and index statistics areconsistent (Reason code 6)

sqlcode: +437

sqlstate: 01602

SQL0438N Application raised error withdiagnostic text: “<text>”.

Explanation: This error occurred as a result ofexecution of the RAISE_ERROR function or theSIGNAL SQLSTATE statement in a trigger.

User Response: See application documentation.

sqlcode: -438

sqlstate: application-defined

SQL0439N User defined function“<function-name>” is indirectlyimplemented by function“<source-function>” whichresulted in error “<sqlcode>”.

Explanation: The function “<function-name>”was referenced in the user’s statement. However,because the SOURCE clause was used in thedefinition of this function, it has turned out thatfunction “<source-function>” actuallyimplements the function. (It may be a direct oran indirect definition path from“<function-name>” to “<source-function>”.) Atcompile time, the encapsulator (DB2 code whichacts on behalf of a function) for“<source-function>” has returned the erroridentified by “<sqlcode>”.

User Response: The actual error situation needsto be understood better before corrective actioncan be taken. Look up the explanation for“<sqlcode>”. If “<source-function>” is a built-infunction, the “<sqlcode>” should indicate theproblem, as in the case where a built-in functionis directly referenced in the user’s statement. If“<source-function>” is a user defined function,the message most likely indicates a problem withone of the arguments or with the result from thefunction.

Correct the problem and try again.

74 Message Reference, Volume 2

Page 83: Db2 SQL Errors

sqlcode: -439

sqlstate: 428A0

SQL0440N No function by the name“<function-name>” havingcompatible arguments was foundin the function path.

Explanation: This occurs in a reference tofunction “<function-name>”, where“<function-name>” can refer to a method, whenthe database manager cannot find a function ormethod it can use to implement the reference.There are several reasons why this could occur:

v “<function-name>” was either incorrectlyspecified or does not exist in the database.

v A qualified reference was made, and thequalifier was incorrectly specified.

v The user’s function path does not contain theschema to which the desired function ormethod belongs, and an unqualified referencewas used.

v The wrong number of arguments wereincluded.

v The right number of arguments were included,but the data types of one or more of thearguments is incorrect.

v The function does not exist in the databasewith a create timestamp earlier than the timethe package was bound (applies to staticstatements).

v The mutator method corresponding to anattribute assignment used in an UPDATEstatement could not be found. The data type ofthe new value for the attribute is not a datatype that is the same or promotable to the datatype of the attribute.

User Response: Fix the problem and retry. Thiscould involve catalog access, change to thestatement, the addition of new functions, and/orchange to the function path.

sqlcode: -440

sqlstate: 42884

SQL0441N Invalid use of keywordDISTINCT or ALL with function“<function-name>”.

Explanation: There are several possible causes.

v The keyword DISTINCT or ALL was detectedwithin the parentheses in a reference tofunction “<function-name>”, and the functionhas been resolved as a scalar function. Use ofthe keyword DISTINCT or ALL with a scalarfunction is invalid.

v The keyword DISTINCT is used in a columnfunction for which it is not supported. Thesefunctions include COVARIANCE,CORRELATION and the linear regressionfunctions (those that start with REGR).

v The function was expected to be a columnfunction supporting the keyword ALL orDISTINCT but the function it resolved to wasnot a column function.

User Response:

v If a scalar function is being used, then removethe keyword DISTINCT or ALL. It is invalidfor a scalar function.

v If the function is a column function that doesnot support the DISTINCT or ALL keywords,then remove the keywords.

v If a column function is being used, then thereis a problem with function resolution. Checkyour function path to see if the desiredfunction is in one of the schemas, and alsocheck the SYSFUNCTIONS catalog for thespelling of the function name and the numberand types of parameters.

Correct the error and try again.

sqlcode: -441

sqlstate: 42601

SQL0442N Error in referring to routine“<routine-name>”. The maximumnumber of allowable arguments(90) has been exceeded.

Explanation: Too many arguments werespecified in the reference to routine

Chapter 2. SQL Messages 75

Page 84: Db2 SQL Errors

“<routine-name>”. The maximum allowable is90.

User Response: Correct the statement byensuring that the correct number of argumentshas been used and try again.

sqlcode: -442

sqlstate: 54023

SQL0443N Routine “<routine-name>”(specific name “<specific-name>”)has returned an error SQLSTATEwith diagnostic text “<text>”.

Explanation: An SQLSTATE of the form 38xxxwas returned to DB2 by routine“<routine-name>” (specific name“<specific-name>”), along with message text“<text>”. The routine could be a user-definedfunction or a user-defined method.

User Response: The user will need tounderstand the meaning of the error. See yourDatabase Administrator, or the author of theroutine.

Errors that are detected by the IBM suppliedfunctions in the SYSFUN schema all return theSQLSTATE 38552. The message text portion ofthe 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 atimestamp 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 outof range

11 Invalid character representation of afloating point number

sqlcode: -443

sqlstate: 38xxx (the SQLSTATE returned by theroutine).

SQL0444N Routine “<routine-name>”(specific name “<specific-name>”)is implemented with code inlibrary or path“<library-or-path>”, function“<function-code-id>” whichcannot be accessed. Reason code:“<code>”.

Explanation: The DBMS is trying to access thebody of the code that implements routine“<routine-name>” (specific name“<specific-name>”), and cannot access it for thereason given by reason code “<code>” (the codesare listed below). The file implementing theroutine is identified by “<library-or-path>”, andthe function by “<function-code-id>”.

(Note that these last two tokens may betruncated, due to limitations in the total tokenlength which can be provided. If this happens,then the definition of the routine in the catalogsmay need to be accessed in order to determinethe full library or path and function code id thatwere defined for the routine.)

User Response: Given for each reason code:

1 Path name ″<library-or-path>″ is longerthan the maximum (255 bytes). Eitherthe routine definition needs to bechanged to specify a shorter path, or theDB2 instance path name is too long.Look at the catalog definition todetermine which is the case. It may benecessary to move the function body toa directory with a shorter path name.

2 The DB2 instance path name could notbe retrieved from DB2. See your systemadministrator.

76 Message Reference, Volume 2

Page 85: Db2 SQL Errors

3 The path ″<library-or-path>″ could notbe found. See the routine creator oryour database administrator. The routinedefinition or the location of the routineitself will need to be corrected.

4 The file in ″<library-or-path>″ could notbe found. See the routine creator oryour database administrator. The routinedefinition or the location of the routinemay need to be corrected, or the routinemay need to be re-linked.

In OS/2 this reason code can arise if theUDF DLL name is longer than format(8.3). For example a name of″abcdefgh99.dll″ has format (10.3) andwould result in this message withreason code 4. The solution is to changethe name to an acceptable form, forexample ″abcdef99.dll″.

In addition to the above, this reasoncode can result if the routine requires ashared library or DLL, and the sharedlibrary cannot be located (using theconcatenation of directories specified inthe LIBPATH environment variable inUNIX-based systems, the PATHenvironment variable in INTELsystems). There can be multiple levels ofthis indirection involved, leading to thisreason code. For example, routine bodyX can be found, and it needs sharedlibrary Y which can also be found. But Yneeds Z, and Z cannot be located, andthis will result in SQL0444N reason code4.

5 There was insufficient memory to loadthe library containing the function orone or more symbols could not beresolved. Contact the routine creator oryour database administrator to makesure that the library was correctlylinked. All required libraries to resolvereferenced symbols such as externalfunctions must be available. If a lack ofmemory is determined then the systemconfiguration may need to be changedto make more memory available to DB2.

6 The function ″<function-code-id>″ couldnot be found in the module named. Seethe routine creator or your databaseadministrator. The routine definition orthe function itself will need to becorrected.

7 The symbol given as the function name(″<function-code-id>″) is not the nameof a valid function in the named library.See the routine creator or your databaseadministrator. The routine definition orthe function itself will need to becorrected.

8 The ″load″ system function has failed,for other than the reasons given above.It may be that the module was notlinked at all, or not linked correctly.

9 There was insufficient memory toresolve the function name″<function-code-id>″ in the libraryidentified in ″<library-or-path>″.Contact the routine creator or yourdatabase administrator to make sure thelibrary containing the function wascorrectly linked. The systemconfiguration may need to be changedto make more memory available to DB2Server.

10 The loadquery system call has failed.This can only happen on unix-basedsystems, and is a symptom that thedatabase manager itself has not beeninstalled correctly. Contact your systemadministrator.

11 The agent process is searching for aparticular database manager functionthat should be in the libdb2.a library,and it cannot find it. This can onlyhappen on unix-based systems, and is asymptom that the database manager isnot correctly installed. Contact yoursystem administrator.

15 Access has been denied. This canhappen in Windows NT environments ifthe EXTERNAL NAME specification inthe routine definition statement does notspecify a full path, or the function does

Chapter 2. SQL Messages 77

Page 86: Db2 SQL Errors

not exist in the instance_name\functiondirectory, necessitating a search usingthe PATH environment variable. Forexample, If the PATH contains a LANdrive prior to the directory containingyour function and the DB2 instance isrunning under the SYSTEM account,this reason code can result.

other: An unidentified system failure hasoccurred. Note the code, and see yoursystem administrator.

If unable to diagnose the error using theinformation in this message, the diagnostic logfile db2diag.log contains failure informationwhich may help isolate the problem. It may benecessary to contact your system administratorfor assistance.

Federated system users: if this user definedfunction is a function template (and thus no codeis required to reside on the federated server), youmay want to consider modifying the SQLstatement or statistics to enable this function tobe evaluated on the remote data source.

sqlcode: -444

sqlstate: 42724

SQL0445W Value “<value>” has beentruncated.

Explanation: The value “<value>” wastruncated by a system (built-in) cast oradjustment function, which was called totransform the value in some way. This is awarning situation.

The value being transformed is the output of aroutine (user-defined function (UDF) or method),and is being transformed because of a CASTFROM specification in the routine definition, orbecause the UDF is sourced on another functionand the result needed to be transformed.

User Response: Ensure that the output is asexpected and that the truncation has not causedany unexpected consequences.

sqlcode: +445

sqlstate: 01004

SQL0447W The statement contains redundantspecifications involving the clause“<clause>”.

Explanation: The “<clause>” keyword wasincluded more than once in the statement. This isa warning condition.

User Response: If the redundancy wasintentional, or if it is determined that no harmhas resulted, then no response is necessary. Thetype of ″harm″ alluded to could include, forexample, the omission of some other desiredkeyword.

sqlcode: +447

sqlstate: 01589

SQL0448N Error in defining routine“<routine-name>”. The maximumnumber of allowable parameters(90 for user defined functions andmethods, 32767 for storedprocedures) has been exceeded.

Explanation: Too many parameters werespecified when defining routine“<routine-name>”. The routine definitionstatement may be a CREATE FUNCTION,CREATE PROCEDURE, CREATE TYPE (methoddefinition), or ALTER TYPE (method definition).

User Response: Change the statement toinclude fewer parameters.

sqlcode: -448

sqlstate: 54023

SQL0449N The statement defining routine“<routine-name>” contains aninvalidly formattedlibrary/function identification inthe EXTERNAL NAME clause.

Explanation: An error was found in theEXTERNAL NAME clause of the CREATEstatement for user defined function (UDF),user-defined method, or stored procedure“<routine-name>”. The rules for the

78 Message Reference, Volume 2

Page 87: Db2 SQL Errors

library/function identification are as follows:

The name takes the form ’<a>!<b>’ or ’<a>’. Noblanks are permitted within the single quotes.<a> is one of the following:

v the full-path identification of a file (forexample, (on AIX) /u/slick/udfs/math or (onOS/2) d:\myfunc\math)

v a file name (for example, math) assumed to bein ’function’ directory in the sqllib directory.

If <b> is omitted, the default is the entry pointdefined when the named file was linked. If <b>is present, it identifies the entry point (function)within <a> that will be invoked as the body ofthe routine.

User Response: Correct the problem and tryagain. A possible cause is the inclusion of ablank, or having the ’!’ at the beginning or endof the name.

sqlcode: -449

sqlstate: 42878

SQL0450N Routine “<routine-name>”(specific name “<specific-name>”)has generated a result value,SQLSTATE value, message text, orscratchpad which is too long.

Explanation: Upon return from routine“<routine-name>” (specific name“<specific-name>”), DB2 has detected that morebytes were returned than were allocated for oneof the following:

v the result value (based upon the routinedefinition). There are several possible causes:

– Too many bytes were moved to the resultbuffer.

– The data type is one where the data valuemust be delimited by a null, such asVARCHAR(n), and the delimiting null wasnot within the range of the defined size.

– DB2 is expecting a two- or four- byte lengthvalue preceding the value, and this lengthexceeds the defined size of the result.

– A LOB locator is returned by the routine,and the length of the LOB value associatedwith this locator exceeds the defined size ofthe result.

The definition of the result argument in theRoutine must conform to the requirement forthe data type. Refer to the ApplicationDevelopment Guide for more information.

v the SQLSTATE value (6 bytes including thenull terminator)

v the message text (71 bytes including the nullterminator).

v the scratchpad content (length declared onCREATE FUNCTION).

This is not permitted.

This error will also be returned if the length fieldof the scratchpad is altered by the routine.

User Response: See your DatabaseAdministrator, or the author of the routine.

sqlcode: -450

sqlstate: 39501

SQL0451N The “<data-item>” definition, inthe statement that defines routine“<routine-name>”, contains a datatype “<type>” that is notappropriate for a non-sourcedroutine written in the givenlanguage.

Explanation: An error was made in the“<data-item>” part of the statement definingroutine “<routine-name>”. The user’s statementcontained the invalid type “<type>”, or itcontained a user defined type (UDT) which isbased on the invalid type “<type>”. The routinedefinition may be a CREATE FUNCTION,CREATE PROCEDURE, CREATE TYPE (methoddefinition), or ALTER TYPE (method definition).

“<data-item>” is a token that identifies the areaof the problem in the statement. For example,″PARAMETER 2″ or ″RETURNS″ or ″CASTFROM″.

User Response: Determine which situation has

Chapter 2. SQL Messages 79

Page 88: Db2 SQL Errors

occurred, and take corrective action. Possiblecorrective actions include:

v Changing the routine definition to a supportedtype; for example, from DECIMAL to FLOAT.This may involve a change in the routine bodyitself, and may also involve use of castfunctions upon use of the routine.

v Creating a new (suitably based) user definedtype, or changing the definition of an existingUDT.

sqlcode: -451

sqlstate: 42815

SQL0452N Unable to access the filereferenced by host variable“<variable-position>”. Reasoncode: “<reason-code>”.

Explanation: An error was encounteredattempting to access or while accessing the filereferenced by the ″nth″ host variable, where n =″<variable-position>″, for the reason given by″<reason-code>″. <variable-position> is set to 0 ifthe host variable position could not bedetermined. The possible reason codes are asfollows:

v 01 - The file name length is invalid or the filename and/or the path has an invalid format.

v 02 - The file option is invalid. It must have oneof the following values:

SQL_FILE_READ-read from an existing file

SQL_FILE_CREATE-create a new file for write

SQL_FILE_OVERWRITE-overwrite an existing file.If the file does not exist,create the file.

SQL_FILE_APPEND-append to an existing file.If the file does not exist,create the file.

v 03 - The file cannot be found.

v 04 - The SQL_FILE_CREATE option wasspecified for a file with the same name as anexisting file.

v 05 - Access to the file was denied. The userdoes not have permission to open the file.

v 06 - Access to the file was denied. The file is inuse with incompatible modes. Files to bewritten to are opened in exclusive mode.

v 07 - Disk full was encountered while writingto the file.

v 08 - Unexpected end of file encountered whilereading from the file.

v 09 - A media error was encountered whileaccessing the file.

v 10 - An incomplete or invalid multibytecharacter was encountered while reading fromthe file.

v 11 - An error was encountered whileconverting data from the file code page to theapplication’s graphic character code page.

User Response:

For reason code 01, correct the file name length,file name and/or path.

For reason code 02, specify a valid file option.

For reason code 03, ensure that the file specifiedexists before attempting to access the file.

For reason code 04, either delete the file if it isno longer required or specify a file name thatdoes not currently exist.

For reason code 05, ensure that the user hasaccess (correct file permissions) to the file.

For reason code 06, either use a different file or,if the file must be accessed, modify theapplication to ensure that the file is not accessedconcurrently.

For reason code 07, delete unnecessary files tofree up disk space or specify a file that resides onanother drive/file system with sufficient diskspace. Also, ensure that no operating system oruser file size limits were reached. If yourapplication code page uses a multibyte encodingscheme it is possible that only part of the lastcharacter was written, ensure that the filecontains only fully formed characters.

For reason code 08, if a file is to be used forinput, ensure that the file is not modified beforethe entire file has been read.

80 Message Reference, Volume 2

Page 89: Db2 SQL Errors

For reason code 09, correct all errors on themedia where the file resides.

For reason code 10, ensure that the file containsvalid multibyte characters based on the codepage of the application or submit the requestwhile running under the same code page as thecontents of the file.

For reason code 11, ensure that characterconversion support between the code page of thefile, for example Japanese EUC, and the graphiccode page of the application, for example UCS-2,is installed.

sqlcode: -452

sqlstate: 428A1

SQL0453N A problem has been identifiedwith the RETURNS clause in thestatement that defines the routine“<routine-name>”.

Explanation: A problem casting the result ofroutine “<routine-name>” has been identified.The CAST FROM data type is not castable to theRETURNS data type, and it should be. See theSQL Reference for details on casting between datatypes.

User Response: Change the RETURNS or CASTFROM clause so that the CAST FROM data typeis castable to the RETURNS data type.

sqlcode: -453

sqlstate: 42880

SQL0454N The signature provided in thedefinition for routine“<routine-name>” matches thesignature of some other routinethat already exists in the schemaor for the type.

Explanation: The signature of a functionconsists of the function name, the number ofparameters defined for the function, and anordered list of the types of the parameters(without regard to any parameters of the types).

The signature of a method consists of the methodname, the subject type of the method, the

number of parameters defined for the method,and an ordered list of the types of theparameters (without regard to any parameters ofthe types).

The signature of a procedure consists of theprocedure name and the number of parametersdefined for the procedure (data types are notconsidered).

In this case, either:

v there is a function or procedure(“<routine-name>”) already in the schemahaving the same signature as the function orprocedure being created

v there is a method (“<routine-name>”) for thesubject type having the same signature as themethod specification being added or themethod body being created

The statement cannot be processed.

User Response: Determine if the existingroutine already provides the functionalitydesired. If not, then the signature of the routinewill have to be changed; for example, bychanging the routine name.

sqlcode: -454

sqlstate: 42723

SQL0455N In routine “<routine-name>”, theschema name “<schema-name1>”provided for the SPECIFIC namedoes not match the schema name“<schema-name2>” of the routine.

Explanation: If the SPECIFIC name is specifiedas a two part name, the “<schema-name1>”portion must be the same as the“<schema-name2>” portion of the“<routine-name>”. Note that the“<schema-name2>” portion of “<routine-name>”may have been specified directly or it may havedefaulted to the authorization ID of thestatement. If the routine is a method,“<schema-name>” refers to the schema name ofthe subject type of the method.

User Response: Correct the statement and tryagain.

Chapter 2. SQL Messages 81

Page 90: Db2 SQL Errors

sqlcode: -455

sqlstate: 42882

SQL0456N In the definition of routine“<routine-name>”, the SPECIFICname “<specific-name>” alreadyexists in the schema.

Explanation: The user has supplied an explicitSPECIFIC name “<specific-name>” in thedefinition of routine “<routine-name>”, but thisname already exists as the SPECIFIC name for afunction, method, or procedure in the schema.

User Response: Choose a new SPECIFIC nameand try again.

sqlcode: -456

sqlstate: 42710

SQL0457N A function, method, user-defineddata type, or structured data typeattribute cannot be called″<name>″ since it is reserved forsystem use.

Explanation: The user-defined function,method, user-defined data type, or structureddata type cannot be created because a specifiedname is reserved for use by the system. Namesthat cannot be used for function names, distincttype names, structured type names, or attributenames include:

"=","<",">",">=","<=","&=","&>",,"&<","!=","!>","!<","<>", SOME, ANY, ALL, NOT,AND, OR, BETWEEN, NULL, LIKE, EXISTS, IN,UNIQUE, OVERLAPS, SIMILAR, and MATCH.

User Response: Select a name for the function,method, user-defined data type, or structureddata type attribute that is not reserved for systemuse.

sqlcode: -457

sqlstate: 42939

SQL0458N In a reference to routine“<routine-name>” by signature, amatching routine could not befound.

Explanation: In a reference to function, method,or stored procedure “<routine-name>” bysignature, no matching function, method, orstored procedure could be found.

If a data type is used that can accept aparameter, then the type parameter is optional.For example, for CHAR(12), you can eitherspecify the parameter (CHAR(12) or omit it(CHAR()). If you specify the parameter, then theDBMS will only accept an exact match on thedata type AND the data type parameter. If youomit the parameter, then the DBMS will accept amatch on data type only. The CHAR() syntaxprovides a way to tell the DBMS to ignore datatype parameters when finding a matchingfunction.

Note also that in the DROPFUNCTION/PROCEDURE and COMMENT ONFUNCTION/PROCEDURE statements, anunqualified reference is qualified with thestatement authorization ID, and this is theschema where the problem can be found. In theSOURCE clause of a CREATE function, thequalification comes from the current functionpath. In this case, there is no matching functionin the entire path.

A function cannot be sourced on the COALESCE,NULLIF, NODENUMBER, PARTITION,RAISE_ERROR, TYPE_ID, TYPE_NAME,TYPE_SCHEMA, or VALUE built-in functions.

The statement cannot be processed.

User Response: Possible responses include:

v Changing the function path to include thecorrect schema.

v Removing parameters from the specificationsof data types.

v Using a SPECIFIC name to refer to thefunction or procedure instead of a signature.

sqlcode: -458

sqlstate: 42883

82 Message Reference, Volume 2

Page 91: Db2 SQL Errors

SQL0461N A value with data type“<source-data-type>” cannot beCAST to type“<target-data-type>”.

Explanation: The statement contains a CASTwith the first operand having a data type of“<source-data-type>” to be cast to the data type“<target-data-type>”. This cast is not supported.

User Response: Change the data type of eitherthe source or target so that the cast is supported.For predefined data types these are documentedin the SQL Reference. For a cast involving auser-defined distinct type, the cast can bebetween the base data type and the user-defineddistinct type or from a data type that ispromotable to the base data type to theuser-defined distinct type.

sqlcode: -461

sqlstate: 42846

SQL0462W Routine “<routine-name>”(specific name “<specific-name>”)has returned a warningSQLSTATE, with diagnostic text“<text>”.

Explanation: An SQLSTATE of the form 01Hxxwas returned to DB2 by routine“<routine-name>” (with specific name“<specific-name>”), along with message text“<text>”.

User Response: The user will need tounderstand the meaning of the warning. Seeyour database administrator, or the author of theroutine.

sqlcode: +462

sqlstate: 01Hxx

SQL0463N Routine “<routine-name>”(specific name “<specific-name>”)has returned an invalidSQLSTATE “<state>”, withdiagnostic text “<text>”.

Explanation: The valid SQLSTATEs that aroutine can return are 38xxx (error), 38502 (error)

and 01Hxx (warning). This routine“<routine-name>” (specific name“<specific-name>”) returned an invalidSQLSTATE “<state>”, along with message text“<text>”. The routine is in error.

User Response: The routine will need to becorrected. See your database administrator, or theauthor of the routine. The applicationsignificance of the bad SQLSTATE can also belearned from the routine author.

sqlcode: -463

sqlstate: 39001

SQL0464W Procedure “<proc>” returned“<num>” query result sets, whichexceeds the defined limit“<integer>”.

Explanation: The stored procedure named byproc completed normally. However, the storedprocedure exceeded the defined limit on thenumber of query result sets the procedure canreturn.

num identifies the number of query resultsets returned by the stored procedure.

integer identifies the defined limit on thenumber of query result sets for thestored procedure.

Only the first integer query result sets arereturned to the SQL program that issued the SQLCALL statement.

The possible causes are as follows: The storedprocedure is unable to return num result sets dueto the DRDA limitations imposed by the client.The DRDA client establishes this limit with theMAXRSLCNT DDM code point.

User Response: The SQL statement issuccessful. The SQLWARN9 field is set to ’Z’.

sqlcode: +464

sqlstate: 0100E

Chapter 2. SQL Messages 83

Page 92: Db2 SQL Errors

SQL0465N Unable to start, initialize, orcommunicate with fenced modeprocess. Reason code “<code>”.

Explanation: There is a system related probleminvolved with the running of a fenced moderoutine (user-defined function or method). Theexact nature of the problem is indicated by“<code>”. This is NOT a user problem. Possiblereason codes are:

Routine process errors

21: Failure to initialize internal data orapplication data.

22: Failure to register signal handlers.

23: Failure to grant agent process the accesspermission for the REQUEST QUEUE.

24: Failure to connect to the routine processShared Memory.

25: Failure to open the REPLY QUEUE.

26: Failure to write to the REPLY QUEUE.

27: Failure to create the REQUEST QUEUE.

28: Failure to read from the REQUESTQUEUE.

29: Routine process dies.

30: Routine process catches an USERINTERRUPT signal.

31: Failure to unload routine module.

32: Failure to allocate storage for controlblocks used in moduleloading/unloading.

33: Failure to send SIGINT from agentprocess to routine process.

34: Failure to initialize OLE library.

35: Failure to initialize OLE DBInitialization Service Component.

40: Internal error occurred in routineprocess.

Agent process errors

41: Failure to spawn routine process.

42: Failure to create the REPLY QUEUE.

43: Failure to read from the REPLY QUEUE.

44: Failure to open the REQUEST QUEUE.

45: Failure to write to the REQUESTQUEUE.

47: Failure to grant the routine process theaccess permission to the UDFP sharedmemory set.

48: Failure to grant the routine process theaccess permission to the REPLY QUEUE.

49: Failure to allocate storage for controlblocks used in moduleloading/unloading.

50: Agent process died while runningroutine code or agent code.

51: Agent process catches USERINTERRUPT while running un-fencedroutine code.

60: Internal error occurred in routineprocess.

User Response: Contact your Database orSystem administrator.

sqlcode: -465

sqlstate: 58032

SQL0466W The procedure“<procedure-name>” returns“<number-results>” result setsfrom the stored procedure.

Explanation: This message is returned as aresult of issuing a CALL SQL statement. Itindicates that the stored procedure“<procedure-name>” has “<number-results>”result sets associated with it.

The statement completed successfully.

User Response: None required.

sqlcode: +466

sqlstate: 0100C

84 Message Reference, Volume 2

Page 93: Db2 SQL Errors

SQL0467W The procedure“<procedure-name>” includesanother result set. There are atotal of “<number-results>” resultsets.

Explanation: This message is returned as aresult of closing a cursor. It indicates that anotherresult set exists for stored procedure“<procedure-name>” and the cursor wasre-opened on the next result set. There are a totalof “<number-results>” result sets from the storedprocedure.

The statement completed successfully.

User Response: None required. Fetches canproceed on to the next result set.

sqlcode: +467

sqlstate: 0100D

SQL0469N The parameter mode (IN, OUT, orINOUT) is not valid for aparameter in procedure“<procedure-name>” with specificname “<specific-name>”(parameter number “<number>”,name “<parameter-name>”).

Explanation: One of the following errorsoccurred:

v a parameter in an SQL procedure is declaredas OUT and is used as input in the procedurebody

v a parameter in an SQL procedure is declaredas IN and is modified in the procedure body.

User Response: Change the attribute of theparameter to INOUT, or change the use of theparameter within the procedure.

sqlcode: -469

sqlstate: 42886

SQL0470N The user defined routine“<routine-name>” (specific name“<specific-name>”) has a nullvalue for argument “<argument>”that could not be passed.

Explanation: A routine has an input argumentwith a null value but was defined with aparameter style that does not pass nullindicators, or the datatype of this parameter doesnot support null values.

User Response: If the routine is to be calledwith null values, ensure the parameter style andinput types are capable of accepting a null value.For functions, the function could also be createdwith ″RETURNS NULL ON NULL INPUT″.

sqlcode: -470

sqlstate: 39004

SQL0471N Invocation of routine “<name>”failed due to reason“<reason-code>”.

Explanation: A routine “<name>” was invokedon a DB2 Universal Database for OS/390 server.The routine invocation failed because of thecondition described by DB2 reason code“<reason-code>”.

The statement cannot be executed. A DSNX9xxmessage describing the error might be displayedon the MVS system console.

User Response: Consult the documentation forthe DB2 Universal Database for OS/390 serverand correct the condition described by the DB2reason code.

sqlcode: -471

sqlstate: 55023

SQL0473N A user defined data type havingthe same name as a systempredefined type cannot be created.

Explanation: The name of a data type to becreated has an unqualified name that is the sameas a system-predefined data type or isBOOLEAN. This is not allowed. Adding

Chapter 2. SQL Messages 85

Page 94: Db2 SQL Errors

delimiters does not make the name valid.

The statement could not be processed.

User Response: Correct the statement to useanother identifier.

sqlcode: -473

sqlstate: 42918

SQL0475N The result type “<type-1>” of theSOURCE function cannot be castto the RETURNS type “<type-2>”of the user defined function“<function-name>”.

Explanation: In order for the CREATE of asourced user defined function (UDF) to be valid,the result type (“<type-1>”) of the sourcefunction must be castable to the RETURNS type(“<type-2>”) of the function being created. Thereis no supported cast between these data types.See the SQL Reference for details on castingbetween data types.

User Response: Change the RETURNS datatype or the SOURCE function identification sothat the result type of the SOURCE function iscastable to the RETURNS data type.

sqlcode: -475

sqlstate: 42866

SQL0476N Reference to routine“<function-name>” was madewithout a signature, but theroutine is not unique in itsschema.

Explanation: References to a function or storedprocedure without a signature is permitted, butthe named function or store procedure“<function-name>” must be unique in its schemaand is not. If the routine is a method, a referencewithout a signature is permitted but this namedmethod must be unique for the data type.

Note that in the DROPFUNCTION/PROCEDURE and COMMENT ONFUNCTION/PROCEDURE statements, anunqualified reference is qualified with thestatement authorization ID, and this is the

schema where the problem can be found. In theSOURCE clause of a CREATE FUNCTION, thequalification comes from the current functionpath. In this case, the first schema in the pathcontaining a function with this name had otherfunctions by the same name.

Federated system users: For a pass-throughsession, if the statement is a CREATEFUNCTION MAPPING statement, this errorindicates that an attempt was made to create afunction mapping from one remote function tomore than one local function.

User Response: Correct the reference by one ofthe following:

v completing the signature

v using the SPECIFIC name of the desiredroutine

v changing the SQL path

and try again.

sqlcode: -476

sqlstate: 42725

SQL0478N The object type “<object-type1>”cannot be dropped because thereis an object “<object-name>”, oftype “<object-type2>”, whichdepends on it.

Explanation: The base object, which is an objectof type “<object-type1>” cannot be droppedbecause another object depends on it. There is arestrict dependency defined with objects of type“<object-type2>” (of which object“<object-name>” is an example).

It may be that the dependency is indirect. Thatis, the named object is dependent on anotherobject which is dependent on the object beingdropped.

For example:

v function F1 is sourced on function F2

v table V1 is defined using F1

v an attempt to drop F2 will fail due to thedirect dependency of F1 on F2 and the indirectdependency of V1 on F2

86 Message Reference, Volume 2

Page 95: Db2 SQL Errors

User Response: Either do not drop this objector drop the dependent objects first.

sqlcode: -478

sqlstate: 42893

SQL0480N The procedure“<procedure-name>” has not yetbeen called.

Explanation: Either the procedure identified inan ASSOCIATE LOCATORS statement has notyet been called within the application process, orthe procedure has been called, but an explicit orimplicit commit occurred before the statement.

User Response: Correct the statements so thatthe exact syntax used to specify the procedurename on the CALL statement is the same as thaton the ASSOCIATE LOCATORS statement. If anunqualified name is used to CALL the procedure,the one-part name must also be used in the otherstatements. Reissue the statements.

sqlcode: -0480

sqlstate: 51030

SQL0481N The GROUP BY clause contains“<element 1>” nested within“<element 2>”.

Explanation: The following types of nesting arenot allowed within a GROUP BY clause:

v CUBE within CUBE, ROLLUP, or GEL

v ROLLUP within CUBE, ROLLUP, or GEL

v () within CUBE, ROLLUP, or GEL

v GROUPING SET within GROUPING SET,CUBE, ROLLUP, or GEL

where GEL represents the element shown asgrouping-expression-list in the syntax diagram ofthe GROUP BY clause.

In some instances the value “---” will be shownfor “<element 2>”. In this case “---” representsone of CUBE, ROLLUP, GROUPING SET, orGEL.

The statement cannot be processed.

User Response: Modify the GROUP BY clauseto remove the nesting.

sqlcode: -481

sqlstate: 428B0

SQL0483N In the CREATE for user definedfunction “<function-name>”statement, the number ofparameters does not match thenumber of parameters of theSOURCE function.

Explanation: An attempt is being made toCREATE a user defined function“<function-name>” which is sourced on anotherfunction. One of the following situations hasbeen identified:

v The SOURCE clause uses a function-name(input parameter list) to identify the sourcefunction, and the number of types in the list isdifferent from the number of parameters of thefunction being created.

v The SOURCE clause uses different syntax toidentify the source function, and the numberof types of that function is different from thenumber of parameters of the function beingcreated.

User Response: The number of parameters forthe SOURCE function and for the function beingcreated must be the same. The identification ofthe SOURCE function needs to be changed, to

v fix the input parameter list

v correct the function name or function specificname to identify the proper function.

It is also possible that the function path needs tobe corrected in order for correct functionresolution to occur.

sqlcode: -483

sqlstate: 42885

Chapter 2. SQL Messages 87

Page 96: Db2 SQL Errors

SQL0486N The BOOLEAN data type iscurrently only supportedinternally.

Explanation: One or more of the data types inthe statement is BOOLEAN. This is notsupported in the current version of DB2.

User Response: Change the data type(s) thenresubmit the statement.

sqlcode: -486

sqlstate: 42991

SQL0487N Routine “<routine-name>”(specific name “<specific-name>”)attempted to execute an SQLstatement.

Explanation: The program used to implementthe body of a routine is not allowed to executeSQL statements. This routine “<routine-name>”(specific name “<specific-name>”) contains SQLstatements.

User Response: Remove any SQL statementsthen recompile the program. Investigate the levelof SQL allowed as specified on the statementdefining the routine.

sqlcode: -487

sqlstate: 38001

SQL0489N The function ″<function-name>″in a SELECT or VALUES list itemhas produced a BOOLEAN result.

Explanation: The function ″<function-name>″ isdefined for use as a predicate, returning aboolean result. Such a result is not valid in aselect list.

The statement cannot be processed.

User Response: Correct the function name orremove the use of the function.

sqlcode: -489

sqlstate: 42844

SQL0491N The definition of routine“<routine-name>” must have aRETURNS clause, and one of: theEXTERNAL clause (with otherrequired keywords); the RETURNstatement; or the SOURCE clause.

Explanation: A required clause is missing in thedefinition of routine “<routine-name>”. IfEXTERNAL was specified, the following mustalso be specified: LANGUAGE, PARAMETERSTYLE, DETERMINISTIC or NOTDETERMINISTIC, NO SQL, and EXTERNALACTION or NO EXTERNAL ACTION.

User Response: Add the missing clause, thentry again.

sqlcode: -491

sqlstate: 42601

SQL0492N There is a problem in theCREATE for user defined function“<function-name>”, withparameter number “<number>”. Itmay involve a mismatch with aSOURCE function.

Explanation: The parameter in position“<number>” of function “<function-name>” is inerror and the CREATE cannot be performed. Theparameter in position “<number>” of the sourcefunction is not castable to the correspondingparameter of the function being created.

User Response: Possible corrections include:

v Identify a different source function.

v Change the data type of the parameter of thefunction being created so that the data type ofthe source function can be cast to this datatype.

sqlcode: -492

sqlstate: 42879

88 Message Reference, Volume 2

Page 97: Db2 SQL Errors

SQL0493N Routine “<routine-name>”(specific name “<specific-name>”)has returned a date, time ortimestamp value which issyntactically or numericallyinvalid.

Explanation: The body of user defined function(UDF) or method “<routine-name>” (specificname “<specific-name>”) has returned an invaliddate, time or timestamp value.

An example of a syntactically invalid date valueis ’1994-12*25’: the ’*’ should be a ’-’. An exampleof a numerically invalid time value is ’11.71.22’:there is no 71st minute in the hour.

User Response: The routine needs fixing. Seeyour DBA, or the author of the routine.

sqlcode: -493

sqlstate: 22007

SQL0495N Estimated processor cost of″<estimate-amount1>″ processorseconds (″<estimate-amount2>″service units) in cost category″<cost-category>″ exceeds aresource limit error threshold of″<limit-amount>″ service units.

Explanation:

The prepare of a dynamic INSERT, UPDATE,DELETE, or SELECT SQL statement resulted in acost estimate that exceeded the error thresholdvalue specified in the resource limit specificationtable (RLST).

This error is also issued if DB2’s cost categoryvalue was ″B″, and the default action specified inthe RLF_CATEGORY_B column in the RLST is toissue an error.

estimate_amount1The cost estimate (in processor seconds)if the prepared INSERT, UPDATE,DELETE or SELECT statement were tobe executed.

estimate_amount2The cost estimate (in service units) if the

prepared INSERT, UPDATE, DELETE orSELECT statement were to be executed.

cost-categoryDB2’s cost-category for this SQLstatement. The possible values are A orB.

limit-amountThe error threshold (in service units)specified in the RLFASUERR column ofthe RLST.

The prepare of the dynamic INSERT, UPDATE,DELETE, or SELECT statement was unsuccessful.

User Response: If this SQLCODE was returnedbecause the cost category value is ″B″, it mightbe that the statement is using parameter markersor that some statistics are not available for thereferenced tables and columns. Make sure theadministrator has run the utility RUNSTATS onthe referenced tables. It might also be that UDFswill be invoked when the statement is executed,or for INSERT, UPDATE, or DELETE statementsthat triggers are defined on the changed table.Check the DSN_STATEMNT_TABLE or theIFCID 22 record for this statement to find thereasons this SQL statement has been put in costcategory ″B″. If the program cannot be changed,or if statistics cannot be obtained, ask theadministrator to change the value in theRLF_CATEGORY_B column in the RLST to ″Y″which allows the statement to execute or ″W″which returns a warning instead of an error.

If the warning is caused by an SQL statementthat is consuming too much processor resource,attempt to rewrite the statement to perform moreefficiently. Another option is to ask theadministrator to increase the error thresholdvalue in the RLST.

sqlcode: -495

sqlstate: 57051

Chapter 2. SQL Messages 89

Page 98: Db2 SQL Errors

SQL0499N Cursor “<cursor-name>” hasalready been assigned to this oranother result set from procedure“<procedure-name>”.

Explanation: An attempt was made to assign acursor to a result set but multiple cursors havebeen allocated for procedure“<procedure-name>”.

User Response: Determine if the target result

set was previously assigned to a cursor. Ifmultiple cursors have been allocated forprocedure “<procedure-name>” ensure that onlyone cursor is used to process the result sets of astored procedure.

sqlcode: -499

sqlstate: 24516

SQL0500 - SQL0599

SQL0501N The cursor specified in a FETCHor CLOSE statement is not open.

Explanation: The program attempted to either:(1) FETCH using a cursor, or (2) CLOSE a cursorat a time when the specified cursor was notopen.

The statement cannot be processed.

User Response: Check for a previous message(SQLCODE) that may have closed the cursor.Note that after the cursor is closed, any fetchesor close cursor statements receive SQLCODE-501.

If no previous SQLCODEs have been issued,correct the application program to ensure thatthe cursor is open when the FETCH or CLOSEstatement is executed.

sqlcode: -501

sqlstate: 24501

SQL0502N The cursor specified in an OPENstatement is already open.

Explanation: The program attempted to executean OPEN statement for an open cursor.

The statement cannot be processed. The cursorwas unchanged.

User Response: Correct the application programto ensure it does not attempt to execute anOPEN statement for a cursor already open.

sqlcode: -502

sqlstate: 24502

SQL0503N A column cannot be updatedbecause it is not identified in theFOR UPDATE clause of theSELECT statement of the cursor.

Explanation: Using a cursor, the programattempted to update a value in a table columnthat was not identified in the FOR UPDATEclause in the cursor declaration or the preparedSELECT statement.

Any column to be updated must be identified inthe FOR UPDATE clause of the cursordeclaration.

The statement cannot be processed.

User Response: Correct the applicationprogram. If the column requires updating, addits name to the FOR UPDATE clause of thecursor declaration.

sqlcode: -503

sqlstate: 42912

SQL0504N The cursor “<name>” is notdefined.

Explanation: An UPDATE or DELETE WHERECURRENT OF “<name>” was specified, but thecursor “<name>” was not declared in theapplication program.

The statement cannot be processed.

User Response: Ensure the completeness of theapplication program and correct spelling errorsin the cursor names.

90 Message Reference, Volume 2

Page 99: Db2 SQL Errors

sqlcode: -504

sqlstate: 34000

SQL0505N The cursor “<name>” is alreadydefined.

Explanation: The cursor name specified in theDECLARE statement has already been declared.

The statement cannot be processed.

User Response: Ensure the name is spelledcorrectly.

SQL0507N The cursor specified in theUPDATE or DELETE statement isnot open.

Explanation: The program attempted to executean UPDATE or DELETE WHERE CURRENT OFcursor statement when the specified cursor wasnot open.

The statement cannot be processed. No update ordelete was performed.

User Response: Check for a previous message(SQLCODE) that may have closed the cursor.Note that after the cursor is closed, any fetchesor close cursor statements receive SQLCODE -501and any updates or deletes receive SQLCODE-507. Correct the logic of the application programto ensure that the specified cursor is open at thetime the UPDATE or DELETE statement isexecuted.

sqlcode: -507

sqlstate: 24501

SQL0508N The cursor specified in theUPDATE or DELETE statement isnot positioned on a row.

Explanation: The program attempted to executean UPDATE or DELETE WHERE CURRENT OFcursor statement when the specified cursor wasnot positioned on an object table row. The cursormust be positioned on the row to be updated ordeleted.

The cursor is no longer positioned on a row ifthe row is deleted. This includes any use of

cursors within a savepoint when a ROLLBACKTO SAVEPOINT is performed.

Federated system users: the record in a remotedata source has been updated and/or deleted byanother application (or a different cursor withinthis application) and the record no longer exists.

The statement cannot be processed. No data isupdated or deleted.

User Response: Correct the logic of theapplication program to ensure that the cursor iscorrectly positioned on the intended row of theobject table before the UPDATE or DELETEstatement is executed. Note that the cursor is notpositioned on a row if FETCH returned messageSQL0100W (SQLCODE = 100).

sqlcode: -508

sqlstate: 24504

SQL0509N The table specified in theUPDATE or DELETE statement isnot the same table specified in theSELECT for the cursor.

Explanation: The program attempted to executean UPDATE or DELETE WHERE CURRENT OFcursor statement where the table named did notmatch the name of the table specified in theSELECT statement that declared the cursor.

The statement cannot be processed.

User Response: Correct the application programto ensure that the table identified in the UPDATEor DELETE statement is the same table identifiedin the cursor declaration.

sqlcode: -509

sqlstate: 42827

SQL0510N UPDATE or DELETE is notallowed against the specifiedcursor.

Explanation: The program attempted to executean UPDATE or DELETE WHERE CURRENT OFcursor statement against a table or viewdefinition that does not permit the requestedupdate or delete operation. For example, this

Chapter 2. SQL Messages 91

Page 100: Db2 SQL Errors

error can occur in a delete from a read-only viewor in an update where the cursor was notdefined with the FOR UPDATE clause.

On the database manager the view is read-only ifthe SELECT statement

v The DISTINCT keyword

v A column function in the SELECT list

v A GROUP BY or HAVING clause

v A FROM clause that identifies one of thefollowing:

– More than one table or view

– A read-only view (READONLY column ofSYSCAT.SYSVIEWS is set to ’Y’)

– A table or view that is also identified in theFROM clause of a subquery of the SELECTstatement. (NOTE: This is a restriction onlyin releases of DB2 prior to Version 2).

v A set operator (other than UNION ALL).

Note that these conditions do not apply tosubqueries of the SELECT statement.

The cursor is declared with a FOR FETCH ONLYor ORDER BY clause.

The cursor is ambiguous and the BLOCKINGALL bind option was specified.

The statement cannot be processed.

User Response: If the database manager isfailing the statement and the cursor is based on aread-only SELECT or VALUES statement, do notissue any update or delete statements against it.

If the database manager is failing the statementand the cursor is not based on a read-onlySELECT or VALUES statement and is definedwith a FOR FETCH ONLY or ORDER BY clause,either remove this clause from the cursordefinition or do not issue any update or deletestatements.

If the database manager is failing the statementand the cursor cannot be determined to be eitherfetch only or updateable from its definition orcontext, rebind the program with either theBLOCKING NO or BLOCKING UNAMBIG bindoption.

Federated system users: isolate the problem tothe data source failing the request (see theproblem determination guide for procedures tofollow to identify the failing data source). If adata source is failing the request, examine therestrictions for that data source to determine thecause of the problem and its solution. If therestriction exists on a data source, see the SQLreference manual for that data source todetermine why the object is not updatable.

sqlcode: -510

sqlstate: 42828

SQL0511N The FOR UPDATE clause is notallowed because the tablespecified by the cursor cannot bemodified.

Explanation: The result table of the SELECT orVALUES statement cannot be updated.

On the database manager, the result table isread-only if the cursor is based on a VALUESstatement or the SELECT statement contains anyof the following:

v The DISTINCT keyword

v A column function in the SELECT list

v A GROUP BY, HAVING, or ORDER BY clause

v A FROM clause that identifies one of thefollowing:

– More than one table or view

– A read-only view

– An OUTER clause with a typed table ortyped view

– A table or view that is also identified in theFROM clause of a subquery of the SELECTstatement. (NOTE: This is only a restrictionon version of DB2 prior to Version 2).

v A set operator (other than UNION ALL).

Note that these conditions do not apply tosubqueries of the SELECT statement.

The statement cannot be processed.

User Response: Do not perform updates on theresult table as specified.

92 Message Reference, Volume 2

Page 101: Db2 SQL Errors

Federated system users: isolate the problem tothe data source failing the request (see theproblem determination guide for procedures tofollow to identify the failing data source). If adata source is failing the request, examine therestrictions for that data source to determine thecause of the problem and its solution. If therestriction exists on a data source, see the SQLreference manual for that data source todetermine why the object is not updatable.

sqlcode: -511

sqlstate: 42829

SQL0513W The SQL statement will modifyan entire table or view.

Explanation: The UPDATE or DELETEstatement does not contain a WHERE clause soall rows of the table or view are modified if thisstatement is executed.

The statement is accepted.

Federated system users: not all data sourcesreport this warning condition. The federatedserver attempts to issue this warning wheneverthe condition exists, but there is no guaranteethat the federated server can always detect thiscondition. Do not rely on this warning topreclude UPDATE/DELETE operations fromaffecting an entire table or view.

User Response: Ensure that you intend tomodify the entire table or view.

SQL0514N The cursor “<name>” is not in aprepared state.

Explanation: The application program tried touse a cursor “<name>” that is not in a preparedstate. The cursor is associated with a statementthat either (1) was never prepared, (2) was madenot valid by a ROLLBACK, or (3) was made notvalid by either an explicit or implicit rebind ofthe package.

The statement cannot be processed.

User Response: For case (1), prepare thestatement named in the DECLARE CURSORstatement for “<name>” before you try to open

the cursor. For case (2), do not issue aROLLBACK until after you finish using thecursor. For case (3), the prepare for the cursormust be reissued.

sqlcode: -514

sqlstate: 26501

SQL0516N The DESCRIBE statement doesnot specify a prepared statement.

Explanation: The statement name in theDESCRIBE statement must specify a statementthat was prepared in the same databasetransaction.

The statement cannot be processed.

User Response: Verify that the statement namespecifies a statement that has been prepared.

sqlcode: -516

sqlstate: 26501

SQL0517N The cursor “<name>” identifies aprepared statement that is not aSELECT or VALUES statement.

Explanation: The cursor “<name>” could not beused as specified because the prepared statementnamed in the cursor declaration was not aSELECT or VALUES statement.

The statement cannot be processed.

User Response: Verify that the statement nameis specified correctly in the PREPARE and theDECLARE CURSOR for cursor “<name>”statements. Or correct the program to ensure thatonly prepared SELECT or VALUES statementsare used in association with cursor declarations.

sqlcode: -517

sqlstate: 07005

Chapter 2. SQL Messages 93

Page 102: Db2 SQL Errors

SQL0518N The statement named in theEXECUTE statement is not in aprepared state or is a SELECT orVALUES statement.

Explanation: The application program tried toEXECUTE a statement that (1) was neverprepared, (2) was made not valid by aROLLBACK, (3) is a SELECT or VALUESstatement, or (4) was made not valid by eitheran explicit or implicit rebind of the package.

The statement cannot be processed.

User Response: For case (1), prepare thestatement before attempting the EXECUTE. Forcase (2), either do not issue a ROLLBACK untilafter you finish using the prepared statement, orprepare the statement again after theROLLBACK. For case (3), ensure that thestatement is not a SELECT or VALUES statement.For case (4), the prepare for the cursor must bereissued.

sqlcode: -518

sqlstate: 07003

SQL0519N The PREPARE statementidentifies the SELECT or VALUESstatement of the open cursor“<name>”.

Explanation: The application programattempted to prepare the SELECT or VALUESstatement for the specified cursor when thatcursor is already open.

The statement cannot be prepared. The cursorwas not affected.

User Response: Correct the application programso it does not attempt to prepare the SELECT orVALUES statement for a cursor that is open.

sqlcode: -519

sqlstate: 24506

SQL0525N The SQL statement cannot beexecuted because it was in error atbind time for section = ″<sectno>″package = ″<pkgname>″consistency token =X″<contoken>″.

Explanation: One of the following:

v The statement was in error when the packagewas bound, but the error was ignored thenbecause the option SQLERROR (CONTINUE)was used. Since the statement contains anerror, it cannot be executed.

v The statement might not be an executablestatement at this location, or might only beexecutable by a DB2 application requester (forexample, DECLARE TABLE in an applicationrunning on OS/2 causes this message).

The variables are:

sectno Section number

pkgnamelocid.collid.pkgid

contokenConsistency token in hexadecimal

The statement cannot be executed.

User Response: If the SQL statement is notsupposed to execute at the indicated location,then correct the program so that the statement inerror does not execute at that location.Precompile, compile, and bind replace thepackage. If the SQL statement is supposed toexecute at the indicated location, correct theproblem found when it was bound and bind thepackage over using BIND withACTION(REPLACE). If multiple versions of thepackage have been bound, issue the followingSELECT statement to determine which versionhas the error: SELECT VERSION FROMlocid.SYSIBM.SYSPACKAGE WHERELOCATION = ’ ’ AND COLLID = ’collid’ ANDNAME = ’pkgid’ AND HEX(CONTOKEN) =’contoken’

Where:

locid Location name

94 Message Reference, Volume 2

Page 103: Db2 SQL Errors

collid Collection id

pkgid Program name

sqlcode: -525

sqlstate: 51015

SQL0526N The requested function does notapply to declared temporarytables.

Explanation: The SQL statement being executedrefers to a declared temporary table. A declaredtemporary table cannot be used in the givencontext.

The statement cannot be processed.

User Response: Modify the SQL statement toensure that the object references are not todeclared temporary tables.

sqlcode: -526

sqlstate: 42995

SQL0528N The table “<tablename>” alreadyhas a unique constraint that is aduplicate of constraint “<name>”.

Explanation: A UNIQUE clause uses the samecolumn list as the PRIMARY KEY clause, anotherUNIQUE clause or the PRIMARY KEY or aUNIQUE constraint that already exists for thetable “<tablename>”. Duplicate uniqueconstraints are not allowed.

“<name>” is the constraint name, if one wasspecified or exists. If a constraint name is notspecified, “<name>” is the first column namespecified in the column list of the UNIQUEclause followed by three periods.

The statement cannot be processed.

User Response: Remove the duplicate UNIQUEclause or change the column list to a set ofcolumns that is not already part of a uniqueconstraint.

sqlcode: -528

sqlstate: 42891

SQL0530N The insert or update value of theFOREIGN KEY“<constraint-name>” is not equalto any value of the parent key ofthe parent table.

Explanation: A value in a foreign key of theobject table is being set, but this value is notequal to any value of the parent key of theparent table.

When a row is inserted into a dependent table,the insert value of a foreign key must be equal tosome value of the parent key of any row of theparent table of the associated relationship.

Similarly, when the value of a foreign key isupdated, the update value of a foreign key mustbe equal to the value of the parent key of anyrow of the parent table of the associatedrelationship at the completion of the statement.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<constraint name>”. Inthese cases the message token will have thefollowing format: “<data source>:UNKNOWN”,indicating that the actual value for the specifieddata source is unknown.

The statement could not be executed. Thecontents of the object table are unchanged.

User Response: Examine the insert or updatevalue of the foreign key first, and then compareit with each of the parent key values of theparent table to determine and correct theproblem.

sqlcode: -530

sqlstate: 23503

SQL0531N The parent key in a parent row ofrelationship “<constraint-name>”cannot be updated.

Explanation: An operation attempted to updatea parent key in the row of the parent table butthe parent key in the specified row hasdependent rows in the dependent table

Chapter 2. SQL Messages 95

Page 104: Db2 SQL Errors

associated with it in the “<constraint-name>”constraint.

When the update rule of constraint“<constraint-name>” is NO ACTION, the valueof a parent key in a parent row cannot beupdated if the parent row has any dependentrows at the completion of the statement.

When the update rule of constraint“<constraint-name>” is RESTRICT, the value of aparent key in a parent row cannot be updated ifthe parent row has any dependent rows at thetime the update of the parent key is attempted.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<constraint name>”. Inthese cases the message token will have thefollowing format: “<data source>:UNKNOWN”,indicating that the actual value for the specifieddata source is unknown.

The statement could not be executed. Thecontents of the parent table are unchanged.

User Response: Examine the parent key of theobject table and the foreign key of the dependenttable to determine if the value of the specifiedrow of the parent key should be changed. If thisdoes not show the problem, examine the contentsof the object table and the dependent table todetermine and correct the problem.

sqlcode: -531

sqlstate: 23001, 23504

SQL0532N A parent row cannot be deletedbecause the relationship“<constraint-name>” restricts thedeletion.

Explanation: An operation attempted to delete aspecified row of the parent table but the parentkey in the specified row has dependent rows inthe referential constraint “<constraint-name>”and the delete rule of NO ACTION or RESTRICTis specified for the relationship.

When the delete rule of constraint

“<constraint-name>” is NO ACTION, a row ofthe parent table cannot be deleted if thedependent rows are still dependent on the parentkey at the completion of the statement.

When the delete rule of constraint“<constraint-name>” is RESTRICT, a row of theparent table cannot be deleted if the parent rowhas any dependent rows at the time of the delete.

Note that a delete can cascade to delete otherrows in dependent tables that have a delete ruleof NO ACTION or RESTRICT. Thus theconstraint “<constraint-name>” may be on adifferent table than the original delete operation.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<constraint name>”. Inthese cases the appropriate fields contain values(such as “unknown”) that indicate that the actualvalue is unknown.

The statement could not be executed. Thecontents of the table are unchanged.

User Response: Examine the delete rule for alldescendent tables to determine and correct theproblem. The specific tables involved can bedetermined from the relationship“<constraint-name>”.

sqlcode: -532

sqlstate: 23001, 23504

SQL0533N The INSERT statement is notvalid because a relationshiprestricts the result of the fullselectto one row.

Explanation: An INSERT operation with afullselect attempted to insert multiple rows into atable that is a parent and a dependent in thesame relationship of a referential constraint.

The fullselect of the INSERT operation shouldreturn no more than one row of data.

The INSERT statement could not be executed.The contents of the object table are unchanged.

96 Message Reference, Volume 2

Page 105: Db2 SQL Errors

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

User Response: Examine the search condition ofthe fullselect to ensure selection of no more thanone row of data.

sqlcode: -533

sqlstate: 21501

SQL0534N Invalid multiple-row update.

Explanation: An UPDATE operation attemptedto perform a multiple-row update of a columnincluded in a primary key or unique index.

Multiple-row updates of columns of a primarykey or unique index are not supported.

The UPDATE statement could not be executed.The contents of the table are unchanged.

Federated system users: the constraint can existon federated server (if the child and parent tablesexist as tables on federated server), or it can existon the data source (if the child and parent tablesexist on the data source).

User Response: Ensure the search condition ofthe UPDATE statement selects only one objecttable row to update.

sqlcode: -534

sqlstate: 21502

SQL0535N The DELETE statement is notvalid because a self-referencingrelationship restricts the deletionto one row.

Explanation: A DELETE operation with aWHERE clause attempted to delete multiplerows from a table which is a parent and adependent in the same relationship of areferential constraint with a RESTRICT or SETNULL delete rule.

The WHERE clause of the DELETE operationshould select no more than one row of data.

The DELETE statement could not be executed.The contents of the object table are unchanged.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

User Response: Examine the WHERE clausesearch condition to ensure no more than one rowof data is selected.

NOTE: This is only a restriction in releases ofDB2 prior to Version 2.

sqlcode: -535

sqlstate: 21504

SQL0536N The DELETE statement is notvalid because table “<name>” canbe affected by the operation.

Explanation: A DELETE operation wasattempted with the indicated table referenced ina subquery.

The indicated table referenced in a subquery ofthe DELETE statement can be affected because itis either:

v A dependent of the DELETE object table in arelationship with a CASCADE or SET NULLdelete rule.

v A dependent of another table in a relationshipwith a CASCADE or SET NULL delete ruleand deletions from the DELETE object tablecan cascade to that table.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<name>”. In these casesthe appropriate fields contain values (such as“unknown”) that indicate that the actual value isunknown.

The statement could not be processed.

User Response: Do not reference a table in aDELETE statement subquery when the table canbe affected by the DELETE statement.

NOTE: This error is only applicable to releases ofDB2 prior to Version 2 and hosts accessedthrough DB2 Connect.

Chapter 2. SQL Messages 97

Page 106: Db2 SQL Errors

sqlcode: -536

sqlstate: 42914

SQL0537N The PRIMARY KEY clause, aFOREIGN KEY clause, a UNIQUEclause, or a PARTITIONING KEYclause identifies column“<name>” more than once.

Explanation: The column “<name>” appearsmore than once in a PRIMARY KEY clause,FOREIGN KEY clause, UNIQUE clause orPARTITIONING KEY clause of a CREATE orALTER statement.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<name>”. In these casesthe appropriate fields contain values (such as“unknown”) that indicate that the actual value isunknown.

The statement cannot be processed.

User Response: Specify unique names for eachcolumn.

sqlcode: -537

sqlstate: 42709

SQL0538N FOREIGN KEY “<name>” doesnot conform to the description ofthe parent key of table“<table-name>”.

Explanation: The definition of the indicatedforeign key does not conform to the parent keydescription of the table “<table-name>”.

Possible errors are:

v The number of columns in the foreign keycolumn list does not match the number ofcolumns in the parent key column list.

v The number of columns in the foreign keycolumn list does not match the number ofcolumns in the primary key of the parent table(a parent key column list is not specified).

v The descriptions of the corresponding columnsare not compatible. Column descriptions arecompatible if corresponding columns havecompatible data types (both columns arenumeric, character strings, graphic, date/time,or have the same distinct type).

“<name>” is the constraint name if specified inthe FOREIGN KEY clause. If a constraint namewas not specified, “<name>” is the first columnname specified in the clause followed by threeperiods.

Federated system users: some data sources donot provide the appropriate values for “<name>”and “<table-name>”. In these cases theappropriate fields contain values (such as“unknown”) that indicate that the actual value isunknown.

The constraint can exist the data source (if thechild and parent tables exist on the data source).

The statement cannot be processed.

User Response: Correct the statement so theforeign key description conforms to the parentkey description.

sqlcode: -538

sqlstate: 42830

SQL0539N Table “<name>” does not have a″<key-type>″ key.

Explanation: One of the following occurred:

v The table “<name>” was specified as a parentin a FOREIGN KEY clause but the table is notdefined as a parent because it does not have aprimary key.

v The ALTER TABLE statement attempted todrop the primary key for the table “<name>”but the table does not have a primary key.

v The ALTER TABLE statement attempted todrop the partitioning key for the table“<name>” but the table does not have apartitioning key.

98 Message Reference, Volume 2

Page 107: Db2 SQL Errors

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<name>” and“<key-type>”. In these cases the appropriatefields contain values (such as “unknown”) thatindicate that the actual value is unknown.

The statement cannot be processed. A systemcatalog cannot be defined as a parent in areferential constraint.

User Response: When creating a referentialconstraint, specify the primary key beforespecifying any foreign keys (constraints).

sqlcode: -539

sqlstate: 42888

SQL0540N The definition of table″<table-name>″ is incompletebecause it lacks a primary indexor a required unique index.

Explanation: The table named was defined witha PRIMARY KEY clause or a UNIQUE clause. Itsdefinition is incomplete, and it cannot be useduntil a unique index is defined for the primarykey (the primary index) and for each set ofcolumns in any UNIQUE clause (the requiredunique indexes). An attempt was made to usethe table in a FOREIGN KEY clause or in an SQLmanipulative statement.

The statement cannot be executed.

User Response: Define a primary index or arequired unique index on the table beforereferencing it.

sqlcode: -540

sqlstate: 57001

SQL0541W The referential, primary key, orunique constraint “<name>” isignored because it is a duplicateconstraint.

Explanation: If “<name>” refers to a referentialconstraint, then a FOREIGN KEY clause uses thesame foreign key and parent table as anotherFOREIGN KEY clause.

If “<name>” refers to a primary key or uniqueconstraint, then one of the following situationsexists.

v A PRIMARY KEY clause uses the same set ofcolumns as a UNIQUE clause in the statement.

v A UNIQUE clause uses the same set ofcolumns as the PRIMARY KEY clause oranother UNIQUE clause in the statement.

v A PRIMARY KEY or a UNIQUE constraint onthe same set of columns already exists for thetable “<tablename>”.

“<name>” is the constraint name, if specified. Ifa constraint name was not specified, “<name>”is the first column name specified in the columnlist of the FOREIGN KEY or UNIQUE clausefollowed by three periods.

Federated system users: the constraint can existon the data source (if the child and parent tablesexist on the data source).

Some data sources do not provide theappropriate values for “<name>”. In these casesthe appropriate fields contain values (such as“unknown”) that indicate that the actual value isunknown.

The indicated referential constraint or uniqueconstraint was not created. The statement wasprocessed successfully.

User Response: No action is required.Processing can continue.

sqlcode: +541

sqlstate: 01543

Chapter 2. SQL Messages 99

Page 108: Db2 SQL Errors

SQL0542N “<name>” cannot be a column ofa primary key or unique keybecause it can contain null values.

Explanation: The column “<name>” identifiedin a PRIMARY KEY clause or UNIQUE clause isdefined to allow null values.

Federated system users: some data sources donot provide the appropriate values for“<name>”. In these cases the appropriate fieldscontain values (such as “unknown”) that indicatethat the actual value is unknown.

The statement cannot be processed.

User Response: Correct the column, primarykey or unique key definition.

sqlcode: -542

sqlstate: 42831

SQL0543N A row in a parent table cannot bedeleted because the checkconstraint “<constraint-name>”restricts the deletion.

Explanation: The delete operation cannot beexecuted because the target table is a parent tableand is connected with a referential constraint to adependent table with a delete rule of SET NULL.However, a check constraint defined on thedependent table restricts the column fromcontaining a null value.

The statement cannot be processed.

User Response: Examine the foreign key and itsdelete rule in the dependent table and theconflicting check constraint. Change either thedelete rule or the check constraint so that theydo not conflict with each other.

sqlcode: -543

sqlstate: 23511

SQL0544N The check constraint“<constraint-name>” cannot beadded because the table containsa row that violates the constraint.

Explanation: At least one existing row in thetable violates the check constraint that is beadded in the ALTER TABLE statement.

The statement cannot be processed.

User Response: Examine the check constraintdefinition that was specified in the ALTERTABLE statement and the data in the table todetermine why there is a violation of theconstraint. Change either the check constraint orthe data so that the constraint is not violated.

sqlcode: -544

sqlstate: 23512

SQL0545N The requested operation is notallowed because a row does notsatisfy the check constraint“<constraint-name>”.

Explanation: Check constraint violations canoccur on either INSERT or UPDATE operations.The resulting row violated the check constraintdefinition on that table.

The statement cannot be processed.

User Response: Examine the data and the checkconstraint definition in the catalog viewSYSCAT.CHECKS to determine why the INSERTor UPDATE statement failed. Change the data sothat the constraint is not violated.

sqlcode: -545

sqlstate: 23513

SQL0546N The check constraint″<constraint-name>″ is invalid.

Explanation: A check constraint in the CREATETABLE or ALTER TABLE statement is invalid forone or more of the following reasons:

v the constraint definition contains a subquery

v the constraint definition contains a columnfunction

100 Message Reference, Volume 2

Page 109: Db2 SQL Errors

v the constraint definition contains a hostvariable

v the constraint definition contains a parametermarker

v the constraint definition contains a specialregister

v the constraint definition contains a variantuser defined function

v the constraint definition contains a userdefined function with external action

v the constraint definition contains a userdefined function with the scratchpad option

v the check constraint is part of a columndefinition, and its check-condition contains areference to a column name other than thecolumn being defined.

v the constraint definition contains a dereferenceoperation or a DEREF function where thescoped reference argument is other than theobject identifier (OID) column.

v the constraint definition uses a TYPEpredicate.

v the constraint definition includes a CASTspecification with a SCOPE clause.

The statement cannot be processed.

User Response: The user response is one of thefollowing, depending on the cause of the error:

v change the check constraint so that it does notinclude the listed item.

v move the check constraint definition outsidethe column definition, so that it becomes atable level constraint definition.

sqlcode: -546

sqlstate: 42621

SQL0548N A check constraint that is definedwith ″<check-condition-element>″is invalid.

Explanation: A check constraint in the CREATETABLE or ALTER TABLE statement is invalid forone or more of the following reasons:

v the constraint definition contains a subquery

v the constraint definition contains a columnfunction

v the constraint definition contains a hostvariable

v the constraint definition contains a parametermarker

v the constraint definition contains a specialregister

v the constraint definition contains a functionthat is not deterministic

v the constraint definition contains a userdefined function with external action

v the constraint definition contains a userdefined function with the scratchpad option

v the definition contains a user defined functionwith the READS SQL DATA option

v the definition contains a reference to agenerated column which is based on anexpression

v the check constraint is part of a columndefinition, and its check-condition contains areference to a column name other than thecolumn being defined

v the generated column definition contains areference to itself

v the constraint definition contains a dereferenceoperation or a DEREF function where thescoped reference argument is other than theobject identifier (OID) column.

v the constraint definition uses a TYPEpredicate.

v the constraint definition includes a CASTspecification with a SCOPE clause.

The token within the text of the error messagelists the invalid item.

The statement cannot be processed.

User Response: The user response is one of thefollowing, depending on the cause of the error:

v change the check constraint or generatedcolumn so that it does not include the listeditem.

v move the check constraint definition outsidethe column definition, so that it becomes atable level constraint definition.

Chapter 2. SQL Messages 101

Page 110: Db2 SQL Errors

sqlcode: -548

sqlstate: 42621.

SQL0549N The “<statement>” statement isnot allowed for “<object-type1 >”“<object-name1>” because thebind optionDYNAMICRULES(BIND) in the“<object-type2>” is in effect.

Explanation: A program attempted to issue theindicated SQL statement that is one of severalSQL statements that cannot be issued from apackage or plan for which the optionDYNAMICRULES(BIND) is in effect. Those SQLstatements are:

v Dynamic GRANT statement

v Dynamic REVOKE statement

v Dynamic ALTER statement

v Dynamic CREATE statement

v Dynamic DROP statement

v Static or dynamic SET CURRENT SCHEMAstatement.

“<statement>”The SQL statement in error

“<object-type1>”PACKAGE or DBRM. DBRM is validonly in a DRDA connection.

“<object-name1>”If “<object-type1>” is PACKAGE,“<object-name1>” is the name of thepackage in the format’location-id.collection-id.package-id’. If“<object-type1>” is DBRM,“<object-name1>” is the name of theDBRM in the format ’plan-nameDBRM-name’.

“<object-type2>”PACKAGE or PLAN. PLAN is validonly in a DRDA connection. If“<object-type1>” is PACKAGE,“<object-type2>” can be eitherPACKAGE or PLAN (whichever isbound with DYNAMICRULES(BIND)).

If “<object-type1>” is DBRM,“<object-type2>” is PLAN.

The SQL statement cannot be executed.

User Response: Do one of the following tocorrect the error:

v If the SQL statement is embedded, remove it,precompile and compile the applicationprogram again, and reissue the BINDcommand with the DYNAMICRULES(BIND)option.

v If appropriate, use the SQL statement with apackage or plan that is bound withDYNAMICRULES(RUN).

v Issue the REBIND command with theDYNAMICRULES(RUN) option for the plan orpackage to which the SQL statement is bound.

sqlcode: -549

sqlstate: 42509

SQL0551N “<authorization-ID>” does nothave the privilege to performoperation “<operation>” on object“<name>”.

Explanation: Authorization ID“<authorization-ID>” attempted to perform thespecified “<operation>” on “<name>” withoutthe proper authorization.

If creating or altering a table with referentialconstraints, this message (SQLCODE) canindicate that the user does not have theREFERENCES privilege to create or drop aFOREIGN KEY. In this case the “<operation>” is“REFERENCES” and the “<name>” is the objectthe constraint references.

If attempting to run a DB2 utility or CLIapplication, the DB2 utility programs may needto be rebound to the database because the useridwho created the database no longer exists or nolonger has the required privileges.

Federated system users: if this message isreturned when the user is changing theremote_pw column of theSYSCAT.USEROPTIONS view, the user is not

102 Message Reference, Volume 2

Page 111: Db2 SQL Errors

authorized to change a password for anotheruser. The user performing the alter operationmust have either SYSADM authority or anauthorization ID (the value in the USER specialregister) that matches the value of the authidcolumn in the rows being updated. Some datasources do not provide the appropriate values for“<authid>”, <operation>, and <name>. In thesecases the message tokens will have the followingformat: “<data source> AUTHID:UNKNOWN”,“UNKNOWN”, and “<datasource>:TABLE/VIEW”, indicating that theactual values for the authid, operation, and nameat the specified data source are not known.

The statement cannot be processed.

User Response: Ensure that“<authorization-ID>” has the authorizationnecessary to perform the operation.

Federated system users: this authorization can beat the federated server, the data source, or both.

If the DB2 utility programs need to be reboundto the database, the database administrator canaccomplish this by issuing one of the followingCLP command from the bnd subdirectory of theinstance, while connected to the database:

v ″DB2 bind @db2ubind.lst blocking all grantpublic″ for the DB2 utilities.

v ″DB2 bind @db2cli.lst blocking all grantpublic″ for CLI.

sqlcode: -551

sqlstate: 42501

SQL0552N “<authorization-ID>” does nothave the privilege to performoperation “<operation>”.

Explanation: Authorization ID“<authorization-ID>” attempted to perform thespecified “<operation>” without the properauthorization.

Federated system users: some data sources donot provide the appropriate values for“<authorization-ID>” and <operation>. In thesecases the message tokens will have the followingformat: “<data source> AUTHID:UNKNOWN”,

and “UNKNOWN” indicating that the actualvalues for authid and operation at the specifieddata source are not known.

The statement cannot be processed.

User Response: Ensure that“<authorization-ID>” has the authorization toperform the operation.

Federated system users: this authorization can beat the federated server, the data source, or both.

sqlcode: -552

sqlstate: 42502

SQL0553N An object cannot be created withthe schema name“<schema-name>”.

Explanation: The reason the schema name“<schema-name>” is invalid depends on the typeof object that is being created.

v Objects of types that existed in releases priorto DB2 Version 2 (tables, views, indexes andpackages) cannot be created with the schemaname SYSCAT, SYSFUN, SYSSTAT or SYSIBM.It is strongly advised that schema namesshould not start with SYS since additionalschemas starting with these letters may bereserved for exclusive use of DB2 in the future.

v Objects of types that are being introducedstarting with DB2 Version 2 (user definedfunctions, distinct types, triggers, schemata,and aliases) cannot be created with anyschema name that starts with the letters SYS.

The statement cannot be processed.

User Response: Use a valid schema name orremove the explicit schema name and rerun thestatement.

sqlcode: -553

sqlstate: 42939

SQL0554N An authorization ID cannot granta privilege to itself.

Explanation: An authorization ID attempted toexecute a GRANT statement where theauthorization ID itself appears as one of the

Chapter 2. SQL Messages 103

Page 112: Db2 SQL Errors

entries in the authorization ID list to whichprivileges are to be granted.

The statement cannot be processed.

User Response: Remove the authorization IDfrom the list.

sqlcode: -554

sqlstate: 42502

SQL0555N An authorization ID cannotrevoke a privilege from itself.

Explanation: An authorization ID attempted toexecute a REVOKE statement where theauthorization ID itself appears as one of theentries in the authorization ID list from whichprivileges are to be revoked.

The statement cannot be processed.

User Response: Remove the authorization IDfrom the list.

sqlcode: -555

sqlstate: 42502

SQL0556N An attempt to revoke a privilegefrom “<authorization-ID>” wasdenied because“<authorization-ID>” does nothold this privilege.

Explanation: The privilege cannot be revokedbecause “<authorization-ID>” does not hold theprivilege.

The statement cannot be processed.

User Response: Change the REVOKE statementto conform to the REVOKE rules and resubmitthe statement. Ensure that when a REVOKEstatement lists several privileges to be revokedand a list of authorization IDs that eachauthorization ID possesses at least one of thespecified privileges.

sqlcode: -556

sqlstate: 42504

SQL0557N The specified combination ofprivileges cannot be granted orrevoked.

Explanation: One of the following occurred:

v The GRANT or REVOKE statement contains acombination of privileges that are of differentclasses. The privileges must all be of one class.Examples are DATABASE, PLAN, or TABLE.

v The GRANT statement attempted to grant aprivilege for a view that is not allowed.ALTER, INDEX and REFERENCES cannot begranted for a view.

The statement cannot be processed.

User Response: Correct and resubmit thestatement.

sqlcode: -557

sqlstate: 42852

SQL0558N An attempt to revoke a privilegefrom “<authorization-ID>” wasdenied because“<authorization-ID>” would stillhold “<control>” authority.

Explanation: “<authorization-ID>” holds the“<control>” privilege. The privilege to berevoked is implicit in the “<control>” privilege,so it cannot be revoked unless the “<control>”privilege is also revoked.

The valid values for “<control>” are thefollowing:

v DBADM

v CONTROL

The statement cannot be executed. No privilegesare revoked.

User Response: Revoke the “<control>”privilege, if desired.

sqlcode: -558

sqlstate: 42504

104 Message Reference, Volume 2

Page 113: Db2 SQL Errors

SQL0562N The specified database privilegescannot be granted to PUBLIC(public).

Explanation: The GRANT statement attemptedto grant a database privilege to the reservedauthorization ID PUBLIC (public). DBADMauthority cannot be granted to PUBLIC (public).

The statement cannot be processed.

User Response: The implied function is notsupported.

sqlcode: -562

sqlstate: 42508

SQL0567N “<authorization-ID>” is not avalid authorization ID.

Explanation: The authorization ID specified by“<authorization-ID>” is not valid for one of thefollowing reasons:

v It begins with ″SYS″, ″sys″, ″IBM″, ″ibm″,″SQL″, or ″sql″.

v It contains characters other than a through z,A through Z, 0 through 9, and the threespecial characters (#,@.$).

v It is delimited and contains lower case letters.

v It is GUESTS, ADMINS, USERS, or LOCAL.

v It is PUBLIC preceded by the keyword USERor GROUP in a GRANT or REVOKEstatement.

The statement cannot be processed.

User Response: Correct the invalidauthorization ID.

sqlcode: -567

sqlstate: 42602

SQL0569N The GRANT/REVOKE statementfailed because″<authorization-name>″ mayidentify both a user and a groupin the system.

Explanation: The GRANT or REVOKEstatement specified an authorization name that

may identify both a user and a group in thesecurity namespace, and did not explicitlyspecify the USER or GROUP keyword in thestatement. The statement is therefore ambiguous.Note that when using DCE security, the USER orGROUP keyword is always required.

User Response: Change the statement toexplicitly specify the USER or GROUP keywordto uniquely identify the required authorizationid.

sqlcode: -569

sqlstate: 56092

SQL0570W Not all requested privileges onobject ″<object-name>″ of type″<object-type>″ were granted.

Explanation: A GRANT operation wasattempted on object ″<object-name>″ of type″<object-type>″, but some or all of the privilegeswere not granted. The authorization ID thatissued the statement does not have all of theprivileges to be granted with grant option ordoes not have DBADM authority.

All valid requested privileges were granted.

User Response: Obtain the required authorityand try the the operation again.

sqlcode: +570

sqlstate: 01007

SQL0572N Package ″<pkgname>″ isinoperative.

Explanation: The package ″<pkgname>″ ismarked as inoperative and must be explicitlyrebound before it can be used. This packagecannot be used because one or more user-definedfunctions that it depends upon have beendropped.

User Response: Explicitly rebind the namedpackage using either the REBIND or the BINDcommand.

sqlcode: -572

sqlstate: 51028

Chapter 2. SQL Messages 105

Page 114: Db2 SQL Errors

SQL0573N A column list specified in thereferences clause of constraint“<name>” does not identify aunique constraint of the parenttable “<table-name>”.

Explanation: A list of column names wasspecified in the references clause for theconstraint identified by “<name>” that does notmatch the column names of the primary key orany unique key of the referenced table“<table-name>”.

“<name>” is the constraint name, if specified. Ifa constraint name was not specified, “<name>”is the first column name specified in the columnlist of the FOREIGN KEY clause followed bythree periods.

The statement cannot be processed.

User Response: Correct the column list in thereferences clause or add the unique constraint tothe referenced table.

sqlcode: -573

sqlstate: 42890

SQL0574N DEFAULT value or IDENTITYattribute value is not valid forcolumn “<column-name>” intable “<table-name>”. Reasoncode: “<reason-code>”.

Explanation: The DEFAULT value or IDENTITYattribute value for column “<column-name>” intable “<table-name>” is not valid. The possiblereason codes are as follows:

1 The value is not assignable to thecolumn because the constant does notconform to the format for a constant ofthat data type, the value has anincorrect length or precision, or thefunction returns an incorrect data type.

2 A floating-point constant is specifiedand the column is not a floating pointdata type

3 A decimal constant is specified andnon-zero digits would be truncatedwhen assigned to the column

4 The value is more than 254 bytes,including quotes for strings, introducercharacters such as the X for a hexconstant, fully qualified function names,and parentheses. Non-significant blanksin the value are ignored. In an unequalcode page environment, the value maybe more than 254 bytes due toexpansion of the string in the databasecode page.

5 The USER special register is specifiedand the length attribute of the characterstring data type is less than 8.

6 A datetime special register (CURRENTDATE, CURRENT TIME, or CURRENTTIMESTAMP) is specified and does notmatch the data type of the column.

7 A function was specified that is notsupported. The specified function mustbe system-generated cast function orone of the built-in functions BLOB,DATE, TIME, or TIMESTAMP.

8 The argument to a datetime functionwas not a character string constant orthe corresponding datetime specialregister.

9 A system-generated cast function wasspecified and the column is not definedwith a user-defined distinct type.

10 A value with non-zero scale wasspecified for the START WITH orINCREMENT BY option of an identitycolumn.

<0 Any reason code that is less than zero isan SQLCODE. The error in theDEFAULT value specification can bedetermined by checking the errormessage corresponding to thisSQLCODE.

The statement cannot be processed.

User Response: Correct the DEFAULT value orIDENTITY attribute value based on the reasoncode that was returned.

sqlcode: -574

106 Message Reference, Volume 2

Page 115: Db2 SQL Errors

sqlstate: 42894

SQL0575N View or summary table “<name>”cannot be used because it hasbeen marked inoperative.

Explanation: The view or summary table“<name>” has been marked inoperative becausea table, view, alias, or privilege upon which it isdependent has been removed. The view cannotbe used by any SQL statement other than one ofthe following:

v COMMENT ON

v DROP VIEW or DROP TABLE

v CREATE ALIAS

v CREATE VIEW or CREATE TABLE

The statement cannot be processed.

User Response: If “<name>” is a view, recreatethe view by issuing a CREATE VIEW statementusing the same view definition as the inoperativeview. If “<name>” is a summary table, recreatethe summary table by issuing the CREATETABLE statement using the same summary tabledefinition as in the inoperative summary table.

sqlcode: -575

sqlstate: 51024

SQL0576N Alias “<name>” cannot be createdfor “<name2>” as it would resultin a repetitive alias chain.

Explanation: The alias definition of “<name>”on “<name2>” would have resulted in arepetitive alias chain which could never beresolved. For example, ″alias A refers to alias Bwhich refers to alias A″ is a repetitive alias chainwhich could never be resolved.

The statement cannot be processed.

User Response: Change the alias definition for“<name>” or revise the definition of one of theother alias definitions in the alias chain to avoida repetitive chain.

sqlcode: -576

sqlstate: 42916

SQL0577N User defined function orprocedure “<function-name>”(specific name “<specific-name>”)attempted to modify data but wasnot defined as MODIFIES SQLDATA.

Explanation: The program used to implementthe body of a user defined function or procedureis not allowed to modify SQL data.

User Response: Remove any SQL statementsthat modify data then recompile the program.For stored procedures, investigate the level ofSQL allowed as specified on the CREATEPROCEDURE statement.

sqlcode: -577

sqlstate: 38002

sqlstate: 42985

SQL0579N User defined function orprocedure “<function-name>”(specific name “<specific-name>”)attempted to read data but wasnot defined as READ SQL DATAor MODIFIES SQL DATA.

Explanation: The program used to implementthe body of a user defined function or procedureis not allowed to read SQL data.

User Response: Remove any SQL statementsthat read data then recompile the program. Forstored procedures, investigate the level of SQLallowed as specified on the CREATEPROCEDURE statement.

sqlcode: -579

sqlstate: 38004

sqlstate: 42985

SQL0580N The result-expressions of a CASEexpression cannot all be NULL.

Explanation: There is a CASE expression in thestatement that has all the result-expressions(expressions following THEN and ELSEkeywords) coded with the keyword NULL.

Chapter 2. SQL Messages 107

Page 116: Db2 SQL Errors

The statement cannot be processed.

User Response: Change the CASE expression toinclude at least one result-expression that is otherthan the keyword NULL.

sqlcode: -580

sqlstate: 42625

SQL0581N The data types of theresult-expressions of a CASEexpression are not compatible.

Explanation: There is a CASE expression in thestatement that has result-expressions (expressionsfollowing THEN and ELSE keywords) that arenot compatible.

The data type of a CASE expression isdetermined using the ″Rules for Result DataTypes″ on the result-expressions. The data typesof the result-expressions may be incompatible forone of the following reasons:

v they are not all character data types

v they are not all numeric data types

v They are not all date data types

v They are not all time data types

v They are not all timestamp data types

v They are not all the same user-defined distinctdata types

The statement cannot be processed.

User Response: Correct the result-expressionsso that they are compatible.

sqlcode: -581

sqlstate: 42804

SQL0582N A CASE expression in a VALUESclause, IN predicate, GROUP BYclause, or ORDER BY clausecannot include a quantifiedpredicate, an IN predicate using afullselect, or an EXISTS predicate.

Explanation: A search condition of a CASEexpression is:

v a quantified predicate (one using SOME, ANY,or ALL),

v an IN predicate using a fullselect or

v an EXISTS predicate

and the CASE expression is part of:

v a VALUES clause

v an IN predicate

v a GROUP BY clause or

v an ORDER BY clause.

Such CASE expressions are not supported. TheCASE expression may be part of a functionwritten in SQL.

The statement cannot be processed.

User Response: Remove the use of thequantified predicate, IN predicate, or EXISTSpredicate from the CASE expression. If the CASEexpression is part of a function, the query mayneed to be written without the function thatcauses the error.

sqlcode: -582

sqlstate: 42625

SQL0583N The use of routine“<routine-name>” is invalidbecause it is not deterministic orhas an external action.

Explanation: The routine (function or method)“<routine-name>” is defined as anon-deterministic routine or a routine with anexternal action. This type of routine is notsupported in the context in which it is used. Thecontexts in which these are not valid are:

v as the first operand of a BETWEEN predicate

v in the expression prior to the first WHENkeyword in a simple-case-expression.

v in an expression of a GROUP BY clause

v in an expression of an ORDER BY clause(external action only)

v in a FILTER clause of a user-defined predicatespecification or an index extension definition

The statement cannot be processed.

User Response: If the use of a non-deterministicor external action routine was not intended,

108 Message Reference, Volume 2

Page 117: Db2 SQL Errors

substitute a routine without these characteristics.If the behavior associated with thenon-deterministic or external action routine isintentional, use the alternate form of thestatements that make that intent explicit.

v Instead of the BETWEEN predicate, use thecorresponding statement using the equivalentcombination of comparison predicates (a>=band a<=c instead of a between b and c).

v Instead of a simple-when-clause, use thecorresponding searched-when-clause where theroutine would get specified in eachsearch-condition.

v Remove the non-deterministic or externalaction routine from the GROUP BY clause. Ifgrouping is desired on a column of the resultthat is based on a non-deterministic or externalaction routine use a nested table expression ora common table expression to first provide aresult table with the expression as a column ofthe result.

v Remove the external action routine from theORDER BY clause. If the column is part of theresult set of the query, change the expressionin the ORDER BY clause to the simple-integeror simple-column-name form of the sort key.

v Remove the non-deterministic or externalaction routine from the FILTER clause.

sqlcode: -583

sqlstate: 42845

SQL0584N Invalid use of NULL orDEFAULT.

Explanation: DEFAULT can only be used in aVALUES clause that is part of an INSERTstatement.

A VALUES clause that is not part of an INSERTstatement must have a value other than NULL inat least one row for each column.

If DEFAULT is used as a column-name in aWHERE or HAVING clause, it must becapitalized and enclosed in double quotes.

Federated system users: DEFAULT can not beused in a VALUES clause of an INSERT

statement where the object is a nickname.

User Response: Substitute a value other thanNULL or DEFAULT in the VALUES clause. IfDEFAULT is used as a column-name, capitalize itand enclose it in double quotes.

sqlcode: -584

sqlstate: 42608

SQL0585N The schema name“<schema-name>” can not appearmore than once in the functionpath.

Explanation: The function path includes“<schema-name>” more than once. The functionpath can only include one occurrence of eachschema name.

The statement cannot be processed.

User Response: Remove duplicate occurrencesof “<schema-name>” from the function path.

sqlcode: -585

sqlstate: 42732

SQL0586N The total length of the CURRENTFUNCTION PATH special registercannot exceed 254 characters.

Explanation: The CURRENT FUNCTION PATHspecial register is defined as a VARCHAR(254).The content of the string includes each schemaname delimited with double quotes andseparated from the next schema name by acomma. The total length of the string of allschema names in the CURRENT FUNCTIONPATH cannot exceed 254 characters. The SETCURRENT FUNCTION PATH statement or theFUNCPATH option of the PREP or BINDcommand causing this message would exceedthis limit.

The statement or command cannot be processed.

User Response: Remove schema names toreduce the total length to fit the 254 charactermaximum length. If all the schema names arerequired, it may be necessary to consolidatesome user-defined functions so that less schema

Chapter 2. SQL Messages 109

Page 118: Db2 SQL Errors

names are required on the CURRENTFUNCTION PATH.

sqlcode: -586

sqlstate: 42907

SQL0590N Name “<name>” specified inprocedure “<procedure>” is notunique.

Explanation: Name “<name>” is specified as aparameter, SQL variable, cursor, label, orcondition in procedure “<procedure>”. The nameis not unique.

User Response: Change the name so that it isunique.

sqlcode: -590

sqlstate: 42734

SQL0595W Isolation level“<requested-level>” has beenescalated to “<escalated-level>”.

Explanation: The isolation level specified is notsupported by DB2. It has been escalated to thenext higher level of isolation supported by DB2.

User Response: To avoid this warning, specifyan isolation level which is supported by DB2.DB2 supports isolation levels Repeatable Read(RR), Read Stability (RS), Cursor Stability (CS),and Uncommitted Read (UR).

sqlcode: +595

sqlstate: 01526

SQL0598W Existing index ″<name>″ is usedas the index for the primary keyor a unique key.

Explanation: An index was required for anALTER TABLE operation that defined a primary

key or a unique key, and the indicated indexmatches the required index.

When creating a primary key or unique keyindex, an index description matches if itidentifies the same set of columns (in any order)as the primary or unique key without regard toascending or descending specifications, and isspecified as unique.

The statement is processed successfully.

User Response: No action is required.

sqlcode: +598

sqlstate: 01550

SQL0599W Comparison functions are notcreated for a distinct type basedon a long string data type.

Explanation: Comparison functions are notcreated for a distinct type based on a long stringdata type (BLOB, CLOB, DBCLOB, LONGVARCHAR, or LONG VARGRAPHIC) since thecorresponding functions are not available forthese built-in data types.

This is a warning situation. The statement isprocessed successfully.

User Response: No action is required.

sqlcode: +599

sqlstate: 01596

SQL0600 - SQL0699

110 Message Reference, Volume 2

Page 119: Db2 SQL Errors

SQL0600N A routine “<routine-name>” couldnot be generated because of aduplicate signature or because itwould override an existingroutine.

Explanation: During the CREATE or ALTERoperation, a system-generated cast function,observer method, mutator method, or constructorfunction could not be created because anotherfunction or method with the same name andsignature already exists in the schema, orbecause the method or function would overridean existing method.

User Response: Choose another name for theuser-defined type, attribute, or cast function thatcauses the conflict, or drop the function ormethod with the same name as the function ormethod that could not be generated.

sqlcode: -600

sqlstate: 42710

SQL0601N The name of the object to becreated is identical to the existingname “<name>” of type “<type>”.

Explanation: The CREATE or ALTER statementtried to create or add an object “<name>” whenan object of type “<type>” already exists withthat name on the application server or in thesame statement.

If “<type>” is FOREIGN KEY, PRIMARY KEY,UNIQUE, or CHECK CONSTRAINT, the“<name>” is the constraint name specified in theCREATE or ALTER TABLE statement orgenerated by the system.

Federated system users: some data sources donot provide the appropriate values for the“<name>” and “<type>” message tokens. Inthese cases, “<name>” and “<type>” will havethe following format: “OBJECT:<data source>TABLE/VIEW”, and “UNKNOWN” indicatingthat the actual values at the specified data sourceare not known.

The statement cannot be processed. No newobject is created, and the existing object is notaltered or modified.

User Response: Either drop the existing objector choose another name for the new object.

Federated system users: if the statement is aCREATE FUNCTION MAPPING or a CREATETYPE MAPPING statement, the user can alsoconsider not supplying a type mapping nameand the system will automatically generate aunique name for this mapping.

sqlcode: -601

sqlstate: 42710

SQL0602N The CREATE INDEX or CREATEINDEX EXTENSION statementspecifies too many columns (16 isthe maximum).

Explanation: The number of columns for theindex that would be generated by the CREATEINDEX statement exceeds the maximum of 16columns for the database manager. If the index isdefined on a typed table, there is additionaloverhead that reduces the maximum number ofspecified columns to 15.

For a CREATE INDEX EXTENSION statement,the GENERATE KEY function returns a numberof columns that exceeds the maximum of 16columns allowed in an index.

Federated system users: the limit for other datasources is different. That limit could have beenexceeded. This problem may be detected on thefederated server, or it may be detected on thedata source.

The statement cannot be processed.

User Response: Change the index definition toconform to the column limit of 16. For aCREATE INDEX EXTENSION statement, specifya different GENERATE KEY function, or redefinethe function to return fewer columns.

Federated system users: change the indexdefinition to conform to the column limit for thedata source.

sqlcode: -602

sqlstate: 54008

Chapter 2. SQL Messages 111

Page 120: Db2 SQL Errors

SQL0603N A unique index cannot be createdbecause the table contains rowswhich are duplicates with respectto the values of the identifiedcolumns.

Explanation: The index defined in the CREATEINDEX statement could not be created as unique,because the specified table already contains rowsthat duplicate the values of the identifiedcolumns.

Federated system users: this situation may alsobe detected by the data source.

The statement cannot be processed. The specifiedindex is not created.

User Response: Examine the data to determineif the duplicate data is permitted. Alternatively,consider creating a non-UNIQUE index.

sqlcode: -603

sqlstate: 23515

SQL0604N The length, precision, or scaleattribute for column, distinct type,structured type, attribute ofstructured type, function, or typemapping “<data-item>” is notvalid.

Explanation: There is an error in the data typespecification in a CREATE or ALTER statement,or a CAST specification. An invalid length,precision or scale attribute may have beenspecified, or it may be that the data type itself isincorrect or not permitted in this context. Thelocation of the error is given by “<data-item>” asfollows:

v for a CREATE or ALTER TABLE statement,“<data-item>” gives the name of the columncontaining the error or the data typecontaining an error. If the column data type isa structured type, then the explicit or implicitINLINE LENGTH value must be at least 292and cannot exceed 32677.

v for a CREATE FUNCTION statement,“<data-item>” is a token that identifies thearea of the problem in the statement. Forexample, ″PARAMETER 2″ or ″RETURNS″ or

″CAST FROM″. In some cases, it may also bethe data type containing the error.

v for a CREATE DISTINCT TYPE statement,“<data-item>” gives the name of the typebeing defined or the source data typecontaining the error.

v for a CREATE or ALTER TYPE statement,“<data-item>” gives the type of the attributecontaining the error or the name of thestructured type having an incorrect inlinelength value. The inline length cannot besmaller than 292 and the size returned by theconstructor function for the structured type.

v for CAST( expression AS data-type ),″<data-item>″ is ″CAST″ or the data typecontaining the error.

Federated system users: if the statement is aCREATE TYPE MAPPING statement, an attemptwas made to create a type mapping where a typeattribute for either the local data type or theremote data type is not valid. Possible reasonsinclude:

v The local length/precision is set to 0 or anegative value.

v The length/precision attribute is specified fordata types such as date/time/timestamp, float,or integer.

v The scale attribute is specified for data typessuch as character, date/time/timestamp, float,or integer.

v The FOR BIT DATA clause is specified for anon-character type.

v The remote precision is set to 0 for remotetypes other than Informix datetime.

v An invalid field qualifier is being used in atype mapping for an Informix datetime type.

v An ending value is lower than the startingvalue in a precision/scale range.

The statement cannot be processed.

User Response: Correct the syntax and tryagain.

sqlcode: -604

sqlstate: 42611

112 Message Reference, Volume 2

Page 121: Db2 SQL Errors

SQL0605W The index was not createdbecause the index “<name>”already exists with the requireddescription.

Explanation: A CREATE INDEX operationattempted to create a new index and theindicated index matches the required index.

For CREATE INDEX, two index descriptionsmatch if they identify the same columns in thesame order with the same ascending ordescending specifications, and are both specifiedas unique or the new index is specified asnon-unique. Also, two index descriptions matchif they identify the same columns in the sameorder with the same or reverse ascending ordescending specifications, and at least onedescription includes the ALLOW REVERSESCANS parameter.

The new index was not created.

User Response: No action is required unless theexisting index ″<name>″ is not a suitable index.For example, the existing index “<name>” is nota suitable index if it does not allow reversescans, and the required one does (or vice versa).In this case, the index “<name>” must bedropped before the required index can becreated.

sqlcode: +605

sqlstate: 01550

SQL0606N The COMMENT ON or LABELON statement failed because thespecified table or column is notowned by “<owner>”.

Explanation: An attempt was made to commentor label on a table or column which does notexist or is not owned by the owner specified inthe message text.

Processing of the SQL statement has ended.

User Response: Correct the statement. Tryagain.

sqlcode: -606

sqlstate: 42505

SQL0607N “<operation>” is not defined forsystem objects.

Explanation: The “<operation>” specified in theSQL statement cannot be performed on systemobjects. One of the following was attempted:

v DROP or ALTER a system owned object suchas a system catalog table, built-in function orbuilt-in data type

v COMMENT ON a system owned built-infunction.

v INSERT or DELETE on a system catalog table.

v UPDATE directly on a system catalog table.Some columns of a subset of system catalogtables are updateable. For UPDATE operationon these catalog tables, updateable views inSYSSTAT schema should be used. For adescription of updateable catalog views(SYSSTAT views), see the SQL Reference.

v CREATE or DROP of an index on a systemtable

v CREATE of a trigger on a system table

v A non-updateable system table was identifiedin the FROM clause of a SELECT statementcontaining a FOR UPDATE clause. For a list ofupdateable system catalogs see the SQLReference.

v DROP or ALTER of a system table space.

v DROP or ALTER of a system nodegroup.

v REDISTRIBUTE of the IBMCATGROUP orIBMTEMPGROUP nodegroups.

The statement cannot be processed.

User Response: Do not attempt to modify anysystem objects except for those columns of thesystem catalog tables which are updateablethrough updateable SYSSTAT views. See the SQLReference for more information.

sqlcode: -607

sqlstate: 42832

SQL0612N “<name>” is a duplicate name.

Explanation: A statement was issued with thesame name appearing more than once whereduplicates are not allowed. Where these names

Chapter 2. SQL Messages 113

Page 122: Db2 SQL Errors

appear varies depending on the type ofstatement.

v CREATE TABLE statements cannot have thesame column name defined for two columns.

v CREATE VIEW statements or common tableexpression definitions cannot have the samecolumn name in the column name list. If nocolumn name list is specified, then the columnnames of the columns in the select list of theview must be unique.

v ALTER TABLE statement cannot add a columnto a table using the name of a column thatalready exists or is the same as anothercolumn being added. Furthermore, a columnname can only be referenced in one ADD orALTER COLUMN clause in a single ALTERTABLE statement.

v CREATE INDEX cannot have a column namespecified more than once as part of the indexkey or the INCLUDE columns of the index.

v CREATE TRIGGER cannot have a columnname specified more than once in the list ofcolumns that cause an update trigger to beactivated.

v CREATE TABLE OF statements cannot havethe same name defined for the REF IS columnand any attribute of the structured type.

v CREATE TYPE statements cannot have thesame name defined for two attributes.Attribute names must be unique with the typeand all supertypes.

v ALTER TYPE statements cannot add anattribute to a structured type using the nameof an attribute that already exists in the typeor any of its subtypes or is the same asanother attribute being added. Also, the nameof the attribute may not be the same as theREF IS column in any table created from thestructured type. Furthermore, an attributename can only be referenced in one ADD orDROP ATTRIBUTE clause in a single ALTERTYPE statement.

v CREATE FUNCTION statements cannot havethe same name defined for two parameters.The name used in the EXPRESSION AS clausecannot be the same as a parameter name.

v CREATE INDEX EXTENSION statementscannot have the same name defined for twoparameters.

The statement cannot be processed.

User Response: Specify unique names asappropriate for the type of statement.

sqlcode: -612

sqlstate: 42711

SQL0613N The primary key or a unique keyidentified by “<name>” is toolong or has too many columns.

Explanation: The sum of the internal lengths ofcolumns in the PRIMARY KEY clause or aUNIQUE clause identified by “<name>” exceeds1024 or the number of columns exceeds themaximum of 16. Also, a primary key or a uniquekey cannot be defined using a LONG VARCHARcolumn. If the primary key or unique constraintis defined on a typed table, there is additionalindex overhead that reduces the maximumnumber of specified columns to 15 and limits thelength to 1020.

“<name>” is the constraint name, if specified, ofthe primary key or unique constraint. If aconstraint name was not specified, “<name>” isthe first column name specified in the primarykey or unique constraint clause followed by threeperiods.

The statement cannot be processed.

User Response: Modify the primary key or aunique key definition by eliminating one or morekey columns to conform to the column limit of16 and the key length limit.

sqlcode: -613

sqlstate: 54008

114 Message Reference, Volume 2

Page 123: Db2 SQL Errors

SQL0614N The index or index extension″<index-name>″ cannot be createdor altered because the combinedlength of the specified columns istoo long.

Explanation: The index could not be created oraltered because the sum of the key columninternal lengths would exceed 1024. Also, anindex cannot be created using a LONGVARCHAR, LONG VARGRAPHIC, or LOBcolumn. If the index is defined on a typed table,there is additional index overhead that reducesthe maximum length by 4 bytes. The index maybe altered by an ALTER TABLE statement thatalters the data type of one or more columns.

An index extension could not be created becausethe sum of the columns returned by theGENERATE KEY function would exceed 1024.

The statement cannot be processed. The specifiedindex or index extension was not created or thetable could not be altered.

User Response: To modify the index definitionor alter column, eliminate one or more keycolumns and reduce the key length to thepermitted maximum. For an index extensiondefinition, specify a different GENERATE KEYfunction, or redefine the function to reduce thelength of the returned row.

sqlcode: -614

sqlstate: 54008

SQL0615N The object “<object-name>” oftype “<object-type>” cannot bedropped because it is currently inuse by the same applicationprocess.

Explanation: A DROP statement of an objectcannot be issued when it is in use.

The statement cannot be processed. The object isnot dropped.

User Response: Close any cursors that dependeither directly or indirectly on the object“<object-name>” and resubmit the statement.

sqlcode: -615

sqlstate: 55006

SQL0620N The CREATE TABLE statementfailed because “<user-id>” has noprivate, recoverable dbspaces withless than 255 tables.

Explanation: The dbspace name was notspecified in the CREATE TABLE statement, sothe database manager tried to find a privatedbspace owned by “<user-id>”. This messagewill appear under one of the followingconditions:

1. There were no private dbspaces found in theDB2 for VM database for the “<user-id>”.

2. There were one or more private dbspacesfound for the “<user-id>”, but each contained255 tables.

3. The private dbspaces were located innonrecoverable storage pools. Only privatedbspaces that exist in recoverable storagepools will be available when the CREATETABLE statement does not specify thedbspace name.

Processing of the SQL statement has ended.

User Response: Suggestions for the threeconditions above are:

1. Acquire a private dbspace in a recoverablestorage pool. You may require a databaseadministrator’s assistance.

2. Drop a table in a private dbspace residing ina recoverable storage pool to free up an entry,or take the action indicated in (1) above.

3. If you want to create the table in a dbspaceexisting in a non-recoverable storage pool,then specify the dbspace name on theCREATE TABLE command. Otherwise, takethe action indicated in (1) above.

Then rerun the CREATE TABLE statement.

If appropriate, acquire a private dbspace for theuser.

sqlcode: -620

sqlstate: 57022

Chapter 2. SQL Messages 115

Page 124: Db2 SQL Errors

SQL0623N A clustering index already existson table “<name>”.

Explanation: The CREATE INDEX statementwould create a second clustering index on thespecified table. A given table can have only oneclustering index.

The statement cannot be executed.

User Response: Check to determine the identityand validity of the existing clustering index ontable “<name>”. Consider creating the indexwithout the CLUSTER attribute.

sqlcode: -623

sqlstate: 55012

SQL0624N Table “<name>” already has a“<key-type>” key.

Explanation: A primary key or partitioning keycannot be defined in an ALTER TABLE statementbecause the indicated table already has a key ofthis type.

The statement cannot be executed.

User Response: A table cannot have more thanone primary key or partitioning key.

sqlcode: -624

sqlstate: 42889

SQL0628N Multiple or conflicting keywordsinvolving the “<clause-type>”clause are present.

Explanation: There are several possible reasonswhy this condition might have been diagnosedfor the statement. Exactly which one happened isindicated by the value of “<clause-type>”. Thepossibilities to consider are:

v The keyword may not be specified in the samestatement as some other keyword.

v The keyword may be part of a sequence ofkeywords where the order in which they arespecified is not enforced. A keyword in such asequence may have been specified with thecontradicting keyword also specified.

v The keyword may appear more than once withdifferent associated values.

v The keyword may require the specifying ofother particular keywords in the samestatement which were not specified.

User Response: Check that the statementconforms to the syntax and rules defined for thestatement. Correct any invalid occurrences ofduplicate or conflicting keywords.

sqlcode: -628

sqlstate: 42613

SQL0629N SET NULL cannot be specifiedbecause FOREIGN KEY“<name>” cannot contain nullvalues.

Explanation: The SET NULL option of theindicated FOREIGN KEY clause is not validbecause no column of the key allows null values.

“<name>” is the constraint name, if specified, inthe FOREIGN KEY clause. If a constraint namewas not specified, “<name>” is the first columnname specified in the column list of theFOREIGN KEY clause followed by three periods.

The statement cannot be processed.

User Response: Change either a column of thekey to allow null values or change the deleterule.

sqlcode: -629

sqlstate: 42834

SQL0631N FOREIGN KEY “<name>” is toolong or has too many columns.

Explanation: The sum of the column internallengths identified in the FOREIGN KEY clause ina CREATE TABLE statement exceeds 1024, or thenumber of columns identified exceeds 16. Also, aforeign key cannot be defined using a LONGVARCHAR column.

“<name>” is the constraint name, if specified, inthe FOREIGN KEY clause. If a constraint namewas not specified, “<name>” is the first columnname specified in the column list of the

116 Message Reference, Volume 2

Page 125: Db2 SQL Errors

FOREIGN KEY clause followed by three periods.

The statement cannot be processed.

User Response: To modify the foreign keydefinition, eliminate one or more key columnsand conform to the 16 column limit and the keylength limit.

sqlcode: -631

sqlstate: 54008

SQL0632N FOREIGN KEY “<name>” is notvalid because the table cannot bedefined as a dependent of table“<table-name>” because of deleterule restrictions (reason code =“<reason-code>”).

Explanation: A referential constraint cannot bedefined because the object table of the CREATETABLE or ALTER TABLE statement cannot bedefined as a dependent of table “<table-name>”for one of the following reason codes:

v (01) The relationship is self-referencing and aself-referencing relationship already exists withthe SET NULL delete rule.

v (02) The relationship forms a cycle of two ormore tables that cause the table to bedelete-connected to itself (all other delete rulesin the cycle would be CASCADE).

v (03) The relationship causes the table to bedelete-connected to the indicated table throughmultiple relationships and the delete rule ofthe existing relationship is SET NULL.

The delete rules of the existing relationshipscause an error, not the delete rule specified in theFOREIGN KEY clause of the CREATE TABLE orALTER TABLE statement.

“<name>” is the constraint name, if specified, inthe FOREIGN KEY clause. If a constraint namewas not specified, “<name>” is the first columnname specified in the column list of theFOREIGN KEY clause followed by three periods.

The statement cannot be processed.

User Response: If possible, eliminate theparticular FOREIGN KEY clause from the

CREATE TABLE or ALTER TABLE statement.

sqlcode: -632

sqlstate: 42915

SQL0633N The delete rule of FOREIGN KEY“<name>” must be“<delete-rule>” (reason code =“<reason-code>”).

Explanation: The delete rule specified in aFOREIGN KEY clause of the CREATE TABLE orALTER TABLE statement is not valid. Theindicated delete rule is required for one of thefollowing reason codes:

v (01) The referential constraint isself-referencing and an existing self-referencingconstraint has the indicated delete rule (NOACTION, RESTRICT or CASCADE).

v (02) The referential constraint isself-referencing and the table is dependent in arelationship with a delete rule of CASCADE.

v (03) The relationship would cause the table tobe delete-connected to the same table throughmultiple relationships and such relationshipsmust have the same delete rule (NO ACTION,RESTRICT or CASCADE).

“<name>” is the constraint name, if specified, inthe FOREIGN KEY clause. If a constraint namewas not specified, “<name>” is the first columnname specified in the column list of theFOREIGN KEY clause followed by three periods.

The statement cannot be processed.

User Response: If possible, change the deleterule.

sqlcode: -633

sqlstate: 42915

SQL0634N The delete rule of FOREIGN KEY“<name>” must not be CASCADE(reason-code = “<reason-code>”).

Explanation: The CASCADE delete rulespecified in the FOREIGN KEY clause of theCREATE TABLE or ALTER TABLE statement isnot valid for one of the following reason codes:

Chapter 2. SQL Messages 117

Page 126: Db2 SQL Errors

v (01) A self-referencing constraint exists with adelete rule of SET NULL, NO ACTION orRESTRICT.

v (02) The relationship would form a cycle thatwould cause a table to be delete-connected toitself. One of the existing delete rules in thecycle is not CASCADE, so this relationshipmay be definable if the delete rule is notCASCADE.

v (03) The relationship would cause anothertable to be delete-connected to the same tablethrough multiple paths with different deleterules or with delete rule equal to SET NULL.

“<name>” is the constraint name, if specified,in the FOREIGN KEY clause. If a constraintname was not specified, “<name>” is the firstcolumn name specified in the column list ofthe FOREIGN KEY clause followed by threeperiods.

The statement cannot be processed.

User Response: If possible, change the deleterule.

sqlcode: -634

sqlstate: 42915

SQL0637N More than one PRIMARY KEYclause or more than one DROPPRIMARY KEY clause wasspecified.

Explanation: The CREATE TABLE statementcontains two or more PRIMARY KEY clauses, orthe ALTER TABLE statement contains two ormore PRIMARY KEY or DROP PRIMARY KEYclauses.

The statement cannot be processed.

User Response: Correct the statement.

sqlcode: -637

sqlstate: 42614

SQL0638N Table “<name>” cannot be createdbecause no column definitionswere specified.

Explanation: The CREATE TABLE statementdoes not contain any column definitions.

The statement cannot be processed.

User Response: Add one or more columndefinitions to the statement.

sqlcode: -638

sqlstate: 42601

SQL0644N Invalid value specified forkeyword ″<keyword>″ instatement ″<statement-type>″.

Explanation: The keyword ″<keyword>″ isfollowed by an invalid value as allowed by thedescription of ″<statement-type>″. For numericvalues, the value may be outside a definedrange. For other types, the value is not in thedefined set of valid values.

User Response: Determine from referencedocumentation for the ″<statement-type>″ whatare valid values and make the appropriatechange.

sqlcode: -644

sqlstate: 42615

SQL0647N Bufferpool “<bufferpool-name>”is currently not active.

Explanation: The bufferpool“<bufferpool-name>” is not active in the currentdatabase environment. An attempt was made tofind another bufferpool with the same page sizebut there are no such bufferpools active in thecurrent database environment. The bufferpool“<bufferpool-name>” was recently defined buthas not yet been activated.

The statement cannot be processed.

User Response: The database must be stoppedand started again to activate the requiredbufferpool.

sqlcode: -647

118 Message Reference, Volume 2

Page 127: Db2 SQL Errors

sqlstate: 57003

SQL0648N The foreign key cannot bedefined because it will cause table“<owner1.table-name1>” to bedelete-connected to table“<owner2.table-name2>” throughmultiple paths. Reason Code =“<reason-code>”.

Explanation: The foreign key cannot be definedbecause one of the following reason codes =“<reason-code>”:

01 The relationship will cause table“<owner1.table-name1>” to bedelete-connected to table“<owner2.table-name2>” throughmultiple paths with the same delete ruleof SET NULL.

02 The relationship will cause table“<owner1.table-name1>” to bedelete-connected to table“<owner2.table-name2>” throughmultiple paths with different deleterules.

Processing of the SQL statement has ended.

User Response: Correct the statement. Tryagain.

sqlcode: -648

sqlstate: 42915

SQL0658N The object “<name>” cannot beexplicitly dropped.

Explanation: The identifier “<name>” identifiesone of the following:

v a cast function or comparison function thatcannot be dropped using the DROP statementbecause it was created by the system for usewith a distinct type

v a method that cannot be dropped using theALTER TYPE method because it was createdby the system for use with a structured type

v a package that cannot be dropped using theDROP statement because it was created by thesystem for use with a SQL procedure

The statement cannot be processed.

User Response:

v The function “<name>” can only be droppedby dropping the distinct type or structuredtype that caused the function or method to bedefined. The distinct type name corresponds toeither the name of the function or the type ofthe parameters to the function.

v The method “<name>” can only be droppedby dropping the structured type that causedthe method to be defined. The method namecorresponds to the name of an attribute for thestructured type.

v The package “<name>” can only be droppedby dropping the SQL procedure that causedthe package to be defined. The specific nameof the SQL procedure can be found byretrieving the DSCHEMA and DNAME fromthe SYSIBM.SYSDEPENDENCIES catalog tablewhere the BSCHEMA and BNAME match“<name>”, BTYPE is ’K’ and DTYPE is ’L’.

sqlcode: -658

sqlstate: 42917

SQL0659N Maximum size of a table objecthas been exceeded.

Explanation: One or more of the objects whichmake up a table has reached its maximum size.The storage objects that make up a table are:

v Data: This is where basic column data is stored

v Index: This is where all indexes on the tableare stored

v Long Data: This is where LONG VARCHARand LONG VARGRAPHIC column data isstored

v Lob/Lob Allocation: This is where BLOB,CLOB, and DBCLOB column data and controlinformation are stored

Once a storage object has grown to its maximumsize, it cannot be extended further.

Chapter 2. SQL Messages 119

Page 128: Db2 SQL Errors

User Response: To make existing space withinthe object available to store new data, thefollowing actions may be taken:

v Reorganize the table

v Delete unnecessary rows from the table

v Drop an index from the table

v Update rows to reduce the amount of data (areorg may be required after this action inorder to reclaim unused storage)

sqlcode: -659

sqlstate: 54032

SQL0667N The FOREIGN KEY “<name>”cannot be created because thetable contains rows with foreignkey values that cannot be foundin the parent key of the parenttable.

Explanation: The definition of the indicatedforeign key failed because the table being alteredcontains at least one row where the foreign keydoes not match the parent key value in theparent table.

“<name>” is the constraint name, if specified. Ifa constraint name was not specified, “<name>”is the first column name specified in the columnlist of the FOREIGN KEY clause followed bythree periods.

The statement cannot be processed. The specifiedtable is not altered.

User Response: Remove the erroneous tablerows and define the foreign key.

sqlcode: -667

sqlstate: 23520

SQL0668N Operation not allowed when theunderlying table (or a dependenttable) is in the Check Pendingstate.

Explanation: When a table is in a checkpending state, there may be one or more rowsthat violate constraints defined on the data. Thistable cannot be used for the operation. An

operation on a parent table that is not in a checkpending state may also receive this error if adependent table is in a check pending state.

User Response: Execute the SET INTEGRITYstatement with the IMMEDIATE CHECKEDoption and ensure that the data satisfies all theconstraints defined on the table or the tabledepending on it.

sqlcode: -668

sqlstate: 57016

SQL0669N A system required index cannotbe dropped explicitly.

Explanation: The DROP INDEX statementattempted to drop an index required to:

v enforce the primary key constraint on a table

v enforce a unique constraint on a table

v enforce the uniqueness of the object identifier(OID) column of a typed table hierarchy

v maintain a replicated summary table.

A system required index cannot be droppedusing the DROP INDEX statement.

The statement cannot be processed. The specifiedindex is not dropped.

User Response: If you do not want to keep theprimary or unique constraint, use the DROPPRIMARY KEY clause or the DROPCONSTRAINT clause of the ALTER TABLEstatement to remove the primary key or uniqueconstraint. If the index was created only forenforcing the primary or unique key, then theindex will be dropped. If not, the DROP INDEXstatement could then be processed.

The index for an OID column can only bedropped by dropping the table.

The index required to maintain a replicatedsummary table can only be dropped by firstdropping the replicated summary table.

sqlcode: -669

sqlstate: 42917

120 Message Reference, Volume 2

Page 129: Db2 SQL Errors

SQL0670N The row length of the tableexceeded a limit of ″<length>″bytes. (Regular table space″<tablespace-name>″.)

Explanation: The row length of a table in thedatabase manager cannot exceed:

v 4005 bytes in a table space with a 4K page size

v 8101 bytes in a table space with an 8K pagesize.

v 16293 bytes in a table space with an 16K pagesize.

v 32677 bytes in a table space with an 32K pagesize.

The length is calculated by adding the internallengths of the columns. Details of internalcolumn lengths can be found under CREATETABLE in the SQL Reference.

One of the following conditions can occur:

v The row length for the table defined in theCREATE TABLE or ALTER TABLE statementexceeds the limit for the page size of the tablespace. The regular table space name″<tablespace-name>″ identifies the table spacefrom which the page size was used todetermine the limit on the row length.

The statement cannot be processed.

User Response: Depending on the cause, doone of the following.

v In the case of CREATE TABLE or ALTERTABLE:

– specify a table space with a larger pagesize,if possible

– otherwise, reduce the row length byeliminating one or more columns orreducing the lengths of one or morecolumns.

sqlcode: -670

sqlstate: 54010

SQL0673N A primary or unique key indexcannot be created because thetable contains rows which areduplicates with respect to thevalues of the identified primaryor unique key columns ofconstraint “<name>”.

Explanation: The primary or unique keydefinition of the constraint identified by“<name>” failed because the table being alteredalready contains rows with duplicate values forthe PRIMARY KEY or UNIQUE clause columns.

“<name>” is the constraint name, if specified. Ifa constraint name was not specified, “<name>”is the first column name specified in the primarykey or unique constraint clause followed by threeperiods.

The statement cannot be processed. The specifiedtable is not altered.

User Response: Remove the erroneous rowsfrom the table before attempting to define theprimary or unique key.

sqlcode: -673

sqlstate: 23515

SQL0680N Too many columns are specifiedfor a table, view, or table function.

Explanation: The maximum number of columnspermitted for each table is based on the page sizeof the table space and the data types of thecolumns. The limits for tables are:

v 4K page size allows a maximum of 500columns

v 8K, 16K, and 32K page sizes allow a maximumof 1012 columns.

The actual number of columns for a table isdetermined by the following formula: TotalColumns * 8 + Number of LOB Columns * 12 +Number of Datalink Columns * 28 <= row sizelimits for page size.

The maximum number of columns permitted foreach view is 5000.

Chapter 2. SQL Messages 121

Page 130: Db2 SQL Errors

The maximum number of columns permitted fora table function is 255.

Federated system users: other data sources mayhave a different maximum column limit. Thislimit has been exceeded.

The statement cannot be processed.

User Response: Ensure that the number of tableor view columns does not exceed the limit. Ifcreating a table where a larger page size wouldallow the number of columns, specify a tablespace with the larger page size. Create separatetables or views, as required, to hold additionalinformation beyond the limit.

Federated system users: limit the number of tablecolumns to the maximum supported by the datasource. Create separate tables or views, asrequired, to hold additional information beyondthe maximum number of columns supported bythe data source.

sqlcode: -680

sqlstate: 54011

SQL0683N The specification for column,attribute, user-defined type orfunction “<data-item>” containsincompatible clauses.

Explanation: There is an error in a data itemspecification in a CREATE or ALTER.Incompatible specifications are present, such as:″INTEGER and FOR BIT DATA″. The location ofthe error is given by “<data-item>” as follows:

v for a CREATE or ALTER TABLE statement,“<data-item>” gives the name of the columncontaining the error.

v for a CREATE FUNCTION statement,“<data-item>” is a token that identifies thearea of the problem in the statement. Forexample, ″PARAMETER 3″ or ″RETURNS″ or″CAST FROM″.

v for a CREATE DISTINCT TYPE statement,“<data-item>” gives the name of the typebeing defined.

v for a CREATE or ALTER TYPE statement,“<data-item>” identifies the clause containingthe error or gives the name of the attributecontaining the error.

The statement cannot be processed.

User Response: Remove the incompatibility andtry the statement again.

sqlcode: -683

sqlstate: 42842

SQL0696N The definition of trigger“<trigger-name>” includes aninvalid use of correlation name ortransition table name “<name>”.Reason code=“<reason-code>”.

Explanation: The trigger definition included aninvalid use of “<name>”. The value of“<reason-code>” indicates the specific problemas follows.

1 NEW correlation name andNEW_TABLE name are not allowed in aDELETE trigger.

2 OLD correlation name and OLD_TABLEname are not allowed in an INSERTtrigger.

3 OLD_TABLE name and NEW_TABLEname are not allowed in a BEFOREtrigger.

The statement cannot be processed.

User Response: Remove the invalid correlationname or transition table name along with thepreceding keyword.

sqlcode: -696

sqlstate: 42898

SQL0697N OLD or NEW correlation namesare not allowed in a triggerdefined with the FOR EACHSTATEMENT clause.

Explanation: The trigger, as defined, includes aREFERENCING clause with OLD or NEW

122 Message Reference, Volume 2

Page 131: Db2 SQL Errors

correlation names specified (or both) and theFOR EACH STATEMENT clause. These cannotbe specified together.

The statement cannot be processed.

User Response: Remove any OLD or NEW

correlation names from the REFERENCINGclause or replace FOR EACH STATEMENT withFOR EACH ROW.

sqlcode: -697

sqlstate: 42899

SQL0700 - SQL0799

SQL0707N The object ″<name>″ cannot becreated because the first threecharacters are reserved for systemobjects.

Explanation: The following is a list of reservednames:

v a table space name cannot start with ’SYS’

v a nodegroup name cannot start with ’SYS’ or’IBM’

User Response: Select a name that does notstart with a reserved prefix.

sqlcode: -707

sqlstate: 42939

SQL0713N The replacement value for″<special-register>″ is invalid.

Explanation: Either the value specified in theSET <special-register> statement is not a validvalue of the indicated special register, or thevalue specified is NULL as a result of anindicator variable.

The statement cannot be executed.

User Response: Correct the replacement valueand/or any indicator variables. See the SQLReference for an explanation of the valid values ofeach special register.

sqlcode: -713

sqlstate: 42815

SQL0723N An error occurred in a triggeredSQL statement in trigger“<trigger-name>”. Informationreturned for the error includesSQLCODE “<sqlcode>”,SQLSTATE “<sqlstate>” andmessage tokens “<token-list>”

Explanation: An SQL statement in the trigger“<trigger-name>” has failed during execution ofthe trigger. The sqlcode, sqlstate and messagetoken list (each token is separated by the verticalbar character) are provided. The message tokensmay be truncated. See the correspondingmessage for the “<sqlcode>” for furtherexplanation of the error.

The trigger and the original SQL statement thatcaused the trigger to execute cannot beprocessed.

User Response: Check the message associatedwith the SQLCODE of the SQL statement thatfailed. Follow the action suggested by thatmessage.

sqlcode: -723

sqlstate: 09000

SQL0724N The activation of trigger“<trigger-name>” would exceedthe maximum level of cascading.

Explanation: Cascading of triggers occurs whena triggered SQL statement in a trigger wouldresult in another trigger being activated or whena referential constraint delete rule causesadditional triggers to be activated. The depth ofthis cascading is limited to 16.

Note that recursive situations where a triggerincludes a triggered SQL statement that directlyor indirectly causes the same trigger to be

Chapter 2. SQL Messages 123

Page 132: Db2 SQL Errors

activated is a form of cascading that is verylikely to cause this error if there are noconditions to prevent cascading from exceedingthe limit.

The “<trigger-name>” specified is one of thetriggers that would have been activated at theseventeenth level of cascading.

User Response: Start with the triggers that areactivated by the UPDATE, INSERT or DELETEstatement that received this error. If any of thesetriggers are recursive, ensure that there is somecondition that prevents the trigger from beingactivated more than the limit allows. If this is notthe cause of the problem, follow the chain oftriggers that are activated to determine the chainthat exceeds the cascading limit.

sqlcode: -724

sqlstate: 54038

SQL0727N An error occurred during implicitsystem action type“<action-type>”. Informationreturned for the error includesSQLCODE “<sqlcode>”,SQLSTATE “<sqlstate>” andmessage tokens “<token-list>”.

Explanation: The processing of a statement orcommand has caused the database manager toimplicitly perform additional processing. Duringthis processing an error was encountered. Theaction attempted is shown by the“<action-type>”:

1 implicit rebind of a package

2 implicit prepare of a cached dynamicSQL statement

3 implicit regeneration of a view

4 This return code is reserved for use byDB2.

5 incremental bind of an SQL statement

The sqlcode, sqlstate and message token list(each token is separated by the vertical barcharacter) are provided. The message tokens may

be truncated. See the corresponding message forthe “<sqlcode>” for further explanation of theerror.

The original SQL statement or command thatcaused the “<action-type>” cannot be processedand the implicit system action was notsuccessful.

Federated system users: You may have receivedthis message because you dynamically preparedan SQL statement in a pass-through session andthen tried to execute the statement after thesession was closed.

User Response: Check the message associatedwith the SQLCODE of the SQL statement thatfailed. Follow the action suggested by thatmessage.

For an invalid package, the REBIND commandcan be used to recreate the error or to explicitlyvalidate the package once the cause of the errorhas been resolved.

For a failure while regenerating a view, the nameof the view that failed is recorded in thedb2diag.log file. The failing view can be droppedor a change made to the statement or commandthat caused the view regeneration.

Federated system users: If the statement thatfailed was dynamically prepared in apass-through session, open another pass-throughsession, write and prepare the statement again,and execute it while the session is still open.

sqlcode: -727

sqlstate: 56098

SQL0750N The source table cannot berenamed because it is referencedin a view, summary table, trigger,SQL function, SQL method, checkconstraint, or referentialconstraint.

Explanation: The source table in a RENAMEstatement cannot be renamed for one or more ofthe following reasons.

124 Message Reference, Volume 2

Page 133: Db2 SQL Errors

v The table is referenced in one or more existingviews.

v The table is referenced in one or more existingsummary tables.

v The table is referenced in one or more existingtriggers. This includes triggers on the table orreferences in triggered SQL statements.

v The table is referenced in one or more existingSQL functions or SQL methods.

v The table has check constraints defined.

v The table is involved in one or more referentialconstraints as a parent or dependent table.

The statement cannot be processed.

User Response: Drop the views, summary table,triggers, SQL functions, SQL methods, checkconstraints, or referential constraints on the tablebefore issuing the RENAME statement. For viewsor summary tables dependent on the table, querySYSCAT.VIEWDEP where the table matchesBSCHEMA and BNAME columns. For triggersdependent on the table, query SYSCAT.TRIGDEPwhere the table matches BSCHEMA and BNAMEcolumns. For SQL functions or SQL methods,query SYSCAT.FUNCDEP where the tablematches BSCHEMA and BNAME columns. Forcheck constraints on the table, querySYSCAT.CHECKS where the table matchesTABSCHEMA and TABBNAME columns. Forreferential constraints dependent on the table,query SYSCAT.REFERENCES where the tablematches TABSCHEMA and TABNAME columnsor REFTABSCHEMA and REFTABNAMEcolumns.

sqlcode: -750

sqlstate: 42986

SQL0751N User defined function orprocedure “<function-name>”(specific name “<specific-name>”)attempted to execute a statementthat is not allowed.

Explanation: The program used to implementthe body of a user defined function or procedureis not allowed to execute the statement.

User Response: Remove the statement thenrecompile the program.

sqlcode: -751

sqlstate: 38003

sqlstate: 42985

SQL0752N Connecting to a database is notpermitted within a logical unit ofwork when the CONNECT type 1connection setting is in use.

Explanation: An attempt was made to connectto either another database or the same databasebefore issuing a COMMIT or ROLLBACKstatement. The request cannot be processedwithin a CONNECT type 1 environment.

User Response:

v Submit a COMMIT or ROLLBACK statementbefore requesting a connection to anotherdatabase.

v If multiple databases need to be updatedwithin a unit of work, change the connectionsettings to SYNCPOINT TWOPHASE andCONNECT 2 by re-precompiling or by issuingthe SET CLIENT API from within theapplication.

sqlcode: -752

sqlstate: 0A001

SQL0773N Case not found for CASEstatement.

Explanation: A CASE statement without anELSE clause was found in the routine body of anSQL procedure. None of the conditions speicifiedin the CASE statement were met.

User Response: Change the CASE statement tohandle all conditions that can occur.

sqlcode: -773

sqlstate: 20000

Chapter 2. SQL Messages 125

Page 134: Db2 SQL Errors

SQL0776N Use of cursor “<cursor-name>” isnot valid.

Explanation: Cursor “<cursor-name>” isspecified as the cursor name on a FOR statementin an SQL procedure. The cursor cannot bespecified on a CLOSE, FETCH, or OPENstatement within the FOR statement.

User Response: Remove the CLOSE, FETCH, orOPEN statement.

sqlcode: -776

sqlstate: 428D4

SQL0777N Nested compound statements arenot allowed.

Explanation: Atomic compound statements inthe routine body of an SQL procedure cannot benested.

User Response: Ensure that the SQL proceduredoes not contain nested atomic compoundstatements.

sqlcode: -777

sqlstate: 42919

SQL0778N End label “<label>” is not thesame as the begin label.

Explanation: Label “<label>” specified at theend of a FOR, IF, LOOP, REPEAT, WHILE, orcompound statement in an SQL procedure is notthe same as the label at the beginning of thestatement. You cannot specify an end label if abegin label is not specified.

User Response: Ensure that the end label is thesame as the begin label for FOR, IF, LOOP,REPEAT, WHILE, and compound statements.

sqlcode: -778

sqlstate: 428D5

SQL0779N Label “<label>” specified on aGOTO, ITERATE, or LEAVEstatement is not valid.

Explanation: Label “<label>” is specified on aGOTO, ITERATE, or LEAVE statement in an SQLprocedure. The label is not defined or is not avalid label for the statement.

The label on an ITERATE statement must be thelabel for a FOR, LOOP, REPEAT, or WHILEstatement.

The label on a LEAVE statement must be thelabel for a FOR, LOOP, REPEAT, WHILE, orcompound statement.

The label on a GOTO must be defined within ascope that the GOTO statement can reach.

v If the GOTO statement is defined in a FORstatement, “<label>” must be defined insidethe same FOR statement, excluding a nestedFOR statement or nested compound statement.

v If the GOTO statement is defined in acompound statement, “<label>” must bedefined inside the same compound statement,excluding a nested FOR statement or nestedcompound statement.

v If the GOTO statement is defined in a handler,“<label>” must be defined in the samehandler, following the other scope rules.

v If the GOTO statement is defined outside of ahandler, “<label>” must not be defined withina handler.

User Response: Specify a valid label on theGOTO, ITERATE, or LEAVE statement.

sqlcode: -779

sqlstate: 42736

SQL0780N UNDO is specified for a handlerwhen ATOMIC is not specifiedfor the compound statement.

Explanation: UNDO is specified for a handlerin a compound statement in an SQL procedure.UNDO cannot be specified unless the compoundstatement is ATOMIC.

User Response: Either specify that the

126 Message Reference, Volume 2

Page 135: Db2 SQL Errors

compound statement is ATOMIC or specify EXITor CONTINUE on the handler.

sqlcode: -780

sqlstate: 428D6

SQL0781N Condition “<condition>” specifiedin a handler is not defined.

Explanation: Condition “<condition>” specifiedin a handler in an SQL procedure is not defined.

User Response: Define the condition using theDECLARE CONDITION statement or remove thecondition from the handler.

sqlcode: -781

sqlstate: 42737

SQL0782N A condition or SQLSTATE valuespecified in a handler is not valid.

Explanation: A condition or SQLSTATE valuespecified in a handler in an SQL is not valid forone of the following reasons:

v The condition or SQLSTATE value has alreadybeen specified by another handler in the samescope.

v The condition or SQLSTATE value wasspecified in the same handler asSQLEXCEPTION, SQLWARNING, or NOTFOUND.

User Response: Remove the condition orSQLSTATE value from the handler.

sqlcode: -782

sqlstate: 428D7

SQL0783N A duplicate column name orunnamed column was specified ina DECLARE CURSOR statementof a FOR statement.

Explanation: The select list in the FORstatement must contain unique column names.The select list specified contains either duplicatecolumn names or unnamed expressions.

User Response: Specify unique column names

in the select list specified in the FOR statement.

sqlcode: -783

sqlstate: 42738

SQL0785N The declaration or use of theSQLSTATE or SQLCODE variableis not valid.

Explanation: SQLSTATE or SQLCODE was usedas a variable in the routine body of an SQLroutine, but is not valid for one of the followingreasons:

v SQLSTATE is not declared as CHAR(5)

v SQLCODE is not declared as INTEGER

v The variable is assigned the NULL value.

The statement cannot be processed.

User Response: Declare the SQLSTATE variableas CHAR(5) and the SQLCODE variable asINTEGER. Set the variable to a valid value.

sqlcode: -785

sqlstate: 428D8

SQL0787N RESIGNAL statement not withina handler.

Explanation: The RESIGNAL statement canonly be used inside condition handlers.

User Response: Remove the RESIGNALstatement or use a SIGNAL statement instead.

sqlcode: -787

sqlstate: 0K000

SQL0789N The data type for parameter orvariable “<name>” is notsupported in the SQL routine.

Explanation: The SQL routine (function,method, or procedure) does not supportvariables or parameters of DATALINK,REFERENCE, DISTINCT, STRUCTURED, or LOBdata types.

User Response: Do not use SQL variables orparameters of DATALINK, REFERENCE,DISTINCT, STRUCTURED, or LOB data types in

Chapter 2. SQL Messages 127

Page 136: Db2 SQL Errors

the SQL routine definition. Specify a differentdata type for the parameter or variable“<name>”.

sqlcode: -789

sqlstate: 429BB

SQL0797N The trigger “<trigger-name>” isdefined with an unsupportedtriggered SQL statement.

Explanation: The trigger is defined with atriggered SQL statement that does match thefollowing list.

v A BEFORE trigger can include the followingtriggered SQL statements:

– a fullselect

– a SET transition-variable statement (onlywhen FOR EACH ROW is specified).

v An AFTER trigger can include the followingtriggered SQL statements:

– an INSERT statement

– a searched UPDATE statement

– a searched DELETE statement

– a fullselect

In some cases the “<trigger-name>” is notavailable for use in the message.

User Response: Check the triggered SQLstatements in the trigger for any statement thatdoes not match the above list and remove it.

sqlcode: -797

sqlstate: 42987

SQL0798N A value cannot be specified forcolumn “<column-name>” whichis defined as GENERATEDALWAYS.

Explanation: When inserting or updating a rowin a table, a value was specified for theGENERATED ALWAYS column“<column-name>”. GENERATED ALWAYScolumns should not be specified in thecolumn-list for an INSERT or in the SET clausefor an update unless the keyword DEFAULT isspecified.

The INSERT or UPDATE is not performed.

User Response: Remove the GENERATEDALWAYS column from the column-list or SETclause, or specify DEFAULT as the column value.

sqlcode: -798

sqlstate: 428C9

SQL0800 - SQL0899

SQL0801N Division by zero was attempted.

Explanation: The processing of a columnfunction or arithmetic expression resulted indivision by zero.

The statement cannot be processed. For theINSERT, UPDATE, or DELETE statements, noinserts or updates are performed.

User Response: Examine the SQL statement todetermine the cause of the problem. If theproblem is data dependent, it is necessary toexamine the data processed when the erroroccurred. Refer to the SQL Reference to see thevalid ranges for the data types.

Federated system users: examine the SQLstatement to determine the cause of the problem.

If the problem is data dependent, examine thedata being processed at the data sources whenthe error occurred.

sqlcode: -801

sqlstate: 22012

SQL0802N Arithmetic overflow or otherarithmetic exception occurred.

Explanation: The processing of a columnfunction or arithmetic expression has resulted inan arithmetic overflow.

The statement cannot be processed. For theINSERT, UPDATE, or DELETE statements, noinserts or updates are performed.

128 Message Reference, Volume 2

Page 137: Db2 SQL Errors

User Response: Examine the SQL statement todetermine the cause of the problem. If theproblem is data dependent, it is necessary toexamine the data processed when the erroroccurred. Refer to the SQL Reference to see thevalid ranges for the data types.

This error may also be returned when columnfunctions cannot handle the value that isreturned by the SQL statement. For example,issuing a SELECT COUNT statement against atable that has more rows than defined by theMAX_LONGINT_INT SQL limit will cause anarithmetic overflow error. Consider using theCOUNT_BIG column function for tables withmore than 2 147 483 647 rows.

Federated system users: examine the SQLstatement to determine the cause of the problem.If the problem is data dependent, examine thedata being processed at the data sources whenthe error occurred. Refer to the correspondingSQL Reference for the data source to determinethe valid ranges for the data types.

sqlcode: -802

sqlstate: 22003

SQL0803N One or more values in theINSERT statement, UPDATEstatement, or foreign key updatecaused by a DELETE statementare not valid because they wouldproduce duplicate rows for a tablewith a primary key, uniqueconstraint, or unique index.

Explanation: The INSERT or UPDATE objecttable is constrained by one or more UNIQUEindexes to have unique values in certain columnsor groups of columns. Alternatively, a DELETEstatement on a parent table caused the update ofa foreign key in a dependent table that isconstrained by one or more UNIQUE indexes tohave unique values in certain columns or groupsof columns. The unique index may exist tosupport a primary key or unique constraintdefined on the table. Completing the requestedinsert or update results in duplicates of thecolumn values.

Alternatively, if a view is the object of theINSERT or UPDATE statement, it is the table onwhich the view is defined that is constrained.

The statement cannot be processed. The tableremains unchanged.

User Response: Examine the definitions for allUNIQUE indexes defined on the object table todetermine the uniqueness constraints thoseindexes impose.

For an UPDATE statement, ensure that thespecified operation is not itself inconsistent withthose uniqueness constraints. If this does notshow the error, examine the object table contentto determine the cause of the problem.

For an INSERT statement, examine the objecttable content to determine which of the values inthe specified value list violates the uniquenessconstraint. Alternatively, if the INSERT statementcontains a subquery, the object table contentsaddressed by that subquery must be matchedagainst the object table contents to determine thecause of the problem.

For a DELETE statement, examine the dependenttables for unique constraints on foreign keys thatare defined with the rule ON DELETE SETNULL. One such table has a foreign key columnincluded in a unique index that cannot be set tonull since there is already a null in the columnfor that table.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and examine the index definitions and data forthe conditions listed previously.

sqlcode: -803

sqlstate: 23505

Chapter 2. SQL Messages 129

Page 138: Db2 SQL Errors

SQL0804N The application program inputparameters for the current requestare not valid. Reason code″<reason-code>″. If a host variableor SQLVAR in the SQLDA isinvalid then: hostvariable/SQLVAR number =″<var-number>″, SQLTYPE =″<sqltype>″, SQLLEN =″<sqllen>″, host variable/SQLVARtype = ″<input_or_output>″.

Explanation: An error occurred whileprocessing the current request.

v The call parameter list, which is created by theprecompiler, may not be correct if theapplication programmer has modified theoutput of the precompiler or over-written thecall parameter list in another way.

v The SQLDA or host variable(s) in the SQLstatement are invalid.

v The request being made is not supported or isout of context.

Reason codes are interpreted as follows:

100 The request being made is notsupported or is out of context.

101 SQLDA.SQLN is less thanSQLDA.SQLD

102 SQLVAR.SQLTYPE is invalid.

Federated system users: A data type thatyou specified is not supported by eitherthe federated server or the data sourcethat you want to access.

103 The length specified inSQLVAR.SQLLEN orSQLVAR2.SQLLONGLEN is incorrectfor the SQL type given inSQLVAR.SQLTYPE.

104 Doubling of the SQLVARs is expected,but the SQLDOUBLED field ofSQLDA.SQLDAID is not set to ’2’. Thismay be required because of a largeobject type or a structured type.

105 A double-byte character Large Objecthas an odd value indicated by the

SQLVAR2.SQLDATALEN pointer, whichis always in terms of bytes, even forDBCLOBs.

106 The SQLDATA pointer is invalid orpoints to insufficient storage.

107 The SQLIND pointer is invalid or pointsto insufficient storage.

108 The SQLDATALEN pointer is invalid orpoints to insufficient storage.

109 A specific number of input hostvariables/SQLVARS is expected for thecurrent SQL statement.

110 The LOB locator is not associated with aLOB of a compatible type.

111 A LOB is indicated by the SQLTYPE ofthe SQLVAR, but the second SQLVAR isnull.

112 The SQLDATATYPE NAME field is notvalid. It does not conform to the formatfor identifying an existing user-definedtype in the database. The format foridentifying an existing user-defined typeis as follows: 8 bytes, followed by aperiod, followed by 18 bytes.

113 The SQLFLAG4 field is not valid. If astructured type is specified the valuemust be X’12’. If a reference type isspecified the value must be X’01’.Otherwise the value must be X’00’.

In SQL statements with host variables, use thehost variable number to count in from thebeginning of the statement (or substatement, inthe case of compound SQL) to locate the invalidhost variable. For statements using an SQLDA,the SQLVAR number is used to locate the invalidSQLVAR. For an input SQLDA, count only inputhost variables or SQLVARs; similarly for output.Note that this number is based at 1.

The statement cannot be processed.

User Response: Examine the applicationprogram for any errors noted. Note that theprogrammer should not attempt to modify theprecompiler output.

130 Message Reference, Volume 2

Page 139: Db2 SQL Errors

Federated system users: If you received reasoncode 102, specify a supported data type andresubmit the program.

sqlcode: -804

sqlstate: 07002

SQL0805N Package “<package-name>” wasnot found.

Explanation: Possible causes for this message(SQLCODE) are:

v The specified package or program is notdefined in the database.

v The program was not bound or it wasdropped.

v The application being run is not bound to thedatabase.

v If attempting to run a DB2 utility or CLIapplication, the DB2 utilities may need to berebound to the database.

The statement cannot be processed.

User Response: Specify the correct packagename or bind the program. If the applicationbeing run is not bound to the database, contactthe database administrator to do the necessarybinding.

If the DB2 utility programs need to be reboundto the database, the database administrator canaccomplish this by issuing one of the followingCLP command from the bnd subdirectory of theinstance, while connected to the database:

v ″DB2 bind @db2ubind.lst blocking all grantpublic″ for the DB2 utilities.

v ″DB2 bind @db2cli.lst blocking all grantpublic″ for CLI.

Federated system users: ensure that the packagesrequired for the federated server are bound atthe applicable data sources. Refer to theInstallation and Configuration Supplement Guidefor more information about binding packages todata sources.

sqlcode: -805

sqlstate: 51002

SQL0808N The CONNECT statementsemantics are not consistent withthose of other existingconnections.

Explanation: The CONNECT statementoriginates from a source file which wasprecompiled having different connection options(SQLRULES, CONNECT type, SYNCPOINT, orRELEASE type) than that of a source file forwhich a connection exists.

User Response: Ensure that all source files areprecompiled using the same CONNECT options,or if this is not possible, call the SET CLIENT apito set the desired options for the applicationprocess before issuing the first CONNECTstatement.

sqlcode: -808

sqlstate: 08001

SQL0811N The result of a scalar fullselect,SELECT INTO statement, orVALUES INTO statement is morethan one row.

Explanation: One of the following caused theerror:

v Execution of an embedded SELECT INTO orVALUES INTO statement resulted in a resulttable of more than one row.

v Execution of a scalar fullselect resulted in aresult table of more than one row.

Federated system users: this situation can bedetected by federated server or by the datasource.

The statement cannot be processed.

User Response: Ensure that the statementcontains the proper condition specifications. If itdoes, there may be a data problem that iscausing more than one row to be returned whenonly one is expected.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)

Chapter 2. SQL Messages 131

Page 140: Db2 SQL Errors

and examine the selection criteria and data forthat object.

sqlcode: -811

sqlstate: 21000

SQL0817N The SQL statement cannot beexecuted because the statementwill result in a prohibited updateoperation.

Explanation: The application attempted toexecute an SQL statement that would result inupdates to user data or to the subsystem catalog.This is prohibited for one of the followingreasons:

v The application is running as an IMSinquiry-only transaction.

v The application is an IMS or CICS applicationthat is attempting to update data at a remoteDBMS that does not support two-phasecommit.

v The application is attempting to update data atmultiple locations and one of the locationsdoes not support two-phase commit.

These SQL statements include INSERT, UPDATE,DELETE, CREATE, ALTER, DROP, GRANT, andREVOKE.

The statement cannot be executed.

User Response: If the application is running asan IMS inquiry-only transaction, see your IMSsystem programmer about changing theinquiry-only status of the transaction underwhich your application is running.

If the IMS or CICS application is attempting aremote update, either the application must bechanged to run as a local application on theserver DBMS, or the server DBMS must beupgraded to support two-phase commit.

If the application is attempting to update data atmultiple locations, either the application must bechanged, or all DBMSs involved must beupgraded to support two-phase commit.

sqlcode: -817

sqlstate: 25000

SQL0818N A timestamp conflict occurred.

Explanation: The timestamp generated by theprecompiler at precompile time is not the sameas the timestamp stored with the package at bindtime.

This problem can be caused by the following:

v Precompile, compile, and link without doingan application bind.

v Precompile and bind without doing theprogram compile and link.

v Bind the application using a bind file thatresulted from a different precompile of theprogram than the precompile that producedthe object module linked into the applicationmodule.

v Bind an application with the same name as anexisting plan and execute the existing (old)application.

Federated system users: in addition to the causeslisted previously, the problem can also be due tonot binding the required packages at allapplicable data sources.

The statement cannot be processed.

User Response: Bind the application again,using the bind file for the program that matchesthe object module. Or, execute the program thatcorresponds to the package stored in thedatabase.

If installing the sample database, record thenumber and text of this message and thencontact your technical service representative.

Federated system users: in addition to thepreviously listed actions, ensure that thepackages required for the federated server arebound at the applicable data sources. Refer to theInstallation and Configuration Supplement formore information on binding packages to datasources.

sqlcode: -818

sqlstate: 51003

132 Message Reference, Volume 2

Page 141: Db2 SQL Errors

SQL0822N The SQLDA contains a dataaddress or indicator variableaddress which is not valid.

Explanation: The application program placed anaddress that is not valid in the SQLDA.

The statement cannot be processed.

User Response: Correct the application programso that valid addresses are placed in SQLDA.

sqlcode: -822

sqlstate: 51004

SQL0840N Too many items were returned ina SELECT list.

Explanation: The number of items returned inthe SELECT list exceeds the allowable maximum.The maximum for SELECT lists (other than oncommon table expressions) is 1012. Themaximum for SELECT lists in common tableexpressions is 5000.

The statement cannot be processed.

User Response: Determine whether all theinformation is actually needed. (Note that thenumber of items returned by the SELECT list * inthe SQL statement SELECT * from A, B, C is thesum of the number of columns in all threetables.) If possible, rewrite the SQL statement soonly the necessary items of information arereturned. If all the information is necessary, breakthe SQL statement into two or more statements.

sqlcode: -840

sqlstate: 54004

SQL0842N A connection to server″<server-name>″ already exists.

Explanation: SQLRULES(STD) is in effect and aCONNECT statement identifies an existing SQLconnection.

User Response: The correction depends on theerror:

v If the server name is not the intended name,correct it.

v If SQLRULES(STD) is in effect and theCONNECT statement identifies an existingSQL connection, replace the CONNECT withSET CONNECTION or change the option toSQLRULES(DB2).

Correct the error in the application and try again.

sqlcode: -842

sqlstate: 08002

SQL0843N The server name does not specifyan existing connection.

Explanation: A statement, command, or APIspecified a server name that does not identify anexisting SQL connection of the applicationprocess.

This may have occurred using:

v a SET CONNECTION statement

v a RELEASE statement

v a DISCONNECT statement

v SET or QUERY CLIENT INFORMATION

User Response: The correction depends on theerror:

v If the server name is not the intended name,correct it.

v Ensure that a connection to the server hasbeen established and is in a current ordormant state before issuing the request forthat connection.

Correct the error in the application and try again.

sqlcode: -843

sqlstate: 08003

SQL0846N Invalid specification of identitycolumn “<column-name>”.

Explanation: For an ALTER or CREATE TABLEstatement, the specification of an identity columnmay be invalid for one of the following reasons:

v The data type of the associated column wasnot one of the allowed data types for anidentity column. The following data types are

Chapter 2. SQL Messages 133

Page 142: Db2 SQL Errors

allowed for an identity column: SMALLINT,INTEGER, BIGINT, and DECIMAL with ascale of zero.

v An invalid value was specified forINCREMENT BY. This value can be anypositive or negative value that could beassigned to this column, but it cannot be 0,and cannot exceed the value of a large integerconstant.

v An invalid value was specified for CACHE.The minimum value for CACHE is 2 and themaximum value is 32767.

The statement cannot be processed.

User Response: Correct the syntax and resubmitthe statement.

sqlcode: -846

sqlstate: 42815

SQL0859N Access to the Transaction ManagerDatabase failed with SQLCODE″<SQLCODE>″.

Explanation: The application was precompiledwith SYNCPOINT(TWOPHASE) and requires aTransaction Manager Database to coordinate thetwo phase commit. Reasons why the TransactionManager Database is not available might includethe following:

v It was not created.

v The tm_database field of the database managerconfiguration file has not been updated andactivated with the name of the database.

v The database exists, but communication to thedatabase failed.

User Response: Possible actions:

v Refer to the SQLCODE that was returned withthis message, and follow the appropriateaction for that SQLCODE.

v Verify that the tm_database exists; if not, createa new database or select a database thatcurrently exists for use as the TM database. Itis recommended to create a separate databaseif there are no serious constraints on diskstorage.

v Update the database manager configurationfor the TM database using the field tm_databaseif that has not already been done.

v Verify that a connection to the tm_database canbe made. For example, attempt the connectionusing the Command Line Processor.

v Ensure that the tm_database chosen is not adatabase accessed through DB2 Connect.

sqlcode: -859

sqlstate: 08502

SQL0863W A successful connection wasmade, but only single bytecharacters should be used.

Explanation: The server database and clientapplication are using codepages for differentlanguage types and any characters outside the7-bit ASCII range cannot be guaranteed (only thecharacters in the 7-bit ASCII range exist in allcodepages). For example, the connection mightbe between a Japanese and a Latin-1 codepage,but none of the Japanese characters will beavailable in the Latin-1 codepage, so all of thesecharacters should be avoided (English charactersare fine though).

Federated system users: possible causes are:

v The federated database supports single-byteand double-byte characters but the databaseclient system supports only single-bytecharacters.

v The data source supports single-byte anddouble-byte characters but the federatedsystem supports only single-byte characters.

User Response: Do not submit SQL statementsor commands that use characters which are notcommon between the application and databasecodepages.

Federated system users: do not submit SQLstatements or commands that use characterswhich are not common between the clientsystem, the federated system, and the datasource.

sqlcode: +863

sqlstate: 01539

134 Message Reference, Volume 2

Page 143: Db2 SQL Errors

SQL0865N Invalid tm_database value.

Explanation: The database chosen as thetm_database in the database managerconfiguration is not valid. The database must beat level DB2 V2.1 or later, and cannot be adatabase accessed through DRDA protocol (ie.through DB2 Connect).

The statement cannot be executed.

User Response:

1. Update the database manager configurationto specify a valid database for the tm_databaseparameter.

2. Issue db2stop and db2start to ensure that thechange takes effect.

sqlcode: -865

sqlstate: 08001

SQL0866N Connection redirection failed.Reason code: “<reason-code>”

Explanation: Directory cataloging for a databasecaused a connection to be redirected in a mannerwhich is not supported.

Possible reason codes are:

01 A database connection involved morethan one redirection from a server toanother server; only one connectionredirection is supported.

02 A connection was attempted whichinvolved both a current version of DB2client or server and a version 1 client orserver. This attempt failed becauseredirection is not supported withversion 1 clients or servers.

User Response: By the reason code, the actionsare:

01 Recatalog the database so that there isno more than one server redirecting theconnection to another server in the pathof the connection.

02 Recatalog the database so that there isno intermediary server redirecting theconnection.

sqlcode: -866

sqlstate: 08001

SQL0868N A CONNECT using aUSER/USING clause wasattempted to a server for which aconnection already exists.

Explanation: A current or dormant connectionto a server exists, and an attempt to CONNECTto this server using the USER/USING clause isinvalid.

User Response: Possible actions:

v Use the SET CONNECTION statement tomake the connection to the DORMANTconnection current.

v Use the CONNECT statement withoutUSER/USING if SQLRULES(DB2) are beingused by the application.

v Complete the existing unit of work,disconnect, and then reconnect usingUSER/USING.

sqlcode: -868

sqlstate: 51022

SQL0880N SAVEPOINT “<savepoint-name>”does not exist or is invalid in thiscontext.

Explanation: An error occurred issuing aRELEASE or ROLLBACK TO SAVEPOINT“<savepoint-name>” statement. Either asavepoint with that name does not exist, or itwas established outside the current atomicexecution context.

The statement cannot be processed.

User Response: Correct the name of thesavepoint in the statement and reissue thestatement.

sqlcode: -880

sqlstate: 3B001

Chapter 2. SQL Messages 135

Page 144: Db2 SQL Errors

SQL0881N A SAVEPOINT with name“<savepoint-name>” alreadyexists, but this savepoint namecannot be reused.

Explanation: The name “<savepoint-name>”has already been used in a SAVEPOINTstatement. The savepoint name cannot be reusedbecause at least one of the SAVEPOINTstatements that used this name also specified theUNIQUE keyword, which asserts that the namemust be unique.

The statement cannot be processed. The newsavepoint is not set. The old savepoint with thesame name still exists.

User Response: Choose another name for thissavepoint and reissue the SAVEPOINT statement.If this existing savepoint name must be reused,issue the RELEASE SAVEPOINT statement tofree the existing savepoint. However, be awarethat the RELEASE SAVEPOINT statement alsoreleases any savepoints that were established in

the transaction since the specified savepoint wasestablished. For more information, refer to theSQL Reference.

sqlcode: -881

sqlstate: 3B501

SQL0882N Savepoint does not exist.

Explanation: An error occurred issuing aROLLBACK TO SAVEPOINT statement. Issuinga ROLLBACK TO SAVEPOINT withoutspecifiying a specific savepoint name is notallowed when there are no existing savepoints.

The statement cannot be processed.

User Response: Issue a different statement, ortry rolling back the entire transaction with theROLLBACK statement.

sqlcode: -882

sqlstate: 3B502

SQL0900 - SQL0999

SQL0900N The application state is in error. Adatabase connection does notexist.

Explanation: A connection to a database doesnot exist. This may be due to one of thefollowing reasons:

v A serious error in the application state hascaused the database connection to be lost.

v The application may have disconnected from adatabase and not established a new currentconnection before executing the next SQLstatement.

User Response: Reestablish a currentconnection be either switching to an existingdormant connection (using CONNECT TO orSET CONNECTION) or by establishing a newconnection (using CONNECT).

sqlcode: -900

sqlstate: 08003

SQL0901N The SQL statement failed becauseof a non-severe system error.Subsequent SQL statements canbe processed. (Reason“<reason>”.)

Explanation: An error has occurred which isdue to a system error. Processing of the SQLstatement has ended for reason “<reason>” (thisis in English only and is useful only to IBMsupport personnel).

User Response: Record the message number(SQLCODE) and reason “<reason>”.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact yourtechnical service representative with thefollowing information:

v Problem description

v SQLCODE

136 Message Reference, Volume 2

Page 145: Db2 SQL Errors

v reason “<reason>”

v SQLCA contents if possible

v Trace file if possible.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and take the necessary diagnostic steps for thatdata source. The problem determinationprocedures for data sources vary, so refer to theapplicable data source manuals.

sqlcode: -901

sqlstate: 58004

SQL0902C A system error (reason code =“<reason-code>”) occurred.Subsequent SQL statementscannot be processed.

Explanation: A system error occurred.

User Response: Record the message number(SQLCODE) and reason code in the message.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact yourtechnical service representative with thefollowing information:

v Problem description

v SQLCODE and embedded reason code

v SQLCA contents if possible

v Trace file if possible.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and take the necessary diagnostic steps for thatdata source. The problem determinationprocedures for data sources vary, so refer to theapplicable data source manuals.

sqlcode: -902

sqlstate: 58005

SQL0903N COMMIT statement failed,transaction rolled back. Reasoncode: “<reason-code>”

Explanation: One or more of the serversparticipating in the current unit of work wasunable to prepare the database to be committed.The COMMIT statement has failed and thetransaction has been rolled back.

Possible reason codes are:

01 A connection to one of the databasesparticipating in the unit of work waslost.

Federated system users: if the databaseyou connected to is a federated serverdatabase where nicknames are used, aconnection to one of the data sourcesrequired for a nickname within thedatabase was lost.

02 One of the databases or nodesparticipating in the unit of work wasaccessed, but unable to prepare tocommit.

Federated system users: if the databaseyou connected to is a federated serverdatabase where nicknames are used, oneof the data sources required for anickname is unable to prepare tocommit.

03 A DB2 Data Links Managerparticipating in the unit of work wasunable to prepare to commit.

User Response: If a connection to a databasewas lost, reestablish the connection. If the failurewas not connection related, reference the errordiagnostic logs on the remote system todetermine the nature of the failure and whataction might be required. Rerun the application.

sqlcode: -903

sqlstate: 40504

Chapter 2. SQL Messages 137

Page 146: Db2 SQL Errors

SQL0904N Unsuccessful execution caused byan unavailable resource. Reasoncode: ″<reason-code>″, type ofresource: ″<resource-type>″, andresource name:″<resource-name>″.

Explanation: The SQL statement could not beexecuted because resource ″<resource-name>″ oftype ″<resource-type>″ was not available at thetime for the reason indicated by ″<reason-code>″.Refer to the Problem Determinationdocumentation of DB2 for MVS for anexplanation of resource type codes.

User Response: Verify the identity of theresource that was not available. To determinewhy the resource was unavailable, refer to thespecified ″<reason-code>″.

sqlcode: -904

sqlstate: 57011

SQL0905N Unsuccessful execution due toresource limit being exceeded.Resource name =″<resource-name>″, limit =″<limit-amount1>″ CPU seconds(″<limit-amount2>″ service units)derived from ″<limit-source>″.

Explanation: The execution of the SQLstatement was terminated because a resourcelimit was exceeded.

The name of the resource whose limit wasexceeded is ″<resource-name>″. It is also thename of the column in the resource limitspecification table from which the limit wasderived. The limit that was exceeded in CPUseconds is ″<limit-amount1>″ and in serviceunits it is ″<limit-amount2>″. The″<resource-name>″ may be ASUTIME, which isthe number of CPU seconds permitted for eachSQL statement. The maximum number of CPUseconds permitted is ″<limit-amount1>″. Themaximum number in service units is″<limit-amount2>″.

The source used to derive the limit-amount is″<limit-source>″ and is either the name of a

resource limit specification table or a ’systemparameter’. If the source is a system parameter,the resource limit specification table did notcontain an applicable entry or an error occurredwhile accessing the table. In either case, the limitis obtained from an install (system) parameter.

User Response: Determine why this SQLstatement took so long and take appropriateaction. Consider simplifying the SQL statement,restructuring tables and indexes, or contactingthe installation group responsible for maintainingthe resource limit specification tables.

An application program that receives this returncode can execute additional SQL statements.

sqlcode: -905

sqlstate: 57014

SQL0906N The SQL statement cannot beexecuted because this function isdisabled due to a prior error.

Explanation: Execution of the SQL statementfailed because the requested function had beendisabled by a prior error. This situation can ariseif the application program has intercepted anabend (for instance, by an ON ERROR conditionin a PL/I program) and continued to executeSQL statements. This situation may also arise if aDB2 CICS transaction encountered a createthread error yet continued to issue SQL requestswithout issuing a SYNCPOINT ROLLBACK first.

User Response: In general, an applicationprogram should terminate upon receipt of thisreturn code. All subsequent attempts by theapplication to execute other SQL statements willalso fail with the same return code. In the case ofa DB2 CICS transaction, if the SQLERRP field inthe SQLCA contains the module nameDSNCEXT1, the transaction may issue aSYNCPOINT ROLLBACK and continueprocessing. If the transactions chooses toROLLBACK and continue processing, it must becapable of correcting the situation that causedthe create thread error to occur originally.

sqlcode: -906

sqlstate: 24514, 51005, 58023

138 Message Reference, Volume 2

Page 147: Db2 SQL Errors

SQL0908N ″<bind-type>″ error using″<auth-id>″ authority BIND,REBIND, or AUTO_REBINDoperation is not allowed.

Explanation: For BIND and REBIND, theindicated authorization ID is not allowed toperform the indicated ″<bind-type>″ against aplan or package. An entry in the resource limitspecification table (RLST) prohibits binding andrebinding by this authorization ID, or allauthorization IDs. For AUTO-REBIND, thesystem parameter controlling AUTO-REBINDoperations is set to disallow AUTO-REBIND.

bind-typeType of bind operation (BIND, REBINDor AUTO-REBIND).

auth-id Authorization ID of the invoker of theBIND subcommand or primaryauthorization ID of the invoker of theplan for AUTO-REBIND operations.

User Response: If the indicated authorization idshould be allowed to bind, change the entry inthe active RLST table. If AUTO-REBINDoperations are disabled, rebind the packagebefore reexecuting the package.

sqlcode: -908

sqlstate: 23510

SQL0909N The object has been deleted.

Explanation: The application program haseither (1) dropped a table and then attempted toaccess it, or (2) dropped an index and then triedto access its object table using that index.

User Response: The logic of the applicationprogram must be corrected such that it does notattempt to access or use an object after it hasbeen dropped.

Dropping indexes within an application programis especially hazardous, because there is no wayof determining whether or not the plan that hasbeen generated for the application (by BIND orREBIND) actually uses a particular index foraccess to its object table.

sqlcode: -909

sqlstate: 57007

SQL0910N The SQL statement cannot accessan object on which a modificationis pending.

Explanation: The application programattempted to access an object within the sameunit of work in which either:

v The application program issued a DROPagainst the object or a related object (e.g. anindex for a table)

v The application program issued a statementagainst the object that added or dropped aconstraint.

v The application program issued a DROPTRIGGER or CREATE TRIGGER statementthat affected the object, either directly orindirectly.

v The application program issued a ROLLBACKTO SAVEPOINT statement, which placed theobject in the modification pending state.

v The application program issued a statementthat caused all rows of a NOT LOGGEDdeclared temporary table to be deleted.

Federated system users: in addition to thepreviously listed causes, other data sourcespecific restrictions may exist that prevent accessto the object.

The SQL statement cannot be processed.

User Response: Modify the application programso there is no attempt to access an object withinthe same unit of work in which the modificationwas made. In general, it is better to isolate DataDefinition Language (DDL) statements in adifferent unit of work than Data ManipulationLanguage (DML) statements that access the sameobjects.

The unit of work must be committed or rolledback before the statement that failed can beprocessed successfully. If the committedmodification caused an object to be dropped,then the object may have to be recreated in orderfor the failing SQL statement to be processedsuccessfully.

Chapter 2. SQL Messages 139

Page 148: Db2 SQL Errors

If the object is modified within a SAVEPOINT,modify the application program so that it doesnot attempt to access the object after theapplication issues a ROLLBACK TO SAVEPOINTstatement. Any cursor that accesses the modifiedobject and is open at the time of the ROLLBACKTO SAVEPOINT will not be accessible. Modifythe application so that it closes the cursor.

If an insert, delete or update statement involvinga NOT LOGGED declared temporary table fails,then all rows in that table are deleted. Anycursor that is open against that declaredtemporary table at the time of the failure will notbe accessible and should be closed by theapplication.

Federated system users: if the previous actiondoes not solve the problem, isolate the request(refer to the Troubleshooting Guide to determinewhich data source is failing to process the SQLstatement) and determine what additionalconstraints exist on the data source that arepreventing access to the object. Ensure that theapplication is not violating any of thoseconstraints.

sqlcode: -910

sqlstate: 57007

SQL0911N The current transaction has beenrolled back because of a deadlockor timeout. Reason code“<reason-code>”.

Explanation: The current unit of work wasinvolved in an unresolved contention for use ofan object and had to be rolled back.

The reason codes are as follows:

2 transaction rolled back due to deadlock.

68 transaction rolled back due to locktimeout.

72 transaction rolled back due to an errorconcerning a DB2 Data Links Managerinvolved in the transaction.

Note: The changes associated with the unit ofwork must be entered again.

The application is rolled back to the previousCOMMIT.

User Response: To help avoid deadlock or locktimeout, issue frequent COMMIT operations, ifpossible, for a long-running application, or for anapplication likely to encounter a deadlock.

Federated system users: the deadlock can occurat the federated server or at the data source.There is no mechanism to detect deadlocks thatspan data sources and potentially the federatedsystem. It is possible to identify the data sourcefailing the request (refer to the problemdetermination guide to determine which datasource is failing to process the SQL statement).

Deadlocks are often normal or expected whileprocessing certain combinations of SQLstatements. It is recommended that you designapplications to avoid deadlocks to the extentpossible.

sqlcode: -911

sqlstate: 40001

SQL0912N The maximum number of lockrequests has been reached for thedatabase.

Explanation: The maximum number of locks forthe database was reached because insufficientmemory was allocated to the lock list.

The statement cannot be processed.

User Response: The application should submita COMMIT or ROLLBACK statement beforesubmitting other SQL statements. Considerincreasing the database configuration parameter(locklist) to allow more lock list space.

sqlcode: -912

sqlstate: 57011

SQL0913N Unsuccessful execution caused bydeadlock or timeout. Reason code“<reason-code>”.

Explanation: The request issued was involvedin an unresolved contention for use of an objectand the execution failed.

140 Message Reference, Volume 2

Page 149: Db2 SQL Errors

The reason codes are as follows:

2 transaction branch failed due todeadlock.

68 transaction branch failed due to locktimeout.

72 transaction rolled back due to an errorconcerning a DB2 Data Links Managerinvolved in the transaction.

80 statement failed due to timeout.

User Response:

v For reason code 80, you can retry the failedstatement without terminating the application.If the application accesses multiple remotedatabases, it may be better to rollback thetransaction to avoid the possibility of a globaldeadlock.

v For other reason codes, issue a request torollback the transaction. The transaction cannotbe commited due to the failure of the currenttransaction branch.

v To help avoid deadlock or lock timeout, issuefrequent COMMIT operations, if possible,within long-running applications orapplications requiring data with highconcurrent access.

sqlcode: -913

sqlstate: 57033

SQL0917N Remote bind from a DRDAapplication requester failed.

Explanation: An error has occurred during aremote bind from a DRDA application requester.This error can be issued during bind or commitprocessing.

User Response: This problem is usually causedby an SQL statement which did not get boundbecause of an error. The user should consult thediagnostics facility at the DRDA applicationrequester to determine which statement iscausing the error and correct it.

sqlcode: -917

sqlstate: 42969

SQL0918N Application must execute arollback.

Explanation: The unit of work has already beenrolled back in the database but other resourcemanagers involved in this unit of work mightnot. To ensure integrity of this application, allSQL requests will be rejected until theapplication issues a rollback.

User Response: All SQL requests will berejected until the application issues a rollback.For example, in a CICS environment, this wouldbe a CICS SYNCPOINT ROLLBACK command.

sqlcode: -918

sqlstate: 51021

SQL0920N Data on a database client systemcannot be accessed from otherdatabase client systems.

Explanation: The workstation has beenconfigured as a client or a server with localclients. Any databases created on this systemcannot be shared by other workstations.

The function cannot be processed.

User Response: Request data only from serverworkstations.

sqlcode: -920

sqlstate: 57019

SQL0925N SQL COMMIT invalid forapplication executionenvironment.

Explanation: COMMIT is disallowed in thefollowing cases:

v In a Distributed Transaction Processingenvironment such as CICS, a static SQLCOMMIT statement was attempted, but acommit statement specific to the environmentis required. For example, in a CICSenvironment this would be the CICSSYNCPOINT command.

v A DB2 application precompiled or set to useCONNECT 2 in a non-TP Monitor

Chapter 2. SQL Messages 141

Page 150: Db2 SQL Errors

environment has issued a dynamic SQLCOMMIT statement, whereas only static SQLCOMMITs are allowed.

v When issued from a stored procedure, SQLCOMMIT is also not allowed if the callingprogram is executing in a distributed unit ofwork or Distributed Transaction Processingenvironment.

User Response: Correct the problem by doingone of the following:

v Remove the statement issuing the COMMITand replace it with a statement which does thevalid equivalent for the environment

v In the case of a connect type 2 in a non-TPMonitor environment, use only staticCOMMIT.

v In the case of a stored procedure, remove theCOMMIT

sqlcode: -925

sqlstate: 2D521

SQL0926N SQL ROLLBACK invalid forapplication executionenvironment.

Explanation: ROLLBACK is disallowed in thefollowing cases:

1. In a Distributed Transaction Processingenvironment such as CICS, a static SQLROLLBACK statement was attempted, but arollback statement specific to the environmentis required. For example, in a CICSenvironment this would be the CICSSYNCPOINT ROLLBACK command.

2. A DB2 application precompiled or set to useCONNECT 2 has issued a dynamic SQLROLLBACK statement, whereas only staticSQL ROLLBACKs are allowed.

3. When issued from a stored procedure, SQLROLLBACK is also restricted if the callingprogram is executing in a distributed unit ofwork (CONNECT type 2) or DistributedTransaction Processing environment.

User Response:

1. Remove the statement issuing theROLLBACK and replace it with a statementwhich does the valid equivalent for theenvironment.

2. In the case of a connect type 2, use only staticCOMMIT.

3. In the case of a stored procedure, remove itentirely.

sqlcode: -926

sqlstate: 2D521

SQL0930N There is not enough storageavailable to process the statement.

Explanation: A request was made to thedatabase that required another memory page butno more pages are available to the databasemanager.

The statement cannot be processed.

User Response: Possible solutions include:

v Verify that your system has sufficient real andvirtual memory.

v Remove background processes.

v If the error occurs during DUOWresynchronization, increase the maxagents andreduce the resync_interval database managerconfiguration parameter values.

sqlcode: -930

sqlstate: 57011

SQL0931C Operating system file tableoverflow occurred. SubsequentSQL statements cannot beprocessed.

Explanation: An Operating system limit hasbeen reached. The application program is notpermitted to issue additional SQL statements.The database is marked as needing recovery andall applications using the database are preventedfrom accessing the database.

User Response: Terminate all the applicationsusing the database. Restart the database.

142 Message Reference, Volume 2

Page 151: Db2 SQL Errors

To help prevent the problem from recurring:

v Change the MAXFILOP database configurationparameter to a smaller value (this will reduceDB2’s use of the operating system file table),and/or

v Terminate other applications that are usingfiles, if appropriate, and/or,

v Refer to the operating system documentationfor increasing the operating system file tablelimit. In most UNIX environments this can beaccomplished by updating the kernelconfiguration with a larger value. (On AIX,this may only be possible by increasing theamount of memory in your machine).

sqlcode: -931

sqlstate: 58005

SQL0950N The table or index cannot bedropped because it is currently inuse.

Explanation: A DROP TABLE or DROP INDEXstatement cannot be issued when an open cursoris currently using the table or index.

The statement cannot be processed. The table orindex is not dropped.

User Response: Close any cursors required andresubmit the statement.

sqlcode: -950

sqlstate: 55006

SQL0951N The object “<object-name>” oftype “<object-type>” cannot bealtered because it is currently inuse by the same applicationprocess.

Explanation: An ALTER statement or SETINTEGRITY statement for an object cannot beissued when it is either locked or in use.

The statement cannot be processed. The object isnot altered.

User Response: Close any cursors that dependeither directly or indirectly on the object

“<object-name>” and resubmit the statement.

sqlcode: -951

sqlstate: 55007

SQL0952N Processing was cancelled due toan interrupt.

Explanation: The user may have pressed theinterrupt key sequence.

The statement processing is terminated. Somechanges may have been applied to the database,but not committed, before termination occurred.

Federated system users: this situation can also bedetected by the data source.

User Response: Continue the application.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -952

sqlstate: 57014

SQL0954C Not enough storage is available inthe application heap to processthe statement.

Explanation: All available memory for theapplication has been used.

The statement cannot be processed.

User Response: Terminate the application onreceipt of this message. Increase the databaseconfiguration parameter (applheapsz) to allow alarger application heap.

sqlcode: -954

sqlstate: 57011

SQL0955C Sort memory cannot be allocatedto process the statement. Reasoncode = “<reason-code>”.

Explanation: Insufficient virtual memory isavailable to the database agent for sortprocessing, as indicated by the reason code:

1 Insufficient private process memory.

Chapter 2. SQL Messages 143

Page 152: Db2 SQL Errors

2 Insufficient shared memory in thedatabase-wide shared memory areadesignated for sort processing.

The statement cannot be processed but otherSQL statements may be processed.

User Response: One or more of the following:

v Decrease the value of the sort heap parameter(sortheap) in the corresponding databaseconfiguration file.

v For reason code 1, increase the private virtualmemory available, if possible. For example, onUNIX systems you can use the ulimitcommand to increase the maximum size of thedata area for a process.

v For reason code 2, increase the size of thedatabase-wide shared memory area designatedfor sort processing by increasing the value ofthe (sheapthres) database managerconfiguration parameter.

sqlcode: -955

sqlstate: 57011

SQL0956C Not enough storage is available inthe database heap to process thestatement.

Explanation: All available memory for thedatabase has been used.

The statement cannot be processed.

User Response: Terminate the application onreceipt of this message. Increase the databaseconfiguration parameter (dbheap) to allow a largerdatabase heap. If the number of I/O servers isnear the high limit, reducing this number mayalso help.

sqlcode: -956

sqlstate: 57011

SQL0958C The maximum number of openfiles has been reached.

Explanation: The maximum number of filehandles available to the database has beenreached.

The statement cannot be processed.

User Response: Increase any parameter thataffects the maximum number of open filesallowed at the location of the database. Thisincludes increasing the configuration parameter(maxfilop) to allow more file handles for theinstance and terminating other sessions to reducethe number of file handles being used.

sqlcode: -958

sqlstate: 57009

SQL0959C Not enough storage is available inthe communication heap of theserver to process the statement.

Explanation: All available memory in the servercommunication heap has been used.

The command or statement cannot be processed.

User Response: Terminate the application onreceipt of this message. Increase the size of thecommunication heap (comheapsz) parameter inthe server workstation database managerconfiguration file.

NOTE: This message is applicable only forreleases of DB2 prior to Version 2.

sqlcode: -959

sqlstate: 57011

SQL0960C The maximum number of fileshas been reached in the database.

Explanation: The maximum number of databasefiles has been reached.

The statement cannot be processed.

User Response: Terminate the application onreceipt of this message. Have all activeapplications disconnect from the database andthen have them reconnect to the database. If theerror continues, drop either tables, indexes, orboth from the database, or split the database.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -960

144 Message Reference, Volume 2

Page 153: Db2 SQL Errors

sqlstate: 57011

SQL0964C The transaction log for thedatabase is full.

Explanation: All space in the transaction log isbeing used.

If a circular log with secondary log files is beingused, an attempt has been made to allocate anduse them. When the file system has no morespace, secondary logs cannot be used.

If an archive log is used, then the file system hasnot provided space to contain a new log file.

The statement cannot be processed.

User Response: Execute a COMMIT orROLLBACK on receipt of this message(SQLCODE) or retry the operation.

If the database is being updated by concurrentapplications, retry the operation. Log space maybe freed up when another application finishes atransaction.

Issue more frequent commit operations. If yourtransactions are not committed, log space may befreed up when the transactions are committed.When designing an application, consider when tocommit the update transactions to prevent a logfull condition.

If deadlocks are occurring, check for them morefrequently. This can be done by decreasing thedatabase configuration parameter DLCHKTIME.This will cause deadlocks to be detected andresolved sooner (by ROLLBACK) which will thenfree log space.

If the condition occurs often, increase thedatabase configuration parameter to allow alarger log file. A larger log file requires morespace but reduces the need for applications toretry the operation.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -964

sqlstate: 57011

SQL0965W There is no message textcorresponding to SQL warning“<SQLCODE>” in the messagefile on this workstation. Thewarning was returned frommodule “<name>” with originaltokens “<token list>”.

Explanation: Database server returned code″<SQLCODE>″ to your application. The warningcode does not correspond to a message in theDB2 message file on this workstation.

User Response: Refer to the documentation foryour database server to determine the cause forspecified ″<SQLCODE>″.

SQL0966N The error mapping file “<name>”specified in the DatabaseConnection Services directorycannot be found or cannot beopened.

Explanation: One of the following conditions istrue:

v The error mapping file does not exist.

v The error mapping file is currently opened byanother application.

v The error mapping file is not located in theexpected path.

v The error mapping file is damaged.

The error mapping data could not be retrieved.

User Response: Release the file from theapplication in which it is open or reinstall orrestore the original file.

sqlcode: -966

sqlstate: 57013

SQL0967N The format of the error mappingfile “<name>” specified in theDatabase Connection Servicesdirectory is not valid.

Explanation: An error occurred while theprogram was reading the error mapping file.

The error mapping data could not be retrieved.

Chapter 2. SQL Messages 145

Page 154: Db2 SQL Errors

User Response: Correct all syntactic errors inthe error mapping file.

sqlcode: -967

sqlstate: 55031

SQL0968C The file system is full.

Explanation: One of the file systems containingthe database is full. This file system may containthe database directory, the database log files, or atable space container.

The statement cannot be processed.

User Response: Refer to the diagnostic log todetermine which file system is full. Free systemspace by erasing unwanted files. Do not erasedatabase files. If additional space is required, itmay be necessary to drop tables and indexesidentified as not required.

On unix-based systems, this disk full conditionmay be due to exceeding the maximum file sizeallowed for the current userid. Use the chusercommand to update fsize. A reboot may benecessary.

sqlcode: -968

sqlstate: 57011

SQL0969N There is no message textcorresponding to SQL error“<error>” in the message file onthis workstation. The error wasreturned from module “<name>”with original tokens “<tokenlist>”.

Explanation: The Database server returnedSQLCODE “<error>” to your application. Theerror code does not correspond to a message inthe DB2 message file on this workstation.

User Response: Refer to the documentation foryour database server to determine the cause forthe specified SQLCODE. Take action specified inthe documentation for the database server to fixthis problem.

Federated system users: isolate the problem tothe data source failing the request (refer to the

Troubleshooting Guide to determine which datasource is failing to process the SQL statement).Find the “<error>” in the applicable manual atthe data source. If the probem is data dependent,it may be necessary to examine the data beingprocessed at the data source at the time the erroroccurred.

SQL0970N The system attempted to write toa read-only file.

Explanation: A file used by the database ismarked read-only or does not exist. The databaserequires write access to this file.

The statement cannot be processed.

User Response: Terminate the application onreceipt of this message (SQLCODE). Ensure thatall database files are allowed both read and writeaccess. Check for unnecessary blank spaceswithin the specified filename.

sqlcode: -970

sqlstate: 55009

SQL0972N The database drive does notcontain the correct diskette.

Explanation: The diskette in the drive is not thedatabase diskette.

The statement cannot be processed.

User Response: Place the required diskette intothe drive. Do not remove a diskette if theapplication starts using a database that resides init.

sqlcode: -972

sqlstate: 57019

SQL0973N Not enough storage is available inthe ″<heap-name>″ heap toprocess the statement.

Explanation: All available memory for this heaphas been used. The statement cannot beprocessed.

User Response: Terminate the application onreceipt of this message (SQLCODE). Increase the

146 Message Reference, Volume 2

Page 155: Db2 SQL Errors

configuration parameter for ″<heap-name>″ toincrease the heap size.

sqlcode: -973

sqlstate: 57011

SQL0974N The drive containing the databaseis locked.

Explanation: The system reported that the drivecontaining the database is locked.

The statement cannot be processed.

User Response: Ensure no other processing (forexample, CHKDSK) that can lock the drive isoccurring on the system. Retry the operation.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -974

sqlstate: 57020

SQL0975N A new transaction could not bestarted because database orinstance ″<name>″ is quiesced byuser ″<username>″. Quiesce type:″<type>″.

Explanation: Another user has quiesced theinstance or database that you are attempting touse, and no new transactions are allowed untilthe instance or database is no longer in thequiesced state.

Quiesce type ″<type>″ refers to the instance ordatabase already quiesced and is a ’1’ for aninstance and a ’2’ for a database.

User Response: Contact the user who currentlyhas the instance or database quiesced todetermine when DB2 will no longer be quiesced,and retry the request at that time.

sqlcode: -975

sqlstate: 57046

SQL0976N The diskette drive door is open.

Explanation: The drive door for the database isopen.

The statement cannot be processed.

User Response: Close the drive door and retrythe operation.

sqlcode: -976

sqlstate: 57021

SQL0977N COMMIT state unknown.

Explanation: The tm_database has becomeunavailable during COMMIT processing, andthis has caused the result of the COMMIT to beunknown. Resynchronization of the databaseswill occur when the tm_database becomesavailable. Note that the transaction may be rolledback during resynchronization. Further executionof SQL statements can safely occur, howeverlocks might be held until the resynchronizationprocess is complete.

User Response: Verify that the connection to thetm_database can be made, for example by usingCLP. If it cannot be made, follow the necessaryactions for the SQLCODE returned to ensure thata connection can be established.

sqlcode: -977

sqlstate: 40003

SQL0978N The diskette is write-protected.

Explanation: A write operation was attemptedto the database but the database diskette is writeprotected.

The statement cannot be processed.

User Response: Verify that you are using thecorrect diskette. Remove protection from thediskette, if necessary.

sqlcode: -978

sqlstate: 55009

Chapter 2. SQL Messages 147

Page 156: Db2 SQL Errors

SQL0979N COMMIT has failed against″<num>″ databases for anapplication process running withSYNCPOINT of NONE. Thefailures include the followingdatabase alias and SQLSTATEpairs (a maximum of four can bereturned): ″<alias/SQLSTATE1>″,″<alias/SQLSTATE2>″,″<alias/SQLSTATE3>″,″<alias/SQLSTATE4>″.

Explanation: An application was connected tomultiple databases, and a COMMIT was issuedwhich failed for one or more of theseconnections.

Federated system users: if one of the failedconnections is a federated server database wherenicknames are used, then a commit against oneof the data sources required for a nickname hasfailed.

User Response: Depending upon the nature ofthe application and the data being updated, theuser might wish to discontinue the processingbeing done, log the failure, and issue theappropriate SQL to ensure that the changesintended by the application are consistentlyreflected across all databases involved.

If a full list of databases affected by COMMITerrors could not be returned please refer to thediagnostic log for a full list.

sqlcode: -979

sqlstate: 40003

SQL0980C A disk error occurred. SubsequentSQL statements cannot beprocessed.

Explanation: A disk error occurred thatprevented successful execution of the current andsubsequent SQL statements. The applicationprogram is not permitted to issue additional SQLstatements. For example, a recovery routineassociated with the application program cannotissue additional SQL statements. The database ismarked as needing recovery and all applications

using the database are prevented from accessingthe database.

The statement cannot be processed.

User Response: Record all error informationfrom the SQLCA, if possible. Terminate allapplications using the database. Determine if theerror is a hardware error and take theappropriate action as specified in theTroubleshooting Guide for hardware problems.Restart the database. If recovery is not possible,restore the database from a backup copy.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -980

sqlstate: 58005

SQL0982N A disk error occurred. However,subsequent SQL statements canbe processed.

Explanation: A disk error occurred duringprocessing of a temporary system file thatprevented successful execution of the currentSQL statement. However, subsequent SQLstatements can be processed.

The statement cannot be processed.

User Response: Terminate the application onreceipt of this message (SQLCODE).

sqlcode: -982

sqlstate: 58004

SQL0983N The transaction log does notbelong to the current database.

Explanation: The signature stored in the log filedoes not match the database dependentsignature. This error usually occurs when theuser specified that the log file be stored in adirectory different from where the database isstored. File redirection can be involved.

The statement cannot be processed.

User Response: Resubmit the command withthe proper access to the log file.

148 Message Reference, Volume 2

Page 157: Db2 SQL Errors

sqlcode: -983

sqlstate: 57036

SQL0984C COMMIT or ROLLBACK was notsuccessful. Subsequent SQLstatements cannot be processed.

Explanation: A commit or rollback operationcould not be processed successfully because of asystem error. The application program is notpermitted to issue additional SQL statements. Forexample, a recovery routine associated with theapplication program may not issue additionalSQL statements. The database is marked asneeding recovery and all applications using thedatabase are prevented from accessing thedatabase.

The statement cannot be processed.

User Response: Record the message number(SQLCODE) and all SQLCA error information, ifpossible. Terminate all applications using thedatabase. Restart the database. If installing thesample database, drop it and install the sampledatabase again.

If recovery is not possible, restore the databasefrom a backup copy.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Contact your technicalservice representative with the followinginformation:

Information required:

v Problem description

v SQLCODE

v SQLCA contents if possible

v Trace file if possible.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and take the necessary diagnostic steps anddatabase recovery procedures for that datasource. The problem determination procedures

and database recovery procedures for datasources vary, so refer to the applicable datasource manuals.

sqlcode: -984

sqlstate: 58005

SQL0985C A file error occurred whileprocessing the database catalogs.The database is not usable.

Explanation: The system is unable to recoverfrom an I/O error on a catalog file.

The system cannot process any statements usingthe database.

User Response: Restore the database from abackup copy.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -985

sqlstate: 58005

SQL0986N A file error occurred whileprocessing a user table. The tableis not usable.

Explanation: The data in the table is no longervalid.

The system cannot process any statements usingthe table.

User Response: Restore the database from abackup version if the database is inconsistent.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -986

sqlstate: 58004

SQL0987C The application control sharedmemory set cannot be allocated.

Explanation: The application control sharedmemory set cannot be allocated. This error iscaused by insufficient memory resources for

Chapter 2. SQL Messages 149

Page 158: Db2 SQL Errors

either the database manager or the environmentin which its operations are being attempted.Memory resources that can cause this errorinclude:

v The number of shared memory identifiersallocated in the system.

v The amount of paging or swapping spaceavailable in the system.

v The amount of physical memory available inthe system.

User Response: One or more of the following:

v Ensure that sufficient memory resources areavailable to satisfy the database managerrequirements and those of the other programsrunning on the system.

v Reduce the database manager memoryrequirement for this memory set by reducingthe database configuration parameter,app_ctl_heap_sz, which affects it.

v Reduce one or more of the databaseconfiguration parameters dbheap,util_heap_sz, and buffpage. Refer to theAdministration Guide for the parametersaffecting the amount of database globalmemory allocated.

v Reduce the database manager configurationparameter, sheapthres, if intra_parallel is set toyes, or set intra_parallel to no.

v Where appropriate, stop other programs usingthe system.

sqlcode: -987

sqlstate: 57011

SQL0990C An index error occurred.Reorganize the table.

Explanation: An index has had considerableactivity that used all the free space for indexes.

Federated system users: this situation can also bedetected by the data source.

The statement cannot be processed.

User Response: Commit your work and retrythe command. If the error continues, roll back

your work. If errors still persist, reorganize thetable, if possible.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and follow the index re-creation procedures forthat data source.

SQL0992C The release number of theprecompiled program is not valid.

Explanation: The release number of theprecompiled program (package) is notcompatible with the release number of theinstalled version of the database manager.

The precompiled program (package) cannot beused with the current version of the databasemanager. The command cannot be processed.

User Response: Use only programs that areprecompiled with a compatible release level ofthe database manager.

sqlcode: -992

sqlstate: 51008

SQL0993W The new path to the log(newlogpath) in the databaseconfiguration file is not valid.

Explanation: The path to the log file is not validfor one of the following reasons:

v The path does not exist.

v A file with the correct name was found in thespecified path, but it is not a log file for thisdatabase.

v The database manager instance id does nothave permission to access the path or a logfile.

The requested change is not made.

User Response: To change the path to the logfile, submit a database configuration commandwith a valid value.

sqlcode: +993

sqlstate: 01562

150 Message Reference, Volume 2

Page 159: Db2 SQL Errors

SQL0994N Invalid usage of the applicationsavepoint.

Explanation: The application savepoint functionhas been used inconsistently. The programattempted to perform one of the following:

v Request more than one active savepoint.

v Issue an end savepoint call without an activesavepoint.

v Issue a rollback savepoint call without anactive savepoint.

The function cannot be processed.

User Response: Correct the savepoint usage inthe program.

SQL0995W The current path to the log file(logpath) is not valid. The log filepath is reset to the default.

Explanation: The path to the log file is not validfor one of the following reasons:

v The path does not exist.

v A file with the correct name was found in thespecified path, but it is not a log file for thisdatabase.

v The database manager instance id does nothave permission to access the path or log file.

For circular logging, the log file is created in thedefault log path. For archive logging, the nextlog file is created in the default log path. Therequested change is not made.

User Response: To change the path to the logfile, submit a configuration command with avalid value.

sqlcode: +995

sqlstate: 01563

SQL0996N Cannot free pages for an object ina table space.

Explanation: There are corrupted internaldatabase pages or internal logic errors in a tablespace. Details can be found in the system errorlog and/or the database manager error log.

User Response: Discontinue use of the object or

table space. Contact IBM service to inspect theobject and the table space.

sqlcode: -996

sqlstate: 58035

SQL0997W General informational messagefor transaction processing. ReasonCode = “<XA-reason-code>”.

Explanation: The SQLCODE 997 is only passedbetween components of the database managerand will not be returned to an application. It isused to carry XA return codes for non-errorsituations. The possible reason codes are:

v XA_RDONLY (3) - the transaction branch wasread-only and has been committed.

v 64 - TM database indicates transaction to becommitted on DUOW resynchronization

v 65 - TM database indicates transaction to berolled back on DUOW resynchronization

User Response: No action required.

SQL0998N Error occurred during transactionor heuristic processing. ReasonCode = ″<reason-code>″ Subcode= ″<subcode>″.

Explanation: An error is detected whenprocessing a distributed transaction. Thetransaction is:

v Running under a Distributed TransactionProcessing environment (such as those fromCICS or other transaction managers).

v Performing heuristic operations.

v Updating multiple nicknames within afederated database, where each updatednickname represents a different data source. Inthis case, one of the data sources has failedduring transaction processing. The reason codereturned in this case is the reason for thefailure at the data source, not the federateddatabase.

The possible reason codes (correspondingX/Open XA reason codes are shown inparenthesis) are:

Chapter 2. SQL Messages 151

Page 160: Db2 SQL Errors

v 01 - (XAER_ASYNC) asynchronous operationalready outstanding.

v 02 - (XAER_RMERR) a resource manager erroroccurred in the transaction branch.

v 03 - (XAER_NOTA) the XID is not valid.

v 04 - (XAER_INVAL) invalid arguments weregiven. Possible subcodes are:

– 01 - xa_info pointer is invalid, eg. theXAOpen string is null.

– 02 - database name exceeds maximumlength.

– 03 - username exceeds maximum length.

– 04 - password exceeds maximum length.

– 05 - username specified but not a password.

– 06 - password specified but not a username.

– 07 - too many parameters in the xa_infostring.

– 08 - multiple xa_opens generate differentRM ids for the same database name.

– 09 - database name not specified.

– 10 - invalide exe_type.

v 05 - (XAER_PROTO) routine invoked inimproper context.

v 06 - (XAER_RMFAIL) resource managerunavailable.

v 07 - (XAER_DUPID) the XID already exits.

v 08 - (XAER_OUTSIDE) RM doing workoutside global transaction.

v 09 - registration (ax_reg) with the transactionmanager failed. Possible subcodes are:

– 01 - Joining XID not found

– 02 - dynamic library specified in thetp_mon_name configuration parametercould not be loaded.

v 10 - attempted to start a different transactionwhile suspended.

v 12 - unregistering (ax_unreg) with thetransaction manager failed.

v 13 - ax interface failure: ax_reg() andax_unreg() not found.

v 14 - The enlistment for DB2 with the MicrosoftDistributed Transaction Coordinator has failed.MSDTC service may be down. You mustterminate the current transaction.

v 35 - Heuristic operations are invalid fornon-XA database.

v 36 - The XID is not known by the databasemanager.

v 37 - The transaction has already beenheuristically committed.

v 38 - The transaction has already beenheuristically rolled back.

v 39 - The transaction is not an indoubttransaction.

v 40 - Only rollbacks are allowed for thistransaction.

v 41 - Transaction is not heuristically committedon some MPP subordinator nodes because ofnode failure.

v 69 - Database log ID mismatch during DUOWresynchronization.

v 85 - As a result of heuristic processing, thetransaction has partially committed and rolledback.

v 210 - Only heuristic commits are allowed forthis transaction. Some nodes are already incommit state.

v 221 - The version of DBMS on the hostrequires that all applications that participate inthe same XA transaction use the same user IDto connect to the database.

v 222 - The version of DBMS on the hostrequires that all applications that participatethe same XA transaction have the sameCCSID.

v 223 - DB2 Connect XA support is onlyavailable to local clients or remote clients thatuse TCPIP to establish the inbound connection.

v 224 - DB2 Connect XA support is onlyavailable to clients that are at least version 7.1.

User Response: For reason codes 1 through 8,an entry will be made in the system log becausesometimes the SQLCA cannot be returned to thecaller.

If the error is due to a failed data sourceassociated with a nickname, the location of thefailed data source will always appear infederated server’s system log.

For reason code 4, verify the content of the xa

152 Message Reference, Volume 2

Page 161: Db2 SQL Errors

open string and make necessary corrections.

For reason code 9, subcode 02, ensure that thetp_mon_name configuration parameter containsthe name of the dynamic library in the externalproduct which has the ax_reg() function used fordynamic registration of transactions.

For reason code 14, ensure that the MSDTCservice is active.

For reason code 35, you attempted to perform aheuristic operation against a database that onlyparticipates as a read-only resource manager in aglobal transaction. Examples are any DRDAdatabases such as DB2 on MVS. These type ofnon-XA databases would not have any XAindoubt transactions.

For reason codes 36, 37, and 38, you attemptedto perform an invalid heuristic operation on anindoubt transaction. Either you specified thewrong XID, or a heuristic or resync operationhad taken place since you recorded this XID.Perform a Heuristic Query request to get thecurrent list of indoubt transactions to verify ifyou still need to perform your heuristicoperation.

For reason code 39, the XID specified is for atransaction that has ended and is waiting for thetwo-phase commit process to begin. You can onlyperform heuristic operations on transactions thathave entered the two-phase commit process andbecome indoubt transactions.

For reason code 40, an SQL statement wasattempted under a transaction which has failed.An example of this is to attempt an SQLstatement in a transaction thread that hassuccessfully registered after a tightly coupledthread participating in the same transaction hasabnormally terminated.

For reason code 41, you can find moreinformation about the problem in the db2diag.logfile. You need to restart DB2 on the failed nodes.It may be necessary to contact the systemadministrator for assistance.

For reason code 69, either the transactionmanager (TM) database or the resource manager(RM) database or both are different from theones when the indoubt transaction was

generated. In other words, the TM database orRM database names could be referencingdifferent database instances. The log IDmismatch may be caused by the followingreasons:

v The database directory for the TM database atthe RM instance is incorrect.

v The configuration may have been changedafter the indoubt transaction was generated.

v The database may have been dropped andrecreated. In that case, you can only commit orrollback the indoubt transaction heuristically.

For reason code 85, you are updating multipledata sources, and some of the data sources havebeen heuristically rolled back or committed,resulting in the transaction having partiallycommitted and rolled back. With this reasoncode data is now in an inconsistent state, youmust manually check every data source updatedby the transaction to correct the data.

For reason code 210, some of the nodes arealready in commit state. You have to performheuristic commit to resolve the indoubttransaction.

For reason code 221, ensure all applications thatparticipate in the same XA transaction use thesame user ID to connect to the database.

For reason code 222, ensure all applications thatparticipate in the same XA transaction have thesame CCSID.

For reason code 223, modify the application andclient set-up to use local clients, or for remoteclients use TCPIP as the communication protocolto connect to the gateway.

For reason code 224, update the client to version7.1 or later.

General information collection procedure:

If you cannot resolve the problem identified bythe reason codes, record the message number

Chapter 2. SQL Messages 153

Page 162: Db2 SQL Errors

(SQLCODE), reason code, and the optionalsubcode in the message or the SQLCA in thesystem log.

If the failure is from a federated database, youshould also record the location of the failed datasource found in the federated server’s systemlog.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then, contact yourtechnical service representative with thefollowing information:

v Problem description

v SQLCODE, embedded reason code, andsubcode

v SQLCA contents (if possible)

v Trace file (if possible)

v Location of the failed data source if the failureis from a federated server.

There might be additional information in theconsole or message logs of the transactionmanager and the database manager.

sqlcode: -998

sqlstate: 58005

SQL1000 - SQL1099

SQL1000N “<alias>” is not a valid databasealias name.

Explanation: The alias specified in thecommand or api is not valid. The alias mustcontain 1 to 8 characters (bytes in MBCScountries) and all the characters must be fromthe database manager base character set.

The command cannot be processed.

User Response: Resubmit the command withthe correct alias.

SQL1001N “<name>” is not a valid databasename.

Explanation: The syntax of the database namespecified in the command is not valid. Thedatabase name must contain 1 to 8 charactersand all the characters must be from the databasemanager base character set.

The command cannot be processed.

User Response: Resubmit the command withthe correct database name.

sqlcode: -1001

sqlstate: 2E000

SQL1002N “<drive>” is not a valid drive.

Explanation: The drive specified in thecommand is not valid. The drive is a singlecharacter (A to Z) indicating the diskette drive orfixed-disk partition where the database ordatabase directory is located.

The command cannot be processed.

User Response: Resubmit the command withthe correct drive.

SQL1003N The password is not valid becausethe syntax is not correct or thepassword does not match thepassword of the specifieddatabase.

Explanation: The length of the password isexpected to be 18 characters or less. However, ifthe password is to be verified for an APPCconversation, it must be 8 characters or less.

User Response: Ensure that the password is notlonger than the limit allowed.

sqlcode: -1003

sqlstate: 28000

154 Message Reference, Volume 2

Page 163: Db2 SQL Errors

SQL1004C There is not enough storage onthe file system to process thecommand.

Explanation: There is not enough storage on thespecified file system to process the command.

In a partitioned database environment on OS/2and Windows environments, each node in thepartitioned database group must have the exactsame physical hard drive specification (letter)available and useable (must contain useablespace) for the CREATE DATABASE command tosucceed. The physical hard drive letter isspecifed in the database manager configuration.If this field is left blank the default will be thehard drive where DB2 is installed on the instanceowning machine (sqllib path).

The command cannot be processed.

User Response: Choose a different file systemor erase some non-database files from thespecified file system to make space for thedatabase manager functions.

In a partitioned database environment on OS/2and Windows environments, follow thefollowing steps:

v Determine which hard drive specification(letter) is required. The drive letter is specifiedin the error message.

v Determine which node/s of the databasepartition are experiencing the problem. Youcan usually find this information in thedb2diag.log file of the instance owning node.

v Correct the drive problem on the individualnode that is experiencing the problem orchange the drive specification in the databasemanager configuration so that the same driveis available (and has sufficient space) on eachand every node of the partitioned databasegroup.

v re-issue the command.

SQL1005N The database alias ″<name>″already exists in either the localdatabase directory or the systemdatabase directory.

Explanation: The alias name specified hasalready been used. If no alias is specified in thecatalog database command, the database name isused as the alias. When a database is created, thealias name is the same as the database name.

This error may occur on the catalog databasecommand when the alias already exists in thesystem database directory.

On the create database command this error mayoccur in one of the following situations:

v The alias already exists in the system databasedirectory and local database directory.

v The alias already exists in the system databasedirectory but not in the local databasedirectory.

v The alias already exists in the local databasedirectory but not in the system databasedirectory.

User Response: For the catalog databasecommand, uncatalog the alias from the systemdatabase directory and resubmit your originalcommand or catalog the database with adifferent alias name.

For the create database command, do thefollowing operations with respect to the above 3situations:

v Drop the database using the alias name.Resubmit your original command.

v Uncatalog the alias. Resubmit your originalcommand.

v Catalog the alias into the system databasedirectory. Drop the database using the samealias. Resubmit your original command.

SQL1006N The code page “<code page>” ofthe application does not match thecode page “<code page>” of thedatabase.

Explanation: The application could not connectto the database because the active codepage is

Chapter 2. SQL Messages 155

Page 164: Db2 SQL Errors

different from the one that was active when thedatabase was created.

The command cannot be processed.

User Response: Exit the current applicationprogram and return to the operating system.Change the code page for the process and restartthe application program.

SQL1007N Error in finding pages for anobject in a table space.

Explanation: There are corrupted internaldatabase pages or internal logic error for a tablespace. Details can be found in the system errorlog and/or the database manager error log.

User Response: Discontinue use of the object ortable space. Contact IBM service to inspect theobject and the table space.

sqlcode: -1007

sqlstate: 58034

SQL1008N Invalid table space ID.

Explanation: The table space ID specified doesnot exist. It is either larger than the currentmaximum table space ID, or the table space hasbeen dropped.

User Response: Discontinue use of thedatabase. Save the diagnostic information in theerror log and contact IBM service.

sqlcode: -1008

sqlstate: 58036

SQL1009N The command is not valid.

Explanation: The command is not supportedwhen issued on a client-only workstation oragainst remote databases. An example of such acommand is cataloging a local database.

The command cannot be processed.

User Response: Possible solutions include:

v Issue the specified command from a nonclient-only workstation or from theworkstation where the database resides.

v Verify that the database is cataloged correctly.

v Issue a different command.

SQL1010N “<type>” is not a valid typeparameter.

Explanation: The type specified in the DatabaseEnvironment command is not valid. It must be’0’ for an indirect database or ’1’ for a remotedatabase.

In addition, on the Unix, OS/2, Windows NT,and Windows 95 platforms, the type can be ’3’for a database that has a DCE global name.

The command cannot be processed.

User Response: Resubmit the command with avalid type.

SQL1011N No path was specified in theCATALOG DATABASE commandfor an indirect entry.

Explanation: A CATALOG DATABASEcommand was issued for an indirect entry but nopath was specified. Indirect entries must specifythe path where the database resides.

The command cannot be processed.

User Response: Resubmit the command withthe required path or change the type.

SQL1012N No node name was specified inthe CATALOG DATABASEcommand for a remote entry.

Explanation: There was no nodename parameterspecified in the CATALOG DATABASEcommand for a remote entry. Remote entriesmust specify the node name of the database.

The command cannot be processed.

User Response: Resubmit the command withthe nodename parameter or a different type.

156 Message Reference, Volume 2

Page 165: Db2 SQL Errors

SQL1013N The database alias name ordatabase name ″<name>″ couldnot be found.

Explanation: The database name or aliasspecified in the command is not an existingdatabase or the database could not be found inthe (client or server) database directories.

User Response: Ensure that the specifieddatabase name exists in the system databasedirectory. If the database name does not exist inthe system database directory, then the databaseeither does not exist or the database name hasnot been cataloged.

If the database name appears in the systemdatabase directory and the entry type isINDIRECT, ensure that the database exists in thespecified local database directory. If the entrytype is REMOTE, then ensure that the databaseexists and is cataloged on the databasedirectories of the server node.

For CREATE DATABASE with the AT NODEclause, ensure that the database name is in thesystem database directory with an entry type ofINDIRECT and with a catalog node number thatdoes not equal -1.

Federated system users: in addition to the above,verify that the database names specified inSYSCAT.SERVERS are all valid. Correct anySYSCAT.SERVERS entry for which the databasespecified in that entry does not exist.

sqlcode: -1013

sqlstate: 42705

SQL1014W There are no more entries in thedirectory, file, or list beingscanned.

Explanation: The scan of the directory, file, orlist is finished.

User Response: No action is required.

SQL1015N The database must be restartedbecause the previous session didnot conclude normally.

Explanation: The database must be restartedbecause of an abnormal termination of theprevious session (for example, a power failure).

The command cannot be processed.

User Response: On receipt of this message(SQLCODE), an application can post a messagewarning the user that it takes time to recover thedatabase. To restart the database, issue theRESTART DATABASE command. In a partitioneddatabase server environment, the command mustbe issued on all nodes.

sqlcode: -1015

sqlstate: 55025

SQL1016N The local_lu alias “<name>”specified in the CATALOG NODEcommand is not valid.

Explanation: The local logical unit (local_lu)alias specified in the CATALOG NODEcommand is not permitted. The local logical unitalias is the local SNA logical unit alias and mustbe 1 to 8 characters and cannot contain blankcharacters.

The command cannot be processed.

User Response: Verify that the alias is apermitted logical unit name. Verify the charactersused in the name. Resubmit the command with avalid logical unit name.

SQL1017N The mode parameter “<mode>”specified in the CATALOG NODEcommand is not valid.

Explanation: The mode specified in theCATALOG NODE command is not permitted.

The mode parameter identifies thecommunications profile the CommunicationsManager uses to set up a session. The modemust be 1 to 8 characters. Valid characters areuppercase or lowercase A through Z, 0 through9, #, @, and $. The first character must be

Chapter 2. SQL Messages 157

Page 166: Db2 SQL Errors

alphabetic. The system changes lowercasecharacters to uppercase.

The command cannot be processed.

User Response: Verify that the name is apermitted mode name. Verify the characters usedin the name. Resubmit the command with acorrect mode.

SQL1018N The node name “<name>”specified in the CATALOG NODEcommand already exists.

Explanation: The node name specified in thenodename parameter of the CATALOG NODEcommand is already cataloged in the nodedirectory on this file system.

The command cannot be processed.

User Response: If the nodename parameter istyped correctly, continue processing.

Uncatalog the cataloged node in the nodedirectory if the node cataloged information is nolonger valid and resubmit the command. If thenode cataloged information is valid, define anew node name and resubmit the commandusing the new node name.

SQL1019N The node name “<name>”specified in the command is notvalid.

Explanation: The node name specified in thecommand is not valid. The node name may be 1to 8 characters and all of the characters must befrom the database manager base character set.

The command cannot be processed.

User Response: Resubmit the command withthe correct node name.

SQL1020C The node directory is full.

Explanation: The node directory cannot holdany more entries.

The command cannot be processed.

User Response: Uncatalog any unnecessaryentries in the node directory.

SQL1021N The node name “<name>”specified in the UNCATALOGNODE command was not found.

Explanation: The nodename specified in thecommand could not be found in the nodedirectory.

The command cannot be processed.

User Response: If the nodename parameter iscorrect, the node may already have beenuncataloged, and processing can continue.Otherwise, resubmit the command with thecorrect node name.

SQL1022C There is not enough memoryavailable to process the command.

Explanation: Not enough random accessmemory (RAM) is available to process thecommand.

If a remote procedure was invoked, the remoteprocedure may use a local variable space that islarger than the allowable maximum (4K).

If the statement involves a user-defined function(UDF), the memory set controlled by theudf_mem_sz database manager configurationparameter may be larger than the memoryavailable.

The command cannot be processed.

User Response: Stop the application. Possiblesolutions include:

v Change the MEMMAN NO SWAP, NO MOVEoption in the CONFIG.SYS file to SWAP,MOVE.

v Remove background processes.

v Decrease the values of the configurationparameters that define allocation of memory,including udf_mem_sz if UDFs are involved inthe failing statement.

v Install more random access memory (RAM).

v If a remote procedure was invoked, ensurethat the remote procedure uses a local variablespace that is less than or equal to 4K.

v If you are using Remote Data Services,increase the Remote Data Services heap size

158 Message Reference, Volume 2

Page 167: Db2 SQL Errors

(rsheapsz) in the server and clientconfiguration because at least one block isused per application.

v On OS/2 systems, change PROTECT toNOPROTECT in the MEMMAN statement ofthe CONFIG.SYS file. This will make morememory space available to applications, butdisables certain protection features of OS/2.Refer to the OS/2 documentation for moreinformation and to determine if this will beappropriate for your environment.

v On OS/2 systems, increase the value of themin_priv_mem database manager configurationparameter. This will cause the databasemanager to reserve more private memoryspace at db2start time.

NOTE: This is applicable only for releases ofDB2 prior to Version 2.

sqlcode: -1022

sqlstate: 57011

SQL1023C The communications conversationfailed.

Explanation: An error occurred in thecommunications conversation.

The command cannot be processed.

User Response: Retry the original command. Ifthe error persists, contact your communicationsadministrator.

Federated system users: this situation can also bedetected by the data source.

sqlcode: -1023

sqlstate: 08001

SQL1024N A database connection does notexist.

Explanation: There is no connection to adatabase. Other SQL statements cannot beprocessed unless an SQL CONNECT waspreviously executed.

The command cannot be processed.

User Response: If the error occurred when

disconnecting from the database, continueprocessing. If the error occurred on another SQLstatement, issue an SQL CONNECT statementand resubmit the command or statement.

sqlcode: -1024

sqlstate: 08003

SQL1025N The database manager was notstopped because databases arestill active.

Explanation: The stop database managercommand cannot be processed if there are anyapplications connected to databases undercontrol of the database manager, or if anydatabases have been activated.

No action is taken.

User Response: Usually no action is required.To stop the database manager, all activeapplications must disconnect from all thedatabases they are using. Alternatively, the usercan use the FORCE command to forceapplications to disconnect, and the DEACTIVATEcommand to deactivate the database.

SQL1026N The database manager is alreadyactive.

Explanation: A start database managercommand is already processed.

The command cannot be processed.

User Response: Because the command isalready processed, the application may continueprocessing.

SQL1027N The node directory cannot befound.

Explanation: The list node directory commandcannot be processed because the node directorycould not be found.

The command cannot be processed.

User Response: Issue a CATALOG NODEcommand with the appropriate parameters andresubmit the current command.

Chapter 2. SQL Messages 159

Page 168: Db2 SQL Errors

SQL1029N The partner_lu alias “<name>”specified in the CATALOG NODEcommand is not valid.

Explanation: The partner_lu alias specified inthe CATALOG NODE command was notspecified or contains characters that are notvalid. The partner_lu alias is the partner SNAlogical unit alias and must be 1 to 8 charactersand must not contain blank characters.

The command cannot be processed.

User Response: Examine the partner_lu for atyping error. Verify that the alias is a permittedlogical unit name. Verify the characters used inthe alias. Resubmit the command with a correctpartner_lu.

SQL1030C The database directory is full.

Explanation: Either the system databasedirectory or the local database directory cannothold any more entries.

The command cannot be processed.

User Response: Uncatalog any unnecessaryentries in the directory. Create new databases onanother file system if the local database directoryis full.

SQL1031N The database directory cannot befound on the indicated filesystem.

Explanation: The system database directory orlocal database directory could not be found. Adatabase has not been created or it was notcataloged correctly.

The command cannot be processed.

User Response: Verify that the database iscreated with the correct path specification. TheCatalog Database command has a pathparameter which specifies the directory wherethe database resides.

sqlcode: -1031

sqlstate: 58031

SQL1032N No start database managercommand was issued.

Explanation: The start database managercommand has not been processed. It must beprocessed before a stop database manager, anySQL statement, or utility can be issued.

The command cannot be processed.

User Response: Issue a start database managercommand and resubmit the current command.

If using multiple logical nodes, ensure theDB2NODE environment variable is set correctly.The DB2NODE environment variable indicatesthe node the application will attempt to connectto. DB2NODE must be set to the node number ofone of the nodes defined on the same host as theapplication.

sqlcode: -1032

sqlstate: 57019

SQL1033N The database directory cannot beaccessed because it is being used.

Explanation: The database directory cannot beaccessed if it is currently being updated. Also,the directory cannot be accessed for update if itis already being accessed for any reason. Thissituation could exist with either the systemdatabase directory or the local database directory.

The command cannot be processed.

User Response: Wait until the access hascompleted, then resubmit the command.

sqlcode: -1033

sqlstate: 57019

SQL1034C The database is damaged. Theapplication has been disconnectedfrom the database. Allapplications processing thedatabase have been stopped.

Explanation: Damage has occurred to thedatabase. It cannot be used until it is recovered.All applications connected to the database havebeen disconnected and all processes running

160 Message Reference, Volume 2

Page 169: Db2 SQL Errors

applications on the database have been stopped.

The command cannot be processed.

User Response: Issue a RESTART DATABASEcommand to recover the database. If theRESTART command consistently fails, you maywant to restore the database from a backup. In apartitioned database server environment, checkthe syslog to find out if the RESTART commandfails because of node or communication failuresbefore restoring the database from a backup. Ifso, ensure the database manager is up andrunning and communication is available amongall the nodes, then resubmit the restartcommand.

If you encountered this error during roll-forwardprocessing, you must restore the database from abackup and perform roll-forward again.

Note that in a partitioned database environment,the RESTART database command is run on aper-node basis. To ensure that the database isrestarted on all nodes, use the command:

db2_all db2 restart database <database_name>

This command may have to be run several timesto ensure that all in-doubt transactions have beenresolved.

If you are installing the sample database, drop itand install the sample database again.

sqlcode: -1034

sqlstate: 58031

SQL1035N The database is currently in use.

Explanation: One of the following conditionsexists:

v Exclusive use was requested, but the databaseis already in use as a shared database byanother user (in the same process).

v Exclusive use was requested, but the databaseis already in use as an exclusive database.(Two different processes are trying to accessthe same database.)

v The maximum number of connections to thedatabase has been reached.

v The database is being used by another user onanother system.

v Activate/Deactivate database is in progress.

The command cannot be processed.

User Response: Possible solutions include:

v Resubmit the command later when thedatabase is not in use.

v Change the authorization to match the currentuser or wait until the database is not in use.

v Wait until the database is not in exclusive use.

v Wait until other users on another system havedisconnected from the database.

sqlcode: -1035

sqlstate: 57019

SQL1036C An I/O error occurred whileaccessing the database.

Explanation: At least one database file has anI/O error:

v The system cannot open, read from, or write toa database file.

v The system cannot create the database becausean error occurred while the system wascreating a database file or a directory for thedatabase.

v The system cannot drop the database becausean error occurred while the system wasdeleting a database file or a directory for thedatabase.

v The system cannot create the database becausean interrupt was received while the systemwas creating or deleting a database file or adirectory for the database.

v The system cannot locate the databasesubdirectory or database configuration fileduring connect.

The database cannot be used.

User Response: If the error occurred during theprocessing of a database, resubmit the command.

Chapter 2. SQL Messages 161

Page 170: Db2 SQL Errors

If the error continues, restore the database from abackup version.

If the error occurred during CREATE DATABASEor DROP DATABASE, a subsequent CREATEDATABASE or DROP DATABASE commandattempts to erase files and directories left fromthe unsuccessful CREATE DATABASE or DROPDATABASE command.

If installing the sample database, drop it andinstall the sample database again.

If the error occurred while trying to connect to adatabase, get a trace and call IBM support for thepossibility of recovering the database.

sqlcode: -1036

sqlstate: 58030

SQL1037W The Node directory is empty.

Explanation: An attempt was made to read thecontents of the node directory, but no entriesexisted.

User Response: No action is required.

sqlcode: +1037

sqlstate: 01606

SQL1038C An I/O error occurred whileaccessing the node directory.

Explanation: The node directory could not beaccessed because of an I/O error.

The command cannot be processed.

User Response: Resubmit the command. If theerror continues, remove the node directory(sqlnodir under the sqllib directory) andrecatalog the node names on the network.

sqlcode: -1038

sqlstate: 58031

SQL1039C An I/O error occurred whileaccessing the database directory.

Explanation: Either the system databasedirectory or the local database directory cannot

be accessed. This error may occur not only whenthe system is cataloging or uncataloging adatabase but also when the system is accessing adatabase that is cataloged in the directory.

The command cannot be processed.

User Response: Possible solutions include:

v If the error occurred on a diskette system,verify that the correct diskette is in the driveand ready to use. Verify that it is notwrite-protected.

v If the database directory is damaged, restorethe databases that were cataloged there frombackup versions and catalog them.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -1039

sqlstate: 58031

SQL1040N The maximum number ofapplications is already connectedto the database.

Explanation: The number of applicationsconnected to the database is equal to themaximum value defined in the configuration filefor the database.

The command cannot be processed.

User Response: Wait for other applications todisconnect from the database. If moreapplications are required to run concurrently,increase the value for maxappls. After allapplications disconnect from the database andthe database is restarted, the new value takeseffect.

sqlcode: -1040

sqlstate: 57030

SQL1041N The maximum number ofconcurrent databases have alreadybeen started.

Explanation: The application attempted to startan inactive database but the number of active

162 Message Reference, Volume 2

Page 171: Db2 SQL Errors

databases already equals the maximum valuedefined in the system configuration file.

The command cannot be processed.

User Response: Wait for one of the databases tobecome inactive. If more databases are requiredto be active at the same time, increase the valuefor numdb. The new value takes effect after thenext successful database manager start.

sqlcode: -1041

sqlstate: 57032

SQL1042C An unexpected system erroroccurred.

Explanation: A system error occurred. Onepossible reason for this error is that the databasemanager is not installed correctly or theenvironment is not set up correctly.

On OS/2, while trying to start the databasemanager, a very common reason for this error isa corrupted NET.ACC file.

The command cannot be processed.

User Response: If the error occurred on OS/2while trying to start the database manager, andthe NET.ACC file is suspected, replace theNET.ACC files on the system with those ondiskette 1 of the DB2 for OS/2 installationdiskettes.

If the error occurred while trying to connect to adatabase, get a trace (instructions below) and callIBM support.

If the problem falls outside of the abovesuggestions, ensure that the system time anddate is correctly set, and make sure your systemhas enough memory and swapping/pagingspace available.

Resubmit the current command.

If the error continues, stop the database managerand restart it.

If the error still continues, reinstall the databasemanager.

If trace was active, invoke the Independent TraceFacility at the operating system command

prompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Contact your technicalservice representative with the followinginformation:

Required information:

v Problem description

v SQLCODE or message number

v SQLCA contents if possible

v Trace file if possible.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the problem determination guide forprocedures to follow to identify the failing datasource). If the problem is with a data sourcefollow the problem determination procedures forthat data source.

sqlcode: -1042

sqlstate: 58004

SQL1043C The database manager could notinitialize the system catalogs.Error “<error>” was returned.

Explanation: The CREATE DATABASEcommand failed while initializing the systemcatalogs.

User Response: Record the message number(SQLCODE) and error in this message.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact yourtechnical service representative with thefollowing information:

v Environment: Application

v Required information:

– Problem description

– SQLCODE or message number and erroridentifier

– SQLCA contents if possible

– Trace file if possible.

Chapter 2. SQL Messages 163

Page 172: Db2 SQL Errors

SQL1044N Processing was cancelled due toan interrupt.

Explanation: The user may have pressed theinterrupt key sequence.

Processing is stopped.

Federated system users: this situation can also bedetected by the data source.

User Response: Continue processing to handlethe interrupt.

If installing the sample database, drop it andinstall the sample database again.

If starting the database manager, issue a db2stopbefore issuing any db2 commands.

sqlcode: -1044

sqlstate: 57014

SQL1045N The database was not foundbecause it was not catalogedcorrectly.

Explanation: An indirect entry in the databasedirectory points to another non-HOME entry.

The command cannot be processed.

User Response: Verify the entries in all theassociated database directories with the directoryscan commands.

sqlcode: -1045

sqlstate: 58031

SQL1046N The authorization ID is not valid.

Explanation: The authorization specified atlogon is not valid for either the data source orthe database manager. One of the followingoccurred:

v The authorization contains more than 30characters for Windows platforms or 8characters for other platforms.

v The authorization contains characters not validfor an authorization. Valid characters are Athrough Z, a through z, 0 through 9, #, @ and$.

v The authorization is PUBLIC or public.

v The authorization begins with SYS, sys, IBM,ibm, SQL or sql.

v The authorization violates some datasource-specific naming convention.

The command cannot be processed.

User Response: Log on with a validauthorization ID.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) and usean authorization ID valid for that data source.

sqlcode: -1046

sqlstate: 28000

SQL1047N The application is alreadyconnected to another database.

Explanation: An application cannot create adatabase while connected to another database.

Binding a bind file to one database while alreadyconnected to another database is not permitted.

The command cannot be processed.

User Response: Disconnect from the activedatabase and resubmit the command.

SQL1048N The use parameter “<parameter>”in the START USING DATABASEor CONNECT TO command is notvalid. it must be an S for sharedaccess, an X for exclusive use oran N for exclusive use at singlenode. For DB2 Connectconnections, only S is supported.N is only supported in MPPconfiguration.

Explanation: The use parameter in the STARTUSING DATABASE or CONNECT TO commandmust be either an S for shared or an X forexclusive use. If connecting to a database usingDB2 Connect, only shared access is allowed.Mnemonic equates for these values are providedin the SQLENV.H file.

164 Message Reference, Volume 2

Page 173: Db2 SQL Errors

The command cannot be processed.

User Response: Resubmit the command with avalid use parameter (preferably from themnemonic equates).

SQL1049C The application state is in error.The database connection has beenlost.

Explanation: The connection to the database hasbeen lost.

The command cannot be processed.

User Response: Issue a CONNECT RESETstatement.

SQL1050N The database cannot beuncataloged because it is a homedatabase.

Explanation: The database specified in theUNCATALOG DATABASE command is a homedatabase. Home databases cannot be uncatalogedbecause their directory entries are deleted whenthe database is dropped.

The command cannot be processed.

User Response: Continue processing if thedatabase name was specified correctly.

SQL1051N The path “<path>” for thedatabase directory does not exist.

Explanation: The path specified in the databasedirectory parameter of the command or in thedatabase directory entry is not valid. There is nofile system with that name.

The command cannot be processed.

User Response: Resubmit the command withthe correct path for the database directory.

sqlcode: -1051

sqlstate: 57019

SQL1052N The database path ″<path>″ doesnot exist.

Explanation: The path specified in the pathparameter of the command is not valid. There isno path with that name.

In a partitioned database environment on OS/2and Windows environments, each node in thepartitioned database group must have the exactsame physical hard drive specification (letter)available and useable (must contain useablespace) for the CREATE DATABASE command tosucceed. The physical hard drive letter isspecifed in the database manager configuration.If this field is left blank the default will be thehard drive where DB2 is installed on the instanceowning machine (sqllib path).

The command cannot be processed.

User Response: Resubmit the command withthe correct database path.

In a partitioned database environment on OS/2and Windows environments, follow thefollowing steps:

v Determine which hard drive specification(letter) is required. The drive letter is specifiedin the error message.

v Determine which node/s of the databasepartition are experiencing the problem. Youcan usually find this information in thedb2diag.log file of the instance owning node.

v Correct the drive problem on the individualnode that is experiencing the problem orchange the drive specification in the databasemanager configuration so that the same driveis available (and has sufficient space) on eachand every node of the partitioned databasegroup.

v re-issue the command.

SQL1053N An interrupt is already beingprocessed.

Explanation: The system is currently processingan interrupt so another interrupt is not honored.

The interrupt request is ignored.

User Response: Wait until the current interrupt

Chapter 2. SQL Messages 165

Page 174: Db2 SQL Errors

processing finishes and resubmit the command.

SQL1054N A COMMIT is in progress andcannot be interrupted.

Explanation: The system is currently processinga COMMIT. The user entered an interrupt keysequence.

The interrupt request is ignored.

Federated system users: this situation can also bedetected by the data source.

User Response: Wait until COMMIT is finishedand resubmit the request.

SQL1055N A ROLLBACK is in progress andcannot be interrupted.

Explanation: The system is currently processinga ROLLBACK. The user entered an interrupt keysequence.

The interrupt request is ignored.

Federated system users: this situation can also bedetected by the data source.

User Response: Wait until ROLLBACK isfinished and resubmit the request.

SQL1056N There are already eight databasedirectory scans open.

Explanation: Eight database directory scans inthis process are already open. No more thaneight open scans are allowed.

The command cannot be processed.

User Response: Issue one or more CLOSEDIRECTORY SCAN commands and resubmit thecommand.

sqlcode: -1056

sqlstate: 54029

SQL1057W The system database directory isempty.

Explanation: An attempt was made to read thecontents of the system database directory, but noentries existed.

User Response: No action is required.

sqlcode: +1057

sqlstate: 01606

SQL1058N The handle parameter in theDirectory Scan command is notvalid.

Explanation: The handle parameter specified inthe Directory Scan command is not valid. Thehandle must be the one returned from the OPENDIRECTORY SCAN or the OPEN NODEDIRECTORY SCAN command.

The command cannot be processed.

User Response: Resubmit the command with avalid handle parameter.

SQL1059N A Get Next command cannot beprocessed because no Open Scancommand was issued.

Explanation: A directory scan command wasissued before the scan was opened.

The command cannot be processed.

User Response: Issue an OPEN DIRECTORYSCAN or OPEN NODE DIRECTORY SCANcommand and resubmit the current command.

SQL1060N User “<authorization-ID>” doesnot have the CONNECT privilege.

Explanation: The specified authorization doesnot have the CONNECT privilege to access thedatabase. The CONNECT privilege must begranted before the user can connect to adatabase.

Federated system users: this situation can also bedetected by the data source.

The command cannot be processed.

166 Message Reference, Volume 2

Page 175: Db2 SQL Errors

User Response: Contact the systemadministrator or database administrator for thedatabase and request a GRANT CONNECT forthe authorization ID. Resubmit the command.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andensure that correct priveleges have been grantedfor that data source.

sqlcode: -1060

sqlstate: 08004

SQL1061W RESTART completed successfully,but indoubt transactions existagainst the database.

Explanation: A RESTART was successfullycompleted, except indoubt transactions werediscovered. The database is usable, but if theindoubt transactions are not resolved before thelast connection to the database is dropped, thenthe database will again require a RESTARTbefore it can be used.

User Response: Either resolve the indoubttransactions, or be prepared to RESTART thedatabase whenever you wish to use it. If thetransaction manager (TM) that was using thedatabase (in an XA/DTP environment) isavailable, then the administrator should instructthe TM to resolve the indoubt transactions.Alternatively, with great caution, theadministrator can use the CLP to heuristicallycomplete the transactions.

Note that in a partitioned database serverenvironment, the RESTART database command isrun on a per-node basis. In order to ensure thatthe database is restarted on all nodes, use thefollowing command:

db2_all db2 restart database <database_name>

Issuing the above command will resolve anyin-doubt transactions if all nodes are operational.

This command may have to be run several timesto ensure that all in-doubt transactions have beenresolved.

SQL1062N The database path “<path>” wasnot found.

Explanation: The database path parameterspecified in the command does not exist. If thepath is not specified, the default path defined inthe system configuration file is used, and it doesnot exist.

In a partitioned database environment on OS/2and Windows environments, each node in thepartitioned database group must have the exactsame physical hard drive specification (letter)available and useable (must contain useablespace) for the CREATE DATABASE command tosucceed. The physical hard drive letter isspecifed in the database manager configuration.If this field is left blank the default will be thehard drive where DB2 is installed on the instanceowning machine (sqllib path).

The command cannot be processed.

User Response: Verify the path or the defaultpath and make sure they exist in the system.Resubmit the command.

In a partitioned database environment on OS/2and Windows environments, follow thefollowing steps:

v Determine which hard drive specification(letter) is required. The drive letter is specifiedin the error message.

v Determine which node/s of the databasepartition are experiencing the problem. Youcan usually find this information in thedb2diag.log file of the instance owning node.

v Correct the drive problem on the individualnode that is experiencing the problem orchange the drive specification in the databasemanager configuration so that the same driveis available (and has sufficient space) on eachand every node of the partitioned databasegroup.

v re-issue the command.

SQL1063N The start database managerprocessing was successful.

Explanation: The command to start thedatabase manager completed successfully.

Chapter 2. SQL Messages 167

Page 176: Db2 SQL Errors

SQL1064N The stop database managerprocessing was successful.

Explanation: The command to stop the databasemanager completed successfully.

SQL1065W The database was created, but anerror occurred on one or morebind files in list “<list-name>”.The following files were notbound: “<list>”.

Explanation: One or more utilities were notbound to the database. The list file “<list-name>”contains a list of the bind files. The numbers in“<list>” indicate the relative positions of theunbound files in the list file.

The listed utility bind files are not bound to thenewly created database.

User Response: The user may bind theindicated utilities to the database. The formatoption must not be used on the binder call.

SQL1066N DB2START processing wassuccessful. IPX/SPX protocolsupport was not successfullystarted.

Explanation: The IPX/SPX protocol supportwas not successfully started. Remote clientscannot use IPX/SPX to connect to the server.Possible causes are:

v The workstation is not logged in to theNetWare file server.

v The workstation does not have authority tocreate an object in the NetWare file serverbindery.

v Another database manager on the network isusing the same object name specified in thedatabase manager configuration file.

User Response: Ensure that the workstation islogged in to the NetWare file server, and hassufficient authority to create an object in thebindery at the file server. The user must belogged in as SUPERVISOR or equivalent. Alsoensure that the object name specified in thedatabase manager configuration file is unique forall database managers in the network. Make any

corrections, run DB2STOP, and then runDB2START again.

If the problem continues, at the operating systemcommand prompt type DB2TRC ON -L0X100000. Run DB2START again, then at thecommand prompt, type DB2TRC DUMPfilename to save the trace information. To turntrace off, type DB2TRC OFF. Contact your servicecoordinator with the trace information.

SQL1067N DB2STOP processing was notsuccessful. IPX/SPX protocolsupport was not successfullystopped.

Explanation: The IPX/SPX protocol supportwas not successfully stopped. Possible causesare:

v The workstation is not logged in to theNetWare file server.

v The workstation does not have authority todelete an object in the NetWare file serverbindery.

User Response: Ensure that the workstation islogged in to the NetWare file server, and hassufficient authority to delete an object in thebindery at the file server. The user must belogged in as SUPERVISOR or equivalent. Makeany corrections, and run DB2STOP again.

If the problem continues, at the operating systemcommand prompt type DB2TRC ON -L0X100000. Run DB2STOP again, then at thecommand prompt, type DB2TRC DUMPfilename to save the trace information. To turntrace off, type DB2TRC OFF. Contact your servicecoordinator with the trace information.

SQL1068N The domain that owns the user ID“<user-ID>” for the CONNECT orATTACH statement is not definedin the DB2DOMAINLISTenvironment variable.

Explanation: A user ID in a CONNECT TO orATTACH TO statement does not belong to adomain defined in the DB2DOMAINLISTenvironment variable.

168 Message Reference, Volume 2

Page 177: Db2 SQL Errors

User Response: Specify the name of the domainwhich owns the user ID in theDB2DOMAINLIST environment variable byusing the DB2SET command.

sqlcode: -1068

sqlstate: 08004

SQL1069N The database “<name>” is not ahome database.

Explanation: The database is not a localdatabase. A local database is cataloged as indirectin the system database directory and this entryreferences a home entry in the local databasedirectory on the same node. Remote databasescannot be dropped.

The command cannot be processed.

User Response: If the specified database namewas incorrect, resubmit the command with thecorrect database name. If the specified databasename was correct and the intent is to remove thedatabase name from the database directory, usethe UNCATALOG DATABASE command.

SQL1070N The address of the database nameparameter is not valid.

Explanation: The application program used anaddress that is not valid for the database nameparameter. Either the address points to anunallocated buffer or the character string in thebuffer does not have a null terminator.

The command cannot be processed.

User Response: Correct the application programso a correct address is used and the input stringis null terminated.

SQL1071N The address of the database aliasname parameter is not valid.

Explanation: The application program used anaddress that is not valid for this parameter.Either the address points to an unallocated bufferor the character string in the buffer does nothave a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1072C The database manager resourcesare in an inconsistent state. thedatabase manager may have beenincorrectly terminated, or anotherapplication may be using systemresources in a way which conflictswith the way the databasemanager uses system resources.System resource cleanup may berequired.

Explanation: The request failed because thedatabase manager resources are in aninconsistent state. This can occur if:

v DB2 was incorrectly terminated (onUNIX-based systems, for example, this mayoccur if the processes were terminated withthe ″kill″ command, rather than the stopdatabase manager command).

v Another application or user may haveremoved the database manager resources (onUNIX-based systems, for example, a user withsufficient privilege may have accidentallyremoved an Interprocess Communication (IPC)resource owned by the database manager,using the ″ipcrm″ command).

v Another application’s use of system resourcesconflicts with the database manager’s use ofsystem resources (on UNIX-based systems, forexample, another application may be using thesame keys that the database manager uses forcreating IPC resources).

v Another instance of the database manager maybe using the same resources. This could occuron UNIX-based systems if the two instancesare on different file systems and the sqllibdirectories happen to have the same i-node(i-nodes are used to get the IPC keys).

User Response: Resource cleanup may berequired:

v Remove all the database manager processesrunning under the instance id (on UNIX-basedsystems, you can use ″ps -eaf -u <instance id>| grep db2″ to list all the database manager

Chapter 2. SQL Messages 169

Page 178: Db2 SQL Errors

processes running under the instance id, andthe ″kill -9 <process id>″ command to removethem).

v Ensure that no other application is runningunder the instance id, and then remove allresources owned by the instance id (onUNIX-based systems, you can use the ″ipcs |grep <instance id>″ command to list all IPCresources owned by the instance id, and the″ipcrm -[q|m|s] <id>″ command to removethem).

v If there is another instance of the databasemanager running, and it is on a differentfilesystem, and an i-node conflict is suspected,then change the i-node by the following steps:

– create another directory at the same level assqllib

– move everything from under sqllib to thenew directory

– delete sqllib

– rename the new directory to sqllib

v Restart the database manager instance.

SQL1073N The node directory releasenumber is not correct.

Explanation: The node directory release numberdoes not match the product expected releasenumber. The node directory could be from aprevious release.

User Response: Re-catalog all the node entriesand try the command again.

SQL1074N The address of the passwordparameter is not valid.

Explanation: The application program used anaddress that is not valid for this parameter.Either the address points to an unallocated bufferor the character string in the buffer does nothave a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1075N The address of the databasecomment parameter is not valid.

Explanation: The application program used anaddress that is not valid for this parameter.Either the address points to an unallocated bufferor the character string in the buffer does nothave a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1076N The address of the countparameter is not valid.

Explanation: The application program used anaddress that is not valid for the count parameter.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program.

SQL1077N The address of the handleparameter is not valid.

Explanation: The application program used anaddress that is not valid for the handle parameter.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program.

SQL1078N The address of the bufferparameter is not valid.

Explanation: The application program used anaddress that is not valid for the buffer parameter.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program.

SQL1079N The address of the nodenameparameter is not valid.

Explanation: The application program used anname parameter address that is invalid. Either

170 Message Reference, Volume 2

Page 179: Db2 SQL Errors

the address points to an unallocated buffer or thecharacter string in the buffer does not have anull terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1080N The address of the local_lu nameparameter is not valid.

Explanation: The application program used anaddress that is not valid for the local_lu nameparameter. Either the address points to anunallocated buffer or the character string in thebuffer does not have a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1081N The address of the partner_luparameter is not valid.

Explanation: The application program has usedan address that is not valid for the partner_luparameter. Either the address points to anunallocated buffer or the character string in thebuffer does not have a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1082N The address of the modeparameter is not valid.

Explanation: The application program has usedan address that is not valid for the modeparameter. Either the address points to anunallocated buffer or the character string in thebuffer does not have a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1083N The database description blockcannot be processed, reasoncode=“<reason-code>”.

Explanation: The application issued a CREATEDATABASE command, but the databasedescriptor block (DBDB) could not be processedfor one of the following reason codes:

v The address of the DBDB is not valid (reasoncode 01).

v The value of the SQLDBDID field of the DBDBis not valid (reason code 02). It should be setto the value SQLDBDB1.

v The value of the SQLDBCSS field of the DBDBis not valid (reason code 04).

The command cannot be processed.

User Response: Correct the error and resubmitthe command.

SQL1084C Shared memory segments cannotbe allocated.

Explanation: The database manager could notallocate segments while processing a DatabaseEnvironment command or an SQL CONNECTstatement.

The dbheap parameter may be too small.

User Response: Record the message number(SQLCODE). The cause of this error may beinsufficient memory resources either for thedatabase manager or the environment whereoperation of the database manager is beingattempted. Validate that sufficient memoryresources are available to satisfy the databasemanager requirements. You may also close anybackground processes that do not need to beactive.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Contact your technicalservice representative with the followinginformation:

Required information:

Chapter 2. SQL Messages 171

Page 180: Db2 SQL Errors

v Problem description

v SQLCODE or message number

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -1084

sqlstate: 57019

SQL1085N The application heap cannot beallocated.

Explanation: The application could not connectto the database because the database managercould not allocate the number of applicationheap 4K pages specified in the databaseconfiguration file. The system is out of 4K pages.The command cannot be processed.

User Response: Possible solutions are:

v Lower the size of the application heap(applheapsz) in the database configuration file.

v Reduce the maximum number of applicationsin the database configuration file.

v Remove background processes.

v Install more memory.

sqlcode: -1085

sqlstate: 57019

SQL1086C An operating system error“<error>” occurred.

Explanation: The command received an errorfrom the operating system that prevents furtherprocessing.

The command cannot be processed.

User Response: Refer to the operating systemuser publications to determine the nature of theerror.

SQL1087W The database was created, but anerror occurred while opening thelist file “<name>”. The utilitiesare not bound to the database.

Explanation: CREATE DATABASE could notopen the list file containing the list of utility bindfiles. The list file should be located in the bndsubdirectory of the sqllib subdirectory.

The utility bind files are not bound to the newlycreated database.

User Response: Bind the utilities to thedatabase. Do not use the format option on thebinder call.

SQL1088W The database was created, but anerror occurred while binding theutilities. The utilities are notbound to the database.

Explanation: CREATE DATABASE or MIGRATEDATABASE could not bind the utility bind filesto the database.

The utility bind files are not bound to the newlycreated or migrated database.

User Response: Bind the utilities to thedatabase. Do not use the format option on thebinder call.

SQL1089W The database was created, but thebinding of the utilities wasinterrupted. The utilities are notbound to the database.

Explanation: CREATE DATABASE wasinterrupted while binding the utilities to thedatabase. The interrupt key sequence may havebeen pressed.

The utility bind files are not bound to the newlycreated database.

User Response: Bind the utilities to thedatabase. Do not use the format option on thebinder call.

172 Message Reference, Volume 2

Page 181: Db2 SQL Errors

SQL1090C The release number of theprecompiled application programor utility is not valid.

Explanation: The release number of theprecompiled application program or utility is notcompatible with the release number of theinstalled version of the database manager.

The error will also occur if the applicationprogram is using down-level database managerlibraries or DLLs while accessing the installedversion of the database manager configurationfile.

The command cannot be processed.

User Response: Verify that there is no olderversion of the database manager libraries orDLLs that will be picked up for your applicationprocessing.

If the problem persists, repeat the precompileprocess with the current database manager. Useonly application programs precompiled with acompatible release level of the database manager.

SQL1091C The release number of thedatabase is not valid.

Explanation: The release number of thedatabase is not compatible with the releasenumber of the installed version of the databasemanager. This can be the release number whenthe database was created, the release numberwhen the database was last migrated, or thehighest version, release, modification, and fixpaklevel defined in the catalog.

The command cannot be processed. If the erroroccurred during a Migrate or Restore, you areattempting to migrate or restore an incompatiblerelease of database. If the error occurred on thefirst connection after removing a fixpak, you areattempting to connect to a database that isdefined to use a higher level of databasemanager code.

User Response: Use only databases createdwith a compatible release of database manager. Ifthe error occurred during a Migrate or Restore,you must first migrate the database to a releasewhich can be migrated by the current release of

the database manager. If the error occurred onthe first connection after removing a fixpak, thedatabase should be restored from a backup priorto using the utility to update the database to thefixpak level.

sqlcode: -1091

sqlstate: 08004

SQL1092N “<authorization-ID>” does nothave the authority to perform therequested command.

Explanation: The user attempted to execute acommand or operation without having theproper authority for that command or operation.

The command cannot be processed.

Federated system users: this situation can also bedetected by the data source.

User Response: Log on as a user with thecorrect authority and retry the failed commandor operation. Correct authorities may includeSYSADM, SYSCTRL, SYSMAINT, and DBADM.DBADM is granted on databases and all otherauthorities are determined by membership in thegroups defined in the database managerconfiguration (eg. if sysctrl_group in the databasemanager configuration file is defined as ’beatles’,then you must belong to the group ’beatles’ tohave SYSCTRL authority). Refer to the CommandReference or the SQL Reference for the listing ofrequired authorities for the attempted commandor operation.

If you are using Kerberos authentication in aWindows 2000 environment, ensure that you logon to the machine using a domain account. Onlydomain users can use Kerberos authentication ina Windows 2000 environment.

If you are using LDAP support, ensure that youor the DB2 Connect gateway has the authority toperform the CATALOG DATABASE, NODE andDCS DATABASE commands. Invoke thecommand ″UPDATE DBM CFG USINGCATALOG_NOAUTH YES″ at the client or thegateway to correct the problem.

Federated system users: if necessary isolate theproblem to the data source rejecting the request

Chapter 2. SQL Messages 173

Page 182: Db2 SQL Errors

(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andensure that the authorization id specified has theproper authority on that data source.

Contact the System Administrator for authorityrequest assistance. Do not attempt to execute thecommand without appropriate authorization.

SQL1093N The user is not logged on.

Explanation: A user must be logged on beforeany command requiring authorization can beprocessed. Possible causes for this error include:

v Unable to get a user ID.

v An unexpected operating system erroroccurred when attempting to log on.

v The application is running in a backgroundprocess.

v The user cancelled an attempted logon.

The command cannot be processed.

User Response: Log on with a valid user IDand resubmit the command. If several concurrentprocesses are attempting to log on, wait a fewseconds and retry the logon procedure.

sqlcode: -1093

sqlstate: 51017

SQL1094N The node directory cannot beaccessed because it is beingupdated.

Explanation: The node directory cannot bescanned or used while it is being updated. Also,the directory cannot be accessed for update if itis already being accessed for any reason.

The command cannot be processed.

User Response: Resubmit the command afterthe update is finished.

sqlcode: -1094

sqlstate: 57009

SQL1095N There are already eight nodedirectory scans open.

Explanation: Eight node directory scans arealready open in this process and no more thaneight are allowed.

The command cannot be processed.

User Response: Issue one or more CLOSENODE DIRECTORY SCAN commands. Resubmitthe command.

sqlcode: -1095

sqlstate: 54029

SQL1096N The command is not valid for thisnode type.

Explanation: A command was issued on a nodethat does not support the command, or thesystem environment was found to be set upincorrectly for this node type. For example, adatabase was cataloged as LOCAL on a clientnode.

The command cannot be processed.

User Response: Verify that the command andparameters are correct for the node type. Alsoverify that the environment where the commandis to be processed is correct. Resubmit thecommand.

SQL1097N The node name was not found inthe node directory.

Explanation: Either the node name listed in thedatabase directory for a remote database or thenode name specified on an attach command wasnot cataloged in the node directory.

The command cannot be processed.

Federated system users: this situation can also bedetected by the data source.

User Response: Verify that the node name listedin the database directory or as the object of theattach command is cataloged in the nodedirectory. If the node is not listed in the nodedirectory, submit a CATALOG NODE command.

Federated system users: in addition to the actions

174 Message Reference, Volume 2

Page 183: Db2 SQL Errors

listed above, also verify that the node nameslisted in all the SYSCAT.SERVERS entries arecorrect. If the node is not listed in the nodedirectory and the server is a member of the DB2family, issue a CATALOG NODE command forthat node.

sqlcode: -1097

sqlstate: 42720

SQL1098N The application is alreadyconnected to this database.

Explanation: A connection to a database wasrequested but the application is alreadyconnected to the specified database.

The command cannot be processed.

User Response: No action is necessary.

sqlcode: -1098

sqlstate: 53056

SQL1099N The diskette is write-protected.

Explanation: A write operation was attemptedto a database residing on a write-protecteddiskette.

The statement cannot be processed.

User Response: Verify you are using the correctdiskette. Remove protection from the diskette, ifnecessary.

SQL1100 - SQL1199

SQL1100W The node name “<name>”specified in the Catalog Databasecommand has not been catalogedin the Node Directory.

Explanation: The Catalog Database commandspecified node name “<name>” but that is notcataloged in the node directory. The node namemust be cataloged before the remote databasecan be used.

The CATALOG DATABASE command completedsuccessfully.

User Response: Issue a CATALOG NODEcommand.

SQL1101N Remote database “<name>” onnode “<node-name>” could not beaccessed with the specifiedauthorization id and password.

Explanation: A connection to the remotedatabase ″<name>″ on node ″<node-name>″ wasrequested, and the remote node does not acceptthe authorization ID and password combinationspecified for this node (either in the remoteauthorization tables or at runtime).

The request cannot be processed.

User Response: Resubmit the request with avalid authorization ID and passwordcombination for the remote system.

SQL1102N A database name was notspecified.

Explanation: No database name was providedto proceed with migration.

The statement cannot be processed.

User Response: Specify a database name formigration.

SQL1103W The Migrate Database commandprocessing was successful.

Explanation: The Migrate command completedsuccessfully.

Note that this message will also be returned ifthe database was already at the current level anddid not need to be migrated.

Processing continues.

User Response: No action is required.

Chapter 2. SQL Messages 175

Page 184: Db2 SQL Errors

SQL1104N The address of the program nameparameter is not valid.

Explanation: The application program has usedan address for the program name that is notvalid.

The command cannot be processed.

User Response: Use a correct address in theapplication program.

SQL1105N The SQL CONNECT RESETstatement is not allowed in aRemote Application InterfaceProcedure.

Explanation: The remote application procedurecontains an SQL CONNECT RESET statement.

The remote procedure is not allowed to continue.

User Response: Remove the SQL CONNECTRESET statement and retry the remote procedure.

sqlcode: -1105

sqlstate: 38003

SQL1106N The specified DLL “<name>”module was loaded, but thefunction “<function>” could notbe executed.

Explanation: The function within the DLL(dynamic link library) cannot be found.

The command cannot be processed.

User Response: Ensure that the DLL module isbuilt correctly. Reference the module in thedefinition file.

sqlcode: -1106

sqlstate: 42724

SQL1107N An interrupt was received whileloading the specified DLL“<name>”.

Explanation: When loading the DLL (dynamiclink library) module, the command wasinterrupted, perhaps by Ctrl+Break.

Processing is stopped.

User Response: Resubmit the command.

sqlcode: -1107

sqlstate: 42724

SQL1108N An unexpected I/O error oroperating system error wasreceived while loading thespecified DLL “<name>”.

Explanation: An unexpected error occurredwhen trying to load the DLL (dynamic linklibrary) module specified in the program namefield.

The command cannot be processed.

User Response: Resubmit the current command.If the error continues, reinstall the databasemanager.

If reinstallation does not correct the error, recordthe message number (SQLCODE) and allinformation in the SQLCA if possible.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact yourtechnical service representative.

sqlcode: -1108

sqlstate: 42724

SQL1109N The specified DLL “<name>”could not be loaded.

Explanation: The DLL (dynamic link library)module specified could not be found.

The command cannot be processed.

User Response: Ensure that the specified file isin a subdirectory identified in the systemLIBPATH.

sqlcode: -1109

sqlstate: 42724

176 Message Reference, Volume 2

Page 185: Db2 SQL Errors

SQL1110N A supplied data area was invalidand could not be used.

Explanation: The data area is not initializedcorrectly.

The command cannot be processed.

User Response: Ensure that the user-suppliedinput SQLDA or output SQLDA fields areinitialized correctly.

SQL1111N The program name “<name>”specified was not valid.

Explanation: The DLL (dynamic link library)module or program name syntax is not correct.

The command cannot be processed.

User Response: Ensure that the DLL orprogram name is specified correctly.

sqlcode: -1111

sqlstate: 42724

SQL1112N There are not enough systemresources to load the specifiedDLL “<name>”.

Explanation: There is not enough randomaccess memory (RAM) to load the specified DLL(dynamic link library) module.

The command cannot be processed.

User Response: Stop the application. Possiblesolutions are:

v Change the MEMMAN NO SWAP, NO MOVEoption in the CONFIG.SYS file to SWAP,MOVE.

v Remove background processes.

v Decrease the values of the configurationparameters that define the allocation ofmemory.

v Install more random access memory (RAM).

sqlcode: -1112

sqlstate: 42724

SQL1113N The data type for sqlvar “<n>” inthe output SQLDA was changedfrom “<type 1>” to “<type 2>”.

Explanation: The remote stored procedurechanged the data type of the nth sqlvar in theoutput SQLDA; n is the sequence number of thefirst mismatched sqlvar.

The stored procedure does not return any data.

User Response: Correct the remote storedprocedure so the data type information in theoutput SQLDA is not changed.

sqlcode: -1113

sqlstate: 39502

SQL1114N The data length for the sqlvar“<n>” in the output SQLDA waschanged from “<length 1>” to“<length 2>”.

Explanation: The remote stored procedurechanged the data length of the nth sqlvar in theoutput SQLDA; n is the sequence number of thefirst mismatched sqlvar.

The stored procedure does not return any data.

User Response: Correct the remote storedprocedure so the data length information in theoutput SQLDA is not changed.

sqlcode: -1114

sqlstate: 39502

SQL1115N The number of sqlvars in theoutput SQLDA was changed from“<count 1>” to “<count 2>”.

Explanation: The remote procedure changed thesqld field in the output SQLDA; sqld is thenumber of used sqlvars in the SQLDA.

The stored procedure does not return any data.

User Response: Correct the remote storedprocedure so the sqld field in the output SQLDAis not changed.

sqlcode: -1115

Chapter 2. SQL Messages 177

Page 186: Db2 SQL Errors

sqlstate: 39502

SQL1116N A connection to or activation fordatabase ″<name>″ cannot bemade because of BACKUPPENDING.

Explanation: The specified database requires abackup to be taken to provide a starting pointfor roll-forward recovery.

No connection was made.

User Response: Back up the database by callingthe BACKUP routine or, if roll-recovery is notrequired, set the log retain and user exit databaseconfiguration parameters off.

sqlcode: -1116

sqlstate: 57019

SQL1117N A connection to or activation fordatabase ″<name>″ cannot bemade because ofROLL-FORWARD PENDING.

Explanation: The specified database is enabledfor roll-forward recovery and it has been restoredbut not rolled forward.

No connection was made.

Federated system users: this situation can also bedetected by the data source.

User Response: Roll forward the database orindicate that you do not wish to roll forward byusing the ROLLFORWARD command. Note thatif you do not roll forward the database, therecords written since the last backup of thedatabase will not be applied to the database.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andtake recovery action appropriate to that datasource to bring the data source to a point ofconsistency.

sqlcode: -1117

sqlstate: 57019

SQL1118N A connection to or activation ofdatabase ″<name>″ cannot bemade because a previous backupis incomplete.

Explanation: The database is in an inconsistentstate because a system error occurred during abackup function.

No connection was made.

Federated system users: this situation can also bedetected by the data source.

User Response: Issue the BACKUP commandand then try the command again.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andissue the BACKUP command against that datasource prior to trying the command again.

sqlcode: -1118

sqlstate: 57019

SQL1119N A connection to or activation ofdatabase ″<name>″ cannot bemade because a previous restoreis incomplete.

Explanation: The database is in an inconsistentstate because a system error occurred during arestore function.

No connection was made.

Federated system users: this situation can bedetected by the data source.

User Response: Issue the RESTORE commandand then try the command again.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andissue the RESTORE command against that datasource prior to trying the command again.

sqlcode: -1119

sqlstate: 57019

178 Message Reference, Volume 2

Page 187: Db2 SQL Errors

SQL1120N A connection to or activation ofdatabase ″<name>″ cannot bemade because a previous backupor restore is incomplete.

Explanation: The database is in an inconsistentstate because a system error occurred during abackup or restore function. It cannot bedetermined if backup or restore was beingprocessed.

No connection was made.

Federated system users: this situation can also bedetected by the data source.

User Response: Issue the BACKUP orRESTORE command, and then try the commandagain.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andissue the BACKUP or RESTORE commandagainst that data source prior to trying thecommand again.

sqlcode: -1120

sqlstate: 57019

SQL1121N The address of the node structureparameter is not valid.

Explanation: The application used an addressfor the node structure parameter that is notvalid. Either the address points to an unallocatedbuffer or the buffer is not large enough tocontain the required input.

The command cannot be processed.

User Response: Verify that the programallocates the required buffer area and resubmitthe command.

SQL1122N The address of the protocolstructure parameter is not valid.

Explanation: The application used an addressfor the protocol structure parameter that is notvalid. Either the address points to an unallocated

buffer or the address points to the incorrectprotocol buffer.

The command cannot be processed.

User Response: Verify that the programallocates the required buffer area based on theprotocol field in the node structure and resubmitthe command.

SQL1123N The protocol “<type>” is notvalid.

Explanation: The protocol type specified in thenode structure for the Catalog command doesnot represent a recognized value. The validprotocol types are defined in the sqlenv headerfiles.

The command cannot be processed.

User Response: Verify the protocol type in thenode structure and resubmit the command.

SQL1124N The remote workstation name“<name>” is not valid.

Explanation: The remote workstation namespecified in the NETBIOS protocol structure forthe Catalog command is not specified or containscharacters that are not valid. The workstationname must be 1 to 8 characters. Valid charactersare A through Z, a through z, 0 through 9, #, @,and $. The first character must be alphabetic or aspecial character: #, @, or $. Lowercase charactersare changed to uppercase by the system.

The command cannot be processed.

User Response: Verify the characters specifiedin the remote workstation name. Resubmit thecommand with a valid workstation name.

SQL1125N The adapter number “<number>”is not valid.

Explanation: The adapter number specified inthe NETBIOS protocol structure for the Catalogcommand is not valid.

The command cannot be processed.

User Response: Verify that the adapter numberis valid and resubmit the command.

Chapter 2. SQL Messages 179

Page 188: Db2 SQL Errors

SQL1126N The network ID “<ID>” is notvalid.

Explanation: The network ID specified in theAPPN protocol structure for the Catalogcommand is not valid. The network ID identifiesthe SNA network where the remote logical unit(LU) resides. The network ID must be 1 to 8characters. Valid characters are A through Z, athrough z, 0 through 9, #, @, and $. The firstcharacter must be alphabetic or a specialcharacter: #, @, or $. Lowercase characters arechanged to uppercase by the system.

The command cannot be processed.

User Response: Verify the characters specifiedin the network ID. Resubmit the command witha valid network ID.

SQL1127N The remote LU name “<name>” isnot valid.

Explanation: The remote logical unit (LU) namespecified in the APPN protocol structure for theCatalog command is not valid. The remote LUname is the remote SNA logical unit name andmust be 1 to 8 characters. Valid characters are Athrough Z, a through z, 0 through 9, #, @, and $.The first character must be alphabetic or aspecial character: #, @, or $. Lowercase charactersare changed to uppercase by the system.

The command cannot be processed.

User Response: Verify the characters specifiedin the remote LU name. Resubmit the commandwith a remote LU name.

SQL1129N New DARI (Stored Procedure)process could not be startedbecause there are insufficientresources for a new process to becreated.

Explanation: New DARI (Stored Procedure)process could not be started because there areinsufficient resources for a new process to becreated.

User Response: Do one of the following:

v Reduce the number of users using DB2

v Increase the system process limit.

sqlcode: -1129

sqlstate: 42724

SQL1130N New DARI (Stored Procedure)process could not be startedbecause the maximum number ofDARI processes allowed to bepresent at the server at the sametime has been reached.

Explanation: New DARI (Stored Procedure)process could not be started because themaximum number of DARI processes allowed tobe present at the server at the same time hasbeen reached.

User Response: Increase the maximum numberof DARI processes, maxdari, configurationparameter. See the database configurationparameter maxdari for more details.

sqlcode: -1130

sqlstate: 42724

SQL1131N DARI (Stored Procedure) processhas been terminated abnormally.

Explanation: The cause of this error may be:

v There was a coding error (e.g. segmentationviolation) within the DARI routine.

v The DARI process has been terminated byanother process through the use of a signal.

User Response: Reinitiate the DARI requestafter doing the following :

v Ensure that the DARI procedure is free fromprogramming errors.

v Make sure that no user is sending atermination signal to the DARI process.

sqlcode: -1131

sqlstate: 38503

180 Message Reference, Volume 2

Page 189: Db2 SQL Errors

SQL1132N The command is not allowed toexecute within a DARI (StoredProcedure).

Explanation: An illegal command has beenmade within the scope of DARI (StoredProcedure).

The DARI procedure is not allowed to continue.

User Response: Remove the illegal command inthe DARI procedure and retry.

sqlcode: -1132

sqlstate: 38003

SQL1133N A pointer address inside an sqlvar( index = “<n>” ) of the outputSQLDA was modified within theDARI (Stored Procedure)function.

Explanation: The “sqlind” or the “sqldata”pointer within the sqlvar of the output SQLDAhas been altered within the user prepared DARIfunction.

The stored procedure does not return any data.

User Response: Correct the usage of theindicated sqlvar within the output SQLDA sothat pointer addresses are not changed withinthe DARI (Stored Procedure) function routine.

sqlcode: -1133

sqlstate: 39502

SQL1134N For database authentication typeCLIENT, the command is notallowed within the scope of DARI(Stored Procedure).

Explanation: All SYSADM commands are notallowed to execute within DARI (StoredProcedure) when the database authenticationtype is CLIENT.

The stored procedure does not return any data.

The DARI procedure is not allowed to continue.

User Response: Remove the illegal command inthe DARI procedure and retry.

sqlcode: -1134

sqlstate: 38003

SQL1135N An invalid value was specified forthe number of segments whencreating a database.

Explanation: The value that was specified forthe number of segments was out of range. Thevalid range is from 1 to 256.

User Response: Respecify the number ofsegments and try to create the database again.

SQL1136N An invalid value was specified forthe default table space extent size(dft_extentsize) when creating adatabase.

Explanation: The value that was specified forthe default table space extent size (dft_extentsize)is out of range. The valid range is from 2 to 256.

User Response: Correct the table space extentsize and try again.

SQL1137W The database manager was unableto remove the database path orsome of the containers whendropping database ″<dbalias>″.Cleanup is required.

Explanation: Either the list of containers couldnot be accessed or some failure occurred whileattempting to remove them or the databasedirectory.

User Response: System managed containers(directories) and database managed filecontainers may be manually removed usingoperating system commands. To release devicecontainers, please call your IBM servicerepresentative for assistance.

If the log directory has been changed via theNew Log Path configuration parameter, thenmanually unmount the log directory file systemand remove the log and database directories.

Chapter 2. SQL Messages 181

Page 190: Db2 SQL Errors

SQL1138W The unique index ″<name>″ wasmigrated to support deferreduniqueness checking. A newindex was not created.

Explanation: A CREATE INDEX operation wasattempted on an existing index. Since the indexhad not yet been migrated to support deferreduniqueness checking, this migration wasperformed.

The migrated format of the unique index willallow multiple row updates to check theuniqueness of the columns of the index at theend of the update statement instead of wheneach row is updated.

User Response: No action is required.

sqlcode: +1138

sqlstate: 01550

SQL1139N The total size of the table space istoo big.

Explanation: The size of the current table spaceis too big. The size of a REGULAR or USERTEMPORARY table space is limited to 0xFFFFFF(16777215) pages while the size of a SYSTEMTEMPORARY or LONG table space is limited to2 tera bytes (2 TB).

User Response: Check the diagnostic log filedb2diag.log for details. Reduce the size of thetable space and correct the SQL statement.

sqlcode: -1139

sqlstate: 54047

SQL1140W Estimated processor cost of″<estimate-amount1>″ processorseconds (″<estimate-amount2>″service units) in cost category″<cost-category>″ exceeds aresource limit warning thresholdof ″<limit-amount>″ service units.

Explanation: The prepare of a dynamic INSERT,UPDATE, DELETE, or SELECT SQL statementresulted in a cost estimate that exceeded thewarning threshold value specified in the resource

limit specification table (RLST).

This warning is also issued if DB2’s cost categoryvalue was ″B″, and the default action specified inthe RLF_CATEGORY_B column in the RLST is toissue a warning.

estimate_amount1The cost estimate (in processor seconds)if the prepared INSERT, UPDATE,DELETE or SELECT statement were tobe executed.

estimate_amount2The cost estimate (in service units) if theprepared INSERT, UPDATE, DELETE orSELECT statement were to be executed.

cost-categoryDB2’s cost-category for this SQLstatement. The possible values are A orB.

limit-amountThe warning threshold (in service units)specified in the RLFASUWARN columnof the RLST.

The prepare of the dynamic INSERT, UPDATE,DELETE, or SELECT statement was successful.An SQLCODE -905 might be issued if theexecution of the prepared statement exceeds theASUTIME value specified in the RLST.

User Response: Ensure that there is applicationlogic to handle the warning to either allow thestatement to execute or to stop the statementfrom being executed. If this SQLCODE wasreturned because the cost category value is ″B″, itmight be that the statement is using parametermarkers or that some statistics are not availablefor the referenced tables and columns. Make surethe administrator has run the utility RUNSTATSon the referenced tables. It might also be thatUDFs will be invoked when the statement isexecuted, or for INSERT, UPDATE, or DELETEstatements that triggers are defined on thechanged table. Check theDSN_STATEMNT_TABLE or the IFCID 22 recordfor this statement to find the reasons this SQLstatement has been put in cost category ″B″.

If the warning is caused by an SQL statement

182 Message Reference, Volume 2

Page 191: Db2 SQL Errors

that is consuming too much processor resource,attempt to rewrite the statement to perform moreefficiently. Another option is to ask theadministrator to increase the warning thresholdvalue in the RLST.

sqlcode: +1140

sqlstate: 01616

SQL1145N PREPARE statement is notsupported when using a gatewayconcentrator. Reason code:“<reason-code>”.

Explanation: The statement failed for one of thefollowing reasons, based on “<reason-code>”.

1 When gateway concentrator feature isON, dynamically prepared statementsfrom embedded SQL are not supported.In this configuration, dynamicallyprepared statements are only supportedif the client is a CLI application.

2 When the gateway concentrator featureis ON, dynamically prepared SETstatements are not supported.

User Response: Based on the reason code,perform the following actions:

1 Change the application to use CLI fordynamic SQL statements, or change theapplication to use static SQL.

2 Use EXECUTE IMMEDIATE for SETstatements.

sqlcode: -1145

sqlstate: 560AF

SQL1150N The address of the user idparameter is not valid.

Explanation: The application program used anaddress that is not valid for this parameter.Either the address points to an unallocated bufferor the character string in the buffer does nothave a null terminator.

The command cannot be processed.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL1160N The DOS ″<network protocol>″TSR has not been loaded.

Explanation: The Terminate and Stay Resident(TSR) network driver for the specifiedcommunications protocol has not been loaded.The TSR must be loaded before attempting touse network communications.

User Response: Ensure that the TSR for thespecified communications protocol has beensuccessfully loaded, then run your applicationagain.

SQL1163N The table cannot be enabled fordata capture as the identifiername “<ident-name>” of type“<ident-type>” is too long.

Explanation: Data capture is not supportedwith certain identifier types exceeding specificlengths. In processing the attempted change, itwas found that the identifier “<ident-name>” oftype “<ident-type>” is too long. The identifiertypes and the maximum lengths allowed for datacapture enablement are as follows:

1. column. Column names cannot be longerthan 18 bytes for data capture to be enabled.

2. table. Table names cannot be longer than 18bytes for data capture to be enabled.

3. schema. Schema names cannot be longer than18 bytes for data capture to be enabled.

User Response: If data capture is to be enabledfor this table than ensure that the identifiers inquestion do not exceed the maximum sizesstated above. Otherwise disable data capture forthe table in order to use longer indentifiernames.

sqlcode: -1163

sqlstate: 42997

Chapter 2. SQL Messages 183

Page 192: Db2 SQL Errors

SQL1164N The SQLDA or host variables, oftype ″<type>″, used in the SQLstatement are not valid. Reasoncode ″<reason-code>″, hostvariable/SQLVAR number″<var-number>″.

Explanation: An error occurred whileprocessing the SQLDA or host variable(s) in theSQL statement.

The call parameter list, which is created by theprecompiler, may not be correct if the applicationprogrammer has modified the output of theprecompiler, used a variable name beginningwith SQL in the application program, orover-written the call parameter list in anotherway.

Also, if an SQLDA is passed directly by theapplication, it may not be initialized correctly.

Host variable/SQLDA types:

1 input host variable(s) or SQLDA

2 output host variable(s) or SQLDA

In SQL statements with host variables, use thehost variable number to count in from thebeginning of the statement (or substatement, inthe case of compound SQL) to locate the invalidhost variable. For statements using an SQLDA,the SQLVAR number is used to locate the invalidSQLVAR. For an input SQLDA, count only inputhost variables or SQLVARs; similarly for output.Note that this number is based at 1, and may notbe applicable to all reason codes. Reason codesare interpreted as follows:

1 SQLDA.SQLN is less thanSQLDA.SQLD

2 SQLVAR.SQLTYPE is invalid.

3 The length specified inSQLVAR.SQLLEN orSQLVAR2.SQLLONGLEN is incorrectfor the SQL type given inSQLVAR.SQLTYPE.

4 A Large Object SQLVAR is present, butthe SQLDOUBLED field ofSQLDA.SQLDAID is not set to ’2’.

5 An input varchar is supplied whosecurrent length (from the length field ofthe varchar itself) is greater than themaximum length. The maximum lengthis determined by the declaration (in thecase of a host variable) or by the settingof SQLVAR.SQLLEN (in the case of auser-defined SQLDA).

6 An input Large Object is passed inwhose current length (either in thelength field of the LOB itself, or asindicated by theSQLVAR2.SQLDATALEN pointer) isgreater than the maximum length. Themaximum length is determined by thedeclaration (in the case of a hostvariable) or by the setting ofSQLVAR2.SQLLONGLEN (in the case ofa user-defined SQLDA).

7 A double-byte character Large Objecthas an odd value indicated by theSQLVAR2.SQLDATALEN pointer, whichis always in terms of bytes, even forDBCLOBs.

8 The SQLDATA pointer is invalid orpoints to insufficient storage.

9 The SQLIND pointer is invalid or pointsto insufficient storage.

10 The SQLDATALEN pointer is invalid orpoints to insufficient storage.

11 A specific number of input hostvariables/SQLVARS is expected for thecurrent SQL statement.

The statement cannot be processed.

User Response: Examine the applicationprogram for any errors noted. Note that theprogrammer should not attempt to modify theprecompiler output.

sqlcode: -1164

sqlstate: 07002

184 Message Reference, Volume 2

Page 193: Db2 SQL Errors

SQL1165W A value cannot be assigned to ahost variable because the value isnot within the range of the hostvariable’s data type.

Explanation: A FETCH, VALUES, or SELECTinto a host variable list failed because the hostvariable was not large enough to hold theretrieved value.

The statement processing continued returning anull indicator of -2.

User Response: Verify that table definitions arecurrent and that the host variable has the correctdata type. For the ranges of SQL data types, referto the SQL Reference.

sqlcode: +1165

sqlstate: 01515

SQL1166W Division by zero was attempted.

Explanation: The processing of an arithmeticexpression resulted in division by zero. Thiswarning may be returned with a row other thanthe row which caused the warning. For example,this occurs with arithmetic expressions inpredicates or when the query is processed usingsystem temporary tables. The warning may beissued again since it is also returned whenever anull indicator variable is set to -2.

The statement processing continued, using nullas the result of the division expression andpossibly returning a null indicator of -2.

User Response: Examine the SQL statement todetermine the cause of the problem. If theproblem is data dependent, it is necessary toexamine the data processed when the erroroccurred.

sqlcode: +1166

sqlstate: 01564

SQL1167W Arithmetic overflow or otherarithmetic exception occurred.

Explanation: The processing of an arithmeticexpression has resulted in an arithmetic overflow,underflow or other arithmetic exception. This

warning may be returned with a row other thanthe row which caused the warning. For example,this occurs with arithmetic expressions inpredicates or when the query is processed usingsystem temporary tables. The warning may beissued again since it is also returned whenever anull indicator variable is set to -2.

The statement processing continued, using nullas the result of the arithmetic expression andpossibly returning a null indicator of -2.

User Response: Examine the SQL statement todetermine the cause of the problem. If theproblem is data dependent, it is necessary toexamine the data processed when the erroroccurred. Refer to the SQL Reference to see thevalid ranges for the data types.

sqlcode: +1167

sqlstate: 01519

SQL1178N The federated “<object-type>”called “<object-name>” does notreference a nickname or OLE DBtable function.

Explanation: The object of type “<object-type>”identified by “<object-name>” is defined usingthe keyword FEDERATED but the fullselect inthe statement does not reference a nickname oran OLE DB table function.

The statement cannot be processed.

User Response: Remove the keywordFEDERATED from the statement.

sqlcode: -1178

sqlstate: 429BA

SQL1179W The “<object-type>” called“<object-name>” may require theinvoker to have necessaryprivileges on data source objects.

Explanation: The object identified by“<object-name>” references an OLE DB tablefunction or a nickname where the actual dataexists at a data source. When the data sourcedata is accessed, the user mapping and

Chapter 2. SQL Messages 185

Page 194: Db2 SQL Errors

authorization checking is based on the user thatinitiated the operation.

If the “<object-type>” is SUMMARY TABLE,then the operation is refreshing the data for thesummary table. The user that invoked theREFRESH TABLE or SET INTEGRITY statementthat causes the refresh may be required to havethe necessary privileges to access the underlyingdata source object at the data source.

If the “<object-type>” is VIEW, then any user ofthe view may be required to have the necessaryprivileges to access the underlying data sourceobject at the data source.

In either case, an authorization error may occurwhen the attempt is made to access the datasource object.

User Response: Granting privileges to the viewor summary table may not be sufficient tosupport operations that access the data from thedata source. User access may need to be grantedat the data source for the underlying data sourceobjects of the view or summary table.

sqlcode: +1179

sqlstate: 01639

SQL1180N Routine ″<routine-name>″(specific name ″<specific-name>″)has caused an OLE error.HRESULT=″<hresult>″.Diagnostic text: ″<message text>″.

Explanation: DB2 received an OLE error codewhile trying to communicate with the OLEautomation server of user defined function(UDF) or stored procedure ″<routine-name>″(specific name ″<specific-name>″). HRESULT″<hresult>″ is the returned OLE error code, and″<message text>″ is the retrieved error message.

The following shows a partial list of errormessages, HRESULTS, and possible causes. Theerror message text may be changed by OLE, andnew error codes may be added by OLE.

Unknown interface (0x80020001):The specified OLE object does notsupport the IDispatch interface.

Type mismatch (0x80020005):One or more of the SQL data types donot match the data types of the methodarguments.

Unknown name (0x80020006):The specified method name was notfound for the specified OLE object.

Invalid number of parameters (0x8002000E):The number of arguments passed to themethod is different from the number ofarguments accepted by the method.

Invalid class string (0x800401F3):The specified ProgID or CLSID isinvalid.

Class not registered (0x80040154):CLSID is not properly registered.

Application not found (0x800401F5):Local server EXE not found.

DLL for class not found (0x800401F8):In-process DLL not found.

Server execution failed (0x80080005):Creation of the OLE object failed.

User Response: Consult the OLE Programmer’sReference Guide for a complete documentation,including the meaning of the special terminology.

sqlcode: -1180

sqlstate: 42724

SQL1181N Routine ″<routine-name>″(specific name ″<specific-name>″)has raised an exception withdescription ″<message text>″.

Explanation: The user defined function (UDF)or stored procedure ″<routine-name>″ (specificname ″<specific-name>″) has raised an exception.The message text shows the textual descriptionof the exception returned by the routine.

User Response: The user will need tounderstand the meaning of the exception. See theauthor of the routine.

sqlcode: -1181

sqlstate: 38501

186 Message Reference, Volume 2

Page 195: Db2 SQL Errors

SQL1182N User defined function“<function-name>” could notinitialize data source object ofspecified OLE DB provider.HRESULT=“<hresult>”.Diagnostic text: “<message-text>”.

Explanation: The OLE DB data source object ofthe specified OLE DB provider could not beinstantiated or initialized. “<hresult>” is thereturned OLE DB error code, and“<message-text>” is the retrieved error message.

The following shows a partial list of HRESULTSand possible causes.

0x80040154Class (OLE DB provider) not registered.

0x80040E73The initialization string specified doesnot conform to specificiation.

0x80004005Unspecified error (during initialization).

User Response: Verify proper registration of theOLE DB provider and correct initialization of theparameters in the connection string. ConsultMicrosoft OLE DB Programmer’s Reference andData Access SDK for a complete documentationof HRESULT codes and Data Link APIconnection string syntax in OLE DB CoreComponents.

sqlcode: -1182

sqlstate: 38506

SQL1183N User defined function“<function-name>” received anOLE DB error from specified OLEDB provider.HRESULT=“<hresult>”.Diagnostic text: “<message-text>”.

Explanation: The specified OLE DB providerreturned an OLE DB error code. “<hresult>” isthe returned OLE DB error code, and“<message-text>” is the retrieved error message.

The following shows a partial list of HRESULTSand possible causes.

0x80040E14The command contained one or moreerrors, e.g. syntax error in pass-throughcommand text.

0x80040E21Errors occurred, e.g. the suppliedcolumnID was invalid(DB_INVALIDCOLUMN).

0x80040E37The specified table does not exist.

User Response: Consult Microsoft OLE DBProgrammer’s Reference and Data Access SDKfor a complete documentation of HRESULTcodes.

sqlcode: -1183

sqlstate: 38506

SQL1184N One or more EXPLAIN tableswere not created using the currentversion of DB2.

Explanation: EXPLAIN will not be able to insertinto these tables until they are migrated usingDB2EXMIG, or dropped and created with theEXPLAIN.DDL CLP script for the current versionof DB2.

User Response: Either migrate the tables usingDB2EXMIG, or drop and re-create them with theEXPLAIN.DDL CLP script for the current versionof DB2. Re-issue the command.

sqlcode: -1184

sqlstate: 55002

SQL1185N FEDERATED “<value>” isincorrectly used in binding thepackage.

Explanation: If “<value>” is NO, then at leastone static SQL statement in the package includesa reference to either a nickname or OLE DB tablefunction or OLE DB procedure. In this case, youmust specify FEDERATED YES to bind thepackage.

If “<value>” is YES, then no static SQL statementin the package includes a reference to either a

Chapter 2. SQL Messages 187

Page 196: Db2 SQL Errors

nickname or OLE DB table function or OLE DBprocedure. In this case, you must specifyFEDERATED NO to bind the package.

The package is not created.

User Response: Specify the correctFEDERATED option.

SQL1200 - SQL1299

SQL1200N The object parameter is not valid.

Explanation: The value specified for the objectparameter in the COLLECT DATABASE STATUSfunction call is not valid. Valid values are:

SQLE_DATABASEStatus is to be collected for a singledatabase.

SQLE_DRIVEStatus is to be collected for all LOCALdatabases on a single path.

SQLE_LOCALStatus is to be collected for all LOCALdatabases.

The command cannot be processed.

User Response: Correct the object parameterand resubmit the COLLECT DATABASE STATUSfunction call.

SQL1201N The status parameter is not valid.

Explanation: The value specified for the statusparameter in the COLLECT DATABASE STATUSfunction call is not valid. Valid values are:

SQLE_SYSTEMSystem status is to be collected.

SQLE_DATABASESystem status and database status is tobe collected.

SQLE_ALLSystem status, database status and userstatus is to be collected.

The command cannot be processed.

User Response: Correct the status parameterand resubmit the COLLECT DATABASE STATUSfunction call.

SQL1202N Status has not been collected.

Explanation: The value specified for the handleparameter in the GET NEXT DATABASESTATUS BLOCK or the FREE DATABASESTATUS RESOURCES function calls is not valid.The handle must be the one returned as thepositive function value from the COLLECTDATABASE STATUS function call.

This is the second COLLECT DATABASESTATUS call made from the process. The firstCOLLECT DATABASE STATUS call terminatesand its handle can no longer be used.

The command cannot be processed.

User Response: Correct the handle parameterand resubmit the COLLECT DATABASE STATUSfunction call.

SQL1203N The database has no usersconnected.

Explanation: A request was made for userstatus on a database, but the database has nousers connected.

The command cannot be processed.

User Response: Verify the database name andthe connection status. Resubmit the commandwith a database currently being used.

SQL1204N The code page “<code page>”and/or country code “<countrycode>” is not supported by theinstalled version of the databasemanager.

Explanation: This version of the databasemanager does not support the active code pageor country code or both.

The command cannot be processed.

188 Message Reference, Volume 2

Page 197: Db2 SQL Errors

Choose an active code page and country codesupported by this version of the databasemanager.

Federated system users: if necessary isolate theproblem to the data source rejecting the request(see the Troubleshooting Guide for procedures tofollow to identify the failing data source) andchoose an active code page and country codesupported by both the federated server and thedata source.

User Response: Exit the current program andreturn to the operating system.

sqlcode: -1204

sqlstate: 22522

SQL1205N The code page “<code page>”and/or country code “<country>”that has been specified is notvalid.

Explanation: This version of DB2 does notsupport the active code page or country code orboth, as specified by the Create Databasecommand.

The command cannot be processed.

User Response: Refer to the Create Databasecommand in the Command Reference for details ofvalid code page and country code pairssupported by DB2/2.

SQL1206N PRUNE LOGFILE is notsupported in this databaseconfiguration.

Explanation: The PRUNE LOGFILE request isnot supported if:

1. both LOGRETAIN and USEREXIT are set toNO, or

2. the active logfile path is set to a raw device.

User Response: Do not issue the PRUNELOGFILE command for this database.

SQL1207N Communication Managerconfiguration file “<name>”cannot be found.

Explanation: The Communication Managerconfiguration file name specified on theCATALOG NODE command was not foundeither in the path specified or in the CMLIBdirectory on the default drive.

The command cannot be processed.

User Response: Resubmit the command withthe correct configuration file name and path.

SQL1209W The partner_lu name “<name>”specified in the CATALOG NODEfunction does not exist. One wascreated.

Explanation: The logical partner unit namespecified in the CATALOG NODE function doesnot exist in the Communications Managerconfiguration file located in the CMLIB directoryon the default drive.

A logical unit profile of the specified name wascreated.

User Response: No action is required.

SQL1210W Default values were returned forone or more DOSRequester/WINDOWS Requesterconfiguration file parameters.

Explanation: One or more of the DOSRequester/WINDOWS Requester configurationvalues returned was defaulted. The parametermay not be defined in the DOSRequester/WINDOWS Requester configurationfile or the configuration file could not be openedor an error occurred reading the file.

User Response: Ensure that the DOSRequester/WINDOWS Requester configurationfile exists in the appropriate path and that theparameters are explicitly defined.

Chapter 2. SQL Messages 189

Page 198: Db2 SQL Errors

SQL1211N The computer name ″<name>″ isnot valid.

Explanation: The computer name specified inthe NPIPE protocol structure for the Catalogcommand is not valid. The size of the computername must be 15 characters or less.

The command cannot be processed.

User Response: Verify that the computer nameis valid and resubmit the command.

SQL1212N The instance name ″<name>″ isnot valid.

Explanation: The instance name specified forthe Catalog command is not valid. The size ofthe instance name must be 8 characters or less.

The command cannot be processed.

User Response: Verify that the instance name isvalid and resubmit the command.

SQL1213N The change password LU name“<name>” is not valid.

Explanation: The change password logical unit(LU) name specified in the APPN protocolstructure for the CATALOG command is notvalid.

The change password LU name is the remoteSNA LU name and must be 1 to 8 characters.Valid characters are A through Z, a through z, 0through 9, #, @, and $. The first character mustbe alphabetic or a special character: #, @, or $.Lowercase characters are changed to uppercaseby the system.

The command cannot be processed.

User Response: Verify the characters specifiedin the change password LU name.

Resubmit the command with a valid changepassword LU name.

SQL1214N The transaction program name“<name>” is not valid.

Explanation: The transaction program (TP)name specified in the APPN protocol structure

for the CATALOG command is not valid.

The TP name is the remote SNA Application TPname and must be 1 to 64 characters. Validcharacters are A through Z, a through z, 0through 9, #, @, and $. The first character mustbe alphabetic or a special character: #, @, or $.

The command cannot be processed.

User Response: Verify the characters specifiedin the TP name.

Resubmit the command with a TP name.

SQL1215N The LAN adapter address“<address>” is not valid.

Explanation: The LAN adapter addressspecified in the APPN protocol structure for theCATALOG command is not valid.

The LAN adapter address is the remote SNALAN adapter address and must be a12-hexadecimal number.

The command cannot be processed.

User Response: Verify the LAN adapteraddress.

Resubmit the command with a valid LANadapter address.

SQL1216N Graphic data and graphicfunctions are not supported forthis database.

Explanation: The code page of the databasedoes not support graphic data. The data typesGRAPHIC, VARGRAPHIC, and LONGVARGRAPHIC are not valid for this database.The GRAPHIC literal and the VARGRAPHICscalar functions are not valid for this database.

The statement cannot be processed.

Federated system users: this situation can also bedetected by the data source.

User Response: Resubmit the command withvalid data types.

sqlcode: -1216

sqlstate: 56031

190 Message Reference, Volume 2

Page 199: Db2 SQL Errors

SQL1217N The REAL data type is notsupported by the target database.

Explanation: An SQL operation is using a datatype of REAL (single-precision floating pointnumber) as an input or output variable. TheREAL data type is not supported on the targetdatabase for this request.

The statement is not processed.

User Response: Replace the declaration of anyhost variable that corresponds to the SQL datatype of REAL with a declaration thatcorresponds to an SQL data type of DOUBLE inyour application.

sqlcode: -1217

sqlstate: 56099

SQL1218N There are no pages currentlyavailable in bufferpool″<buffpool-num>″.

Explanation: All of the pages in the bufferpoolare currently being used. A request to useanother page failed.

The statement cannot be processed.

User Response: The bufferpool is not largeenough to provide pages to all databaseprocesses or threads at this time. The bufferpoolis too small or there are too many activeprocesses or threads.

The statement may be successful if executedagain. If this error occurs frequently, some or allof the following actions may prevent furtherfailures:

1. increase the bufferpool size

2. decrease the maximum number of databaseagents and/or connections

3. decrease the maximum degree of parallelism

4. decrease the prefetch size for table spaces thatare in this bufferpool

5. move some table spaces into otherbufferpools.

sqlcode: -1218

sqlstate: 57011

SQL1219N The request failed because privatevirtual memory could not beallocated.

Explanation: The instance was unable toallocate enough private virtual memory toprocess the request. This may be a result ofshared memory allocations made in other(unrelated) processes.

User Response: The problem may be correctedby:

v On OS/2, increasing the min_priv_memconfiguration parameter. This will result inmore private virtual memory being reservedwhen the instance is started.

v Stopping other applications running on themachine, especially those that use largeamounts of shared memory.

sqlcode: -1219

sqlstate: 57011

SQL1220N The database manager sharedmemory set cannot be allocated.

Explanation: The database manager could notallocate its shared memory set. The cause of thiserror may be insufficient memory resourceseither for the database manager or theenvironment in which its operation is beingattempted. Memory resources that can cause thiserror include:

v The number of shared memory identifiersallocated in the system

v The amount of paging or swapping spaceavailable in the system

v The amount of physical memory available inthe system

User Response: One or more of the following:

v Validate that sufficient memory resources areavailable to satisfy the database manager’srequirements, and those of the other programsrunning on the system.

Chapter 2. SQL Messages 191

Page 200: Db2 SQL Errors

v Reduce database manager’s memoryrequirement for this memory set by reducingthe database manager configurationparameters which affect it. These are:maxagents, maxdari and, numdb.

v Where appropriate, stop other programs usingthe system.

SQL1221N The Application Support Layerheap cannot be allocated.

Explanation: The Application Support Layerheap could not be allocated. The cause of thiserror may be insufficient memory resourceseither for the database manager or theenvironment in which its operations are beingattempted. Memory resources that can cause thiserror include:

v The number of shared memory identifiersallocated in the system

v The amount of paging or swapping spaceavailable in the system

v The amount of physical memory available inthe system

User Response: One or more of the following:

v Validate that sufficient memory resources areavailable to satisfy the database manager’srequirements, and those of the other programsrunning on the system.

v Reduce the aslheapsz configuration parameter.

v Where appropriate, stop other programs usingthe system.

sqlcode: -1221

sqlstate: 57011

SQL1222N Not enough storage is available inthe Application Support Layerheap to process the request.

Explanation: All available memory in theApplication Support Layer heap has been used.

User Response: Increase the aslheapszconfiguration parameter.

sqlcode: -1222

sqlstate: 57011

SQL1223N An agent could not be started toservice this request.

Explanation: The request failed because themaxagents configuration parameter limit wouldbe exceeded.

User Response: Increase the maxagentsconfiguration parameter, and/or reduce thenumber of users using the database.

sqlcode: -1223

sqlstate: 57019

SQL1224N A database agent could not bestarted to service a request, or wasterminated as a result of adatabase system shutdown or aforce command.

Explanation: The message may be attributed toany of the following cases.

v The database manager has not been started onthe database server

v The database manager was stopped

v The database manager has already allocatedthe maximum number of agents

v The database agent was forced off by thesystem administrator

v The database agent was terminated due to anabnormal termination of a key databasemanager process

v The application is using multiple contexts withlocal protocol. In this case the number ofconnections is limited by the number of sharedmemory segments to which a single processcan be attached. For example, on AIX, the limitis ten shared memory segments per process.

Additional federated server cases are:

v The maximum number of processes per user(maxuproc on AIX) at the operating systemlevel has been exceeded.

v In the client/server environment using theTCP/IP protocol, the port number assigned tothe TCP/IP service name on the client is notthe same as the port number on the server.

192 Message Reference, Volume 2

Page 201: Db2 SQL Errors

This situation can be detected by federatedserver or by the data source.

User Response: Reissue the database request. Ifa connection cannot be established, then ensurethat the database manager has been startedsuccessfully. Additionally, ensure that themaxagents database manager configurationparameter is appropriately configured.

Federated system users, should also:

v Isolate the problem to the data source rejectingthe request (see the Troubleshooting Guide forprocedures to follow to identify the failingdata source) and ensure that thecommunication subsystem is active and thatthe database manager and requiredcommunication protocol server processes havebeen started on the database server.

v For AIX operating systems, check the setting ofmaxuproc and change it if needed. maxuprocrestricts the number of processes that can rununder a given federated server. The defaultsetting is 40.

You can check the current setting of maxuprocwith the command:

.lsattr -E -l sys0

To view the number of processes currentlyrunning under a given federated server, usethe command:

ps -ef | grep instdj1 | wc -l

where “instdj1” is the instance name of thefederated server.

To change maxuproc, use the command:

chdev -l sys0 -a maxuproc='nn'

where nn is the new integer value ofmaxuproc.

If the application is using multiple contexts withlocal protocol, then either reduce the number ofconnections in the application, or switch toanother protocol (for example, TCP/IP). Forusers on AIX version 4.2.1 or newer, theenvironment variable EXTSHM can be set to ON

to increase the number of shared memorysegments to which a single process can beattached.

sqlcode: -1224

sqlstate: 55032

SQL1225N The request failed because anoperating system process, thread,or swap space limit was reached.

Explanation: An operating system process,thread, or swap space limit was reached. OnUNIX-based systems, this may mean that themaxuproc value is too low. On OS/2-basedsystems, this may mean that the THREADSCONFIG.SYS value is too low.

User Response: Increase the limit which wasreached (or have your system administratorincrease it). On UNIX-based systems, themaxuproc limit can be changed with the chdevcommand.

sqlcode: -1225

sqlstate: 57049

SQL1226N The maximum number ofcoordinating agents are alreadystarted.

Explanation: The number of coordinatingagents started is already equal to the maximumvalue defined in the system configuration file.

The statement cannot be processed.

User Response: Wait for other applications todisconnect from the database. If one or moreapplications are required to run concurrently,increase the value for max_coordagents. The newvalue takes effect after the next successfuldatabase manager start.

sqlcode: -1226

sqlstate: 57030

Chapter 2. SQL Messages 193

Page 202: Db2 SQL Errors

SQL1227N The catalog statistic ″<value>″ forcolumn ″<column>″ is out ofrange for its target column, has aninvalid format, or is inconsistentin relation to some other statistic.Reason Code = ″<code>″

Explanation: The value or format of a statisticprovided for an updateable catalog is eitherinvalid, out of range, or inconsistent. The mostcommon checks for value, range and format are(corresponding to ″<code>″):

1 Numeric statistics must be -1 or >= 0.

2 Numeric statistics representingpercentages (eg. CLUSTERRATIO) mustbe between 0 and 100.

3 HIGH2KEY, LOW2KEY related rules :

v The datatype of any HIGH2KEY,LOW2KEY value must be the same asthe datatype of the correspondinguser column.

v The length of HIGH2KEY, LOW2KEYvalue must be the smaller of 33 or thetarget column’s datatype’s maximumlength.

v HIGH2KEY must be > LOW2KEYwhenever there are 3 or more distinctvalues in the corresponding column.In the case of less than 3 distinctvalues in the column, HIGH2KEY canbe equal to LOW2KEY.

4 PAGE_FETCH_PAIRS related rules :

v Individual values in thePAGE_FETCH_PAIRS statistic mustbe separated by a series of blankdelimiters.

v Individual values inPAGE_FETCH_PAIRS statistics mustnot be longer than 10 digits and mustbe less than the maximum integervalue (MAXINT = 2147483647).

v There must always be a validPAGE_FETCH_PAIRS value if theCLUSTERFACTOR is > 0.

v There must be exactly 11 pairs in asingle PAGE_FETCH_PAIR statistic

v buffer size entries ofPAGE_FETCH_PAIRS must beascending in value. Also, any buffersize value in a PAGE_FETCH_PAIRSentry cannot be greater than MIN(NPAGES, 524287) where NPAGES isthe number of pages in thecorresponding table.

v ″fetches″ entries ofPAGE_FETCH_PAIRS must bedescending in value, with noindividual fetches entry being lessthan NPAGES. Also, any ″fetch″ sizevalue in a PAGE_FETCH_PAIRS entrymust not be greater than CARD(cardinality) statistic of thecorresponding table.

v If buffer size value is the same in twoconsecutive pairs, then page fetchvalue must also be the same in boththe pairs.

5 CLUSTERRATIO andCLUSTERFACTOR related rules :

v Valid values for CLUSTERRATIO are-1 or between 0 and 100

v Valid values for CLUSTERFACTORare -1 or between 0 and 1

v Either CLUSTERRATIO orCLUSTERFACTOR must be -1 at alltimes.

v If CLUSTERFACTOR is a positivevalue, it must be accompanied by avalid PAGE_FETCH_PAIR statistic.

6 The cardinality of a column (COLCARDstatistic in SYSCOLUMNS) cannot begreater than the cardinality of itscorresponding table (CARD statistic inSYSTABLES).

7 No statistics are supported for columnswith the following data types: LONGVARCHAR, LONG VARGRAPHIC,BLOB, CLOB, DBCLOB, or user-definedstructured types.

8 A statistic is inconsistent with otherrelated statistics for this entity or isinvalid in this context.

194 Message Reference, Volume 2

Page 203: Db2 SQL Errors

User Response: Make sure the new catalogstatistic satisfies the above range/length/formatchecks.

Make sure that any updates to statistics areconsistent in their inter-relationships (eg.cardinality).

sqlcode: -1227

sqlstate: 23521

SQL1228W DROP DATABASE has completedbut the database alias name ordatabase name ″<name>″ couldnot be found on ″<num>″ nodes.

Explanation: The drop database command hascompleted successfully, however, there are somenodes where the database alias or database namewas not found. It is possible that DROPDATABASE AT NODE was already performedon these nodes.

User Response: This is a warning message only.No response is necessary.

SQL1229N The current transaction has beenrolled back because of a systemerror.

Explanation: One of the following has occurred:

1. A system error, such as node failure orconnection failure, has occurred. Theapplication is rolled back to the previousCOMMIT.

Note that in the case of DB2 utility functions,the behavior is described below:

Import The application is rolled back. If theCOMMITCOUNT parameter wasused, the operation is rolled back toa previous committed point.

Reorg The operation is aborted and mustbe resubmitted.

RedistributeThe operation is aborted, however,some of the operation may havebeen successful. Issuing the request

again with the ″continue″ option willrestart the operation from the pointof failure.

RollforwardThe operation is aborted and thedatabase is still in rollforwardpending state. The command mustbe resubmitted.

Backup/RestoreThe operation is aborted and mustbe resubmitted.

2. The service port numbers assigned for FCM(Fast Communication Manager)communications are not the same on allnodes in the DB2 instance. Check the servicesfile being used on all nodes to ensure that theports are the same. The ports are definedusing the format:

DB2_<instance> xxxx/tcpDB2_<instance>_END xxxx/tcp

where <instance> is the DB2 instance nameand xxxx is the port number Ensure thatthese port numbers are not being used forDB2 remote client support.

User Response:

1. Try the request again. If the error persists,you can find more information about theproblem in the db2diag.log file. It may benecessary to contact the system administratorfor assistance since the most common reasonfor this error is that a node has failed.

Note that in an SP environment where thehigh speed switch is used, this error can be asymptom of a failure in the high speedswitch.

2. Update the service ports to be the same on allnodes and try the request again.

The sixth sqlerrd field of the SQLCA willindicate the node number that detected the nodefailure. On the node that detected the failure amessage will be placed in the db2diag.log thatidentifies the failed node.

sqlcode: -1229

Chapter 2. SQL Messages 195

Page 204: Db2 SQL Errors

sqlstate: 40504

SQL1230W At least one agent id specifiedcould not be forced.

Explanation: At least one agent id specified onthe Force command could not be forced. Causesof this warning may be:

v A nonexistent or invalid agent id wasspecified.

v The agent disconnected from the databasemanager between the time that the agent idswere collected and the Force command wasissued.

v The agent id specified was for a parallel agent(exists on DB2 Enterprise - Extended Editiononly) which cannot be forced.

User Response: If a nonexistent or invalid agentid was specified, retry the command using thevalid agent id.

SQL1231N Invalid Force count specified.

Explanation: The value specified for the countparameter of the Force command is not valid.The value specified must either be a positiveinteger or SQL_ALL_USERS. A value of 0 willresult in an error.

User Response: Correct the value of count andresubmit the command.

SQL1232N Invalid Force mode specified.

Explanation: The value specified for the modeparameter of the Force command is not valid.Only asynchronous mode is supported for theForce command. The parameter must be set tothe value SQL_ASYNCH.

User Response: Set the mode to SQL_ASYNCHand resubmit the command.

SQL1233N The use of this clause or scalarfunction is supported only forgraphic data that is UCS-2.

Explanation: UCS-2 is not supported for thisdatabase. The support of UCS-2 is required forthe following:

v Specifying a graphic string expression as thefirst argument of the VARCHAR scalarfunction

v Specifying a character string expression as thefirst argument of the VARGRAPHIC scalarfunction when a second argument is specified

v Specifying a UCS-2 hexadecimal constantusing the format UX’hex-digits’

The statement cannot be processed.

User Response: Resubmit the command withvalid data types.

sqlcode: -1233

sqlstate: 560AA

SQL1240N The maximum number ofquiescers has been reached.

Explanation: An attempt was made to acquire aquiesce state on a table space which has alreadybeen quiesced by 5 processes.

User Response: Wait for one of the processes torelease its quiesce state and try again.

SQL1241N An invalid value was specified forthe ″<tbs-name>″ table spacedefinition when creating adatabase. Attribute is ″<string>″.

Explanation: The value for a table spaceattribute was out of range. See the DataStructures section of Application DevelopmentGuide for the format of the sqletsdesc structureused for the create database api. The identifiedattribute is the field name of this structure.

User Response: Correct the create databaserequest.

196 Message Reference, Volume 2

Page 205: Db2 SQL Errors

SQL1244W Disconnect for transactionmanager database“<database-name>” will occur atnext COMMIT.

Explanation: A disconnect has been issuedagainst a database which is acting as the TMdatabase. The disconnect cannot be completeduntil the next COMMIT is processed.

User Response: If it is necessary that thedatabase which is acting as the TM database bedisconnected immediately, issue a COMMITstatement before execution continues.

sqlcode: +1244

sqlstate: 01002

SQL1245N Connection limit has beenreached. No more connections areallowed from this client.

Explanation: The maximum number ofconcurrent database connections has beenreached for an environment where the number ofconnections is restricted or must be predefined.The primary example of where this would occuris when the NETBIOS protocol is being used.

User Response: Possible actions:

v Use the SET CLIENT command or API to setthe MAX NETBIOS CONNECTIONS field tothe maximum number of concurrentconnections required. This must be donebefore any connections are made.

sqlcode: -1245

sqlstate: 08001

SQL1246N Connection settings cannot bechanged while connections exist.

Explanation: One of the following occurred:

v An attempt was made to change theconnection settings for an application usingthe SET CLIENT API. This was rejectedbecause one or more connections exist.

v The application contains both DB2 Call LevelInterface API calls and calls to functions

containing embedded SQL, and the connectionmanagement was not invoked using the CLIAPIs.

User Response: Possible actions:

v Ensure that the application disconnects fromall servers before attempting to issue the SETCLIENT API (sqlesetc or sqlgsetc) or CLPcommand.

v Ensure that all connection managementrequests are issued via the DB2 Call LevelInterface APIs if CLI is being used by theapplication.

SQL1247N Applications running in an XAtransaction processingenvironment must use theSYNCPOINT TWOPHASEconnection setting.

Explanation: The application was precompiledwith the option SYNCPOINT ONEPHASE orSYNCPOINT NONE, or the SYNCPOINTconnection setting was changed to one of thesevalues using the SET CLIENT API. These settingsare invalid for applications which causetransaction processing syncpoint commands (forexample CICS SYNCPOINT) to be executed.Note that SYNCPOINT ONEPHASE is thedefault precompiler option.

User Response: Possible actions:

v Re-precompile the application using theprecompiler option SYNCPOINT TWOPHASE.

v Modify the program such that the SETCLIENT API is called to set the connectionoption to SYNCPOINT TWOPHASE prior toany other processing.

sqlcode: -1247

sqlstate: 51025

SQL1248N Database “<database alias>” notdefined with the transactionmanager.

Explanation: You attempted to access adatabase that had not been opened by thetransaction manager. A database must be defined

Chapter 2. SQL Messages 197

Page 206: Db2 SQL Errors

to the transaction manager in order to participatein the two-phase commit process.

User Response: Define the database as aresource manager to the transaction manager ofyour Distributed Transaction Processingenvironment. For example, in a CICSenvironment this requires adding the database tothe XAD file and provides the database aliasname in the XAOpen string of the XAD entry.

sqlcode: -1248

sqlstate: 42705

SQL1251W No data returned for heuristicquery.

Explanation: There are no in-doubt transactionsin the database, nor any transactions that haveended and are waiting to enter the syncpointprocess.

User Response: No action is required.

SQL1260N Database “<name>” is notconfigured for roll-forwardrecovery on node(s) “<node-list>”.

Explanation: The specified database is notconfigured for roll-forward recovery on thespecified node(s). If ″,...″ is displayed at the endof the node list, see the diagnostic log for thecomplete list of nodes.

The database is not rolled forward on thespecified node(s).

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Ensure that recovery is requiredon the specified node(s), then restore the mostrecent backup version of the database on thesenodes.

SQL1261N Database ″<name>″ is not inrollforward pending state onnode(s) ″<node-list>″, so it doesnot need to be rolled forward onthese nodes.

Explanation: The specified database is not inroll-forward pending state on the specifiednode(s). This may be because the database hasnot been restored, or was restored with theWITHOUT ROLLING FORWARD option, orroll-forward recovery is complete on these nodes.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

The database is not rolled forward.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Do the following:

1. Ensure that recovery is required on thespecified node(s).

2. Restore a backup version of the database onthese nodes.

3. Issue the ROLLFORWARD DATABASEcommand.

SQL1262N The point-in-time specified forrolling forward database“<name>” is not valid.

Explanation: The timestamp parameterspecified for the point-in-time stopping value isnot valid. The timestamp must be entered in ISOformat (YYYY-MM-DD-hh.mm.ss.<ssssss> whereYYYY represents year, MM represents month,DD represents day, hh represents hours, mmrepresents minutes, ss represents seconds, andssssss represents optional microseconds).

The database is not rolled forward.

User Response: Ensure that the timestamp isentered in the correct format.

When you issue a ROLLFORWARD DATABASE

198 Message Reference, Volume 2

Page 207: Db2 SQL Errors

command, ensure that you are not specifying ayear greater than 2105.

SQL1263N The archive file “<name>” is nota valid log file for database“<name>” on node“<node-number>”.

Explanation: The specified archive log file existsin the database log directory or the overflow logdirectory on the specified node, but the file is notvalid.

Roll-forward recovery processing stops.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file into thedatabase log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file, and issue theROLLFORWARD DATABASE command again.Alternatively, resubmit the command with theoverflow log path pointing to the correct archivefile.

SQL1264N The archive file “<name>” doesnot belong to database“<database-name>” on node“<node-number>”.

Explanation: The archive log file specified wasfound in the log directory or the overflow logdirectory but does not belong to the specifieddatabase.

Roll-forward recovery processing stops.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file into the

database log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file and issue theROLLFORWARD DATABASE command again.Alternatively, resubmit the command with theoverflow log path pointing to the correct archivefile.

SQL1265N The archive log file “<name>” isnot associated with the current logsequence for database “<name>”on node “<node-number>”.

Explanation: For roll-forward recovery, the logfiles need to be processed in correct sequence.The log file sequence is determined by thedatabase that has been restored or the log filesthat have been processed. In addition to this, fortable space level roll-forward recovery, the logfiles must be processed in the sequence throughwhich the current state of the database has beenreached. The specified archive log file was foundin the log directory or the overflow log path forthe database on the specified node but the logfile is not in the correct log sequence.

Roll-forward recovery processing stops.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file into thedatabase log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file and issue theROLLFORWARD DATABASE command again.Alternatively, resubmit the command with theoverflow log path pointing to the correct archivefile.

Chapter 2. SQL Messages 199

Page 208: Db2 SQL Errors

SQL1266N Database “<name>” has beenrolled forward to “<timestamp>”,which is past the specifiedpoint-in-time.

Explanation: Roll-forward is requested to stopat a timestamp that is before the current point intime in the specified database log file. This canhappen when rolling forward either the databaseor a subset of table spaces to a point in time.

Database roll-forward processing stops.

User Response: Specify the correct point in timeor restore the database or table space subset froma backup version and resubmit theROLLFORWARD command.

SQL1267N The system could not finddb2uexit in the current PATHenvironment variable.

Explanation: The user-supplied file db2uexitcannot be found, either because it is not in thecurrent PATH environment variable or it doesnot exist.

The command cannot be processed.

User Response: Update the current PATHenvironment variable to include the path todb2uexit or create a db2uexit file and update thecurrent PATH environment variable if necessary.

SQL1268N Roll-forward recovery stoppeddue to error “<error>” whileretrieving log file “<logfile>” fordatabase “<name>” on node“<node-number>”.

Explanation: Roll-forward processing invokesdb2uext2 to retrieve the log file. The error mayhave occurred in db2uext2.

Roll-forward processing stopped. The database isstill in a roll forward pending state on thespecified node.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: See the user exit documentationin the Administration Guide for a description ofthe error and resume or terminate roll-forwardrecovery.

SQL1269N Table space level roll-forwardrecovery is already running.

Explanation: An attempt has been made to usetable space level roll-forward recovery but it isalready running. Only one agent can beexecuting roll-forward recovery at any giventime.

User Response: Wait until table space levelroll-forward recovery is complete. If more tablespaces need recovery, initiate table space levelroll-forward recovery again.

SQL1270C The LANG environmentalvariable is set to “<string>”. Thislanguage is not supported.

Explanation: The LANG environmental variableis set to a language that is not supported by thedatabase manager. Processing cannot continue.

User Response: Set the LANG environmentalvariable to a language that is supported. Formore information please refer to “NationalLanguage Support” appendix in theAdministration Guide.

Federated system users: see the Installation andConfiguration Supplement for NLS information.

SQL1271W Database ″<name>″ is recoveredbut one or more table spaces areoff-line on node(s) ″<node-list>″.

Explanation: This message can occur after crashrecovery, database level roll-forward recovery, ortable space level roll-forward recovery. Fordatabase level roll-forward recovery, the databaseis available for use if the STOP option wasspecified. One or more table spaces on thespecified node(s) are not available. This couldhappen if:

v the STOP option is not specified for a tablespace level roll-forward recovery to a point intime.

200 Message Reference, Volume 2

Page 209: Db2 SQL Errors

v one or more table spaces receive errors duringrecovery.

v additional table spaces are restored while atable space level roll-forward recovery isalready in progress.

v the database is rolled forward past a previouspoint-in-time table space roll-forward, causingall table spaces involved to be placed inrestore pending state.

The table spaces that are off-line can beidentified on the specified node(s) by the LISTTABLESPACES command or the db2dart utility.The diagnostic log will provide more informationon specific table spaces.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Repair or restore the tablespaces if necessary and run roll-forwardrecovery. If the same error occurs, try runningtable space level roll-forward recovery offline.

SQL1272N Table space level roll-forwardrecovery for database ″<name>″has stopped before completion onnode(s) ″<node-list>″.

Explanation: Table space level roll-forwardrecovery has stopped on the specified node(s)before all qualifying table spaces could be rolledforward. This can be cause by one of thefollowing:

v The transaction table is full.

v All table spaces being rolled forward receivedI/O errors.

v Point-in-time table space level roll-forwardencountered an I/O error on one of the tablespaces being rolled forward.

v Point-in-time table space level roll-forwardencountered an active transaction that made

changes to one of the table spaces being rolledforward. This transaction could be an indoubttransaction.

v The table space level roll-forward wasinterrupted and, before it was resumed, alltable spaces that were being rolled forward arerestored again.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Check the diagnostic log for thecause. Do one of the following depending on thecause:

v Use the LIST TABLESPACES command todetermine if the table spaces received I/Oerrors. If so, repair them.

v If the transaction table became full, include theMAXAPPLS database configuration parameteror try running table space level roll-forwardrecovery offline.

v If the cause is an active or indoubt transaction,complete the transaction.

v If the table spaces were restored after aprevious table space level roll forward wasinterrupted, the previous table space levelroll-forward is now canceled. The next tablespace level roll-forward command will checkfor table spaces in rollforward pending state.

Run table space level roll-forward recoveryagain.

SQL1273N Roll-forward recovery on database″<name>″ cannot reach thespecified stop point (end-of-log orpoint-in-time) because of missinglog file ″<name>″ on node″<node-number>″.

Explanation: The Rollforward Database utilitycannot find the specified archive log file in thedatabase log directory or the overflow logdirectory on the specified node.

Chapter 2. SQL Messages 201

Page 210: Db2 SQL Errors

Roll-forward recovery has stopped.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: Do one of the following:

v Move the specified archive log file into thedatabase log directory or, if the database is ina consistent state, change the log path to pointto the correct archive file, and issue theROLLFORWARD DATABASE command again.Alternatively, resubmit the command with theoverflow log path pointing to the correctarchive file.

v If you cannot find the missing log files, restorethe database/table space on all nodes, then dopoint-in-time recovery using a timestamp thatis earlier than that of the missing log file.

SQL1274N The database “<name>” requiresroll-forward recovery and thepoint-in-time must be to the endof logs.

Explanation: The database needs to be rolledforward. For database level roll-forward recovery,the point-in-time must be to the end of logsbecause a database level roll-forward to end oflogs is already in progess. To continue the rollforward, the same stoptime must be specified.

For table space level roll-forward recovery, thepoint-in-time must be to the end of logs for oneof the following reasons:

v The system catalogs require roll-forwardrecovery. System catalogs must always berolled forward to the end of logs to remainconsistent with all other table spaces.

v A table space level roll-forward to the end oflogs is already in progress. To continue the rollforward, the same stoptime must be specified.

The database is not rolled forward.

User Response: Resubmit the ROLLFORWARDcommand specifying ROLLFORWARD TO ENDOF LOGS.

SQL1275N The stoptime passed toroll-forward must be greater thanor equal to “<timestamp>”,because database “<name>” onnode(s) “<node-list>” containsinformation later than thespecified time.

Explanation: The database or at least one of thetable spaces to be rolled forward were backed uponline. An advanced virtual timestamp is in thedatabase or table space backup. The stoptimepassed to roll-forward must be greater than orequal to the time the online backup ended on thespecified node.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Do one of the following:

v Resubmit the command with a stoptimegreater than or equal to “<timestamp>”. Timemust be specified in CUT (CoordinatedUniversal Time).

v Restore an earlier backup on node(s), thenissue the ROLLFORWARD DATABASEcommand again.

SQL1276N Database ″<name>″ cannot bebrought out of rollforwardpending state until roll-forwardhas passed a point in time greaterthan or equal to ″<timestamp>″,because node “<node-number>”contains information later thanthe specified time.

Explanation: A request was made to bring thedatabase or subset of table spaces out ofrollforward pending state by specifying calleraction SQLUM_ROLLFWD_STOP, SQLUM_STOP,SQLUM_ROLLFWD_COMPLETE, orSQLUM_COMPLETE. However, the database orat least one of the table spaces to be rolledforward was backed up online. The request

202 Message Reference, Volume 2

Page 211: Db2 SQL Errors

cannot be granted until the database or all tablespaces have been rolled forward to the end ofthe online backup timestamp on the specifiednode.

This error can also occur if not all the log filesare provided to perform the requested recovery.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: If the stoptime specified on theROLLFORWARD command is smaller then″<timestamp>″, resubmit the command with astoptime greater than or equal to ″<timestamp>″.

Verify that all the log files were provided. theROLLFORWARD QUERY STATUS commandshows which log file is to be processed next.Some of the reasons for missing log files include:

v the log path has changed. The file can befound in the old log path.

v the userexit program is not able to retrieve thelog file, because it may have been archived toa different location.

If the missing log file is found, copy it to the logpath and resubmit the command.

SQL1277N Restore has detected that one ormore table space containers areinaccessible, or has set their stateto ″storage must be defined″.

Explanation: Restore validates that thecontainers needed by each table space beingrestored are currently accessible on the system.Where possible, restore will create the containersif they do not exist. If they cannot be created, orare currently in use by another table space, or areinaccessible for any other reason, then the list ofcontainers needed must be corrected before therestore can continue.

If this is a redirected restore, the state of eachcontainer of the table spaces being restored is setto ″storage must be defined″. This makes itpossible to use the SET TABLESPACECONTAINERS api or command against thecontainers to redefine their storage.

User Response: To determine the list ofcontainers for each table space being restored,use the TABLESPACE CONTAINER QUERY apior the LIST TABLESPACE CONTAINERScommand. To specify an updated list for eachtable space, use the SET TABLESPACECONTAINERS api or command. This api orcommand lets you specify whether this shouldbe the initial list of containers (i.e. a subsequentrollforward will redo any ″add container″operations described in the database log) or thefinal list (rollforward will not redo ″addcontainer″ operations).

It is also possible that the container(s) areread-only, in which case the only action requiredbefore continuing with the restore is to giveread/write access to the container.

SQL1278W Roll-forward operation hascompleted successfully. Active orindoubt transactions requiredrollback on node(s) ″<node-list>″.

Explanation: The roll-forward of a table spacesubset to a point in time was completedsuccessfully, however one or both of thefollowing situations occurred:

1. There was one or more active transactions atthe point in time specified. Each transactionwas rolled back from the table spaces in thetable space subset.

2. There was one or more indoubt transactionsat the point in time specified. Each indoubttransaction was rolled back from the tablespaces in the table space subset.

Transactions that were rolled back from the tablespaces in the table space subset may still becommitted in other table spaces not involved inthe roll-forward.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

Chapter 2. SQL Messages 203

Page 212: Db2 SQL Errors

User Response: The diagnostic log will containdetails on the transactions that were rolled backby roll-forward recovery.

SQL1279W Some indexes may not have beenrecreated.

Explanation: An error occurred during indexrecreation while performing a database restart orfollowing a table reorganization which preventedsome of the indexes from being recreatedsuccessfully. Details can be found in the systemerror log and/or the database manager error log.

Database restart or Reorg table was successful.

User Response: Examine the error log(s) todetermine why the index(es) could not berecreated and correct the problem. The invalidindexes for a table will be recreated when thetable is first accessed.

SQL1280N The stoptime passed toroll-forward must be less than orequal to “<timestamp>” fordatabase “<name>” because atleast one of the table spaces wasalready rolled forward to thispoint in time.

Explanation: At least one of the table spacesspecified by the roll-forward to point in time hasalready been rolled forward to an earlier point intime. It cannot be rolled forward any further.

User Response: Do one of the following:

v Resubmit the command with stoptime“<timestamp>”.

v Restore all table spaces again, and resubmitthe command with a stoptime less than“<timestamp>”.

v Restore the table space backup(s) takenfollowing the earlier table space roll-forwardto point in time and resubmit the commandwith the same stoptime.

Time must be specified in CUT (CoordinatedUniversal Time).

SQL1281N The connection to database″<database-alias>″ has beensevered because the pipe″<pipe-name>″ has been broken.

Explanation: The connection was lost becausethe DB2 server broke the pipe. The currenttransaction has been rolled back.

User Response: Resubmit the current command.If the error continues, contact your technicalservice representative.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Contact your technicalservice representative with the followinginformation:

Required information:

v Problem description

v SQLCODE or message number

v SQLCA contents, if possible

v Trace file, if possible.

sqlcode: -1281

sqlstate: 40504

SQL1282N The attempt to connect todatabase ″<database-alias>″ failedbecause all the pipe instances on″<pipe-name>″ are busy.

Explanation: Attempts to connect to the namedpipe failed because the connection was refusedby DB2. There is a limit to the number ofconnections that are allowed on the named pipe.

User Response: Increase the connection limit onthe DB2 server, or terminate some of theapplications using named pipe to free upconnection resources.

sqlcode: -1282

sqlstate: 08001

204 Message Reference, Volume 2

Page 213: Db2 SQL Errors

SQL1283N The attempt to connect todatabase ″<database-alias>″ failedbecause the pipe ″<pipe-name>″is in use by another process.

Explanation: The name of the named pipe isalready in used by another process. Named pipesupport did not start.

User Response: Choose a different name bysetting the environment variable DB2PIPENAME,or have the other programs which use namedpipe use a different pipe name.

SQL1284N The attempt to connect todatabase ″<database-alias>″ failedbecause the pipe ″<pipe-name>″cannot be found.

Explanation: The server has not started itsnamed pipe support, or the server is using adifferent name for the named pipe.

User Response: Start the database manager andensure the named pipe support starts. If thenamed pipe support has been started, thenensure the name of the named pipe is the samebetween the client and server by setting theenvironment variable DB2PIPENAME to thesame value.

sqlcode: -1284

sqlstate: 08001

SQL1285N The attempt to connect todatabase ″<database-alias>″ failedbecause the pipe ″<pipe-name>″is invalid.

Explanation: The alternate pipe name set by theenvironment variable DB2PIPENAME is invalid.

User Response: The value of the environmentvariable DB2PIPENAME must be a valid pipename. The pipe name must be no longer thaneight characters, and has the same syntacticalrestrictions as a normal file name.

sqlcode: -1285

sqlstate: 08001

SQL1286N The connection to database″<database-alias>″ has beensevered because the operatingsystem ran out of resources forpipe ″<pipe-name>″.

Explanation: Named pipe failed because theoperating system ran out of resources (swappingspace, disk space, file handles). The currenttransaction has been rolled back.

User Response: Free up the system resourcesand try again.

sqlcode: -1286

sqlstate: 40504

SQL1287N ATTACH to instance ″<instance>″failed because the named pipe″<pipe>″ cannot be found.

Explanation: The server has not started itsnamed pipe support, or the instance name isincorrect.

User Response: Ensure that the databasemanager is started at the server and that thenamed pipe support is started. Ensure that theinstance name is correct.

SQL1290N The value of either theDFT_CLIENT_COMM databasemanager configuration parameteror the DB2CLIENTCOMMenvironment variable is not valid.

Explanation: Either an incorrect value wasspecified or the protocol(s) specified are notsupported by the target database. The acceptablevalues are:

v Unix platforms: TCPIP and APPC

v OS/2: TCPIP, APPC, IPXSPX, and NETBIOS

v Windows NT and Windows 95: TCPIP, APPC,IPXSPX, NETBIOS, and NPIPE

If more than one value is specified, then theymust be delimited by a comma.

Note that this message may be returned from anintermediate node involved in your connection.

Chapter 2. SQL Messages 205

Page 214: Db2 SQL Errors

For example, if you are trying to connect to aDRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Correct the value and try again.

sqlcode: -1290

sqlstate: 08001

SQL1291N A directory services error hasbeen detected. Service:″<directory-services-type>″, API:″<API>″, function: ″<function>″,error code: ″<rc>″.

Explanation: An error has been detected by thedirectory services subsystem. Refer to the tokenvalues for details. The following is theexplanation of the token values:

″<directory-services-type>″The type of the directory services beingused. Valid tokens include:

v DCE

″<API>″The application programming interfaceused to access the above directoryservices. Valid tokens include:

v XDS/XOM

″<function>″The name of the directory servicessubsystem function that returned theerror code.

″<rc>″ The error code returned from the abovefunction. The meaning of the value isspecific to the API being used.

For XDS functions such as ds_read, thereturn code values can be found in theDCE include file xds.h.

For XOM functions such as om_get, thereturn code values can be found in theDCE include file xom.h.

Note that this message may be returned from anintermediate node involved in your connection.For example, if you are trying to connect to a

DRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Ensure that:

v The product providing the directory services isproperly installed and operational.

v You are logged in to the directory serviceswith the appropriate authorization to accessthe directory entries, if login is required by thedirectory services provider, for example, DCE.

If the problem persists, consult with your systemadministrator and/or database administrator todetermine the cause of the problem using the setof tokens provided.

sqlcode: -1291

sqlstate: 08001

SQL1292N The global name of the databaseor database manager instance isinvalid.

Explanation: The global name of the databaseor database manager instance cannot be NULLand cannot be longer than 255 characters. It muststart with either ″/.../″ or ″/.:/″.

Note that this message may be returned from anintermediate node involved in your connection.For example, if you are trying to connect to aDRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Correct the global name and tryagain.

SQL1293N An error was found in a globaldirectory entry. Error code:″<error-code>″.

Explanation: An error has been detected in oneof the global database directory entries used.Refer to the following error codes for details:

1 The database object does not containauthentication information

206 Message Reference, Volume 2

Page 215: Db2 SQL Errors

2 Both the database object and thedatabase locator object do not containcommunication protocol information

10 Entry not a database object

11 Native database name in the databaseobject is either not found or too long

12 Database protocol in the database objectis either not found or too long

13 Invalid authentication value found inthe database object

14 Insufficient or invalid communicationprotocol information in the databaseobject

15 Database locator object name not foundin the database object

16 Database locator object name in thedatabase object invalid

20 Entry not a database locator object

22 Insufficient or invalid communicationprotocol information in the databaselocator object

30 Entry not a routing information object

31 Target database information not foundin the routing information object

32 Insufficient information for the targetdatabase in the routing informationobject

33 No appropriate gateway found in therouting information object

34 Invalid flag for authentication atgateway

35 Database locator object name for thegateway invalid

36 Database name in the target databaseinformation attribute of the routinginformation object is either not found ortoo long

37 Database protocol in the target databaseinformation attribute of the routinginformation object is either not found ortoo long

Note that you may also see this message if theDCE subsystem is not operational, or if you donot have sufficient privilege to read the DCEdirectory entry.

Note that this message may be returned from anintermediate node involved in your connection.For example, if you are trying to connect to aDRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Make sure the DCE subsystemis operational and that you have the appropriateprivilege to read the directory entry. If theproblem persists, inform the databaseadministrator to correct the error in the directoryentry. Refer to the Administration Guide for theformat of these directory objects.

sqlcode: -1293

sqlstate: 08001

SQL1294N The directory path name beingused for global directory access isnot specified or not valid.

Explanation: In order to use global directoryservices, a directory path name must be specifiedeither in the dir_path_name database managerconfiguration parameter, or in theDB2DIRPATHNAME environment variable. Youeither did not specify it, or the name youspecified is not valid.

Note that this message may be returned from anintermediate node involved in your connection.For example, if you are trying to connect to aDRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Consult your database

Chapter 2. SQL Messages 207

Page 216: Db2 SQL Errors

administrator for the correct name to use, specifyit, and try again.

sqlcode: -1294

sqlstate: 08001

SQL1295N The routing information objectname being used for globaldirectory access is not specified ornot valid.

Explanation: In order to use global directoryservices to access a remote database with adatabase protocol that is not native to this client,the name of a routing information object must bespecified either in the route_obj_name databasemanager configuration parameter, or in theDB2ROUTE environment variable. You either didnot specify it, or the name you specified is notvalid.

Note that this message may be returned from anintermediate node involved in your connection.For example, if you are trying to connect to aDRDA server via a DB2 Connect gateway andyour client workstation does not use globaldirectory services, this message may be returnedfrom the DB2 Connect gateway.

User Response: Consult with your databaseadministrator for the correct object name to use,specify it and try again.

sqlcode: -1295

sqlstate: 08001

SQL1296N Valid values must be specified forthe DIR_PATH_NAME andDIR_OBJ_NAME databasemanager configuration parametersif the DIR_TYPE parameter has avalue other than NONE.

Explanation: These three parameters areinterrelated. If the DIR_TYPE value is NONE,

then the other two are ignored. If the DIR_TYPEvalue is not NONE, then the other two mustboth contain valid values. The following rulesapply when the DIR_TYPE value is not NONE:

1. The DIR_PATH_NAME and DIR_OBJ_NAMEvalues cannot be NULL (or blanks).

2. If the DIR_TYPE value is DCE, then theDIR_PATH_NAME value must start witheither of the special DCE strings enclosed inthe following quotes: ″/.../″ or ″/.:/″.

User Response: If you want to change theDIR_TYPE value, make sure theDIR_PATH_NAME and DIR_OBJ_NAMEparameters have been specified with the validvalues first. If you want to blank out either theDIR_PATH_NAME or the DIR_OBJ_NAMEparameter, make sure you set DIR_TYPE toNONE first.

SQL1297N This command is currently notsupported on this platform.

Explanation: The function requested using thiscommand is not supported on this platform.

User Response: Do not use this command.

SQL1300 - SQL1399

208 Message Reference, Volume 2

Page 217: Db2 SQL Errors

SQL1300N Invalid DCE principal name incatalog statement.

Explanation: The DCE principal name in thecatalog database operation was invalid. DCEprincipal names are subject to the followingconditions:

v If AUTHENTICATION is specified as DCE, aprincipal name must be included in thecatalog statement.

v If AUTHENTICATION is not specified asDCE, a principal name can not be included inthe catalog statement.

v The maximum length of the principal name is1024 bytes.

User Response: Ensure that the principal nameconforms to the conditions above, and resubmitthe catalog command.

SQL1301N An error occurred when accessingthe server’s DCE keytab file.

Explanation: An error occurred when accessingthe server’s DCE keytab file. For a keytab file tobe valid, the following conditions must besatisfied:

v The server’s keytab file exists, has the namekeytab.db2, and is in the sqllib/securitydirectory.

v There is only a single entry in the keytab file.

User Response: Make sure that DCE is started.Next, check that the keytab file exists, andcontains a single entry (with rgy_edit). Retry theoperation.

SQL1302N DCE principal to DB2authorization id mapping error.Reason code: ″<reason-code>″.

Explanation: An error occurred when mappinga DCE principal to a DB2 authorization id. Referto the reason code below.

v 1. Missing or invalid DCE user to DB2authorization id mapping

v 2. Missing or invalid DCE group to DB2authorization id mapping

User Response: The DCE principal must havean ERA mapping to a DB2 authorization id. Addthe missing entry to the DCE registry, and retrythe operation.

sqlcode: -1302

sqlstate: 08001

SQL1303N Security daemon could not berestarted.

Explanation: An attempt to restart the securitydaemon has failed after communication betweenthe agents and the security daemon was severedor the security daemon terminated abnormally.All new connections to the database managerwill be rejected, as authentication is not possible.

User Response: Stop the database manager andstart it again. If the db2start command fails,follow the user response for that sqlcode. Checkthe First Failure Service Log(db2diag.log) todetermine what errors have occurred.

sqlcode: -1303

sqlstate: 58004

SQL1304N The TCP/IP security type SOCKSis not valid.

Explanation: The TCP/IP security type SOCKSin the TCP/IP protocol structure of the CatalogNode command is invalid with authenticationtype DCE.

User Response: Make sure you do not use thecombination of TCP/IP protocol with securitytype SOCKS and authentication type DCE.

sqlcode: -1304

sqlstate: 08001

SQL1305N An internal DCE error occurred.

Explanation: DB2 processing failed due to aninternal DCE error.

User Response: Make sure DCE is started. Ifthe problem persists, contact a servicerepresentative for assistance.

Chapter 2. SQL Messages 209

Page 218: Db2 SQL Errors

sqlcode: -1305

sqlstate: 58004

SQL1306N An invalid parameter wasspecified during invocation of thesecurity audit facility. ReasonCode: ″<reason-code>″.

Explanation: One of the parameters of thesecurity audit API is incorrect. Reasons:

1 An invalid audit option was specified.

2 Invalid pointer to Configure/Describesqleaucfg structure.

3 Invalid Configure/Describe parametertoken.

4 Invalid Configure/Describe parametervalue. The value is incorrect or outsidethe valid range for the parameter.

5 Invalid count specification forConfigure/Describe parameter.

6 Insufficient length allocated forConfigure/Describe parameter.

7 Invalid pointer to Extract sqleauextractstructure.

8 Invalid Extract parameter token.

9 Invalid Extract parameter value. Thevalue is incorrect or outside the validrange.

10 Invalid count specification for Extractparameter.

11 Invalid length for Extract parameter.

User Response: The system administratorshould take specific actions for each of thereasons.

1 Provide the right option value for theaudit API call by looking at the sqlutil.hinclude file.

2 Check to see if a valid pointer has beenprovided to a Configure/Describestructure.

3 The correct parameter should be

specified by looking up the audit facilityreference section for the sqleaucfgparameter tokens.

4 Correct the parameter value by lookingup the valid values in the audit facilityreference.

5 Specify the correct count andallocate/initialize the appropriate lengthfor variable length parameters.

6 Correct the length allocated forConfigure/Describe parameter based onthe error token that is returned in theSQLCA.

7 Check to see if a valid pointer has beenprovided to a Extract structure.

8 The correct parameter should bespecified by looking up the audit facilityreference section for the sqleauextractparameter tokens.

9 Correct the parameter value by lookingup the valid values in the audit facilityreference.

10 Specify the correct count andallocate/initialize the appropriate lengthfor variable length parameters.

11 Correct the length allocated for Extractparameter based on the error token thatis returned in the SQLCA.

SQL1307N An error occurred duringinvocation of the security auditfacility. Reason Code:″<reason-code>″.

Explanation: The invocation of the securityaudit API caused an error to occur. Reasons:

1. Audit is already started.

2. Audit is already stopped.

3. Invalid checksum for audit configuration file.

4. The default or user-provided audit pathnameis too long.

5. Could not update the audit configuration file.Either the filesystem is full or the permissionsdo not allow write.

210 Message Reference, Volume 2

Page 219: Db2 SQL Errors

6. Configuration File not found. Either the fileor the directory which contains the file doesnot exist.

7. The extract file is not found.

8. Invalid format of audit records duringextract. The file is corrupted.

User Response: The system administratorshould take specific actions for each of thereasons.

1. No action required.

2. No action required.

3. Restore the configuration file from backup orissue ’audit reset’ command.

4. Choose a different audit pathname which iswithin the filename length limit.

5. If the file permissions are incorrect,set thepermissions to allow write by owner. If thefilesystem is full, create free space beforeproceeding.

6. If the audit configuration file is missing, thenrestore it from a backup or issue the ’reset’command to initialize the file to defaults. Ifthe directory is missing, restore from abackup or recreate the database managerinstance.

7. Verify that file exists in the specified path. Iffile missing, restore from backup if available.

8. The audit log file is most likely corrupted. Ifproblem persists for other audit log files,notify DB2 service.

SQL1308W The audit Extract Facilitycompleted Processing.″<num-records>″ records wereextracted.

Explanation: The security audit extract facilitycompleted its processing succesfully andextracted the specified number of records.

User Response: If zero records were extracted,the user should verify that the extract pathnamecontains extract files and the extract parametersare correct.

SQL1309N Invalid server principal name.

Explanation: The server principal namespecified in the database catalog statement doesnot exist in the DCE registry. Because of this aDCE ticket could not be obtained for the DB2server.

User Response: Make sure that the principalname in the database catalog entry correspondsto the DCE principal being used by the DB2server. It may be necessary to fully qualify theprincipal name.

sqlcode: -1309

sqlstate: 08001

SQL1310N The Database Connection Servicesdirectory service failed whileattempting to access the DatabaseConnection Services directory.

Explanation: The Database Connection ServicesDirectory Service failed because of file errorswhile trying to access the Database ConnectionServices directory file.

The function cannot be processed.

User Response: Rerun the function after doingone of the following:

v If you are adding an entry to the DatabaseConnection Services directory, ensure thatthere is sufficient space for the directory file tobecome larger.

v Ensure that no other concurrently runningprogram is trying to access the file.

v Verify that the directory file has not beendamaged. If it is unrecoverable, you musterase it and recreate it or restore it from abacked-up version.

SQL1311N The Database Connection Servicesdirectory cannot be found.

Explanation: The directory cannot be found.The directory may have been deleted.

The function cannot be processed.

User Response: Use the CATALOG DCS

Chapter 2. SQL Messages 211

Page 220: Db2 SQL Errors

DATABASE command to add an entry to theDatabase Connection Services directory, orrestore the directory from a backed-up version.

SQL1312W The Database Connection Servicesdirectory is empty.

Explanation: An attempt was made to read thecontents of the Database Connection Servicesdirectory, but no entries existed.

Processing continues, but subsequent commandsexpecting entries to be available cannot beprocessed.

User Response: Use the Catalog DCS Databasecommand to add entries to the directory orrestore a backed-up version that contains entries.

SQL1313N The Database Connection Servicesdirectory is full.

Explanation: The entry cannot be added to theDatabase Connection Services directory becausethe directory has already reached its maximumsize.

The function cannot be processed.

User Response: Delete an entry or entries fromthe directory before adding any more entries.

SQL1314N The address of the DatabaseConnection Services directoryentry parameter is not valid.

Explanation: The application program has usedan address for this parameter that is not valid.Either the address points to an unallocated bufferor the buffer is not large enough to contain therequired input.

The function cannot be processed.

User Response: Ensure that the applicationprogram has allocated the required buffer areaand resubmit the command.

SQL1315N The local database name is notvalid.

Explanation: A local database name wasspecified that contains characters that are not

valid. All characters must be from the databasemanager base character set.

The function cannot be processed.

User Response: Ensure that the characters usedin the local database name are from the databasemanager base character set and resubmit thecommand.

SQL1316N No entry was found in theDatabase Connection Servicesdirectory for the specified localdatabase name.

Explanation: The Database Connection Servicesdirectory service failed because no entry could befound in the Database Connection Servicesdirectory that corresponds to the input localdatabase name.

The function cannot be processed.

User Response: Ensure that the local databasename is correct and resubmit the command.

SQL1317N The local database name alreadyexists in the Database ConnectionServices directory.

Explanation: The entry could not be added tothe directory because an entry for that localdatabase name already exists in the directory.

The function cannot be processed.

User Response: Specify a unique local databasename or delete the existing entry and add thenew entry.

SQL1318N The length of element “<name>”in the input structure forparameter 1 is not valid.

Explanation: The length values in the DatabaseConnection Services directory entry structureshould not be less than zero nor greater than themaximum length for the element it represents.

The function cannot be processed.

User Response: If an element of the directoryentry structure is specified, the associated lengthvalue should represent the number of bytes in

212 Message Reference, Volume 2

Page 221: Db2 SQL Errors

the element. Otherwise, the length value shouldbe zero. Ensure that all the directory entrystructure elements have the requiredspecifications and lengths for the command andresubmit the command.

SQL1319N The Database Connection Servicesdirectory entries have not beencollected.

Explanation: A request to copy all the directoryentries was received, but either a prior request tocollect the entries was not received or the priorrequest to collect the entries failed.

The function cannot be processed.

User Response: Issue a request to open thedirectory and collect the entries. Then resubmitthis command.

SQL1320N The Database Connection Servicesdirectory cannot be accessed atthis time.

Explanation: A request to access the DatabaseConnection Services directory failed. Access tothe Database Connection Services directory isdependent on the type of access requested andthe current activity in the directory. If the requestis for the intention of updating the directory,then the directory must not be active. If therequest is to read the directory, then access isallowed if the directory is not being updated.

The function cannot be processed.

User Response: Wait for the current activity tocomplete and resubmit the command.

SQL1321N The structure ID specified in thedirectory entry structure is notvalid.

Explanation: The structure ID received in thedirectory entry structure does not represent arecognized value.

The function cannot be processed.

User Response: Verify the structure ID passedin the directory entry structure is a valid valueand resubmit the command.

SQL1322N An error occurred when writing tothe audit log file.

Explanation: The DB2 audit facility encounteredan error when invoked to record an audit eventto the trail. There is no space on the file systemthe audit log resides on. Free up space on thisfile system or prune the audit log to reduce itssize.

When more space is available, use db2audit toflush out any data in memory, and to reset theauditor to a ready state. Ensure that appropriateextracts have occurred, or a copy of the log hasbeen made prior to pruning the log, as deletedrecords are not recoverable.

User Response: The system administratorshould take the suggested corrective action sothat the audit facility can resume logging.

sqlcode: -1322

sqlstate: 58030

SQL1323N An error occurred when accessingthe audit configuration file.

Explanation: db2audit.cfg could not be opened,or was invalid. Possible reasons:

v The db2audit.cfg file either does not exist, orhas been damaged. Take one of the followingactions:

– Restore from a saved version of the file.

– Reset the audit facility configuration file byissuing the reset command from thedb2audit executable.

User Response: The system administratorshould take the suggested action to resolve theproblem.

sqlcode: -1323

sqlstate: 57019

SQL1325N The remote database environmentdoes not support the command orone of the command options.

Explanation: An attempt has been made toissue a DB2 workstation database specific

Chapter 2. SQL Messages 213

Page 222: Db2 SQL Errors

command or command option against a hostdatabase through DB2 Connect or federatedserver. The following commands generate thiserror when issued against a DB2 for MVS*, DB2for OS/400* or SQL/DS* database:

v OPSTAT (Collect Operational Status)

v DARI (Database Application Remote Interface)

v GETAA (Get Administrative Authorizations)

v GETTA (Get Table Authorizations)

v PREREORG (Prepare to Reorganize Table)

v REORG (Call Reorganize Function)

v RQSVPT/ENSVPT/RLBSVPT (SubtransactionRequests)

v RUNSTATS (Run Statistics).

v COMPOUND SQL ATOMIC STATIC (AtomicCompound SQL)

v ACTIVATE DATABASE

v DEACTIVATE DATABASE

As well, the following commands generate thiserror with incorrect options:

v IMPORT (Import table) The filetype must beIXF, commitcount must be 0, and the firstword in the Action String (e.g. ″REPLACE into...″) must be INSERT.

v EXPORT (Export table) The filetype must beIXF.

The command cannot be processed.

User Response: Do not attempt to issue thiscommand against a host database through DB2Connect or federated server.

SQL1326N The file or directory “<name>”cannot be accessed.

Explanation: The file or directory “<name>”cannot be accessed because either the filepermissions are incorrect, the file path isincorrect, or there is insufficient space in thedirectory or path.

User Response: Verify that any path or filenamespecified in the command is valid, you have theproper permissions to access the path orfilename, and there is sufficient space to containthe file. Correct the problem and resubmit the

command. If the problem persists, contact yourSystem Administrator.

SQL1327N An implicit connection attemptfailed. ″<database-name>″ is not avalid database name.

Explanation: An attempt to perform an implicitconnection failed. The syntax of the databasealias name specified by the DB2DBDFTenvironment variable is not valid. The databasename must contain 1 to 8 bytes and all thecharacters must be from the database managerbase character set.

The command cannot be processed.

User Response: Correct the database alias namespecified by the DB2DBDFT environmentvariable and resubmit your command. If usingthe command line processor, then a ″db2terminate″ should be issued prior to resubmittingthe command. If you do not want an implicitconnection to be performed, remove theDB2DBDFT environment variable.

sqlcode: -1327

sqlstate: 2E000

SQL1328N An implicit connection attemptfailed. The database alias name ordatabase name ″<name>″ was notfound in the local databasedirectory.

Explanation: An attempt to perform an implicitconnection failed. The database name specifiedby the DB2DBDFT environment variable doesnot name an existing database. The databasecould not be found in the database directory.

The command cannot be processed.

Note that a CONNECT RESET request issuedwithin a distributed unit of work will attempt animplicit connect to the default database. Thismay be the reason for this error.

User Response:

v Correct the database alias name specified bythe DB2DBDFT environment variable andresubmit the command.

214 Message Reference, Volume 2

Page 223: Db2 SQL Errors

v If the intended action is to remove aconnection while operating in a distributedunit of work environment, consider replacingthe CONNECT RESET statement with aDISCONNECT or RELEASE statement.

v If using the command line processor, then a″db2 terminate″ should be issued prior toresubmitting the command.

v If you do not want an implicit connection tobe performed, remove the DB2DBDFTenvironment variable.

sqlcode: -1328

sqlstate: 42705

SQL1329N The resolved path specified onthe command is too long.

Explanation: The resolved path specified on thecommand exceeds the maximum lengthsupported by the database manager. Theresolved path must be no longer than 215characters in length. During a Create Database,Catalog Database, Open Database Directory forscan, and change database comment commands,the database manager instance name is appendedto the end of the specified path.

User Response: Check that the fully resolvedabsolute or relative path name, including thedatabase manager instance name, does notexceed 215 characters in length. Correct the pathand resubmit the command.

SQL1330N The symbolic destination name“<name>” is not valid.

Explanation: The symbolic destination name inthe CPIC protocol structure of the Catalog Nodecommand is either not specified or longer thanthe allowable length. The name must be 1 to 8bytes in length.

User Response: Verify that the symbolicdestination name is specified and that it is notlonger than 8 bytes in length. Resubmit thecommand with a valid symbolic destinationname.

SQL1331N The CPIC security type “<type>”is not valid.

Explanation: The CPIC security type specifiedin the CPIC protocol structure of the CatalogNode command is invalid. The security typespecifies the security information that will beincluded when a database client allocates aconversation with a partner LU, as specified bythe LU 6.2 architecture. Correct values forsecurity type are:

v SQL_CPIC_SECURITY_NONE

– No access security information will beincluded.

Note: This is not supported when usingfederated server. When DB2 Connectis used, it is only supported whenauthentication type is DCE,KERBEROS, SERVER_ENCRYPT orDCS_ENCRYPT.

v SQL_CPIC_SECURITY_SAME

– A userid will be included together with anindicator specifying that the userid isalready verified. This is not supportedwhen authentication type DCS is used withDB2 Connect or federated server, or whenauthentication type is DCE, KERBEROS,SERVER_ENCRYPT or DCS_ENCRYPT.

v SQL_CPIC_SECURITY_PROGRAM

– Both a userid and a password will beincluded. This is not supported whenauthentication type CLIENT is used withDB2 Connect or when authentication type isDCE, KERBEROS, SERVER_ENCRYPT orDCS_ENCRYPT.

User Response: Set the security type to one ofthe above and resubmit the command.

sqlcode: -1331

sqlstate: 08001

SQL1332N The Host Name “<name>” is notvalid.

Explanation: The host name in the TCP/IPprotocol structure of the Catalog Node commandis either not specified or longer than the

Chapter 2. SQL Messages 215

Page 224: Db2 SQL Errors

allowable length. The name must be 1 to 255characters in length and cannot be all blanks.

User Response: Verify that the host name isspecified and that it is not longer than 255characters in length. Resubmit the commandwith a valid host name.

SQL1333N The Service Name ″<name>″ isnot valid.

Explanation: The service name is the TCP/IPprotocol structure of the Catalog Node commandis either not specified or longer than theallowable length. The name must be 1 to 14characters in length and cannot be all blanks.

User Response: Verify that the service name isspecified and that it is not longer than 14characters in length. Resubmit the commandwith a valid service name.

SQL1334N The database server cannot beused to route a remote request toa second database server in thisconfiguration.

Explanation: An attempt was made to route arequest through a database server node using anunsupported combination of client and targetdatabase server. Either a client or target databaseprior to release version 2 was used or an attemptwas made to route the request from a DRDAclient to a DRDA target database. The requestmust be routed directly from the client to thenode on which the target database is running.

User Response: Uncatalog the database at theclient machine and then catalog the databasespecifying the node on which the databaseactually resides. Ensure that the node is alsocataloged.

SQL1335N The application requestor name isnot valid

Explanation: An application requestor namewas specified that contains characters that arenot valid. All characters must be from thedatabase manager base character set.

User Response: Ensure that the characters used

in the application requestor name are from thedatabase manager base character set andresubmit the command.

SQL1336N The remote host “<hostname>”was not found.

Explanation: The system cannot resolve theaddress of the remote host. Possible causes are:

v An incorrect hostname value was specifiedwhen the TCP/IP node was cataloged.

v The correct hostname was specified, but wasnot defined in any TCP/IP name serveraccessible to your client node, nor in theclient’s hosts file.

v The TCP/IP name server where the hostnamewas defined was not available at the time youtried to connect.

v TCP/IP is not running.

User Response: Make sure that TCP/IP isrunning and that the hostname specified whencataloging the TCP/IP node is a correct name,and that it is defined in an accessible nameserver or in the local hosts file.

Federated system users: verify that the remotehost is cataloged correctly in theSYSCAT.SERVERS view.

SQL1337N The service “<service-name>” wasnot found.

Explanation: The system cannot resolve the portnumber associated with the service-name.Possible causes are:

v An incorrect service-name value was specifiedwhen the TCP/IP node was cataloged.

v The correct service-name was specified, butwas not defined in the client’s services file.

Federated system users: this situation can also bedetected by the data source.

User Response: Make sure that theservice-name specified when cataloging theTCP/IP node is a correct name, and that it isdefined in the local services file.

Federated system users must also ensure that the

216 Message Reference, Volume 2

Page 225: Db2 SQL Errors

name is defined in the services file at the datasource.

SQL1338N The symbolic destination name“<symbolic-destination-name>”was not found.

Explanation: The system cannot find the SideInformation associated with thesymbolic-destination-name you specified.Possible causes are:

v An incorrect symbolic-destination-name valuewas specified when the CPIC NODE wascataloged.

v The symbolic destination name and itsassociated side information have not beendefined to the SNA communicationssubsystem.

v The SNA communication subsystem has notbeen started.

User Response: Make sure that thesymbolic-destination-name specified whencataloging the CPIC node is a correct name, andthat it has been defined to the local SNAcommunication subsystem.

Start the SNA communication subsystem if it hasnot been started.

SQL1339N ″<n>″ SQL error(s) were detectedin the execution of a Not AtomicCompound SQL statement, andhave the following identification:″<error1>″ ″<error2>″ ″<error3>″″<error4>″ ″<error5>″ ″<error6>″″<error7>″.

Explanation: One or more SQL substatementswithin a Compound SQL statement resulted inSQL errors (negative return codes).

The error tokens will not be returned forCLI/ODBC applications. CLI/ODBC applicationscan use SQLGetDiagRec, SQLGetDiagField, orSQLError APIs to get more information abouteach error.

User Response: Examine the error identificationinformation provided. There will be <n><errorX> tokens filled in, up to a maximum of 7.

Each <errorX> represents an SQL statement error.These errors are listed in the order that theywere encountered. If the message text has notbeen formatted, this information can be found inthe second and subsequent tokens of theSQLERRMC field (tokens are separated by a onebyte hexadecimal value 0xFF).

Each <errorX> is of the format PPPSSSSS where:

PPP PPP represents the position of thestatement that caused the error withinthe Compound SQL block, and isleft-justified. For example, if the firststatement failed, this field wouldcontain the number one (″1 ″).

SSSSS SQLSTATE of the statement that failed.

More information can be found by examining theSQLCA itself. The third SQLERRD field containsthe number of rows affected by the compoundSQL statement, the fourth SQLERRD fieldcontains the position of the last statement thatsucceeded, the 5th SQLERRD field contains thenumber of rows affected by referential integritywhen DB2 Client/Server and SQL/DS databasesare accessed, and the 6th SQLERRD fieldcontains the number of statements that failed(returned negative SQLCODES).

sqlcode: -1339

sqlstate: 56091

SQL1340N The file server ″<fileserver>″ wasnot found.

Explanation: The system cannot find thespecified file server on the network. Possiblecauses are:

v An incorrect fileserver name was specifiedwhen the IPX/SPX node was cataloged.

v The correct fileserver name was specified, butthe file server was not available at the time theconnect was tried.

User Response: Make sure that the fileservername specified when cataloging the IPX/SPXnode is correct, and that the file server isavailable on the network.

Chapter 2. SQL Messages 217

Page 226: Db2 SQL Errors

SQL1341N A workstation name must bespecified in the client databasemanager configuration file.

Explanation: A workstation name has not beenspecified in the client database managerconfiguration file. A workstation name must bespecified when using NetBIOS to communicatewith the server.

User Response: Specify a workstation name inthe client database manager configuration file.

SQL1342N The File Server name ″<name>″ ismissing or invalid.″

Explanation: The File Server name specified inthe command/API is missing or invalid.

User Response: Verify that a File Server namewas specified, that the name does not containinvalid characters, and is not longer than 48characters in length. Resubmit thecommand/API with a valid File Server name.

SQL1343N The Object Name ″<name>″ ismissing or invalid.

Explanation: The Object Name specified in thecommand/API is missing or invalid.

User Response: Verify that the Object Namewas specified, that the name does not containinvalid characters, and is not longer then 48characters in length. Resubmit thecommand/API with a valid Object Name.

SQL1350N The application is not in thecorrect state to process thisrequest. Reason code=″<rc>″.

Explanation: Corresponding to ″<rc>″:

01 The application is currently processingSQL and cannot process the utilitycommand requested.

02 A Backup request is in progress. Awarning was received from the initialutility call indicating that furtherrequests are required before Backup cancomplete.

03 A Restore request is in progress. Awarning was received from the initialutility call indicating that furtherrequests are required before Restore cancomplete.

04 A Rollforward request is in progress. Awarning was received from the initialutility call indicating that furtherrequests are required before Rollforwardcan complete.

05 A Load request is in progress. Awarning was received from the initialutility call indicating that furtherrequests are required before Load cancomplete.

07 Federated system users: the applicationcannot process this command afterexecuting SQL statements.

User Response: Corresponding to ″<rc>″:

01 Complete the unit of work (using eitherCOMMIT or ROLLBACK) beforereissuing this command.

02-05 Issue the required call(s) to complete theutility in progress, then reissue thiscommand.

07 Federated system users: the applicationmust issue the commands afterestablishing a connection to the databasemanager but prior to any other SQLstatements.

SQL1360N Current processing cannot beinterrupted.

Explanation: The user attempted to interrupt aprocess which is not interruptible.

User Response: Do not interrupt the currentprocess.

SQL1361W Execution time has exceededtimeout value. Do you wish tointerrupt it?

Explanation: If a command takes longer than apre-defined timeout period, a dialog box pops up

218 Message Reference, Volume 2

Page 227: Db2 SQL Errors

asking if the (Windows client) user wants tointerrupt it or not.

Note that this message is applicable in Windowsenvironments only, and will only be seen in adialog pop up box.

User Response: There are three choices: YES -interrupt now; NO - continue, don’t prompt me;CANCEL - continue, same timeout.

SQL1370N An attempt to quiesce instance ordatabase ″<name1>″ failedbecause instance or database″<name2>″ is already quiesced byuser ″<username>″. Quiesce type:″<type>″.

Explanation: An attempt was made to quiescean instance or database which would havecaused an overlapping quiesce, such as quiescingan instance while a database is already quiescedby another user.

Quiesce type ″<type>″ refers to the instance ordatabase already quiesced and is a ’1’ for aninstance and a ’2’ for a database.

User Response: Contact the user who currentlyhas the instance or database quiesced todetermine when DB2 will no longer be quiesced,and retry the request at that time.

SQL1371N Instance or database ″<name>″ isalready quiesced by user″<username>″. Quiesce type:″<type>″.

Explanation: An attempt was made to quiescean instance or database which is alreadyquiesced.

Quiesce type ″<type>″ refers to the instance ordatabase already quiesced and is a ’1’ for aninstance and a ’2’ for a database.

User Response: Contact the user who currentlyhas the instance or database quiesced todetermine when DB2 will no longer be quiesced,and retry the request at that time.

SQL1372N Cannot perform a quiesce whilein a transaction.

Explanation: An attempt was made to quiesce adatabase or instance while the user issuing thequiesce has uncompleted units of work. Quiescecannot be issued while in this state.

User Response: Complete the unit of work(COMMIT or ROLLBACK) and retry the request.

SQL1373N Cannot QUIESCE RESET instanceor database ″<name>″, because itis not quiesced.

Explanation: QUIESCE RESET failed becausethe instance or database is not quiesced.

User Response: Ensure that the quiesce reset isbeing issued for the correct instance or databaseand try again.

SQL1374N Cannot QUIESCE RESET instanceor database ″<name>″, because ithas been quiesced by another user″<username>″.

Explanation: The instance or database isquiesced, but you are not the quiescer.

User Response: Ensure that the quiesce reset isbeing issued for the correct instance or database.

SQL1375N An invalid parameter was passedto the api. Parameter″<parm-code>″ is in error.

Explanation: ″<parm-code>″ indicates theparameter in error:

1 scope

2 options

The value may be out of range or invalid.

User Response: Check the syntax of the api,correct the parameter and try again.

Chapter 2. SQL Messages 219

Page 228: Db2 SQL Errors

SQL1380N An unexpected Kerberos securityerror has occurred. For moreinformation, refer to db2diag.log.

Explanation: An unexpected Kerberos securityerror occurred during authentication.

User Response: Check the db2diag.log file forfurther information.

SQL1381N The Security Support ProviderInterface is not available.

Explanation: Authentication failed because theSecurity Support Provider Interface (SSPI) wasnot available.

User Response: When running under Windowsoperating system, ensure that the file security.dllexists under the system directory. Also ensurethat SSPI is supported for the operating systemthat is being used.

SQL1382N Kerberos support is not available.

Explanation: Authentication failed becauseKerberos support is not installed.

User Response: Ensure that Kerberos support isinstalled and operational, then retry theconnection.

SQL1383N The target principal name is notvalid.

Explanation: The target principal name that wasspecified in the CATALOG DATABASEcommand is not valid.

User Response: Remove the database entry thathas the invalid target principal name by usingthe UNCATALOG DATABASE command.Re-catalog the database entry with a valid targetprincipal name using the CATALOG DATABASEcommand and retry the connection.

When running in a Windows 32-bit operatingsystem environment, the target principal name isthe logon account name of the DB2 service in theformat of <domain name>\<user ID>.

SQL1384N Unable to complete mutualauthentication.

Explanation: The connection failed becauseeither the client or server was unable to completemutual authentication.

User Response: If the target principal name wasspecified in the CATALOG DATABASEcommand, ensure that the target principal nameis valid for the server to which the client isattempting to connect or attach.

When running in a Windows 32-bit operatingsystem environment, the target principal name isthe logon account name of the DB2 service in theformat of <domain name>\<user ID>.

If the target principal name appears to be valid,then contact IBM service for assistance.

SQL1390C The environment variableDB2INSTANCE is not defined oris invalid.

Explanation: The environment variableDB2INSTANCE is not defined or is not set to avalid instance owner.

User Response: Set the DB2INSTANCEenvironment variable to the name of the instanceto use. If you do not know the name of theinstance to use or how to set the DB2INSTANCEenvironment variable to the instance name, referto the Administration Guide.

Federated system users: refer to the Installationand Configuration Supplement for DB2INSTANCEinformation.

Ensure your PATH environment variablecontains the sqllib/adm path in the homedirectory of the instance you want to use (forexample, /u/instance/sqllib/adm, where/u/instance is the home directory of the instanceowner on a UNIX system).

SQL1391N The database is already in use byanother instance.

Explanation: The request failed because thedatabase is in use by another instance of thedatabase manager (a database may only be used

220 Message Reference, Volume 2

Page 229: Db2 SQL Errors

by one instance.) This may be caused byattempting to access a database located on amounted file system accessible to anotherinstance located on another machine.

This can also occur if you have an openconnection (via SNA) to a database and thedatabase manager was brought downabnormally.

User Response:

v Validate that you are using the correctdatabase and ensure no other instance usesthis database.

v If the database manager was brought downabnormally, and you have a command lineprocessor connection to it, perform a db2terminate to close the offending openconnection before attempting to connect again.

sqlcode: -1391

sqlstate: 51023

SQL1392N Multiple instances of applicationsusing “<prep, bind, import,export>” is not supported.

Explanation: Only 1 instance of prep, bind,import, or export can be running at any one timewithin WINDOWS.

User Response: Within WINDOWS, do notattempt to start more than 1 application that usesprep, bind, import, or export.

SQL1393C The environment variableDB2PATH is not defined or isinvalid.

Explanation: The environment variableDB2PATH is not defined or is not set to a validdirectory path.

User Response: Set the DB2PATH environmentvariable to the directory where the databasemanager is installed.

SQL1394N The instance is not defined.

Explanation: The new instance can not be setfor the application because the instance is notdefined.

User Response: Ensure that the specifiedinstance exists. Use the db2ilist command todisplay the list of instances:

db2ilist

SQL1395N Unable to switch to anotherinstance because the application isusing multiple contexts.

Explanation: The request to switch to anotherinstance failed because the application is usingmultiple contexts.

User Response: Ensure that the application isnot using multiple contexts before switching toanother instance.

SQL1396N Unable to switch to anotherinstance because the application isconnected to a database orattached to an instance.

Explanation: Request to switch to anotherinstance failed because the application isconnected to a database or attached to aninstance.

User Response: Ensure that the application isnot connected to any database or attached to anyinstance before switching to another instance.

SQL1397N The DB2 service failed to logon.

Explanation: DB2 service did not start due to alogon failure.

User Response: If you are starting the DB2Administration Server, then use the DB2ADMINSETID command to set a new logon account. Ifyou are starting a DB2 server on Windows NT,you can set the logon account for a DB2 serviceby using the Services dialog box from theControl Panel.

Chapter 2. SQL Messages 221

Page 230: Db2 SQL Errors

SQL1400 - SQL1499

SQL1400N Authentication is not supported.

Explanation: The authentication type suppliedis not one of the supported types.

The command can not be processed.

User Response: The user should reissue thecommand with a valid parameter value.

See Application Development Guide for a list ofsupported authentication types.

SQL1401N Authentication types do notmatch.

Explanation: The user is attempting to connectto a remote database which is cataloged on thelocal node with a different authentication typefrom the remote node.

Federated system users: this message can alsoappear when:

v A data source is identified inSYSCAT.SERVEROPTIONS with SETTING=’N’for OPTION =’PASSWORD’ and the datasource is not running in trusted client mode(that is, the data source expects a password)

v The data source is identified inSYSCAT.SERVEROPTIONS with SETTING=’Y’for OPTION =’PASSWORD″ and the datasource is running in trusted client mode (thatis, the data source does not expect a password)

v There is no server option specified forOPTION=’PASSWORD’ inSYSCAT.SERVEROPTIONS and the systemdefault value for PASSWORD violates the datasource password requirement.

User Response: The command can not beprocessed.

The user should recatalog the database alias onthe client node with the same authentication typeas the remote database. Resubmit the command.

Federated system users:

v If the problem is that the data source requiresa password but SYSCAT.SERVEROPTIONScontains SETTING=’N’ for

OPTION=’PASSWORD’ for that server, alterSYSCAT.SERVEROPTIONS to reflect the truedata source password requirement using theALTER SERVER SQL statement.

v If the problem is that the data source does notrequire a password butSYSCAT.SERVEROPTIONS containsSETTING=’Y’ for OPTION=’PASSWORD’ forthat server, alter SYSCAT.SERVEROPTIONS toreflect the true data source passwordrequirement using the ALTER SERVER SQLstatement.

v If the server option for OPTION=’PASSWORD’is not set in SYSCAT.SERVEROPTIONS, createan entry using the CREATE SERVER SQLstatement to reflect the true data sourcepassword requirement.

sqlcode: -1401

sqlstate: 08001

SQL1402N Unable to authenticate user due tounexpected system error.

Explanation: Call your system administrator.On unix-based systems, the file db2ckpw may nothave the correct permission bits set, or thesystem may have run out of swap/paging space.On Windows NT, the DB2 security service maynot have been started.

The command can not be processed.

Federated system users: this situation can also bedetected by the data source.

User Response: On unix-based systems, havethe system administrator ensure the correctaccess permissions are set for db2ckpw, and thatthere is enough swap/paging space allocated. OnWindows NT, have the system administratorverify that the DB2 security service is installedand started.

222 Message Reference, Volume 2

Page 231: Db2 SQL Errors

SQL1403N The username and/or passwordsupplied is incorrect.

Explanation: The username and/or passwordsupplied is incorrect or not a validusername/password combination or the databaseto which you are attempting to connect to has anauthentication type of SERVER and no usernameand password was supplied on the CONNECTTO statement.

If DB2 Connect is being used, the problem maybe that the DCS directory entry for the hostconnection could not be found.

If a connection is being made from an OS/2client to a UNIX-based server with authenticationserver, and the userid and password are beingpicked up from UPM, then the userid on theserver must be defined in lowercase and have anuppercase password.

The command can not be processed.

Federated system users: this situation can also bedetected by the data source.

User Response: Supply the correct usernameand password combination.

Federated system users: ensure that the entry inSYSCAT.USEROPTIONS contains the correctusername and password for the data sourcebeing accessed.

sqlcode: -1403

sqlstate: 08004

SQL1404N Password expired.

Explanation: Your password has expired.

User Response: Change your password, thenretry the request using the new password. Youcan use the DB2 Client Configuration Assistant,or Command Line Processor CONNECT andATTACH commands to change your password.

sqlcode: -1404

sqlstate: 08004

SQL1405N Unable to communicate with localDB2 authentication server.

Explanation: The application failed toauthenticate due to an error whilecommunicating to the local DB2 authenticationserver.

User Response: Ensure that the DB2authentication server is started by entering thefollowing command from an OS/2 window:

detach db2upm

SQL1415N The statement was compiled fordiagnostic purposes only and hasnot been executed.

Explanation: The statement was processedthrough parts of the system to collect diagnosticinformation using service features. The necessarysteps to allow further processing of the statementhave not been completed.

User Response: This error is returned toprevent further processing by the system ofstatements prepared using service features and isexpected.

SQL1420N Too many concatenation operators.

Explanation: The database manager has reachedan internal limit while evaluating an expression,of long or large object string result type, thatcontains concatenation operators.

User Response: Reduce the number ofconcatenations in the expression and try again.

sqlcode: -1420

sqlstate: 54001

SQL1421N MBCS conversion error occurredwhen converting host variable orsqlvar ″<number>″ to or fromwchar_t format. Reason code″<rc>″.

Explanation: A C/C++ application withembedded SQL statements was precompiled withthe WCHARTYPE CONVERT option. At runtime,the application received an error which occurred

Chapter 2. SQL Messages 223

Page 232: Db2 SQL Errors

during conversion in either wcstombs(), for inputhost variables, or mbstowcs(), for output hostvariables. The host variable or sqlvar numberindicates which data item experienced theproblem. Valid reason codes are:

1 the problem occurred with input data

2 the problem occurred with output data

User Response: If application data is already inMBCS format, re-precompile the application withWCHARTYPE NOCONVERT and re-build. Ifapplication data is intended to be in wchar_tformat, then input data failing in wcstombs()may be corrupt. Correct the data and re-executethe application.

sqlcode: -1421

sqlstate: 22504

SQL1422N The size of the container isinvalid.

Explanation: One of the containers to be usedin a database managed table space is either toolarge or too small. A container must be at leastextentsize + 1 pages in length. The maximumsize of a container is operating systemdependent. The most common system limit is 2gigabytes (524288 4K pages).

User Response: Check the diagnostic log fordetails. Then correct the SQL statement.

sqlcode: -1422

sqlstate: 54039

SQL1423N The query includes a column witha large object data type.

Explanation: The query includes a column witha data type of BLOB, CLOB or DBCLOB. Ingeneral, such data types cannot be handled fromclients available prior to Version 2.1.

The error occurred for a condition thatcorresponds to warning SQLCODE +238. See thismessage for details that explain the condition.The client level receiving this message cannotprocess BLOB data types. It may be able tohandle CLOB and DBCLOB data types by using

the SUBSTR function or by setting the data typein the SQLDA to one of the character data typesavailable in Version 1 if the LOB column is notlarger than the supported length of the characterdata type.

User Response: Change the query to excludeany column that has a data type of BLOB, CLOBor DBCLOB. This is the only possible action ifthe query includes a column of type BLOB. If thecolumn (say C1) is a CLOB, you could useCAST(C1 AS LONG VARCHAR) to get the first32700 characters. Similarly for DBCLOB column(DC1) use CAST(DC1 AS LONG VARGRAPHIC)to get the first 16350 characters. If the applicationcode can be changed, code can be added tochange the SQLDA to use LONG VARCHAR orLONG VARGRAPHIC for CLOB and DBCLOB.

sqlcode: -1423

sqlstate: 56093

SQL1424N Too many references to transitionvariables and transition tablecolumns or the row length forthese references is too long.Reason code=“<rc>”.

Explanation: The trigger includes aREFERENCING clause that identifies one ormore transition tables and transition variables.The triggered action of the trigger containsreferences to transition table columns ortransition variables with one of the followingconditions identified by the reason code:

1 references total more than the limit ofthe number of columns in a table

2 sum of the lengths of the referencesexceeds the maximum length of a rowin a table.

User Response: Reduce the number ofreferences to transition variables and transitiontable columns in the trigger action of the triggerso that the length is reduced or the total numberof such references is less than the maximumnumber of columns in a table.

sqlcode: -1424

sqlstate: 54040

224 Message Reference, Volume 2

Page 233: Db2 SQL Errors

SQL1425N A password has been suppliedwithout a userid.

Explanation: Any command/API that accepts auserid and password will not accept a passwordwithout a userid.

User Response: Resubmit the command/APIand supply a userid if you are also supplying apassword.

SQL1426N A default instance cannot bedetermined.

Explanation: If an explicit ’attach to instance’has not been performed, instance commands tryto form an implicit attachment to a defaultinstance. The default instance is determined fromthe DB2INSTDFT and DB2INSTANCEenvironment variables. If neither of these are set,then no implicit attachment can be formed.

User Response: Set one of these environmentvariables to a valid instance name and resubmitthe command.

SQL1427N An instance attachment does notexist.

Explanation: The application is not attached toan instance. The attempted command/APIcannot be executed unless there is an existinginstance attachment.

User Response: If the error occurred whendetaching from an instance, continue processing.If the error occurred during the execution of anyother command, attach to an instance and reissuethe failed command.

SQL1428N The application is alreadyattached to ″<nodename1>″ whilethe command issued requires anattachment to ″<nodename2>″ forsuccessful execution.

Explanation: In order to successfully process thecommand, an attachment to a node other thanthat which currently exists is required. Theapplication must either: 1) have no attachmentwhen the command is issued, or 2) already be

attached to the node required by the command.

User Response: Ensure that the application hasno attachment before issuing the command orthat the attachment that exists is to the correctnode.

SQL1429N A node directory entry cannot becreated in which the node namematches the value of theDB2INSTANCE environmentvariable.

Explanation: The CATALOG NODE commandor API does not allow an entry whose nodenamematches the value of the DB2INSTANCEenvironment variable.

User Response: Choose another node name forthe node being cataloged and try again.

SQL1430N The database name ″<database>″cannot be found in the systemdatabase directory on node″<nodename>″.

Explanation: When specific database names areprovided to the database monitor, thosedatabases must reside either at the node towhich you are currently attached or at the localnode.

User Response: Make sure the databases listedin the request all reside at the node to which youare attached or at the local node. Reissue therequest.

SQL1431N The relative path ″<path>″ is notallowed when executing remotely.

Explanation: When the application is remotefrom the server, relative paths are not allowed.

User Response: Specify a fully qualified paththat is valid at the server and reissue thecommand.

Chapter 2. SQL Messages 225

Page 234: Db2 SQL Errors

SQL1432N A request has been sent to aserver using a database protocolwhich the server does notrecognize.

Explanation: This error is caused by sending aDB2 request to a server which does notunderstand the database protocol being used totransmit the request. This situation will occurmost frequently when sending a DB2 ATTACHrequest to a server listed in your node directorywhich is not a DB2 Version 2 or greater server.This error will also arise if you send an attachrequest to DB2 for AS/400, DB2 for MVS, or DB2for VM and VSE servers.

User Response: Do not attempt to attach to anyof the servers listed above.

SQL1433N The application is alreadyconnected to ″<database1>″ whilethe command issued requires aconnection to ″<database2>″ forsuccessful execution.

Explanation: In order to successfully process thecommand, a connection to a database other thanthat which currently exists is required. Theapplication must either: 1) have no connectionwhen the command is issued, or 2) already beconnected to the database required by thecommand.

User Response: Ensure that the application hasno connection before issuing the command orthat the connection that exists is to the correctdatabase.

SQL1434N A CONNECT or ATTACHstatement failed because of aclient/server incompatibilitybetween 32 bit and 64 bitplatforms.

Explanation: This release does not supportclient/server connections between 32 bit and 64bit platforms.

User Response: You can issue a CONNECT orATTACH statement in the following scenarios:

v from a 32 bit client to a 32 bit server

v from a 64 bit client to a 64 bit server

sqlcode: -1434

sqlstate: 08004

SQL1440W The WITH GRANT OPTION hasbeen ignored on the GRANT(Database Authorities) statement,GRANT (Package Privileges)statement, GRANT (IndexPrivileges) statement, or whengranting CONTROL privilege ona table or view.

Explanation: The WITH GRANT OPTION isnot applicable when granting databaseauthorities or privileges on packages or indexes.The WITH GRANT OPTION does not apply toCONTROL privilege on tables, views, indexes, orpackages.

All valid requested privileges were granted.

User Response: When granting databaseauthorities, package privileges or indexprivileges do not include the WITH GRANTOPTION clause. When granting CONTROL, usea separate grant statement for the CONTROLprivilege without specifying the WITH GRANTOPTION clause.

sqlcode: +1440

sqlstate: 01516

SQL1441N Invalid parameter. Reason code″<code>″.

Explanation: The following is a list of validreason codes:

1 A NULL was passed in for the contextpointer.

3 The context pointer has been initialized,but not to a valid context area.

4. Invalid option

5 reserved parameter was not NULL

User Response: Ensure that the applicationcontext pointer has been properly initialized and

226 Message Reference, Volume 2

Page 235: Db2 SQL Errors

that any options used are valid and try again.

SQL1442N The context is not in use or is notin use by the current thread.Reason code ″<code>″.

Explanation: The call failed because:

1 The context is not in use by any thread(no attach was done)

2 The context is not in use by the currentthread.

3 The current thread is not using acontext.

User Response: For a detach call, ensure thatthe context is the one in use by the currentthread, and that a corresponding attach wasdone.

For a get current context call, ensure that thethread is currently using a context.

SQL1443N Thread is already attached to acontext.

Explanation: The user attempted to attach acontext to a thread, and the thread is alreadyusing a context.

User Response: Detach from the previouscontext before attaching to a new one.

SQL1444N The application context cannot bedestroyed because it is in use.

Explanation: The user attempted to destroy anapplication context while it is still in use. Eitherthere is a thread attached to the context, or thecontext has a CONNECT or ATTACH associatedwith it. A CONNECT RESET or DETACH mustbe done (if a CONNECT or ATTACH has beendone), and all threads must detach from thecontext before it can be destroyed.

User Response: Ensure that all calls to attach toa context have a corresponding detach, allCONNECTS have a corresponding CONNECTRESET, and all ATTACHES have a correspondingDETACH.

SQL1445N Thread or process does not have acontext to use.

Explanation: A context type ofSQL_CTX_MULTI_MANUAL is in effect, but thecurrent thread or process has not been attachedto a context.

User Response: Make sure the current thread orprocess is attached to a context before makingany database calls.

SQL1450N Invalid registration informationpointer.

Explanation: An invalid registration informationpointer was passed to the register/deregisterDB2 server command/API.

User Response: Verify that a valid pointer waspassed to the register/ deregister DB2 servercommand/API.

SQL1451N Register/deregister DB2 servermust be issued from a servernode.

Explanation: Register/deregister DB2 serverwas issued from an invalid node.

User Response: Reissue the register/deregisterDB2 server command/API from a server node.

SQL1452N An invalid registration locationwas specified.

Explanation: An invalid registration locationwas passed to the register/deregister DB2 servercommand/API.

User Response: Verify that a valid registrationlocation was passed to the register/deregisterDB2 server command/API.

SQL1453N The entry in the databasemanager configuration file for fileserver name is missing or invalid.

Explanation: The file server name specified inthe configuration command/API or in thedatabase manager configuration file is missing orinvalid.

Chapter 2. SQL Messages 227

Page 236: Db2 SQL Errors

User Response: Verify that a file server namewas specified, that the name does not containinvalid characters, and is not longer than 48characters in length. Update the file server namein the database manager configuration file andresubmit the command/API.

SQL1454N The entry in the databasemanager configuration file forobject name is missing or invalid.

Explanation: The object name specified in theconfiguration command/API or in the databasemanager configuration file is missing or invalid.

User Response: Verify that an object name wasspecified, that the name does not contain invalidcharacters, and is not longer than 48 charactersin length. Update the object name in thedatabase manager configuration file andresubmit the command/API.

SQL1455N The entry in the databasemanager configuration file for IPXsocket number is missing orinvalid.

Explanation: The IPX socket number specifiedin the configuration command/API or in thedatabase manager configuration file is missing orinvalid.

User Response: Verify that an IPX socketnumber was specified, that the number does notcontain invalid characters, and is not longer than4 characters in length. Update the IPX socketnumber in the database manager configurationfile and resubmit the command/API.

SQL1456N The object name specified in thedatabase manager configurationfile already exists on the NetWarefile server.

Explanation: A duplicate object name wasfound when trying to register the DB2 serverobject name on the NetWare file server.

User Response: The object name specified inthe database manager configuration file isalready in use. Change the object name and then

re-register the DB2 server.

SQL1457N Register/deregister failed to loginto the NetWare file serverspecified because a NetWaredirectory services connection isalready established to that fileserver.

Explanation: A bindery login usingNWLoginToFileServer cannot be performed if aNetWare directory services connection is alreadyestablished to the specified file server.

User Response: Sever the directory servicesconnection by logging out and detaching fromDirectory Services, and then reissueregister/deregister.

SQL1458N IPX/SPX has been configured inthe database managerconfiguration file for directaddressing. It is not necessary toregister/deregister the DB2 serverat/from a NetWare file server.

Explanation: Issuing register/deregister is notnecessary since the database managerconfiguration file has been configured forIPX/SPX direct addressing. ie. Fileserver andobjectname have been specified as ’*’.

User Response: Note that since the DB2 serverhas been configured for direct addressing only,IPX/SPX clients using fileserver addressing willnot be able to connect to this server. For theserver to support both types of IPX/SPX clientaddressing, specify a fileserver and objectnamein the database manager configuration file.

SQL1460N The environment variable″<variable>″ required for SOCKSserver name resolution is notdefined or not valid.

Explanation: The SOCKS environment variableSOCKS_NS or SOCKS_SERVER is not defined.SOCKS protocol support requires that both theseenvironment variables be defined.

228 Message Reference, Volume 2

Page 237: Db2 SQL Errors

SOCKS_NSThis is the IP address of the domainname server where the SOCKS server isdefined.

SOCKS_SERVERThis is the hostname of the SOCKSserver.

User Response: Define the missing environmentvariable and resubmit the command.

SQL1461N The security option ″<security>″is not valid.

Explanation: The SECURITY option for aTCP/IP node has a value other than ’SOCKS’.This option is used to enable the TCP/IP nodebeing cataloged to use SOCKS protocol supportto traverse a firewall. No value other than’SOCKS’ is permitted.

User Response: Verify that SOCKS protocolsupport is required. If so, re-catalog the nodewith SECURITY SOCKS. If not, re-catalog thenode, but omit the SECURITY option.

SQL1462N Request is only valid for asyncpoint manager connection.

Explanation: A request was attempted which isonly valid for a syncpoint manager connection,but the syncpoint manager instance is notconnected to.

User Response: Connect to the syncpointmanager instance and reissue the request.

SQL1468N The database manager TCP/IPlistener must be configured andrunning on the server instance″<instance>″ (nodenum″<node-num1>″) beforeattempting to CONNECT orATTACH to node ″<node-num2>″.

Explanation: The SET CLIENT command or apior the environment variable DB2NODE was usedto set the node for CONNECT or ATTACH to″<node-num2>″. In order to CONNECT orATTACH to this node, the Database ManagerTCP/IP listener must be configured and running

on the server instance ″<instance>″ (node″<node-num1>″).

Note: This message may be returned by animplicit CONNECT or ATTACH.

User Response: Either:

v Ensure that svcename has been specified in thedatabase manager configuration on theinstance ″<instance>″, node ″<node-num1>″,the DB2COMM environment variable has beenset to use TCP/IP, and that TCP/IP listenerwas successfully started at DB2START time.

or

v Explictly catalog the node and database.

sqlcode: -1468

sqlstate: 08004

SQL1469N Instance ″<instance-name>″(nodenum ″<node-num1>″) doesnot have node ″<node-num2>″specified in its db2nodes.cfg file.

Explanation: The SET CLIENT command or apior the environment variable DB2NODE was usedto set the node for CONNECT or ATTACH to″<node-num2>″. Subsequent CONNECT orATTACH processing was unable to locate thisnode in the db2nodes.cfg file on the instance″<instance-name>″ (node ″<node-num1>″).

Note: This message may be returned by animplicit CONNECT or ATTACH.

User Response: Ensure that the node numberspecified by the SET CLIENT command or api orthe DB2NODE environment variable exists in thedb2nodes.cfg file of the intermediate instance″<instance-name>″, node ″<node-num1>″.

sqlcode: -1469

sqlstate: 08004

SQL1470N Value of DB2NODE environmentvariable is not valid.

Explanation: The DB2NODE environmentvariable indicates the node the application will

Chapter 2. SQL Messages 229

Page 238: Db2 SQL Errors

attempt to connect to. If DB2NODE is unset or isblank, the application will attempt to connect tothe default node. Otherwise, DB2NODE must beset to the node number of one of the nodesdefined on the same host as the application.

User Response: Set the DB2NODE environmentvariable to one of the following values:

unset causes the application to connect to thedefault node.

blank causes the application to connect to thedefault node.

A numbercauses the application to connect to thenode with that node number. The nodemust be running on the same host asthe application.

sqlcode: -1470

sqlstate: 08001

SQL1471N Cannot connect to database″<database-name>″ on node″<node-number>″ because thedatabase on this node is notsynchronized with catalog node.

Explanation: The end-of-log information on thisnode does not match the corresponding recordon the catalog node. This can be caused byrestoring the database on various nodes withbackups taken from different times.

User Response: If the database is restoredwithout rolling forward on one node, ensure thatthe database is restored from consistent offlinebackups on all nodes without rolling forward.

sqlcode: -1471

sqlstate: 08004

SQL1472N Cannot connect to database″<database-name>″ on node″<node-number>″ because thedifference between the systemtime on the catalog node and thevirtual timestamp on this node isgreater than the max_time_diffdatabase manager configurationparameter.

Explanation: The system time difference for themachines in the configuration (listed in thedb2nodes.cfg file) is greater than themax_time_diff database manager configurationparameter.

User Response: Synchronize the system timeson all machines, and ensure that themax_time_diff parameter is configured to allowfor normal communication delays among thedatabase machines.

If the above does not fix the problem, see theAdministration Guide for possible causes andactions.

sqlcode: -1472

sqlstate: 08004

SQL1473N Cannot commit the transactionbecause the time differencebetween the system time on thelocal node and the virtualtimestamps of node(s)″<node-list>″ is greater than themax_time_diff database managerconfiguration parameter. Thetransaction is rolled back.

Explanation: The system time difference for themachines in the configuration (listed in thedb2nodes.cfg file) is greater than themax_time_diff database manager configurationparameter.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Synchronize the system timeson all machines, and ensure that themax_time_diff parameter is configured to allow

230 Message Reference, Volume 2

Page 239: Db2 SQL Errors

for normal communication delays among thedatabase machines.

sqlcode: -1473

sqlstate: 40504

SQL1474W The transaction completedsuccessfully, but the timedifference between the systemtime on the local node and thevirtual timestamps of node(s)″<node-list>″ is greater than themax_time_diff database managerconfiguration parameter.

Explanation: The system time difference for themachines in the configuration (listed in thedb2nodes.cfg file) is greater than themax_time_diff database manager configurationparameter.

This warning message is returned to read-onlytransactions because they are not affected by thiscondition. However, other transactions would berolled back. This message is to inform the userabout this condition so that action can be takenat the earliest possible time.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Synchronize the system timeson all machines, and ensure that themax_time_diff parameter is configured to allowfor normal communication delays among thedatabase machines.

sqlcode: 1474

sqlstate: 01607

SQL1475W A system error occurred duringCONNECT RESET processing.

Explanation: The CONNECT RESET wassuccessful but a system error such as a nodefailure or a communications error may haveoccurred.

User Response: Check the db2diag.log file fordetails. The database at this node may need to berestarted.

sqlcode: 1475

sqlstate: 01622

SQL1476N The current transaction was rolledback because of error ″<sqlcode>″.

Explanation: A table was being created with theNOT LOGGED INITIALLY option, or NOTLOGGED INITIALLY was activated for anexisting table. During the same unit of work,either an error occurred, or a ROLLBACK TOSAVEPOINT statement was issued. This unit ofwork is rolled back, with the following effects:

v any table that was created in this unit of workis dropped.

v any NOT LOGGED INITIALLY tables thatwere activated in the transaction are markedinaccessible, and can only be dropped.

The ″<sqlcode>″ reported is the SQLCODE of theoriginal error. The “<sqlcode>” will be 0 if aROLLBACK TO SAVEPOINT was issued in thetransaction.

User Response: Correct the problem, then runthe transaction again. Remove any ROLLBACKTO SAVEPOINT statement that is used in thesame transaction in which a NOT LOGGEDINITIALLY table is created or activated.

sqlcode: -1476

sqlstate: 40506

SQL1477N Table “<table-name>” cannot beaccessed.

Explanation: An attempt was made to access atable that is not accessible. The table may not beaccessible because of one of the followingreasons:

v The table had NOT LOGGED INITIALLYactivated when the unit of work was rolledback.

v The table is a partitioned declared temporarytable and one or more partitions failed sincethe temporary table was declared (all declaredtemporary tables have the schema nameSESSION).

Chapter 2. SQL Messages 231

Page 240: Db2 SQL Errors

v ROLLFORWARD encountered the activation ofNOT LOGGED INITIALLY on this table or aNONRECOVERABLE load on this table.

Access to this table is not allowed because itsintegrity cannot be guaranteed.

User Response: One of the following actionscan be taken.

v If the table had NOT LOGGED INITIALLYactivated, drop the table. If this table isrequired, re-create it.

v If the table is a declared temporary table, dropthe table. If this table is required, declare itagain.

v Otherwise, restore from a tablespace ordatabase backup. The backup image musthave been taken subsequent to the commitpoint following the completion of thenon-recoverable operation (NOT LOGGEDINITIALLY operation, or NONRECOVERABLEload).

sqlcode: -1477

sqlstate: 55019

SQL1478W The database has been started butonly one buffer pool has beenactivated.

Explanation: Only one small buffer pool withno extended storage has been activated. This isbecause of one of the following reasons:

v Not enough memory could be allocated for thetotal size of the buffer pools and the extendedstorage specified for this database.

v The buffer pool files in the database directoryare missing or corrupt.

User Response: Check the db2diag.log file forthe correct source of the problem. Possiblesolutions will be:

v Drop or alter the size of one or more of thebuffer pools to allow the database to startproperly. If there is extended storage specifiedfor the database, adjust the configurationvalues of num_estore_segs and estore_seg_szfor less memory consumption.

v Run db2dart on the database and verify thevalidity of the buffer pool files. If the db2dartreports an error, contact your local servicerepresentative.

After making the changes, disconnect from thedatabase and start the database again.

sqlcode: +1478

sqlstate: 01626

SQL1479W Attempt to fetch before the resultset returned the first rowset.

Explanation: The requested rowset overlappedthe start of the result set and, depending on thefetch orientation specified:

SQL_FETCH_PRIORone of the following situations:

v the current position was beyond thefirst row, and the number of thecurrent row is less than or equal tothe rowset size.

v the current position was beyond theend of the result set, and the rowsetsize was greater than the result setsize.

SQL_FETCH_RELATIVEthe absolute value of the fetch offsetwas less than or equal to the currentrowset size.

SQL_FETCH_ABSOLUTEthe fetch offset was negative, and theabsolute value of the fetch offset wasgreater than the result set size but lessthan or equal to the current rowset size.

User Response: No action needed.

SQL1480N The discover type specified in theDISCOVER database managerconfiguration parameter isinvalid.

Explanation: Valid values for the DISCOVERparameter in the database manager configurationfile are: DISABLE, KNOWN, or SEARCH.

232 Message Reference, Volume 2

Page 241: Db2 SQL Errors

User Response: Update the DISCOVERdatabase manager configuration parameter witha type of DISABLE, KNOWN, or SEARCH.

SQL1481N One or more of thecommunications protocolsspecified in theDISCOVER_COMM parameter isinvalid.

Explanation: Valid values for theDISCOVER_COMM parameter in the databasemanager configuration file are any combinationof NETBIOS, and TCPIP, separated by commas.

User Response: Update the DISCOVER_COMMdatabase manager configuration parameter withany combination of NETBIOS, and TCPIP,separated by commas.

SQL1482W The BUFFPAGE parameter willonly be used if one of the bufferpools is defined with a size of -1.

Explanation: This is a warning that theBUFFPAGE database configuration parameterwill be ignored if none of the database’s bufferpools is defined with a size of -1. -1 indicatesthat the buffer pool is to use the BUFFPAGEparameter as the number of buffer pool pages.

User Response: You can select from theSYSCAT.BUFFERPOOLS to review the bufferpool definitions. If none of the buffer pools aredefined with size -1 (NPAGES), then setting theBUFFPAGE parameter will not change the size ofthe buffer pools for the database.

SQL1490W Activate database is successful,however, the database has alreadybeen activated on one or morenodes.

Explanation: Database has already beenexplicitly started (activated) on one or morenodes.

User Response: Refer to the diagnostic log tosee which node returns the warning.

SQL1491N The database ″<name>″ was notdeactivated because the databaseis still being used.

Explanation: The database cannot bedeactivated if there are any applicationsconnected to the specified database.

User Response: Ensure that all applicationshave done a CONNECT RESET, then try again.

SQL1492N The database ″<name>″ was notdeactivated because it was notactivated.

Explanation: The database cannot bedeactivated because the specified database wasnot active.

User Response: No action is required.

SQL1493N The application is alreadyconnected to an active database.

Explanation: The ACTIVATE DATABASE andDEACTIVATED DATABASE commands cannotproceed because the application is alreadyconnected to a database.

User Response: Disconnect from the databasethen re-submit the command.

SQL1494W Activate database is successful,however, there is already aconnection to the database.

Explanation: There is already databaseconnection on one or more nodes.

User Response: Refer to the diagnostic log tosee which node returns this warning.

SQL1495W Deactivate database is successful,however, there is still aconnection to the database.

Explanation: There is still database connectionto one or more nodes.

User Response: Refer to the diagnostic log tosee which node returns this warning.

Chapter 2. SQL Messages 233

Page 242: Db2 SQL Errors

SQL1496W Deactivate database is successful,but the database was notactivated.

Explanation: Database was not explicitly startedon one or more nodes when deactivate databasewas executed.

User Response: Refer to the diagnostic log tosee which node returns this warning.

SQL1497W Activate/Deactivate database wassuccessful, however, an erroroccurred on some nodes.

Explanation: Activate/Deactivate database issuccessful at least on the catalog node and

coordinator node, however, on some othernode(s) an error has occurred.

User Response: Refer to the diagnostic log tofind out what error has occurred on which node,fix the problem if possible and then reissue theactivate/deactivate database command.

SQL1500 - SQL1599

SQL1512N ddcstrc could not write to thespecified file.

Explanation: ddcstrc was not able to write thetrace information to the filename that it has beeninstructed to write to.

User Response: Ensure that the filenamespecified is valid for your file system. If afilename is not specified, ensure that you havethe necessary permission to write to the defaultfile ddcstrc.tmp.

SQL1513W ddcstrc has not been turned off.

Explanation: Because of an error conditionddcstrc has not been turned off. This was done toensure that the trace information will not be lostbefore being safely placed in a file.

User Response: Correct the ddcstrc errorcondition reported prior to this error and attemptto turn off the trace again.

SQL1520N Buffersize must be a numericvalue greater than or equal to65536.

Explanation: The user specified an invalidbuffersize for the ddcstrc command.

User Response: Ensure that the buffersize used

is numeric and greater than or equal to 65536(64K). Note that the memory to be used will be amultiple of 64K. ddcstrc rounds down thebuffersize specified to the nearest multiple of64K.

SQL1525N An error occurred when startingthe DB2 security daemon.

Explanation: An unexpected error occurredwhen starting the DB2 security daemon.

User Response: Check the db2diag.log file forfurther information, and then retry theDB2START command.

SQL1526N db2start failed because DB2VIAsupport was not started. Reasoncode ″<reason code>″.

Explanation: DB2VIA support was not startedsuccessfully at db2start time. The reason codeindicates the error:

1. The VIPL library specified in DB2_VI_VIPLregistry variable could not be loaded.

2. The Device name specified inDB2_VI_DEVICE registry variable could notbe opened.

3. DB2 does not support the VIAimplementation installed.

234 Message Reference, Volume 2

Page 243: Db2 SQL Errors

User Response:

1. Make sure the DB2 registry DB2_VI_VIPL isproperly set and the name specified inDB2_VI_VIPL is in the %PATH% environmentvariable.

2. Make sure the DB2 registry DB2_VI_DEVICEis properly set.

3. DB2 only supports a VIA implementation thatsupports at least Reliable Delivery reliabilitylevel. It is also required that the VIAimplementation complies with Intel VirtualInterface Architecture Implementation Guideand passes the conformance Suite. Make surethe VIA implementation you chose satisfiesthese requirements.

SQL1530W The specified degree ofparallelism will be ignoredbecause the system is not enabledfor intra-partition parallelism.

Explanation: Either the DEGREE bind optionwas specified with a value greater than 1 or theSET CURRENT DEGREE statement was executedwith a value greater than 1, but the databasemanager was not enabled for intra-partitionparallelism.

The database manager must be started with theintra_parallel configuration parameter set to ONin order for the instance to be enabled forintra-partition parallelism.

The statement or command completedsuccessfully, but the degree specification wasignored.

User Response: If you want to useintra-partition parallelism restart the databasemanager with the intra_parallel configurationparameter set to ON.

Otherwise use a value of 1 or ANY for thedegree specification.

sqlcode: +1530

sqlstate: 01623

SQL1580W Trailing blanks were truncatedwhile performing conversion fromcodepage ″<source>″ to codepage″<target>″. The maximum size ofthe target area was ″<max-len>″.The source string length was″<source-len>″ and itshexadecimal representation was″<string>″.

Explanation: During the execution of the SQLstatement, a code page conversion operation hasresulted in a string that is longer than themaximum size of the target object. Processingcontinued because only blank characters weretruncated.

User Response: Ensure that the output is asexpected and that the truncation has not causedany unexpected consequences.

sqlcode: 1580

sqlstate: 01004

SQL1581N The table “<table-name>” cannotbe in append mode and have aclustering index.

Explanation: There are two situations wherethis error is issued.

v A clustered index exists for a table and ALTERTABLE is used to attempt to place the table inappend mode.

v A table is in append mode and CREATEINDEX is used to attempt to create aclustering index.

User Response: If a clustering index isnecessary then alter the table to set append modeoff. If append mode is desired, drop the existingclustering index on the table.

sqlcode: -1581

sqlstate: 428CA

Chapter 2. SQL Messages 235

Page 244: Db2 SQL Errors

SQL1582N The PAGESIZE of the table space“<tbspace-name>” does not matchthe PAGESIZE of the bufferpool“<bufferpool-name>” associatedwith the table space.

Explanation: The PAGESIZE value specified inthe CREATE TABLESPACE statement does notmatch the page size of the bufferpool specifiedfor use with the table space. These values mustmatch.

The statement cannot be processed.

User Response: Change the value specified forPAGESIZE to match the page size of thebufferpool or change the bufferpool to one thathas a page size that matches.

sqlcode: -1582

sqlstate: 428CB

SQL1583N PAGESIZE value “<pagesize>” isnot supported.

Explanation: The PAGESIZE that is specified inthe CREATE BUFFERPOOL or CREATETABLESPACE statement is not a supported pagesize. The supported page sizes for Version 5 are4K, 8K, 16K, and 32K.

The statement cannot be processed.

User Response: Specify one of the supportedpage sizes.

sqlcode: -1583

sqlstate: 428DE

SQL1584N System temporary tablespace withpage size of at least “<pagesize>”could not be found.

Explanation: A system temporary table spacewas required to process the statement. There wasno system temporary table space available thathad a page size of “<pagesize>” or larger.

The statement cannot be processed.

User Response: Create a system temporarytable space with a page size of at least“<pagesize>”.

sqlcode: -1584

sqlstate: 57055

SQL1585N A system temporary table spacewith sufficient page size does notexist.

Explanation: One of the following conditionscould have occurred:

1. The row length of the system temporary tableexceeded the limit that can be accomodatedin the largest system temporary table space inthe database.

2. The number of columns required in a systemtemporary table exceeded the limit that canbe accomodated in the largest systemtemporary table space in the database.

The system temporary table space limits dependon its page size. These values are:

Max Max Page size ofRecord Cols temporaryLength table space----------- ---- ------------1957 bytes 244 2K4005 bytes 500 4K8101 bytes 1012 8K16293 bytes 1012 16K32677 bytes 1012 32K

User Response: Create a system temporarytable space of a larger page size supported, ifone does not already exist. If such a table spacealready exists, eliminate one or more columnsfrom the system temporary table. Create separatetables or views, as required, to hold additionalinformation beyond the limit.

sqlcode: -1585

sqlstate: 54048

SQL1590N LONG VARCHAR and LONGVARGRAPHIC fields are notpermitted in TABLESPACEswhich are built on DEVICEs.

Explanation: Devices (raw i/o) on HP requirei/o to be aligned on 1024 byte boundaries.LONG VARCHAR and LONG VARGRAPHICfields are handled in 512 byte pieces, and thus

236 Message Reference, Volume 2

Page 245: Db2 SQL Errors

can only be used in SYSTEM MANAGEDTABLESPACEs or in DATABASE MANAGEDTABLESPACEs with only FILE containers.

User Response: Alternatives:

v Choose one of the LOB columns types(BLOB,CLOB,DBCLOB) instead of LONG.

v Use a table space with the correct attributes.

sqlcode: 1590

sqlstate: 56097

SQL1591N The ON option of the SETINTEGRITY statement is notvalid since the table“<table-name>” is not in thecorrect state.

Explanation: The ON option can only bespecified on a table that is in the check pendingstate and the first (for foreign key constraints),second (for check constraints) and fifth (forsummary tables) fields in the CONST_CHECKEDcolumn of SYSCAT.TABLES catalog must beeither ’Y’ or ’U’.

User Response: If the table is not in checkpending, do not specify the ON option. If thetable is in check pending, perform integritychecking on the table (or refresh the table if it isa summary table) before executing the SETINTEGRITY statement with the ON option.

sqlcode: -1591

sqlstate: 55019

SQL1592N The INCREMENTAL option is notvalid with reason code“<reason-code>” since the table“<table-name>” cannot beincrementally processed.

Explanation: The cause is based on the“<reason-code>”:

31 The table is not in check pending state ifthe INCREMENTAL option is specifiedin a REFRESH TABLE statement.

32 The table is not a REFRESHIMMEDIATE summary table.

33 A Load Replace or Load Insert hasoccured to the table if it is a summarytable.

34 A Load Replace has occured to the tableafter the last integrity check.

35 One of the following:

v New constraint has been added to thetable itself or its parents (or itsunderlying table if it is a summarytable) while in check pending.

v If it is a summary table, a LoadReplace has occured to anyunderlying table of the table after thelast refresh.

v If it is a summary table, some of itsunderlying table has been taken outof check pending before it getsrefreshed.

v If it is a summary table, some of itsunderlying tables were loaded. Thetable was then refreshed, followed bysome more loads to the sameunderlying tables.

v Some of its parents (or underlyingtable if it is a summary table) havebeen checked for integritynon-incrementally.

v The table was in check pending statebefore migration. Full processing isrequired for the first time the table ischecked for integrity after migration.

36 Incremental processing of a summarytable is not currently supported.

User Response: Do not specify theINCREMENTAL option. The system will checkthe entire table for constraint violations (or if it isa summary table, recompute the summary tabledefinition query).

sqlcode: -1592

sqlstate: 55019

Chapter 2. SQL Messages 237

Page 246: Db2 SQL Errors

SQL1593N The REMAIN PENDING optionis not valid since the table“<table-name>” is not in checkpending state.

Explanation: The table must be in checkpending state if the REMAIN PENDING optionis to be specified.

User Response: Do not specify the REMAINPENDING option.

sqlcode: -1593

sqlstate: 55019

SQL1594W Some old data remains unverifiedby the system and thus somefields in the CONST_CHECKEDcolumn of the SYSCAT.TABLEScatalog are marked as ’U’.

Explanation: The table was previouslyunchecked (or checked by users). The statementSET INTEGRITY ... OFF or LOAD was laterexecuted which changed some values in theCONST_CHECKED column to ’W’. WhenINCREMENTAL option is specified in thecurrent statement, the old (non-appended)portion of the table remains unchecked by thesystem, and hence, the corresponding values inthe CONST_CHECKED column are marked as’U’ to keep track of it.

User Response: No action is required. If theuser wants the data integrity of the table to bemaintained by the system, bring the table backinto check pending and re-execute the statementwithout the INCREMENTAL option. Fullprocessing will be chosen by the system, whichwill then assume full responsibility of dataintegrity of the table.

sqlcode: +1594

sqlstate: 01636

SQL1595N The integrity for table“<table-name>” cannot bechecked because either a parenttable in a referential constrainthas not been checked or anunderlying table of the summarytable is not checked.

Explanation: To avoid propagating this tablewith data that might violate integrity checks, all

parents must have been validated in order tocheck integrity for this table. If this is a summarytable, all underlying tables must have beenvalidated in order to refresh this table. A table isvalidated when the first (for foreign keyconstraints), the second (for check constraints)and the fifth (for summary tables) fields in theCONST_CHECKED column of SYSCAT.TABLESare either ’Y’ or ’U’.

User Response: Check integrity for all its parenttables (or underlying tables if it is a summarytable) and re-execute this statement.

sqlcode: -1595

sqlstate: 55019

SQL1596N WITH EMPTY TABLE cannot bespecified for “<table-name>” thathas a dependent REFRESHIMMEDIATE summary table.

Explanation: The table “<table-name>” isreferenced in the query for at least one REFRESHIMMEDIATE summary table. The WITH EMPTYTABLE clause cannot be specified when alteringa table to ACTIVATE NOT LOGGED INITIALLYon a table with such a dependency.

The statement cannot be processed.

User Response: Remove the WITH EMPTYTABLE clause from the ALTER TABLE statement.

sqlcode: -1596

sqlstate: 42928

238 Message Reference, Volume 2

Page 247: Db2 SQL Errors

SQL1600 - SQL1699

SQL1601N The Database System Monitorinput parameter “<parameter>” isa null pointer.

Explanation: The user called one of theDatabase System Monitor APIs and provided anull pointer instead of a required parameter.

The command can not be processed.

User Response: The user should reissue thecommand with a valid parameter value.

SQL1602N An object type supplied in theinput data structure (sqlma) is notsupported.

Explanation: An object type specified in thevariable data area of the input data structure(sqlma) for Database System Monitor SnapshotAPI is not supported.

The command can not be processed.

User Response: Reissue the command using avalid object type. Refer to the Administrative APIReference and Application Development Guide forfurther information about valid object types.

SQL1603N The parameter “<parameter>” isnot specified in the input datastructure (sqlma).

Explanation: A required parameter is notspecified in the input data structure (sqlma) ofthe Database System Monitor Snapshot orEstimate Buffer Size API.

The command cannot be processed.

User Response: The user should reissue thecommand specifying a valid parameter value.

SQL1604N The parameter “<parameter>” isnot null terminated.

Explanation: A null character is expected at theend of the character string parameter.

The command can not be processed.

User Response: Add a null character at the endof the character string parameter and reissue thecommand.

SQL1605W The database “<db-alias>” is notactive.

Explanation: The Database System MonitorReset API was called for a specific database, butthe database was not active.

The command completed successfully but noaction was taken.

User Response: Verify that the database alias iscorrect and the database has been started.

SQL1606W The Database System Monitoroutput buffer is full.

Explanation: The Database System Monitoroutput buffer area is not large enough toaccommodate the returned data. Likely causesare intense system activity when the call wasmade, or in the case of a Database Monitor APIcall within a user application, the user allocateda buffer too small to contain the returned data.

The command completed successfully and datacollected prior to the buffer overflow is returnedin the user’s buffer.

User Response: The user should reissue thecommand, or in the case of a Database MonitorAPI call within a user application, allocate alarger buffer or reduce the amount ofinformation requested.

SQL1607N There is not enough workingmemory to execute the requestedDatabase System Monitorfunction.

Explanation: The database manager is out ofworking memory to process the Database SystemMonitor command.

The command can not be processed.

User Response: Reduce the buffer size in theinput parameter and reissue the command.

Chapter 2. SQL Messages 239

Page 248: Db2 SQL Errors

SQL1608W Two or more database aliasesspecified on input refer to thesame database.

Explanation: A Database System MonitorSnapshot or Estimate Buffer Size API call wasissued specifying the same request for two ormore database aliases in the sqlma input datastructure, and they point to the same database.

Database System Monitor executes successfully,but returns only one copy of the information inthe output buffer.

User Response: No action is required. However,the user should verify that the database aliasesspecified on input are correct if information ondifferent databases was expected.

SQL1609N The database “<db-alias>” is aremote database and cannot bemonitored.

Explanation: A Database System Monitor APIcall was issued specifying the database alias of aremote database. Database System Monitor doesnot support monitoring of remote databases.

The command cannot be processed.

User Response: The user should verify that thedatabase alias specified on input is correct, andreissue the command with the correct databasealias.

SQL1610N The Database System Monitorinput parameter “<parameter>” isinvalid.

Explanation: The user called one of theDatabase System Monitor APIs and specified aninvalid value for the specified parameter.

The command can not be processed.

User Response: The user should reissue thecommand with a valid parameter value.

SQL1611W No data was returned by DatabaseSystem Monitor.

Explanation: None of the monitoringinformation requested by the users was available

at the time the Database System Monitor API callwas issued. This can occur when a requesteddatabase or application is inactive, or when amonitoring group such as the Table group isturned OFF, and Table information is requested.

User Response: The command completedsuccessfully, but no data is returned to the user.

The user should make sure that the databases orapplications for which monitoring is desired areactive at the time the Database System MonitorAPI is called, or that the desired monitoringgroups are active.

SQL1612N The specified event monitor targetpath is invalid.

Explanation: The target path specified in theCREATE EVENT MONITOR statement is not avalid path name. The command could not beprocessed.

User Response: Resubmit the statement withthe correct event monitor target path.

sqlcode: -1612

sqlstate: 428A3

SQL1613N The specified event monitoroption is invalid.

Explanation: The option specified in theCREATE EVENT MONITOR statement is notvalid. Possible causes include:

v The specified MAXFILES, MAXFILESIZE, orBUFFERSIZE is too low.

v MAXFILESIZE is smaller than BUFFERSIZE.

v MAXFILESIZE NONE was specified withMAXFILES not equal to 1.

The command could not be processed.

User Response: Resubmit the statement withthe corrected event monitor options.

sqlcode: -1613

sqlstate: 428A4

240 Message Reference, Volume 2

Page 249: Db2 SQL Errors

SQL1614N An I/O error occurred whenactivating an event monitor.Reason code = ″<reason-code>″.

Explanation: An I/O error was detected whenan event monitor was activated. <reason-code> isone of the following:

1 Encountered an unknown event monitortarget type.

2 The Event monitor target path was notfound.

3 Access to event monitor target path wasdenied.

4 Event monitor target path is not thename of a pipe.

5 No process has opened the eventmonitor target pipe for reading.

6 Encountered an unexpected I/O error.

7 The target pipe was not opened inmessage mode. (This reason code isapplicable on OS/2 only.)

8 The target pipe buffer is too small. Theinbound pipe buffer must be at least4096 bytes in size. (This reason code isapplicable on OS/2 only.)

User Response: Where possible, fix the problemdescribed by the reason code, and resubmit theSET EVENT MONITOR statement.

sqlcode: -1614

sqlstate: 58030

SQL1615W The specified event monitor isalready in the requested state.

Explanation: An attempt was made to eitheractivate an already active event monitor, ordeactivate an already inactive event monitor. TheSET EVENT MONITOR statement was ignored.

User Response: No user response is required.

sqlcode: +1615

sqlstate: 01598

SQL1616N The limit on the maximumnumber of active event monitorshas already been reached.

Explanation: A maximum of 32 event monitorscan be active simultaneously per database. Thislimit has already been reached. The specifiedevent monitor cannot be activated.

User Response: If possible, deactivate one ofthe active event monitors and resubmit the SETEVENT MONITOR statement.

sqlcode: -1616

sqlstate: 54030

SQL1617N The specified event monitor hasalready reached its MAXFILESand MAXFILESIZE limit.

Explanation: The specified event monitor wascreated with a limit on the amount of data thatwould be allowed in the event monitor targetdirectory. This limit has already been reached.The specified event monitor cannot be activated.

User Response: If possible, delete some of theevent monitor data files from the target directory,and resubmit the SET EVENT MONITORstatement.

sqlcode: -1617

sqlstate: 54031

SQL1618N The target path of the specifiedevent monitor is in use by anotherevent monitor.

Explanation: The specified event monitor wascreated with the same target path as anotherevent monitor. This other event monitor wasactivated at least once, and has left .evt and/or.ctl files in the target path. These files may be inuse by application(s) that are reading the eventinformation they contain.

User Response: If the other event monitor iscurrently active, deactivate it. After ensuring noapplication(s) are using the files it created in thetarget path, remove the files. Then resubmit theSET EVENT MONITOR statement.

Chapter 2. SQL Messages 241

Page 250: Db2 SQL Errors

Alternatively, recreate the required eventmonitor, specifying a different target path, andresubmit the SET EVENT MONITOR statement.

sqlcode: -1618

sqlstate: 51026

SQL1619N Cannot DROP an active eventmonitor.

Explanation: The specified event monitor iscurrently active, and therefore cannot bedropped.

User Response: Deactivate the event monitorand resubmit the DROP EVENT MONITORstatement.

sqlcode: -1619

sqlstate: 55034

SQL1620N Unable to flush event monitor.Reason code “<rc>”.

Explanation: The event monitor could not beflushed. Possible reasons are:

1. The event monitor is not started.

2. The event monitor is running at a pre-version6 level of output, for which flush is notavailable.

User Response: Ensure that the event monitoris started. If the event monitor is running at apre-version 6 level of output, do not attempt toflush it.

sqlcode: -1620

sqlstate: 55034

SQL1621N The transaction in which thespecified event monitor wascreated has not yet beencommitted. The event monitorcannot be activated.

Explanation: An event monitor cannot beactivated until the transaction in which it wascreated has been committed.

User Response: Commit the transaction in

which the event monitor was created and thenreissue the SET EVENT MONITOR statement.

sqlcode: -1621

sqlstate: 55033

SQL1622N The STATE value specified in theSET EVENT MONITOR STATEstatement is invalid.

Explanation: The STATE value specified in theSET EVENT MONITOR STATE statement is notwithin the range of valid values, or the value isNULL as a result of an indicator variable.

Valid values for the Event Monitor State include:

0 to deactivate the event monitor

1 to activate the event monitor

The statement cannot be executed.

User Response: Correct the event monitor statevalue and/or any indicator variable and reissuethe statement.

sqlcode: -1622

sqlstate: 42815

SQL1623N The sqlmonsz or sqlmonss APIwas called with too many objectsspecified in the sqlma inputstructure.

Explanation: The limit imposed on the numberof objects that are permitted in the sqlma inputstructure has been exceeded.

User Response: Reduce the number of objectsin the sqlma parameter and try the call again.

SQL1624N All databases referenced by thesqlmonsz or sqlmonss API mustbe located at the same node.

Explanation: The sqlma parameter containedreferences to databases that reside on differentnodes.

User Response: Modify the sqlma parameter sothat all database objects reference the same node

242 Message Reference, Volume 2

Page 251: Db2 SQL Errors

and then try the call again.

SQL1625W The monitor is not able to convertfrom the code page ″<source>″ tothe code page ″<target>″. Thisconversion was attempted for datapertaining to type ″<type>″.

Explanation: Possible types are as follows:

1. statement text

2. dcs application

3. application

4. table

5. locks

6. table space

Conversion of data from the source code page tothe target code page is not supported. Thiscondition can occur under the followingconditions:

1. source and target code page combination isnot supported by the database manager.

2. source and target code page combination isnot supported by the operating systemcharacter conversion utility on the servernode.

This situation can occur when the monitor triesto convert data pertaining to a database whosecode page is incompatible to that of the monitorapplication.

User Response: Check your operating systemdocumentation for a list of supportedconversions and ensure that the appropriate onesare installed and accessible to the databasemanager.

If possible ensure that the database beingmonitored and the monitoring application are inthe same codepage.

SQL1626W Overflow occurred whileperforming conversion fromcodepage ″<source>″ to codepage″<target>″. The size of the targetarea was ″<max-len>″ ,the datapertained to type ″<type>″ andthe first eight characters are″<data>″.

Explanation: Possible types are as follows:

1. statement text

2. dcs application

3. application

4. table

5. locks

6. table space

The monitor is unable to convert the data due tospace constraints. The data is retained in itsoriginal form.

User Response: If possible ensure that thedatabase being monitored and the monitoringapplication are in the same codepage.

SQL1627W A snapshot api request was madeat the self-describing datastreamlevel, but the server was only ableto return a snapshot of the fixedsize structure format.

Explanation: Although the application issuingthe snapshot request made it at theSQLM_DBMON_VERSION6 or later level, theserver returning the snapshot returned adownlevel view of the data.

User Response: In the self describing dataformat for snapshot (DB2 version 6 and later),collected information, including the server level,is returned as part of the snapshot datastream. Inthe pre-version 6 levels of DB2, the snapshotcollected information is returned in ansqlm_collected structure. You must use thesqlm_collected structure, and the old data streamprocessing method to parse this snapshotdatastream.

Chapter 2. SQL Messages 243

Page 252: Db2 SQL Errors

SQL1628W A remote get switches operationreturned partial results becausethe output buffer is full. Toretrieve the full results, use aminimum buffer size of “<size>”bytes.

Explanation: The output buffer provided wasnot large enough to return all the switch dataavailable. The monitor returned as much data aspossible using the given output buffer.

User Response: Allocate a larger data bufferand re-issue the switch request.

SQL1629W A remote snapshot operationfailed on node or nodes“<node-list>”, with reason code orcodes “<reason-list>”.

Explanation: Some type of failure occurredduring an operation on a remote node for reason<reason-code>, which is one of the following:

1 FCM was unable to communicate withthe target node, due to a node failure orcommunications error.

2 The snapshot operation failed tocomplete on the target node. Please seethe db2diag.log for the specific sqlca.

User Response: If the cause of the error was anode failure, or communication error, you willneed to resolve the communication error, orrestart the node that failed to correct the error.

If the error was due to a snapshot operationfailure on a remote node, see the db2diag.log forthe sqlca from the failed operation, and refer tothe instructions for that code to correct theproblem.

SQL1650N The function invoked is no longersupported.

Explanation: The user has attempted to call anAPI that is no longer supported in this version ofthe database manager.

User Response: The function required may besupported by a different API call. Check in theAdministrative API Reference and Application

Development Guide to determine if the function issupported through a different API call.

SQL1651N The request cannot be executedbecause the DB2 server versiondoes not support thisfunctionality.

Explanation: Some new functionality is notsupported against older DB2 server versions.Another possible cause of this error could be therequest referenced objects with qualifiers oflength that exceeds the support of the serverversion.

User Response: Execute the request against aDB2 server where the latest DB2 server versionhas been installed, or upgrade the server to thelatest DB2 server version.

SQL1652N File I/O error occurred.

Explanation: Error occurred either opening,reading, writing, or closing a file.

User Response: Check the db2diag.log fordetails. Also, check for disk full conditions, filepermissions, and operating system errors.

SQL1653N An invalid profile path wasspecified.

Explanation: A full path to a file where serverinformation should be generated must bespecified.

User Response: Ensure that the profile pathspecified is correct and not null.

SQL1654N An instance path error wasencountered.

Explanation: The instance path could not bereturned.

User Response: Check that the DB2INSTANCEpath was specified correctly. Check that thecomplete path length specified is notapproaching the maximum supported by theoperating system.

244 Message Reference, Volume 2

Page 253: Db2 SQL Errors

SQL1660N The Generator at the server,which is used by Discovery togather server information, hasfailed.

Explanation: A server system failure hasoccurred.

User Response: Report the failure to your DB2server administrator. More details of the failurecan be found in the server’s db2diag.log file.

SQL1670N The discover type specified in theDISCOVER database managerconfiguration parameter indicatesdiscovery is disabled.

Explanation: DISCOVER = DISABLE isconfigured in the database managerconfiguration file.

User Response: If DISCOVER functionality isrequired, change the discover type to KNOWNor SEARCH.

SQL1671N The search discovery requestfailed. Check the db2diag.log forfurther details.

Explanation: The search discovery requestfailed for one of the following reasons:

1. Initialization failed(sqleCommonInitializationForAPIs)

2. Failed to retrieve the client instance path(sqloinstancepath)

3. Failed to open the output file (sqlofopn)

4. Failed to write to output file (sqlofprt)

5. Failed to get memory (sqlogmblk)

6. Failed to retrieve database managerconfiguration (sqlfcsys)

7. NetBIOS call failed

8. DB2 internal system function failed (sqlogpid,sqlogmt)

Check the db2diag.log for details.

User Response:

1. If initialization fails, try re-booting themachine or re-installing the product.

2. If there was an instance path failure, checkthe DB2INSTANCE value to ensure it iscorrectly set.

3. If the open or write to file failed, check thatyou have access to open and write a file tothe <sqllib path>\<instance>\tmp directoryon Intel machines, or the <instancepath>/sqllib/tmp directory on UNIXmachines.

4. If get memory failed, check the availablememory on your machine.

5. If retrieving the DBM configuration failed, tryre-booting the machine or re-installing theproduct.

6. If a NetBIOS call failed:

v If Add Name failed with a return code of13, check that the nname configured in theDBM configuration was not used toconfigure another DB2 client/server on thenetwork.

v Check that NetBIOS was installed andconfigured properly, and is functioningcorrectly.

v Check your network for problems.

7. If a DB2 internal system function failed,check that the operating system functions onyour machine are functioning correctly.

DB2 Service can provide details about the errorcodes returned by the above functions andwritten to the db2diag.log.

SQL1673N The address list specified as inputto the discover interface isinvalid.

Explanation: The application program used aninvalid input address list pointer. The address listpoints to nothing.

User Response: Ensure that a valid inputaddress list pointer is specified in the applicationprogram, and that it is not null.

Chapter 2. SQL Messages 245

Page 254: Db2 SQL Errors

SQL1674N The server address specified asinput to the discover interface isinvalid.

Explanation: The application program used aninvalid input server address pointer. The serveraddress points to nothing.

User Response: Ensure that a valid input serveraddress is specified in the application program,and that it is not null.

SQL1675N Discovery is only allowed againstDB2 administration servers. Thecommunications informationprovided does not access anadministration server.

Explanation: A KNOWN discovery request wasissued against a DB2 server that is not a DB2

administration server. The communicationsinformation specified is not correct.

User Response: Verify that DB2ADMINSERVERis set on the DB2 server instance you areaccessing. This indicates that the server instanceis a DB2 administration server. Retry theKNOWN discovery request with the correctcommunications information.

SQL1700 - SQL1799

SQL1700N The reserved schema name″<name>″ was found in thedatabase during databasemigration.

Explanation: The database contains one or moredatabase objects which use the schema name″<name>″ that is reserved by the currentDatabase Manager.

The command cannot be processed.

User Response: Ensure that all the databaseobjects that use the reserved schema name aredropped and recreate the objects using a differentschema name. This correction must be made inthe release of Database Manager where thedatabase was originally created. Ensure that noreserved schema names are in use beforeattempting the migration again. Then, resubmitthe database migration command under thecurrent release of Database Manager.

SQL1701N The database cannot be migratedbecause the last session wasabnormally terminated.

Explanation: The last database operation wasabnormally terminated (for example, a power

failure) under the previous database manager.Database migration cannot be done until thedatabase has been restarted.

The command cannot be processed.

User Response: The database must be restarted.You must issue the RESTART DATABASEcommand using the release of Database Managerwhere the database was last accessed. Then,resubmit the database migration command underthe current release of Database Manager.

SQL1702W The “<protocol>” connectionmanagers have startedsuccessfully.

User Response: No action required.

SQL1703W The db2event directory could notbe created during databasemigration.

Explanation: The database was migratedsuccessfully but the db2event directory could notbe created.

This is a warning only.

246 Message Reference, Volume 2

Page 255: Db2 SQL Errors

User Response: The db2event directory must becreated if the event monitor is to be used. Thedb2event directory must be created in thedatabase directory where the migrated databaseresides. The database directory of the migrateddatabase can be determined by invoking LISTDATABASE DIRECTORY.

SQL1704N Database migration failed. Reasoncode ″<reason-code>″.

Explanation: Database migration failed. Thereason codes are as follows:

1 an invalid schema name was found.

2 database is not migrateable. Thedatabase could be in one of thefollowing states:

v backup pending state

v roll-forward pending state

v transaction inconsistent state.

3 database logs are full.

4 insufficient disk space.

5 cannot update database configurationfile.

6 failed to relocate database.

7 failed to access the databasesubdirectory or one of the database files.

8 failed to update database container tag.

9 table space access is not allowed.

10 an invalid type name was found.

11 structured type and function have thesame name.

12 structured type/table has an invalidattribute.

13 structured type encountered.

User Response: Possible solutions based on thereason code are:

1 The reserved schema names are:SYSIBM, SYSCAT, SYSSTAT, andSYSFUN. Ensure that all the databaseobjects that use one or more of these

schema names are dropped and recreatethe objects using a different schemaname. This correction must be made inthe release of database manager in useprior to the current release. Resubmitthe database migration command underthe current release.

2 Correct the database state by going backto release of database manager in useprior to the current release and performany necessary corrective action to thedatabase. Resubmit the databasemigration command under the currentrelease.

3 Increase the database configurationparameters logfilsiz or logprimary to alarger value. Resubmit the databasemigration command.

4 Ensure that there is sufficient disk spaceand resubmit the database migrationcommand.

5 There was a problem in updating thedatabase configuration file. Ensure thatthe database configuration file is notbeing held exculsively by any users andis updateable. Resubmit the databasemigration command. If the problempersists, inform your IBM servicerepresentatives.

6 Restore the database from the databasebackup.

7 Restore the database from the databasebackup.

8 Resubmit the database migrationcommand. If the problem persists,contact your IBM service representative.

9 Correct the table space by going back tothe release of the database manager inuse prior to the current release. Refer tomessage SQL0290N for the suggestedactions to take to correct the table space.

10 The type name is reserved by thesystem. Ensure that the type anddatabase objects that use the type aredropped and recreated using a

Chapter 2. SQL Messages 247

Page 256: Db2 SQL Errors

non-reserved type name. This correctionmust be made in the release of databasemanager in use prior to the currentrelease. Resubmit the databasemigration command under the currentrelease.

11 A structured type and function (with noarguments) belonging to the sameschema cannot have the same name.Ensure that the type or function anddatabase objects that use the type orfunction are dropped and recreatedusing a different name. This correctionmust be made in the release of databasemanager in use prior to the currentrelease. Resubmit the databasemigration command under the currentrelease.

12 Attribute may have defaults, may bedefined as long varchar or longvargraphic, or include null constraints.The attribute has to be dropped andadded back to the type according to theattribute definition rules in the CREATETYPE statement.

13 Restore the database from the databasebackup. Drop all structured types (andrelated objects, e.g., typed tables, typedviews). Resubmit the database migrationcommand.

SQL1705W Unable to update a databasedirectory entry to the currentrelease level.

Explanation: One or more database aliasescould not be updated in the database directoryfor a database which has just been migrated froma previous release.

User Response: Uncatalog the database alias(es)for the migrated database and re-catalog thedatabase alias using the same information.

SQL1706W At least one non local databasewas detected in the node directoryfor this instance during word sizeinstance migration.

Explanation: While performing word sizeinstance migration, at least one database notcreated under this instance was encountered.Such databases must have the same word size asthis instance for migration to completesuccessfully.

User Response: Ensure that all databasescataloged at the instance have the same wordsize.

SQL1707N Unable to migrate the instanceword size.

Explanation: There was an error whileattempting to migrate the word size of theinstance. Please contact your IBM servicerepresentative.

User Response: Contact your IBM servicerepresentative.

SQL1708W Database migration completedwith the following warning code:“<warning-code>”.

Explanation: Database migration completedwith a warning. The warning codes are asfollows:

1 One or more nodes failed to migrate.

User Response: Possible solution based on thewarning codes:

1 Check the db2diag.log file to determinewhich node failed to migrate. Re-issuethe database migration command onthat node.

248 Message Reference, Volume 2

Page 257: Db2 SQL Errors

SQL1749N The NOT LOGGED INITIALLYattribute cannot be activated fortable “<table-name>” since it wasnot created with NOT LOGGEDINITIALLY.

Explanation: The table “<table-name>” was notcreated with the NOT LOGGED INITIALLYattribute specified and therefore this attributecannot be activated using ALTER TABLE.

The statement cannot be processed.

User Response: Remove the NOT LOGGEDINITIALLY clause from the ALTER TABLEstatement.

sqlcode: -1749

sqlstate: 429AA

SQL1750N Foreign keys cannot reference aparent key table “<table-name>”that was created with the NOTLOGGED INITIALLY clause.

Explanation: A table that was created with theNOT LOGGED INITIALLY clause cannot bereferenced by a foreign key.

User Response: Remove the foreign keyreference to “<table-name>” in the ALTER orCREATE TABLE statement.

sqlcode: -1750

sqlstate: 429A0

SQL1751N The resulting nodegroup wouldnot contain any nodes that can beused in a partition map.

Explanation: A nodegroup must contain at leastone node that can be used in a partition map. Ifa node is added to a nodegroup WITHOUTTABLESPACES, it cannot be included in thepartition map because there are no containers forthe table spaces defined on the nodegroup. If anode is added LIKE another node and the othernode does not have containers for all tablespaces on the nodegroup then neither node canbe included in the partition map.

User Response: Do not drop all the nodes in

the nodegroup without adding at least one node.If tablespaces are already defined on thenodegroup but there are no tables, ensure that atleast one node has containers for all the tablespaces.

sqlcode: -1751

sqlstate: 428C0

SQL1752N The table space cannot be createdin the nodegroup “<ngname>”.

Explanation: The nodegroup IBMTEMPGROUPcan be specified if and only if the table space is asystem temporary table space.

User Response: For system temporary tablespaces, specify nodegroup IBMTEMPGROUP. Forother table space types, specify a nodegroupother than IBMTEMPGROUP.

sqlcode: -1752

sqlstate: 429A1

SQL1753N Node “<node-number>” does nothave containers for all the systemtemporary table spaces defined inthe nodegroup IBMTEMPGROUP.

Explanation: A node must have containersdefined for all the system temporary table spacesdefined in the nodegroup IBMTEMPGROUP forthis database before it can be included in anodegroup.

User Response: Issue the ALTER TABLESPACEstatement to add containers on every node forevery system temporary table space in thedatabase.

sqlcode: -1753

sqlstate: 57052

SQL1754N The index table space or longtable space is not in the samenodegroup as the primary tablespace.

Explanation: All the table spaces specified inthe CREATE TABLE statement must belong tothe same nodegroup.

Chapter 2. SQL Messages 249

Page 258: Db2 SQL Errors

User Response: Make sure all the table spacesspecified in the CREATE TABLE statementbelong to the same nodegroup.

sqlcode: -1754

sqlstate: 42838

SQL1755N Node “<node-number>” does nothave containers for all the tablespaces defined in the nodegroup“<ngname>”.

Explanation: A node must have containersdefined for all the table spaces defined in anodegroup before that node can be included in aredistribution operation of a nodegroup.

User Response: Issue the ALTER TABLESPACEstatement to add containers on the node for allthe table spaces defined in the nodegroup.

SQL1756N More than one clause specifiescontainers without the ONNODES clause.

Explanation: For the CREATE TABLESPACE,the USING clause without the ON NODESclause can only be specified once.

For the ALTER TABLESPACE, the ADD clausewithout the ON NODES clause can only bespecified once.

The statement was not processed.

User Response: Correct the statement andreissue it.

sqlcode: -1756

sqlstate: 428B1

SQL1757N A USING clause without an ONNODES clause is missing.

Explanation: In CREATE TABLESPACEstatement, every USING clause specifies the ONNODES clause. However not all the nodes in thenodegroup are included, and therefore not allnodes in the nodegroup have containers.

The statement is not processed.

User Response: Ensure that the USING clausewithout the ON NODES clause is specified orthat each node in the nodegroup is includedonce in an ON NODES clause.

sqlcode: -1757

sqlstate: 428B1

SQL1758W The containers not designated forspecific nodes are not used by thetable space on any node.

Explanation: The ALTER TABLESPACE andCREATE TABLESPACE statement includescontainer specification for all the nodes in thenodegroup. The specification of the containersthat is not followed by an ON NODES clause isredundant and has been ignored.

The statement has been processed.

User Response: If the containers are needed onsome of the nodes, issue an ALTERTABLESPACE statement to add the necessarycontainers.

sqlcode: -1758

sqlstate: 01589

SQL1759W Redistribute nodegroup isrequired to change datapartitioning for objects innodegroup “<nodegroup-name>”to include some added nodes orexclude some dropped nodes.

Explanation: This warning indicates that achange being made using the ALTERNODEGROUP or ALTER TABLESPACEstatements has not caused the partitioning mapfor the nodegroup to be changed. Thepartitioning map for a nodegroup is onlychanged immediately by these statements if thereare no tables defined using any table spacedefined in the nodegroup or the node beingdropped is not in the partitioning map.

This warning is issued in the following cases:

v One or more nodes are added using ALTERNODEGROUP ADD NODE

250 Message Reference, Volume 2

Page 259: Db2 SQL Errors

v One or more nodes are dropped using ALTERNODEGROUP DROP NODE

v Containers are added for table space and nofurther containers are required for a node tobe used.

For all of these cases, a table is already definedusing a table space in the nodegroup.

User Response: If you want the node includedor excluded for data partitioning then issue theREDISTRIBUTE NODEGROUP command or API.Another alternative is to drop all tables that usetable spaces in the nodegroup.

sqlcode: +1759

sqlstate: 01618

SQL1760N The CREATE statement for storedprocedure “<procedure-name>”must have a valid LANGUAGEclause, EXTERNAL clause andPARAMETER STYLE clause.

Explanation: A required clause is missing in theCREATE for procedure “<procedure-name>”.LANGUAGE, EXTERNAL and PARAMETERSTYLE must be specified.

User Response: Add the missing clause, thentry again.

sqlcode: -1760

sqlstate: 42601

SQL1761N The nodegroup “<ngname>” isnot defined for the buffer pool“<bpname>”.

Explanation: The nodegroup for the table spacehas not been defined for the buffer pool. Thetable space cannot be created or altered to usethis combination of nodegroup and buffer pool.

The statement cannot be processed.

User Response: The possible actions are:

v specify a buffer pool that has defined thenodegroup for the table space

v alter the buffer pool to add the nodegroup ofthe table space

v If CREATE TABLESPACE, specify a nodegroupthat is defined for the buffer pool.

sqlcode: -1761

sqlstate: 42735

SQL1762N Unable to connect to databasebecause there is not enough spaceto allocate active log files.

Explanation: There is not enough disk space toallocate active log files.

User Response: Reduce values forLOGPRIMARY and/or LOGFILSIZ databaseconfiguartion parameters so that a smaller set ofactive log files are used.

SQL1763N There are multiple containeractions in the ALTERTABLESPACE statement.

Explanation: There is more than one type ofcontainer action (ADD, EXTEND, or RESIZE) inan ALTER TABLESPACE statement. You can onlyspecify one type of action within a single ALTERTABLESPACE statement. However, you canspecify the same action multiple times overdifferent containers within the statement.

User Response: Specify only one type ofcontainer action in the ALTER TABLESPACEstatement.

sqlcode: -1763

sqlstate: 429BC

SQL1764N Specified size for a RESIZE actionin an ALTER TABLESPACEstatement is smaller than thecurrent size of the table spacecontainer.

Explanation: The size specified in an ALTERTABLESPACE statement using the RESIZE actionis smaller than the current size of the table spacecontainer. You can only increase the size of acontainer.

User Response: Specify a size that is larger than

Chapter 2. SQL Messages 251

Page 260: Db2 SQL Errors

the current size value of the table spacecontainer.

sqlcode: -1764

sqlstate: 560B0

SQL1800 - SQL1899

SQL1800N An invalid pointer to structuresqle_request_info was passed tothe catalog admin command/api.

Explanation: The pointer to structuresqle_request_info passed as a parameter to thecatalog admin command/api was invalid. ForClient Configuration Assistance request thispointer must not be NULL.

User Response: Specify a valid pointer tosqle_request_info and re-submit the command.

SQL1801N Invalid request type.

Explanation: The specified request type is notsupported for this command.

User Response: Ensure that the request type isone of the following supported request types:

1. SQLE_CCA_REQUEST - CCA catalog noderequest for catalog and open scan command

2. SQLE_DAS_REQUEST - DAS catalog noderequest for catalog and open scan command

3. SQLE_CND_REQUEST - Open scancommand for CCA and DAS catalog entries

SQL1802N No entry belongs to the requesttype.

Explanation: There is no entry in the nodedirectory that is catalogued by the given requesttype.

User Response: Catalog an entry with the samerequest type and re-submit the command.

SQL1803N The requested operation cannotbe executed in ″No Package Lock″mode. An affected package is″<package-name>″.

Explanation: The database manager is currentlyoperating in ″No Package Lock″ mode. This

mode has been activated by setting theDB2_NO_PKG_LOCK registry environmentvariable to ″ON″.

In this mode, the following classes of operationsare prevented from being executed because oftheir impact on packages:

v An operation that invalidates packages.

v An operation that makes a packageinoperative.

v Binding, rebinding (explicitly or implicitly) ordropping a package.

Since the requested operation would affect thepackage ″<package-name>″ in one of these ways,the operation is disallowed.

User Response: Do not attempt disallowedoperations in ″No Package Lock″ mode. In orderto execute the requested operation, ″No PackageLock″ mode must be exited. This is accomplishedby unsetting the DB2_NO_PKG_LOCKenvironment registry variable. In order for thevariable change to take effect, that databasemanager must be stopped and restarted.

sqlcode: -1803

sqlstate: 57056

SQL1816N Wrapper “<wrapper-name>”cannot be used to access the“<type-or-version>” of data source(“<server-type>”“<server-version>”) that you aretrying to define to the federateddatabase.

Explanation: The wrapper that you specifieddoes not support the type or version of datasource that you want to define.

User Response: Consult the documentation tofind out which wrapper supports the type andversion of data source that you want to define.Make sure that the wrapper has been registered

252 Message Reference, Volume 2

Page 261: Db2 SQL Errors

to the federated database by the CREATEWRAPPER statement. Then recode the CREATESERVER statement so that it specifies thiswrapper, and run the CREATE SERVERstatement again.

sqlcode: -1816

sqlstate: 560AC

SQL1817N The CREATE SERVER statementdoes not identify the“<type-or-version>” of data sourcethat you want defined to thefederated database.

Explanation: When a CREATE SERVERstatement references the wrapper that youspecified, it must also identify the“<type-or-version>” of data source that is to bedefined to the federated database.

User Response: In the CREATE SERVERstatement, code the “<type-or-version>” optionso that it designates the “<type-or-version>” ofdata source being defined. Then run the CREATESERVER statement again.

sqlcode: -1817

sqlstate: 428EU

SQL1818N The ALTER SERVER statementthat you submitted could not beprocessed.

Explanation: The ALTER SERVER statement ispreceded in a unit of work by a SELECTstatement that references a nickname for a tableor view within the data source (or category ofdata sources) that the ALTER SERVER statementreferences.

User Response: Let the unit of work finish; thenresubmit the ALTER SERVER statement.

sqlcode: -1818

sqlstate: 55007

SQL1819N The DROP SERVER statementthat you submitted could not beprocessed.

Explanation: The DROP SERVER statement ispreceded in a unit of work by a SELECTstatement that references a nickname for a tableor view within the data source (or category ofdata sources) that the DROP SERVER statementreferences.

User Response: Let the unit of work finish; thenresubmit the DROP SERVER statement.

sqlcode: -1819

sqlstate: 55006

SQL1820N Action on the LOB value failed.Reason code = “<reason-code>”.

Explanation: The possible reasons codes are:

1. Not enough buffer space to store the LOBvalue.

2. The remote data source does not support thecurrent action on LOB datatype.

3. Some internal programming limitationexceeded.

User Response: Reduce the size of the LOB orreplace the function which is being applied onthe LOB datatype. As a last resort, remove theLOB datatype from the statement.

sqlcode: -1820

sqlstate: 560A0

SQL1821W The LOB value retrieved mayhave changed.

Explanation: The LOB value was evaluated on adeferred retrieval basis. The LOB value may havechanged between the time it was first accessedand when it was actually retrieved.

User Response: Set the ″deferred_lob_retrieval″to ″N″ in SYSSERVEROPTIONS, resubmit yourquery, or ignore the warning.

sqlcode: +1821

sqlstate: 01621

Chapter 2. SQL Messages 253

Page 262: Db2 SQL Errors

SQL1822N Unexpected error code ″<errorcode>″ received from data source″<data source name>″. Associatedtext and tokens are ″<tokens>″.

Explanation: While referencing a data source,the federated server received an unexpectederror code from the data source that does notmap to a DB2 equivalent.

Possible error codes include:

v 4901 Trying to open more than 15 cursors

v 4902 Row size exceeds 32K limit

User Response: Identify and correct the rootcause of the problem by locating the appropriatemessage text and corrective action for thespecified error at the data source.

SQL1823N No data type mapping exists fordata type ″<data type name>″from server ″<server name>″.

Explanation: An attempt was made to create anickname for an object. One or more columns ofthat object are of a type currently unknown tothe federated server. The name of (one of) theunknown type(s) is listed in the message.

User Response: Create a mapping for thespecified type name on the specified server usingthe CREATE TYPE MAPPING statement.

sqlcode: -1823

sqlstate: 428C5

SQL1824W Some base tables in the operandsof this UNION ALL may be thesame table.

Explanation: A nickname can refer to a remotebase table, a remote view, a remotealias/synonym, or a remote nickname. If twooperands of a UNION ALL view refer todifferent nicknames, they may potentially bepointing to the same table (if not both of themare known to be remote base tables). Thismessage is issued to warn the user thatpotentially one remote base table can getupdated/deleted twice via updates/deletesthrough two operands.

User Response: Verify if all operands point todifferent remote tables. If two operands point tothe same remote base table, consider issuing arollback to reverse the update/delete operation.

sqlcode: +1824

sqlstate: 01620

SQL1825N This SQL statement cannot behandled in a federatedenvironment.

Explanation: Due to some limitation, thecurrent SQL statement cannot be handled in afederated environment. Possible limitationsinclude:

v A cursor update/delete statement involves arefetch of a column into the federated serverthat is not being fetched in the cursor selectstatement.

v Some internal programming limitation isexceeded.

User Response: Based on the cause:

v If this is the cursor update/delete statementthat involves refetch of a column not beingfetched in the cursor select statement, modifythe cursor select statement so that the neededcolumn is fetched.

v If some internal programming limitation isexceeded, try to simplify or rewrite the part ofthe statement that seems complex, e.g.expression.

sqlcode: -1825

sqlstate: 429A9

SQL1826N An invalid value “<value>” wasspecified for column“<column-name>” in a systemcatalog object “<object-name>”.

Explanation: An invalid value “<value>” wasspecified for a column “<column-name>” in asystem catalog object “<object-name>”.

The statement cannot be processed.

User Response: Refer to the SQL Reference forvalid values for the specified column in the

254 Message Reference, Volume 2

Page 263: Db2 SQL Errors

specified system catalog object. Correct thestatement and reissue it.

sqlcode: -1826

sqlstate: 23521

SQL1827N No user mapping is defined fromlocal authorization ID″<auth-ID>″ to server″<server-name>″.

Explanation: An attempt was made to drop oralter a user mapping that is not defined.

User Response: If it is an ALTER USERMAPPING statement, first create a user mappingusing the CREATE USER MAPPING statement.Then, alter the user mapping. If it is a DROPUSER MAPPING statement, no extra action isneeded because the user mapping does not exist.

sqlcode: -1827

sqlstate: 42704

SQL1828N No server option ″<option-name>″is defined for remote server″<server-name>″ or for a group ofremote servers: server type″<server-type>″, version″<server-version>″, and protocol″<server-protocol>″.

Explanation: An attempt was made to drop oralter a server option that is not defined.

User Response: If it is an ALTER SERVERstatement, first create a server option using theCREATE SERVER statement. Then, alter theserver option. If it is a DROP SERVER statement,no extra action is needed because the serveroption for the servers does not exist.

sqlcode: -1828

sqlstate: 42704

SQL1830N RETURNS clause must bespecified prior to a predicatespecification using theEXPRESSION AS clause.

Explanation: The RETURNS clause is notspecified before the PREDICATE clause thatincludes the EXPRESSION AS clause. TheRETURNS clause may have been included afterthe predicate specification or may be missing.

The statement cannot be processed.

User Response: Specify the CREATEFUNCTION statement with the RESULTS clauseprior to the PREDICATE clause.

sqlcode: -1830

sqlstate: 42627

SQL1831N Table statistics for a subtable“<subtable-name>” cannot beupdated.

Explanation: The statement attempts to updatethe statistics values of NPAGES, FPAGES, orOVERFLOW, for table “<subtable-name>”, that isdefined as a subtable. For typed tables, thesestatistics can only be updated using the roottable of the table hierarchy.

The statement cannot be processed.

User Response: Update the catalog statistics forthe root table of the table hierarchy instead of thesubtable.

sqlcode: -1831

sqlstate: 428DY

SQL1832N The routine “<routine-name>”cannot be used to define a filterbecause it is defined as an SQLfunction.

Explanation: The routine (function or method)“<routine-name>” is specified in a FILTER clausefor a user defined predicate specification or anindex extension definition. The routine can notbe defined with LANGUAGE SQL.

The statement cannot be processed.

Chapter 2. SQL Messages 255

Page 264: Db2 SQL Errors

User Response: Specify a routine that is notdefined with LANGUAGE SQL.

sqlcode: -1832

sqlstate: 429B4

SQL1881N “<option-name>” is not a valid“<option-type>” option for“<object-name>”.

Explanation: The specified option might notexist, or it might not be valid for the particulardata source, data source type, or database objectthat you’re working with.

User Response: Consult the SQL Reference toverify the option that you want. Then revise andresubmit the statement that you want to run.

sqlcode: -1881

sqlstate: 428EE

SQL1882N The “<option-type>” option“<option-name>” cannot be set to“<option-value>” for“<object-name>”.

Explanation: The value that you specified eitherlacks the proper delimiters or is invalid.

User Response: Consult the SQL Reference toverify the value that you want. Then revise andresubmit the statement that you want to run. Besure to delimit the value in single quotes.

sqlcode: -1882

sqlstate: 428EF

SQL1883N “<option-name>” is a required“<option-type>” option for“<object-name>”.

Explanation: You did not specify an option thatDB2 requires in order to process the statementthat you submitted.

User Response: Consult the documentation tofind out the options that are required for thestatement that you want to run. Then revise andresubmit this statement.

sqlcode: -1883

sqlstate: 428EG

SQL1884N You specified “<option-name>” (a“<option-type>” option) morethan once.

Explanation: You entered a statement thatreferences the same option multiple times.

User Response: Recode the statement so that itreferences the option that you want only once.Then resubmit the statement.

sqlcode: -1884

sqlstate: 42853

SQL1885N The “<option-type>” option“<option-name>” is alreadydefined.

Explanation: You entered a value for an optionthat already has a value.

User Response: Query the appropriate catalogview to determine what value the option iscurrently set to. If this value differs from the onethat you want, recode the statement so that theSET keyword follows the OPTIONS keyword. Tofind out what catalog view contains the valuesfor this option, consult the SQL Reference.

sqlcode: -1885

sqlstate: 428EH

SQL1886N The “<operation-type>” operationis not valid because the“<option-type>” option“<option-name>” has not beendefined.

Explanation: You tried to change or delete avalue for an option that has not been defined forthe data source, data source type, or databaseobject that you’re working with.

User Response: If you specified SET in thestatement that you want to run, recode thestatement, either omitting SET or replacing itwith ADD (ADD is the default). Then resubmitthe statement. If you specified DROP, do nothing.

256 Message Reference, Volume 2

Page 265: Db2 SQL Errors

sqlcode: -1886

sqlstate: 428EJ

SQL1887N SPECIFICATION ONLY clauserequired.

Explanation: A CREATE INDEX statement for anickname must have a SPECIFICATION ONLYclause.

User Response: Add the SPECIFICATIONONLY clause and then resubmit the statement.

sqlcode: -1887

sqlstate: 42601

SQL1900 - SQL1999

SQL1900N The command completedsuccessfully.

Explanation: The command line utilitysuccessfully completed the command.

User Response: No action is required.

SQL1901N The syntax of the command is notcorrect.

Explanation: The command line utility couldnot process the command.

User Response: Correct and resubmit thecommand.

SQL2000 - SQL2099

SQL2000N The drive specified in the utilitycommand is not a valid diskettedrive or fixed disk.

Explanation: The input or output drivespecified in the utility command does not exist.

The utility stops processing.

User Response: Resubmit the utility commandwith the correct drive specifier.

SQL2001N The utility was interrupted. Theoutput data may be incomplete.

Explanation: The user may have pressed theinterrupt key sequence, or had called the utilitywith a terminate caller action.

This message can also be returned by DB2Enterprise - Extended Edition during a backupor restore operation on a database node whenthe database catalog node is down.

The utility stops processing.

User Response: Restart the application orreissue the command, if needed. The output datafrom the interrupted command may beincomplete, and should not be used.

SQL2002N The specified database utilitycommand is not valid for remotedatabases. The database specifiedin the command must reside onyour local workstation.

Explanation: The database utility command isonly valid for local databases.

The utility stops processing.

User Response: Run the utility locally.

SQL2003C A system error occurred.

Explanation: An operating system erroroccurred. The return code can be found in the

Chapter 2. SQL Messages 257

Page 266: Db2 SQL Errors

SQLERRD[0] field of the SQLCA.

The utility stops processing.

User Response: Look at the error return code inthe SQLERRD[0] field of the SQLCA. Correct theerror, if possible, and resubmit the command.

SQL2004N An SQL error “<sqlcode>”occurred during processing.

Explanation: The utility was using an SQLstatement when an error occurred.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL2005C An I/O error occurred during aread operation. The data may beincomplete.

Explanation: Incomplete data was read duringan I/O operation.

The utility stops processing.

User Response: Determine if the I/O error canbe corrected and resubmit the command.

SQL2006C An I/O error occurred during awrite operation. The data may beincomplete.

Explanation: Incomplete data was writtenduring an I/O operation.

The utility stops processing.

User Response: Determine if the I/O error canbe corrected and resubmit the command.

SQL2007N Specified buffersize of“<buffersize>” 4K buffers is toosmall for “<pagesize>” page sizeobject.

Explanation: To backup a “<pagesize>” pagesize database object one needs a buffer largerthan the page size. When backing up a database

the data is first copied to an internal buffer. Datais then written from this buffer to the backupmedia when the buffer is full. The buffersize of“<buffersize>” 4K buffers that was specified isinadequate.

User Response: Use a larger buffersize.

SQL2008N The callerac parameter is notwithin valid range or therequested action is out ofsequence.

Explanation: Either the callerac parameter valueis not one of the acceptable values or therequested action is out of sequence.

The command cannot be processed.

User Response: Each utility has its own list ofvalid callerac values. Check the ApplicationDevelopment Guide for the valid values for thecallerac for the utility in use. Resubmit thecommand with a valid callerac parameter.

SQL2009C There is not enough memoryavailable to run the utility.

Explanation: More memory is needed to runthe specified utility.

The command cannot be processed.

User Response: Possible actions include:

v Verify that your system has sufficient real andvirtual memory.

v Remove background processes.

v Increase the DBHEAP database configurationparameter.

SQL2010N The utility encountered an error″<error>″ while connecting to thedatabase.

Explanation: The utility could not connect tothe database.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

258 Message Reference, Volume 2

Page 267: Db2 SQL Errors

SQL2011N The utility encountered an error″<error>″ while disconnectingfrom the database.

Explanation: The utility could not disconnectfrom the database.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

SQL2012N Interrupt handling could not beenabled.

Explanation: The utility could not enableinterrupt handling. The actual return code can befound in the SQLERRD[0] field of the SQLCA.

The utility stops processing.

User Response: Look at the error return code inthe SQLERRD[0] field of the SQLCA. Correct theerror, if possible, and resubmit the command.

SQL2013N The utility could not access thedatabase directory. Error “<error>”was returned.

Explanation: An error occurred while the utilitywas accessing the database directory.

The utility stops processing.

User Response: If the path in the databaseparameter is not the database directory path,resubmit the command with the correct path.Otherwise, look at the error number in themessage for more information. Make changesand resubmit the command.

SQL2014N A database environment erroroccurred.

Explanation: The utility received an error froma database environment command. The databasemanager configuration file and the databaseconfiguration file may contain incompatiblevalues.

The utility stops processing.

User Response: Check the database manager

configuration file and the database configurationfile for inconsistent values. Resubmit thecommand.

SQL2015N The database parameter is notvalid. The database name is toolong, it was not specified, or theaddress of the name is not valid.

Explanation: The database name is required. Itmust contain 1 to 8 characters and the charactersmust be chosen from the database manager basecharacter set. The name must be located at avalid address for the application.

The utility stops processing.

User Response: Resubmit the command with avalid database name.

SQL2016C The PATH command does notcontain a path to“<program-name>”.

Explanation: The utility could not find therequired program using the operating systemSelect Path.

The utility stops processing.

User Response: Update the PATH command toinclude the path to the indicated program name.

SQL2017N Too many sessions are alreadystarted or OS/2 Start Session didnot complete successfully.

Explanation: The BACKUP or RESTORE utilitycould not start the new session because:

v The maximum number of sessions is alreadystarted.

v The OS/2 Start Session program returned anerror.

The utility stops processing.

User Response: Wait until some of the currentsessions stop processing and resubmit thecommand. Or, see the SQLERRD[0] field in theSQLCA for more information and resubmit thecommand.

Chapter 2. SQL Messages 259

Page 268: Db2 SQL Errors

SQL2018N The utility encountered an error“<error>” while attempting toverify the user’s authorization IDor database authorizations.

Explanation: The user attempted to execute autility and one of the following has occurred:

v The user authorization ID is not valid.

v An error occurred attempting to access theuser’s authorizations for the database.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

SQL2019N An error occurred while bindingthe utilities to the database.

Explanation: Because the current level of theutility being executed was not bound to thedatabase, the system attempted to bind allutilities to the database and this binding processfailed. Possible causes for the error include:

v The system may have run out of disk space.

v A system resource problem such as too manyfiles opened.

v A missing or invalid list of utility programs tobe bound (db2ubind.lst).

v A missing or invalid bind file for one of theutilities (db2uxxxx.bnd).

v The user does not have the requiredauthorization for binding utilities. Therequired privileges are:

– BIND privilege for the utility programs

– SELECT privilege for the system catalogs.

For the RESTORE utility, the database is restored,but at least one utility is not bound to thedatabase. The other utilities stop processing.

User Response: Complete all activities that maybe competing for system resources and resubmitthe utility command. If the error continues,perform one of the following actions:

v Have a user with SYSADM or DBADMauthority retry the command.

v Reinstall the database manager or reapply anyrecent updates or do both.

v Bind the utility programs (db2uxxxx.bnd files)individually to the database (with no formatoption) to isolate the problem and, possiblyenable some utilities to operate successfully.

SQL2020N The utility is not bound to thedatabase correctly.

Explanation: All the utilities were rebound tothe database because the utility was not boundto the database or the package of the utility thatwas bound to the database was not compatiblewith the installed version of the databasemanager, but there is still a timestamp conflictbetween the installed version of the databasemanager and the package so the utility and bindfile are not compatible.

The utility stops processing.

User Response: Reinstall the database manageror reapply any recent updates or do both.Resubmit the utility command.

SQL2021N The correct diskette is not in thedrive.

Explanation: The diskette to be used for BackupDatabase or for Restore Database is not in thedrive or is not valid.

The command cannot be processed.

User Response: Verify that the correct disketteis in the drive or insert a new diskette.

SQL2023N The utility encountered an I/Oerror “<code>” while accessingthe log control file.

Explanation: The read or write operationagainst the log control file failed.

The utility stops processing.

User Response: Record the error return codevalue. Determine whether the I/O error can becorrected.

260 Message Reference, Volume 2

Page 269: Db2 SQL Errors

SQL2024N The utility encountered an I/Oerror “<code>” while accessingthe .BRG file.

Explanation: An I/O error occurred whileaccessing the specified file.

The .BRG file is used to determine whether aRestore operation has terminated abnormally.The .BRG file resides in the local databasedirectory of the database in question and consistsof a filename equivalent to the database tokenand filetype of .BRG.

The utility stops processing.

User Response: Record the error return code.Determine whether the I/O error can becorrected.

SQL2025N An I/O error “<code>” occurredon media “<dir/devices>”.

Explanation: An I/O error occurred whileaccessing a file on the specified media.

The utility stops processing.

User Response: Record the error return code.Determine whether the I/O error can becorrected.

SQL2026N An error ″<sqlcode>″ occurredwhile trying to internallydisconnect from the database.

Explanation: The internal disconnect commandfailed. The SQLCODE is returned in the message.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL2027N An error ″<sqlcode>″ occurredwhile trying to internally connectto the database.

Explanation: The internal connection failed. TheSQLCODE is returned in the message. Thedatabase manager configuration file and the

database configuration file may containincompatible values.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand. Check that the database managerconfiguration file values and the backup image’sdatabase configuration file values are compatible.

SQL2028N Error “<sqlcode>” occurred whileinstalling the interrupt handler.

Explanation: The utility could not enable theinterrupt handler. The SQLCODE is returned inthe message.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL2029N An error “<error>” occurred while“<command-file-name>” wasprocessing.

Explanation: An error was returned from eitherthe specified command file, or from theoperating system.

User Response: The user has either requested a“Backup changes only” of a database enabled forROLLFORWARD recovery, or has requested a“Backup changes only” while requesting the useof the user exit.

SQL2030N The “<name>” drive is full. Atleast “<number>” free bytes areneeded on this drive.

Explanation: The specified drive does not haveenough space for creating an internalsubdirectory and information file.

The utility stops processing.

User Response: Free the indicated space on thespecified drive and resubmit the command.

Chapter 2. SQL Messages 261

Page 270: Db2 SQL Errors

SQL2031W Warning! Please mount the targetor source media on device″<device>″.

Explanation: A database utility process eitherwrites data to or reads data from the media onthe specified device. The utility returns so thatthe user may mount the correct media for theoperation.

The utility waits for a response to continue.

User Response: Mount the media and return tothe utility with the callerac parameter indicatingif processing continues or ends.

SQL2032N The ″<parameter>″ parameter isnot valid.

Explanation: The parameter is incorrectlyspecified. Either the value is out of range or isincorrect.

User Response: Resubmit the command with acorrect value for the parameter.

SQL2033N The TSM error ″<error>″ occurred.

Explanation: During the processing of adatabase utility, TSM was called and encounteredan error.

User Response: Consult the TSMdocumentation for a description of the error, takecorrective actions and resubmit the command.

SQL2034N The address of the ″<parm>″parameter is not valid.

Explanation: The application program used anaddress that is not valid for this parameter.Either the address points to an unallocated bufferor the character string in the buffer does nothave a null terminator.

User Response: Ensure that a valid address isused in the application program and the inputstring is null terminated.

SQL2035N The warning condition ″<warn>″was encountered while executingthe utility in non-interrupt mode.

Explanation: The calling application invokedthe utility with no interrupt mode. During theoperation a warning condition was encountered.

User Response: Resubmit the operation withoutspecifying the no interrupt condition in thecallerac parameter or take actions to prevent thewarning and resubmit the operation.

SQL2036N The path for the file or device“<path/device>” is not valid.

Explanation: The application calling the utilityhas supplied a source or target path that is notvalid. The path or device specified may not existor is incorrectly specified.

User Response: Reissue the utility commandwith a path that represents a correct path ordevice.

SQL2037N TSM could not be loaded.

Explanation: A call to a database utilityspecified TSM as the target or source of thebackup. An attempt was made to load the TSMclient. Either the TSM client is not available onthe system or an error was encountered in theload procedure.

User Response: Ensure that the system hasTSM available. Resubmit the command afterTSM is made available, or resubmit thecommand without utilizing TSM.

SQL2038N A database system error″<errcode>″ occurred duringprocessing.

Explanation: A database system error wasencountered during the processing of one of theutilities.

User Response: Examine the error code in themessage for more information. Take correctiveaction and resubmit the command.

262 Message Reference, Volume 2

Page 271: Db2 SQL Errors

SQL2039N The application calling the utilityhas terminated.

Explanation: The application calling the utilityhas terminated. The application side of the utilityis in the same process as the calling applicationand terminates with the application. The agentside of the utility terminates as a result.

User Response: Reissue the command afterdetermining why the application terminated.

SQL2040N The database alias parameter“<dbalias>” is not valid or notspecified.

Explanation: The application calling the Backupor Restore utility has supplied a database aliasparameter that is not valid. The alias must be 1to 8 bytes and the characters must be chosenfrom the database manager base character set.

User Response: Reissue the Backup or Restorecommand with a valid database alias.

SQL2041N The buffer size parameterspecified is not valid. The buffersize must be specified as 0 or bebetween 8 and 16384 inclusive.

Explanation: The application calling the utilityhas supplied a buffer size parameter that is notvalid. The buffer size is used to determine theinternal buffer size. The value is the number of4K pages that are obtained for this buffer. Thevalue must be specified as 0 or be between 16and 16384 inclusive.

When running the backup or restore utility, if 0is specified, the default buffer size defined in thedatabase manager configuration is used.

If the target media is a diskette, the buffer sizemust be smaller than the diskette size.

SQL2042W Warning! I/O error ″<error>″accessing device ″<device>″.Additional information (ifavailable):″<additional_information>″.Please ensure media is mountedand positioned correctly.

Explanation: The application calling the utilityhas encountered an I/O error while trying toread or write to the tape device. The utilityreturns so that the user may correctly mount andposition the tape.

The message may contain additional informationto help diagnose the problem.

The utility waits for a response to continue.

User Response: Correctly mount and positionthe tape and return to the utility indicating ifprocessing continues or ends.

The error, device and the additional information(if present) can be used to diagnose and correctthe problem.

SQL2043N Unable to start a child process orthread.

Explanation: Unable to start up the childprocesses or threads required during theprocessing of a database utility. There may not beenough available memory to create the newprocess or thread. On AIX-based systems, themaxuproc value set by the chdev command maybe too low. On OS/2-based systems, theTHREADS value set in CONFIG.SYS may be toolow. The utility stops processing.

User Response: Ensure the system limit fornumber of processes or threads has not beenreached (either increase the limit or reduce thenumber of processes or threads already running).Ensure that there is sufficient memory for thenew process or thread. Resubmit the utilitycommand.

Chapter 2. SQL Messages 263

Page 272: Db2 SQL Errors

SQL2044N An error occurred while accessinga message queue. Reason code:“<reason-code>”

Explanation: An unexpected error or badmessage was received on one of the messagequeues during the processing of a databaseutility. The following is a list of reason codes:

1 Unable to create a message queue. Thenumber of message queues allowed mayhave been exceeded.

2 An error was encountered while readingfrom a message queue.

3 An error was encountered while writingto a message queue.

4 An invalid message was received from amessage queue.

5 An error was encountered whileopening a message queue.

6 An error was encountered while closinga message queue.

7 An error was encountered whilequerying a message queue.

8 An error was encountered whiledeleting a message queue.

The utility stops processing.

User Response: Ensure the number of messagequeues allowed is not reached. Reduce thenumber of message queues in use if necessaryand resubmit the utility command.

SQL2045W Warning! Error ″<error>″ occurredwhile writing to media“<media>”.

Explanation: A database utility processencountered error ″<error>″ returned by theoperating system while writing to the media″<media>″. The utility returns so that the usermay attempt to fix the problem or cancel theoperation.

The utility waits for a response to continue.

User Response: Consult the problem

determination documentation for your operatingsystem and correct the ″<error>″ condition.Return to the utility with the correct caller actionparameter to indicate if processing shouldcontinue or terminate.

SQL2048N An error occurred while accessingobject “<object>”. Reason code:“<reason-code>”.

Explanation: An error occurred while accessingan object during the processing of a databaseutility. The following is a list of reason codes:

1 An invalid object type is encountered.

2 A lock object operation failed. The lockwait may have reached the lock timeoutlimit specified in the databaseconfiguration.

3 An unlock object operation failed duringthe processing of a database utility.

4 Access to an object failed.

5 An object in the database is corrupted.

6 The object being accessed is a tablespace and either the table space is insuch a state that the operation is notallowed or one or more containers ofthe table space is not available. (LISTTABLESPACES will list the current tablespace state.)

7 A delete object operation failed.

8 Trying to load/quiesce into a table thatis not defined on this partition.

The utility stops processing.

User Response: If a lock object operation failed,ensure the lock timeout limit in the databaseconfiguration is adequate and resubmit theutility command. You may also consider usingthe QUIESCE command to bring the database toa quiesced state to ensure access.

If the error was encountered during backup, takecorrective action to recover the database andresubmit the utility command.

If the error was encountered during restore or

264 Message Reference, Volume 2

Page 273: Db2 SQL Errors

load recovery, ensure the backup or copy imageis correct and resubmit the utility command.

If the object is a table space and the error wasencountered during a restore, the set table spacecontainer api may be used to modify the tablespace before resubmitting the utility command.

SQL2054N The backup or copy image iscorrupted.

Explanation: The backup or copy image in useis corrupted

The utility stops processing.

User Response: Discard the image as it is not avalid image. Resubmit the utility command witha valid image.

SQL2055N Unable to access memory frommemory set “<memory-heap>”.

Explanation: A database utility was unable toaccess memory during processing.

The utility stops processing.

User Response: Stop the database manager,then restart it and resubmit the utility command.

SQL2056N An invalid media type wasencountered on media “<media>”.

Explanation: An invalid media type wasencountered during the processing of a databaseutility.

The utility stops processing.

User Response: Ensure the media used isamong of the types supported by the utility.Resubmit the command with a valid media list.

SQL2057N The media “<media>” is alreadyopened by another process.

Explanation: The source or target mediaspecified during the processing of a databaseutility is already open by another process. Theutility does not allow shared access for theoperation.

The utility stops processing.

User Response: Ensure the media used is not inuse currently. Resubmit the command with avalid media list.

SQL2058W An end-of-media warning wasencountered on media “<media>”.

Explanation: An end-of-media warning wasencountered during the processing of a databaseutility. This error can also occur if an invalid tapedevice block size was specified.

The utility is waiting for a response to continue.

User Response: Correct the end-of-mediacondition and return to the utility with thecorrect caller action parameter to indicate ifprocessing should continue or terminate.

The tape device block size (or blocking factor)used at restore time must be the same as thatused during the backup. If a variable block sizeis used, then the buffer size used must be lessthan or equal to the maximum block size of thetape device.

SQL2059W A device full warning wasencountered on device“<device>”.

Explanation: An device full warning wasencountered during the processing of a databaseutility.

The utility is waiting for a response to continue.

User Response: Correct the device fullcondition and return to the utility with thecorrect caller action parameter to indicate ifprocessing should continue or terminate.

SQL2060W The device “<device>” is empty.

Explanation: An empty device was encounteredduring the processing of a database utility. Theutility is waiting for a response to continue.

User Response: Mount the media and return tothe utility with the caller action parameter toindicate if processing should continue orterminate.

Chapter 2. SQL Messages 265

Page 274: Db2 SQL Errors

SQL2061N An attempt to access media“<media>” is denied.

Explanation: An attempt to access a device, file,TSM or the vendor shared library is deniedduring the processing of a database utility. Theutility stops processing.

User Response: Ensure the device, file, TSM orvendor shared library used by the utility allowsthe access requested and resubmit the utilitycommand.

SQL2062N An error occurred while accessingmedia “<media>”. Reason code:“<reason-code>”

Explanation: An unexpected error occurredwhile accessing a device, file, TSM or the vendorshared library during the processing of adatabase utility. The following is a list of reasoncodes:

1 An attempt to initialize a device, file,TSM or the vendor shared library failed.

2 An attempt to terminate a device, file,TSM or the vendor shared library failed.

other If you are using TSM, this is an errorcode returned by TSM.

The utility stops processing.

User Response: Ensure the device, file, TSM orvendor shared library used by the utility isavailable and resubmit the utility command. Ifthe command is still unsuccessful, contact yourtechnical service representative.

SQL2065W Caller action “<caller-action>”specified is not allowed when themedia “<media>” specified is theonly one left connected to theutility.

Explanation: The caller action specified is notallowed because there is only one device leftconnected to the database utility.

User Response: Return to the utility with thecorrect caller action parameter to indicate ifprocessing should continue or terminate.

SQL2066N Table space name ″<name>″specified does not exist in thedatabase or cannot be used for theutility operation.

Explanation: The table space name specified issyntactically correct, but it does not exist in thedatabase or cannot be used in an utilityoperation. If the utility in use is a backupoperation, the table space may be disallowedbecause it is a system or user temporary tablespace or is in an inconsistent state.

User Response: Check the table space nameand resubmit the utility command with thecorrect table space name.

SQL2068N An invalid image wasencountered on media “<media>”.There was no media header.

Explanation: An invalid image was encounteredduring the processing of a database utility. Theutility was not able to locate a valid mediaheader. The utility stops processing.

User Response: Resubmit the command withcorrect backup or copy images.

SQL2069N An invalid image wasencountered on media “<media>”.The image was created fordatabase alias “<dbalias>”.

Explanation: An invalid image was encounteredduring the processing of a database utility. Theimage provided was from a different databasealias. The utility stops processing.

User Response: Resubmit the command withcorrect backup or copy images.

SQL2070N An invalid image wasencountered on media “<media>”.The image contained timestamp“<timestamp>”.

Explanation: An invalid image was encounteredduring the processing of a database utility. Theimage provided was from a backup or copy with

266 Message Reference, Volume 2

Page 275: Db2 SQL Errors

a different timestamp. The utility stopsprocessing.

User Response: Resubmit the command withcorrect backup or copy images.

SQL2071N An error occurred while accessingthe shared library“<shr-lib-name>”. Reason code:“<reason-code>”

Explanation: An unexpected error occurredwhile accessing a vendor shared library duringthe processing of a database utility. Thefollowing is a list of reason codes:

1 An invalid shared library path wasencountered.

2 An attempt to load the backup sharedlibrary failed.

3 An error was encountered whileunloading the shared library.

The utility stops processing.

User Response: Ensure the shared libraryprovided is valid and resubmit the utilitycommand or use another supported media.

SQL2072N Unable to bind the shared library“<shr-lib-name>”. Reason code:“<reason-code>”.

Explanation: An error was encountered whilebinding the shared library during the processingof a database utility. The utility stops processing.

User Response: Note the reason code returnedfrom the vendor utility in the message and takecorrective action if possible. Resubmit thecommand with a valid shared library or usinganother supported media.

SQL2073N DATALINK processing failedbecause of internal problems atthe database server or DB2 DataLinks Manager.

Explanation: An unexpected error occurredwhile processing DATALINK values.

User Response: Resubmit the command. If theproblem still exists, resubmit the command aftershutdown and restart of DB2 and the DB2 DataLinks Managers.

The Restore utility can avoid DATALINKprocessing by specifying WITHOUT DATALINK.

SQL2074N DATALINK processing failedbecause of internal problems atthe database server.

Explanation: An unexpected error occurredwhile processing DATALINK values.

User Response: Resubmit the command. If theproblem still exists, resubmit the command aftershutdown and restart of DB2.

The Restore utility can avoid DATALINKprocessing by specifying WITHOUT DATALINK.

SQL2075N DATALINK processing failedbecause of internal problems atthe DB2 Data Links Manager.

Explanation: An unexpected error occurredwhile processing DATALINK values.

User Response: Resubmit the command. If theproblem still exists, resubmit the command aftershutdown and restart of the DB2 Data LinksManagers.

The Restore utility can avoid DATALINKprocessing by specifying WITHOUT DATALINK.

SQL2076W The DB2 Data Links Manager“<server-name>” was notregistered to the database.

Explanation: The DB2 Data Links Manager“<server-name>” was not registered to thedatabase with the ADD DATALINKSMANAGER command.

User Response: For details on why the ADDDATALINKS MANAGER command failed, checkthe diagnostic log file db2diag.log.

Chapter 2. SQL Messages 267

Page 276: Db2 SQL Errors

SQL2100 - SQL2199

SQL2150W The table spaces contained in thebackup image were restored.Depending on the request of thecaller, one or more of these tablespaces might have been skipped.

Explanation: A RESTORE DATABASEcommand was issued. The user might haveindicated that only a subset of the table spaces inthe backup image were to be recovered.

User Response: No action is required.

SQL2154N The RESTORE was not successful.The backup used to restore thetable space(s) is not associatedwith the current log sequence forthe database.

Explanation: For table space restore, the backupmust have been taken during the current logsequence of the database. The log file sequence isdetermined by the database that has beenrestored previously or the log files that havebeen processed. In addition, the backup musthave been taken after the last time the databasewas enabled for roll forward recovery.

Table space restore has stopped.

User Response: Resubmit the command with acorrect backup image.

SQL2155W Changes have been made to therecovery history file since theopen scan was issued.

Explanation: Changes have been made to therecovery history file since the file was open for ascan. The data read may not be consistent.

User Response: If it is essential to haveconsistent data from the scan, close the recoveryhistory file and resubmit the command.

SQL2157N There are already eight recoveryhistory file scans open.

Explanation: Eight recovery history file scans inthis process are already open. No more than

eight open scans are allowed.

The command cannot be processed.

User Response: Issue one or more CLOSERECOVERY HISTORY FILE SCAN commandsand resubmit the command.

SQL2160W A damaged recovery history filehas been replaced. Processingcontinued.

Explanation: An error was encountered duringan access to the recovery history file. The utilityis able to recover the file from an alternate copy.The utility continues processing.

User Response: The utility continues processingsuccessfully. The user should take appropriateprecautions to ensure the recovery history file isnot damaged again.

SQL2161N A damaged recovery history filecould not be fixed. The specifiedaction failed.

Explanation: An error was encountered duringan access to the recovery history file. The utilityis not able to recover the file. The utility stopsprocessing.

User Response: To continue processing, the usermay remove the recovery history file andresubmit the command. The utility willregenerate a new file. Any data from thecorrupted file are lost. The user may look at thecorrupted file to see if any information can besaved. The user should take appropriateprecautions to ensure the recovery history file isnot damaged again.

SQL2165W The SQLUHINFO structure didnot provide enough TABLESPACEentries.

Explanation: The SQLUHINFO structure wasnot large enough to hold the entry that was to bereturned (including all of its TABLESPACES).The value of the SQLN field of the SQLUHINFO

268 Message Reference, Volume 2

Page 277: Db2 SQL Errors

structure should be at least as large as the SQLDfield returned.

The command cannot be processed.

User Response: Increase the value of the SQLNfield in the SQLUHINFO structure to the valueindicated by the SQLD field (making sure theSQLUHINFO structure is large enough tosupport that amount) and resubmit thecommand.

SQL2170N The utility encountered entrieswith the same identifier in therecovery history file. Write fails.

Explanation: The utility has encountered anentry with the same identifier (timestamp to thesecond) in the recovery history file while writingto it. The write to the recovery history fileterminates. Database manager ensures theuniqueness of the recovery history file identifiersand makes provisions for it even if there aremore than one request per second. However,there may be cases where it will fail if numerousrequests come in within a few seconds.

User Response: Check the First Failure ServiceLog (db2diag.log) for additional information. Ifthe applications are running utilities (such asbackup, quiesce, load) that generate numerousentries to the history file, try to pace the utilityrequests to prevent the problem.

SQL2171N The update of the recovery historyfile failed because the specifiedobject part does not exist in thefile.

Explanation: The entry specified to be updatedin the recovery history file does not exist in thefile. The utility stops processing.

User Response: Resubmit the command with avalid entry.

SQL2172W The utility has completed but it isnot able to log the event in therecovery history file due to error″<error>″.

Explanation: The utility has encountered anerror writing to the recovery history file. Thiswarning does not affect processing.

User Response: Check the First Failure ServiceLog (db2diag.log) for additional information.Correct the error condition to prevent futurewarnings.

SQL2180N Incorrect syntax or incorrectpassword key used in filteringspecification.

Explanation: The filtering specification provideduses one or both of incorrect syntax or anincorrect password key. Details can be found ineither or both of the system error log and thedatabase manager error log.

User Response: Save the diagnosticinformation. Contact IBM service.

SQL2181N An internal error occurred duringfiltered recovery.

Explanation: An internal error occurred duringfiltered recovery. Recovery is terminated. Detailscan be found in one or both of the system errorlog or the database manager error log.

User Response: If the error was on an attemptto change the state for a table, try filtering outthe full tablespace. Save the diagnosticinformation. Contact IBM service.

SQL2200 - SQL2299

Chapter 2. SQL Messages 269

Page 278: Db2 SQL Errors

SQL2200N The qualifier for the table orindex name is too long or it wasnot specified as part of the tableor index name.

Explanation: The table name or index must befully qualified. The format is authid.name whereauthid must be 1 to 30 characters, table namemust be 1 to 128 characters and index name mustbe 1 to 18 characters (bytes in a MBCSenvironment).

The utility stops processing.

User Response: Resubmit the command with afully qualified name including the correctqualifier.

SQL2203N The tablename parameter is notvalid. Either the table name is toolong, only an authorization IDwas specified, the table name wasnot specified, or the address ofthe name is not valid.

Explanation: The table name is required. Itmust be fully qualified and in the formatauthid.name where authid is 1 to 30 characters andname is 1 to 128 characters (bytes in MBCSenvironments). The table name must be locatedat a valid application address.

The utility stops processing.

User Response: Resubmit the command withthe correct table name.

SQL2204N The iname parameter is not valid.The name of the index is too long,only an authorization ID wasspecified, or the address of theindex is not valid.

Explanation: If an index is specified, it must befully qualified and in the format authid.namewhere authid is 1 to 30 characters and name is 1to 18 characters (bytes in MBCS environments).The index must be located at a valid applicationaddress.

The utility stops processing.

User Response: Resubmit the command with avalid index name.

SQL2205N The specified index is not valid.Reason code: “<reason-code>”.

Explanation: The specified index parameter isnot valid for the requested operation. Followingis a list of reason codes:

1 The specified index does not exist forthe specified “<schema>”.“<table-name>” or “<schema>”.“<index-name>”.

2 The specified index is an extendedindex. The Reorganize Table utility doesnot support indexes based on indexextensions.

Federated system users: this situation can also bedetected by the data source.

The utility or operation stops processing.

User Response: Resubmit the command with avalid index or without an index.

SQL2207N The filepath specified by thedatafile parameter is not valid.

Explanation: The datafile parameter is not anyof the values that indicate the default filepath.Also the datafile parameter is not a validnon-default value. One of the following mayapply:

v The pointer is not valid.

v The pointer points to a string that is too longfor a filepath designation.

v The specified path value is not valid (on theserver machine).

v The file path does not end with an appropriateseparator for the server machine.

The utility stops processing.

User Response: Resubmit the command with avalid datafile parameter.

270 Message Reference, Volume 2

Page 279: Db2 SQL Errors

SQL2208N The table space specified by thetable space parameter is not valid.

Explanation: The table space parameter doesnot contain a valid value. One of the followingconditions may exist:

v The pointer is not valid

v The pointer points to a string that is too longfor a table space name

v The specified table space does not exist.

The utility stops processing.

User Response: Resubmit the command with avalid table space parameter or do not use thetable space name parameter. In the latter case,the Reorganize Table utility will use the tablespace(s) in which the table itself resides.

SQL2211N The specified table does not exist.

Explanation: The table does not exist in thedatabase. Either the table name or theauthorization ID is incorrect.

The command cannot be processed.

User Response: Resubmit the command with avalid table name.

SQL2212N The specified table is a view. TheReorganize Table utility cannot berun against a view.

Explanation: The Reorganize Table utilitycannot be run against a view.

The utility stops processing.

User Response: Resubmit the command with avalid table name.

SQL2213N The specified table space is not asystem temporary table space.

Explanation: The Reorganize Table utilityrequires that any table space specified is asystem temporary table space. The table spacename provided is not a table space defined tohold system temporary tables.

The utility stops processing.

User Response: Resubmit the command withthe name of a system temporary table space ordo not use the table space name parameter. Inthe latter case, the Reorganize Table utility willuse the table space(s) in which the table itselfresides.

SQL2214N The user does not have theauthority to run the ReorganizeTable utility on table “<name>”.

Explanation: The user attempted to reorganizethe specified table without the appropriateauthorization (either SYSADM or DBADMauthority or the CONTROL privilege on thetable).

The utility stops processing.

User Response: Logon as a user with theappropriate authority or privilege and resubmitthe reorganize table utility command.

SQL2215N SQL error “<sqlcode>” occurredwhile committing previous workfor the database.

Explanation: The user was already connected tothe database specified in the Reorganize Tablecommand. An error occurred while committingthe previous work in progress for the database.

The utility stops processing with no attempt toroll back the work or break the databaseconnection.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL2216N SQL error “<sqlcode>” occurredwhile reorganizing a databasetable.

Explanation: An error occurred during thereorganization of a database table.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for more

Chapter 2. SQL Messages 271

Page 280: Db2 SQL Errors

information. Make changes and resubmit thecommand.

SQL2217N The page size of the systemtemporary table space used by theREORG utility must match thepage size of the table space(s) inwhich the table data resides(including the LONG and/or LOBcolumn data).

Explanation: If the system temporary table wasexplicitly specified to the REORG utility then thepage size of the system temporary table spaceused by the REORG utility must match the pagesize of the table space or table spaces in whichthe table data, including LONG and/or LOBcolumn data, resides. One of the following hasviolated this restriction:

v The table’s data resides in a table space thathas a different page size than that of thespecified system temporary table space.

v The table contains LONG and/or LOBcolumns whose data resides in a table spacewith a page size that is different than that ofthe system temporary table space and thetable’s regular data.

If the system temporary table space was notspecified to the REORG utility then the utilitywas looking internally for a system temporarytable space. A system temporary table space thatuses the same page size as the table data eitherdid not exist in the database or was not availableat the time.

User Response: If the table being reorganizedresides in a table space with a page size which isdifferent than that of the table space in which theLONG and/or LOB data of the table resides,then a system temporary table space cannot beprovided to the REORG utility. Reissue theREORG request without specifying a systemtemporary table space.

If a system temporary table space that uses thesame page size as the table data does not exist inthe database, please create a system temporarytable space using a page size that matches thepage size of the table data.

If a system temporary table space that uses thesame page size as the table data exists in thedatabase but was not available at the time ofyour command, please reissue the commandwhen the system temporary table space isavailable.

SQL2300 - SQL2399

SQL2300N The identifier for the table nameis too long or it was not specifiedas part of the table name.

Explanation: The table name must be fullyqualified. The format is authid.tablename whereauthid contains 1 to 30 characters and tablenamecontains 1 to 128 characters (bytes in MBCSenvironments).

The utility stops processing.

User Response: Resubmit the command withthe fully qualified table name, including thecorrect qualifier.

SQL2301N The tablename parameter is notvalid. Either it is too long, only anauthorization ID was specified, orthe address of the name is notvalid.

Explanation: The table name must be fullyqualified and in the format authid.name whereauthid contains 1 to 30 characters and namecontains 1 to 128 characters (bytes in MBCSenvironments) and must be located at a validapplication address.

The utility stops processing.

User Response: Resubmit the command withthe correct table name.

272 Message Reference, Volume 2

Page 281: Db2 SQL Errors

SQL2302N The index list is not valid. Eitherthe address for the list is notvalid, the number of entries in thelist is less than the number ofindexes specified, or the addressfor an index in the list is notvalid.

Explanation: The address for the list is notvalid, the number of entries in the list is lessthan the number of indexes specified, or theaddress for an index in the list is not valid.

The utility stops processing.

User Response: Resubmit the command with avalid index list.

SQL2303N The statsopt parameter is notvalid.

Explanation: The statsopt parameter in the RunStatistics command must be one of the following:

v T for basic table only

v I for basic indexes only

v B for both basic table and indexes

v D for table and distribution

v E for table and distribution and basic indexes

v X for extended indexes only

v Y for extended indexes and basic table

v A for all

The utility stops processing.

User Response: Resubmit the command with avalid statsopt parameter.

SQL2304N The sharelev parameter is notvalid. It must be ’R’ for referenceor ’C’ for change.

Explanation: The sharelev parameter in the RUNSTATISTICS command must be R for reference orC for change.

The utility stops processing.

User Response: Resubmit the command with avalid sharelev parameter.

SQL2305N The table specified is a view. Theutility cannot be run against aview.

Explanation: The tname parameter specified aview rather than a table.

The utility stops processing.

User Response: Resubmit the command with avalid tname parameter.

SQL2306N The table or index “<name>” doesnot exist.

Explanation: The table or index identified by“<name>” does not exist in the database, or theindex identified by “<name>” is not defined onthe specified table. The qualifier for the table orone of the indexes may be incorrect.

The utility stops processing.

User Response: Resubmit the command withvalid table names and indexes.

SQL2307N The table specified is a systemtable. The Runstats utility cannotbe run against a system table.

Explanation: The Run Statistics utility commandmay not be run against a system table.

The utility stops processing.

User Response: Resubmit the command with avalid table name.

SQL2308N The qualifier for the index name“<name>” is too long, or it wasnot specified as part of the indexname.

Explanation: The index name must be a fullyqualified name. The format is authid.name whereauthid contains 1 to 30 characters and namecontains 1 to 18 characters (bytes in MBCSenvironments).

The utility stops processing.

User Response: Resubmit the command with afully qualified name, including the correctqualifier.

Chapter 2. SQL Messages 273

Page 282: Db2 SQL Errors

SQL2309N The index name “<name>” is notvalid. It is too long or only aqualifier was specified.

Explanation: The index name must be a fullyqualified name. The format is authid.name whereauthid contains 1 to 30 characters and namecontains 1 to 18 characters (bytes in MBCSenvironments).

The utility stops processing.

User Response: Resubmit the command with avalid index.

SQL2310N The utility could not generatestatistics. Error “<sqlcode>” wasreturned.

Explanation: An error occurred while the utilitywas gathering statistics.

The utility stops processing.

User Response: Look at the message errornumber for more information. Make changes andresubmit the command.

SQL2311N The user does not have theauthority to run the Run Statisticsutility on table “<name>”.

Explanation: The user attempted to runstatistics on the specified table without theappropriate authorization (either the SYSADM orDBADM authority or the CONTROL privilege onthe table). If the table specified in RUNSTATS isthe root table of a table hierarchy, then the tablename returned in the message may be a subtableof the specified root table.

The utility stops processing.

User Response: Do not attempt to call the RunStatistics utility command without appropriateauthorization.

SQL2312N Statistics heap size is too small tocarry out the operation. Suggestedheap size is ″<num>″ pages.

Explanation: The setting of the databaseconfiguration parameter stat_heap_sz is not big

enough to collect non-uniform distributionstatistics on the table.

User Response: Update the databaseconfiguration parameter stat_heap_sz to thesuggested value and try again.

SQL2313W All available memory in thestatistics heap has been used.Statistics were collected on thefirst ″<n1>″ rows out of a total of″<n2>″ rows.

Explanation: The setting of the databaseconfiguration parameter stat_heap_sz is not bigenough to collect non-uniform distributionstatistics on the table. Only <n1> of <n2> rowscould be processed.

User Response: Update the databaseconfiguration parameter stat_heap_sz by 20percent and try again.

SQL2314W Some statistics are in aninconsistent state. The newlycollected ″<object1>″ statistics areinconsistent with the existing″<object2>″ statistics.

Explanation: Issuing RUNSTATS on the tableonly may result in a situation where the tablelevel statistics are inconsistent with the alreadyexisting index level statistics. For example, ifindex level statistics are collected on a particulartable and later a significant number of rows isdeleted from this table, issuing RUNSTATS onthe table only may end up with the tablecardinality less than FIRSTKEYCARD which isan inconsistent state. Likewise, issuingRUNSTATS for indexes only may leave thealready existing table level statistics in aninconsistent state. For example, if table levelstatistics are collected on a particular table andlater a significant number of rows is deletedfrom this table, issuing RUNSTATS for theindexes only may end up with some columnshaving a COLCARD greater than the tablecardinality.

User Response: If you issued a RUNSTATS forindexes only issue a RUNSTATS on the table as

274 Message Reference, Volume 2

Page 283: Db2 SQL Errors

well so that table level and index level statisticsare consistent. Likewise, if you issued a

RUNSTATS on the table only, issue a RUNSTATSfor indexes as well.

SQL2400 - SQL2499

SQL2400N The type specified in theBACKUP command is not valid. Itmust be either 0 to back up theentire database or 1 to back uponly the current changes.

Explanation: The type must be either 0 forbacking up the whole database or 1 for backingup changes only.

The utility stops processing.

User Response: Resubmit the utility commandwith the correct type.

SQL2401N “Backup changes only” cannot beperformed until a backup of theentire database has been done.The type must be 0.

Explanation: A backup of changes only hasbeen requested without requesting a backup ofthe entire database first, or an internal file hasbeen damaged such that the BACKUP utilitycannot determine whether a full backup hadbeen taken. The backup of changes only cannotbe used until after a backup of the entiredatabase.

The utility stops processing.

User Response: Resubmit the utility commandwith the correct type.

SQL2403N The user does not have theauthority to run the utility againstthe database.

Explanation: The user attempted to execute adatabase utility without either SYSADM orDBADM authority.

The utility stops processing.

User Response: Do not attempt to call theutility command without appropriateauthorization.

SQL2404N The backup target media is full.At least “<number>” free bytesare needed on the target media.

Explanation: The backup target media does nothave enough space for creating an internalsubdirectory and information file.

The utility stops processing.

User Response: Prepare a backup media thathas at least the specified number of bytes of freespace and then resubmit the command.

SQL2405N The BACKUP cannot beperformed because there is apreviously incomplete RESTORE.

Explanation: The database is in an inconsistentstate due to a system crash during a restoreoperation or due to an abnormally terminatedRESTORE.

The utility stops processing.

User Response: Resubmit the RESTOREcommand.

SQL2406N The BACKUP cannot beperformed because the databaseneeds to be rolled forward.

Explanation: The backup failed because thedatabase is in an inconsistent state.

The utility stops processing.

User Response: Use the ROLLFORWARDcommand to make the database usable. Thenresubmit the BACKUP command.

Chapter 2. SQL Messages 275

Page 284: Db2 SQL Errors

SQL2407N An I/O error occurred reading thefile “<name>”. The BACKUPcannot be performed because itcannot determine if a RESTOREwas completed.

Explanation: The indicated file cannot be readdue to the I/O error. Since the file exists, aBACKUP or RESTORE command must have notcompleted. Upon successful completion of theprocess this file is deleted.

The utility stops processing.

User Response: Determine which process wasexecuted previously. Delete the indicated file andresubmit the previous command.

SQL2408W The database was backed up, butan I/O error “<error>” occurredwhile deleting the file “<name>”.

Explanation: The BACKUP command ransuccessfully. The indicated file was not deleteddue to an I/O error.

The utility completed processing.

User Response: Try to delete the file indicatedin the message.

SQL2409N When doing a BACKUP ofchanges only, the most recentbackup image must be used.

Explanation: The user has attempted to performa changes only backup but the backup imagespecified is not the most current backup or theprevious backup of changes only failed.

The utility stops processing.

User Response: Locate the most recent backupimage and resubmit the command. If the mostrecent backup image cannot be located or if theprevious backup of changes only failed, resubmitthe command requesting a backup of the entiredatabase rather that a changes only backup.

SQL2410N “Backup changes only” cannot beperformed if the database isenabled for ROLLFORWARD or ifthe BACKUP is being donethrough a user exit.

Explanation: The user requested a changes onlybackup of a database with roll-forward enabled,or has requested a changes only backup throughthe user exit program.

User Response: Possible solutions include:

v If the database is roll-forward enabled,resubmit the BACKUP utility commandrequesting a backup of the entire database.

v Disable roll-forward by turning of theSQL_ENABLE_LOG_RETAIN flag andSQL_ENABLE_USER_EXIT flag in thedatabase configuration file. Then resubmit theBACKUP utility command requesting achanges only backup.

v If the backup was requested through the userexit program, resubmit the BACKUP utilitycommand to do a changes only backup notusing the user exit program.

v If the backup was requested through the userexit program to a standard device, resubmitthe BACKUP utility command to do a changesonly backup not using the user exit program.

SQL2411C An I/O error occurred whilerunning a utility. Either the diskcould not be physically written toor has been filled.

Explanation: An operating system erroroccurred when the utility was writing to the diskor diskette. The actual return code can be foundin the SQLERRD[0]field of the SQLCA.

User Response: Look at the error return code inthe SQLERRD[0] field of the SQLCA. Correct theerror, if possible, and resubmit the command.

SQL2412C A corrupted database page wasencountered while running adatabase utility.

Explanation: During the utility operation acorrupted database page was encountered. The

276 Message Reference, Volume 2

Page 285: Db2 SQL Errors

database is in an unpredictable state and theutility cannot continue.

User Response: Record the message number(SQLCODE).

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact yourtechnical service representative with thefollowing information:

v Problem description

v SQLCODE or message number

v SQLCA if possible

v Trace file if possible.

SQL2413N Online backup is not allowedbecause either logretain oruserexit for roll-forward is notactivated, or a backup pendingcondition is in effect for thedatabase.

Explanation: Online backup cannot beperformed while the database is not logging forforward recovery as forward recovery will berequired at restore time. Forward recovery isplaced into effect by setting either the databaseconfiguration logretain parameter or the userexitparameter, and then performing an offlinebackup of the database.

User Response: Execute an offline backup orreconfigure the database for roll-forwardrecovery and issue an offline backup so thatsubsequent online backups will be allowed.

SQL2414W Warning! Insufficient space ondevice ″<device>″ to containbackup control information. Thismedia will not contain backupinformation.

Explanation: During the Backup operation anew media was mounted and positioned afterone or more media became full. There is notenough space on this media to contain theBackup Control Information and the media

should not be included during the Restoreoperation.

User Response: Mount a new media, orreposition the current media to provide enoughspace for this header, then return to the utilitywith the callerac parameter indicating ifprocessing continues.

SQL2416W Warning! Device ″<device>″ isfull. Please mount new media.

Explanation: The tape which the utility is usinghas become full.

User Response: Mount another tape andcontinue the operation with the calleracparameter indicating if processing continues.

SQL2418N The database specified for Backupdoes not exist.

Explanation: The database specified in the dbaseparameter of the Database Backup commandcould not be found.

User Response: Ensure that the correct databasealias was specified for the Backup Databaseutility and that the database exists for this alias.Resubmit the command with the correct alias.

SQL2419N The target disk ″<disk>″ hasbecome full.

Explanation: During the processing of adatabase utility, the target disk became full. Theutility has stopped and the target is deleted.

User Response: Ensure enough disk space isavailable for the utility or direct the target toother media, such as tape.

On unix-based systems, this disk full conditionmay be due to exceeding the maximum file sizeallowed for the current userid. Use the chusercommand to update fsize. A reboot may benecessary.

On non unix-based systems, this disk fullcondition may be due to exceeding themaximum file size allowed for the operatingsystem. Direct the target to other media, such astape, or use multiple targets.

Chapter 2. SQL Messages 277

Page 286: Db2 SQL Errors

SQL2420N Insufficient space on device″<device>″ to contain initialbackup control information.

Explanation: During the Backup operation aninitial backup header needs to be created at thestart of the backup image. This header must fiton one tape when backing up to tape. There isinsufficient space on the tape to contain thisheader.

User Response: Resubmit the Backup operationand either direct the output to a new tape, orreposition the current tape to provide enoughspace for this header.

SQL2421N Table space level backup is notallowed because roll-forwardrecovery is not enabled.

Explanation: Table space level backup cannot beperformed while the database is not logging forforward recovery as forward recovery will berequired at restore time. Forward recovery isplaced into effect by setting either the databaseconfiguration logretain parameter or the userexitparameter, and then performing an offlinebackup of the database.

User Response: Execute a full database backupor reconfigure the database for roll-forwardrecovery and issue an offline backup so thatsubsequent table space level backups will beallowed.

SQL2422N The database cannot be backed upwith a back-level backup API dueto incompatible table spacelocations.

Explanation: This database contains tablespace(s) which have been defined in a locationother than the database subdirectory. This is notcompatible with the API being used.

User Response: Use the current backup API tobackup the database.

SQL2423N The database cannot be backed upbecause some index files aremissing.

Explanation: Some of the index files requiredby the backup are missing. These index filesmust be recreated prior to backing up thedatabase.

User Response: Run the ’db2recri’ program torecreate the missing index files and thenresubmit the backup command.

SQL2424N The backup could not succeedbecause asynchronous copyoperations at DB2 Data LinksManagers are not complete.

Explanation: The TSM or vendor suppliedarchive server might not be in operational state.

User Response: Ensure TSM or the vendorsupplied archive server is in an operational stateand resubmit the backup command.

SQL2425W The log file for the online backupwas not truncated.

Explanation: During an online backup, allbuffered log records are forced to disk and thelast active log file is truncated. During thecurrent backup, truncation of the last active logfile has failed. As a result, new log records willcontinue to be written into the last log file usedduring the backup.

User Response: No user action is required. Thelast active log file used during the backup willeventually become inactive when it becomes full.

SQL2500 - SQL2599

278 Message Reference, Volume 2

Page 287: Db2 SQL Errors

SQL2501C The database was restored but thedata in the restored database wasunusable.

Explanation: The RESTORE utility either couldnot read data from the restored database or onlya portion of the database was restored. Bothcases indicate that the restored database is notusable.

The database is unusable and the RESTOREutility stops processing.

User Response: Resubmit the RESTOREcommand.

SQL2502C An error occurred while readingthe backup files. Either the diskcould not physically be read orthe specified disk did not containa valid backup.

Explanation: An operating system erroroccurred when the RESTORE utility was readingthe diskette or disk, or the diskette or disk doesnot contain a backup of the database directory ordoes not contain the results of any previousbackup.

The utility stops processing.

User Response: If the input drive specified is adiskette drive, check the diskette being used. Ifthe input drive is a hard file, verify that it is thecorrect hard file. Resubmit the command withthe correct input drive and the correct diskettes,if applicable.

SQL2503N The RESTORE was not successful.The backup used to restore thedatabase contained the wrongdatabase.

Explanation: The name of the databasecontained on the backup disk does not match thedatabase name specified on the RESTOREcommand. The RESTORE utility cannotdetermine the name until after the database hasbeen restored because a previous release backupimage was restored.

The utility stops processing.

User Response: If the wrong database namewas used in the command, resubmit thecommand with the correct database name. If theinput drive specified is a diskette drive, checkthe diskette being used. If the input drive is ahard file, verify that it is the correct hard file.Resubmit the command with the correct inputdrive and the correct diskettes, if applicable.

SQL2504W Insert the first backup disketteinto drive “<drive>”.

Explanation: The RESTORE utility reads thefirst backup diskette to determine the path of thedatabase directory that was backed up. If thebackup media is a diskette and the diskette isnot found in the specified input drive, the utilityreturns to the caller with this prompt. The callingprogram is expected to query the user and returnto the utility with the user response.

The utility waits for a response from the caller.

User Response: Prompt the user for the disketteand return to the utility with the calleracparameter, indicating if processing continues orends.

SQL2505W Warning! Database “<name>”resides at “<drive>”. The files forthis database will be deleted.

Explanation: If the database being restoredalready exists, its files will be deleted before therestore process starts. The utility returns to thecaller with this warning. The caller is expected toquery the user and return to the utility with theuser response. Once the database is dropped, itcannot be accessed again.

The utility waits for response from the caller.

User Response: Warn the user that the databasefiles will be deleted and return to the utility withthe callerac parameter indicating if processingcontinues or ends.

Chapter 2. SQL Messages 279

Page 288: Db2 SQL Errors

SQL2506W The database was restored, butthere may be extra files in thedatabase.

Explanation: If changes-only backups wereperformed and database files were deletedbetween backups, the RESTORE utility addsthese deleted files back into the database. Therestore process could not delete the extra fileseither because of an I/O error or by the failure ofan internal connection to an internally stoppeddatabase.

The utility ends successfully.

User Response: Either use the database as it isor attempt to restore it again. Ensure that theDB2 configuration is compatible with therestored database configuration before rerunningthe RESTORE utility.

SQL2507W The RESTORE utility is notbound to the database correctly.

Explanation: Because the RESTORE utility wasnot bound to the database or the package of theutility that was bound to the database is notcompatible with the installed version of DB2, allthe utilities have been rebound to the database.But there is a timestamp conflict between theinstalled version of DB2 and the package so theutility and bind file are not compatible.

The database is restored, but the utility is notcorrectly bound.

User Response: Reinstall DB2 or reapply recentupdates and resubmit the utility command.

SQL2508N The Database Restore timestampparameter ″<timestamp>″ is notvalid.

Explanation: The timestamp parameter mustcontain either NULL or a portion of a validtimestamp, the portion consisting of completecomponents of a timestamp.

User Response: Resubmit the Restore operationwith a valid timestamp value.

SQL2509N The database drive parameter isnot valid.

Explanation: The drive specified does not exist,or the database does not exist on this drive or isnot cataloged on this drive. RESTORE should usethe db2uexit command to perform the databaserestore.

The utility stops processing.

User Response: Resubmit the utility commandwith a valid drive.

SQL2510N An operating system semaphoreerror occurred.

Explanation: An error occurred in the wait orpost semaphore.

The utility stops processing.

User Response: Stop the database manager,then restart it and resubmit the utility command.

SQL2511N The utility encountered an error“<error>” while dropping thedatabase.

Explanation: The utility could not drop thedatabase.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

SQL2512N The utility encountered an error“<error>” while creating thedatabase.

Explanation: The utility could not create thedatabase.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

280 Message Reference, Volume 2

Page 289: Db2 SQL Errors

SQL2513N The utility encountered an error“<error>” renaming the database.

Explanation: The utility could not rename thedatabase.

The utility stops processing.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

SQL2514N The RESTORE was not successful.The backup used to restore thedatabase contained a databasewith a release number that is notcompatible with the installedversion of the database manager.

Explanation: The release number of the restoreddatabase is not compatible with the releasenumber of the installed version of the databasemanager.

The utility stops processing.

User Response: Resubmit the command with abackup that is compatible with the release levelof the database manager.

SQL2515N The user does not have theauthority to run the RESTOREutility against the database.

Explanation: The user attempted to execute theRESTORE utility without SYSADM authority.

The utility stops processing.

User Response: Do not attempt to call theRESTORE utility command without appropriateauthorization.

SQL2516N The RESTORE utility cannotcomplete because at least onedatabase on the workstation is inuse.

Explanation: In some situations, the RESTOREutility can attempt to move a database to adirectory by renaming the directory associatedwith the database. This cannot be done if any

databases are in use in any process on theworkstation.

The utility stops processing.

User Response: Wait until no databases on theworkstation are in use and resubmit thecommand.

SQL2517W The restored database wasmigrated to the current release.

Explanation: The database being restored wasbacked up using a previous release of DB2. TheRESTORE utility migrated it to the format of thecurrent release.

The user who submitted the RESTORE commandis given DBADM authority for the database. Ifthere are other users, the database administratorwith DBADM authority must grant authorizationprivileges to the specific database users.

The RESTORE utility completes successfully.

User Response: No action is required.

SQL2518N The RESTORE was not successful.An I/O error occurred whiletrying to restore the databaseconfiguration file.

Explanation: The database configuration filecould not be restored due to an I/O error.

The utility stops processing.

User Response: Determine whether the I/Oerror can be corrected. Resubmit the command.

SQL2519N The database was restored, butthe restored database was notmigrated to the current release.Error “<sqlcode>” with tokens″<tokens>″ is returned.

Explanation: The backup image contains aprevious release of the database. After thedatabase files were restored, an attempt wasmade to migrate the database to the currentrelease. The migration failed.

The utility finishes processing but the databasewas not migrated.

Chapter 2. SQL Messages 281

Page 290: Db2 SQL Errors

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and submit theMigrate command before using the database.

SQL2520W The database was restored. Thebackup version of theconfiguration file was used.

Explanation: When a database is restored, thecurrent database configuration file is not alwaysreplaced with the backup version. The currentdatabase configuration file was not usable. It hasbeen replaced by the backup version.

The utility completed successfully.

User Response: Some values in the databaseconfiguration file may be different after therestore process. Check that the configurationparameters are set to the desired values.

SQL2521W The database was restored, but anI/O error “<code>” occurred whiledeleting the .BRG file.

Explanation: The restore process ransuccessfully. The .BRG file was not deleted dueto an I/O error.

The .BRG file is used to determine whether aRestore operation has terminated abnormally.The .BRG file resides in the local databasedirectory of the database in question and consistsof a filename equivalent to the database tokenand filetype of .BRG.

The utility completed successfully.

User Response: Try to delete the .BRG file. Ifyou are unsuccessful, contact your technicalservice representative.

SQL2522N More than one backup filematches the timestamp valueprovided for the backed updatabase image.

Explanation: The backup image file filenameconsists of a database alias and a timestampcomponent. A filename is constructed from thesource database alias and timestamp parameters

provided in the Database Restore call. A portionof a timestamp may have been specified so that amatch with more than one backup imagefilename was found.

User Response: Resubmit the operation byspecifying a timestamp with sufficient timestampcomponents to result in a match to a uniquebackup file.

SQL2523W Warning! Restoring to an existingdatabase that is different from thedatabase on the backup image,but have matching names. Thetarget database will beoverwritten by the backupversion. The Roll-forwardrecovery logs associated with thetarget database will be deleted.

Explanation: The database alias and name ofthe target database are the same as the backupimage database alias and name. The databaseseeds are not the same indicating that thedatabases are not the same. The target databasewill be overwritten by the backup version. TheRoll-forward recovery logs associated with thetarget database will be deleted. The currentconfiguration file will be overwritten with thebackup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2524W Warning! Restoring to an existingdatabase which appears to be thesame but the alias ″<dbase>″ ofthe existing database does notmatch the alias ″<dbase>″ of thebackup image. The targetdatabase will be overwritten bythe backup version.

Explanation: The database seeds of the targetdatabase and the database image are the same,indicating these are the same databases, thedatabase names are the same, but the databasealiases are not the same. The target database willbe overwritten by the backup version.

282 Message Reference, Volume 2

Page 291: Db2 SQL Errors

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2525W Warning! Restoring to an existingdatabase that is different from thedatabase on the backup image,and the alias ″<dbase>″ of theexisting database does not matchthe alias ″<dbase>″ of the backupimage, but the database names arethe same. The target database willbe overwritten by the backupversion. The Roll-forwardrecovery logs associated with thetarget database will be deleted.

Explanation: The database aliases of the targetdatabase and database image are not the same,the database names are the same, and thedatabase seeds are not the same, indicating theseare different databases. The target database willbe overwritten by the backup version. TheRoll-forward recovery logs associated with thetarget database will be deleted. The currentconfiguration file will be overwritten with thebackup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2526W Warning! Restoring to an existingdatabase that is the same as thebackup image database, and thealias names are the same, but thedatabase name ″<dbname>″ of theexisting database does not matchthe database name ″<dbname>″ ofthe backup image. The targetdatabase will be overwritten bythe backup version.

Explanation: The database aliases of the targetdatabase and database image are the same, andthe database seeds are the same, however thedatabase names are different. These are the samedatabases. The target database will beoverwritten by the backup version.

User Response: Return to the utility with the

callerac parameter indicating processing tocontinue or end.

SQL2527W Warning! Restoring to an existingdatabase that is different from thebackup image database, and thedatabase name ″<dbname>″ of theexisting database does not matchthe database name ″<dbname>″ ofthe backup image, but the aliasnames are the same. The targetdatabase will be overwritten bythe backup version. TheRoll-forward recovery logsassociated with the targetdatabase will be deleted.

Explanation: The database aliases of the targetdatabase and database image are the same, thedatabase names are not the same, and thedatabase seeds are not the same, indicating theseare different databases. The target database willbe overwritten by the backup version. TheRoll-forward recovery logs associated with thetarget database will be deleted. The currentconfiguration file will be overwritten with thebackup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2528W Warning! Restoring to an existingdatabase that is the same as thebackup image database, but thealias name ″<dbase>″ of theexisting database does not matchthe alias ″<dbase>″ of backupimage, and the database name″<dbname>″ of the existingdatabase does not match thedatabase name ″<dbname>″ of thebackup image. The targetdatabase will be overwritten bythe backup version.

Explanation: The database aliases of the targetdatabase and database image are not the same,the database names are not the same, and thedatabase seeds are the same, indicating these are

Chapter 2. SQL Messages 283

Page 292: Db2 SQL Errors

the same databases. The current database will beoverwritten by the backup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2529W Warning! Restoring to an existingdatabase that is different from thebackup image database, and thealias name ″<dbase>″ of theexisting database does not matchthe alias name ″<dbase>″ of thebackup image, and the databasename ″<dbname>″ of the existingdatabase does not match thedatabase name ″<dbname>″ of thebackup image. The targetdatabase will be overwritten bythe backup version. TheRoll-forward recovery logsassociated with the targetdatabase will be deleted.

Explanation: The database aliases of the targetand database image are not the same, thedatabase names are not the same, and thedatabase seeds are not the same, indicating theseare different databases. The current database willbe overwritten by the backup version. TheRoll-forward recovery logs associated with thetarget database will be deleted. The currentconfiguration file will be overwritten with thebackup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2530N The backup image is corrupted.Restore of database from thisbackup image is not possible.

Explanation: The backup image being restoredis corrupted making the database imagenon-restorable.

User Response: Discard the backup image as itis unusable. Restore from a previous backup ifpossible.

SQL2531N The backup image selected forrestore is not a valid databasebackup image.

Explanation: The file selected for restore is nota valid backup image. Either the file selected hasbecome corrupted or a backup tape is not at thecorrect position.

User Response: Determine the location of thecorrect backup image file, and resubmit theRestore command.

SQL2532N The backup file contains thebackup image of database“<dbalias>” taken at timestamp“<timestamp>”. This is not thebackup image requested.

Explanation: The file selected for restore doesnot contain the requested backup image. Theimage is for a different database than thatrequested.

User Response: If using tape, ensure that thecorrect tape is mounted. If a restore or load isbeing done from disk, then the file must havebeen renamed. Rename the file to the correctfilename with a match on database name andtimestamp. Resubmit the command after takingthe appropriate action.

SQL2533W Warning! The backup file ondevice ″<device>″ contains theimage of database ″<database>″taken at timestamp″<timestamp>″. This is not thebackup image requested.

Explanation: The backup image read from thetape position contains a media header that doesnot match the header of the image of the first fileof the backup file sequence.

User Response: Ensure that the tape ispositioned at the correct backup, then return tothe utility with the callerac parameter indicatingif processing continues.

284 Message Reference, Volume 2

Page 293: Db2 SQL Errors

SQL2534W Warning! The media on device″<device>″ is not positioned at avalid backup media header.

Explanation: The data read from the tapeposition does not contain a valid backup mediaheader.

User Response: Ensure that the tape ispositioned at the correct position, then return tothe utility with the callerac parameter indicatingif processing continues.

SQL2535W Warning! End of media on device″<device>″ has been reached.Please mount the next sourcemedia.

Explanation: The end of tape has been reachedand there is still more data to be processed. Theremainder of the backup or load source exists onanother tape or on several more tapes.

User Response: Mount the next tape insequence that contains the source image andresubmit the Restore or Load command with thecallerac parameter set to continue or end.

SQL2536W Warning! The backup image ondevice <device> contains anincorrect sequence number.Sequence number <number> isexpected.

Explanation: The tape is positioned on abackup image file that is out of sequence. Thetape containing the backup image must bepositioned to the file of sequence number″<sequence>″ of the backup image.

User Response: Position the tape containing thebackup image to the correct file and resubmit theRestore command with the callerac parameter setto continue or end.

SQL2537N Roll-forward is requiredfollowing the Restore.

Explanation: SQLUD_NOROLLFWD wasspecified for the rst_type parameter of theDatabase Restore utility, indicating that a

roll-forward is not required to make the restoreddatabase usable. The database to be restored wasbacked up in online mode and a roll-forwardoperation is necessary to make the databaseusable.

User Response: Resubmit the Database Restorecommand without specifyingSQLUD_NOROLLFWD for the rst_typeparameter.

SQL2538N Unexpected End of File of BackupImage reached on media″<media>″.

Explanation: While reading and restoring fromthe Backup Image file, an end of file conditionwas reached unexpectedly. The backup image isunusable and the restore operation terminates.

User Response: Resubmit the Database Restorecommand with a usable backup image file.

SQL2539W Warning! Restoring to an existingdatabase that is the same as thebackup image database. Thedatabase files will be deleted.

Explanation: The database aliases, names andseeds of the target database and database imageare the same, indicating these are the samedatabases. The current database will beoverwritten by the backup version.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2540W Restore is successful, however awarning ″<warn>″ wasencountered during DatabaseRestore while processing in NoInterrupt mode.

Explanation: The Database Restore utility wasinvoked in No Interrupt mode, i.e.SQLUB_NO_INTERRUPT orSQLUD_NO_INTERRUPT was specified. Duringthe processing a warning was encountered butnot returned at the time it was encountered. TheRestore has completed successfully and the

Chapter 2. SQL Messages 285

Page 294: Db2 SQL Errors

warning message found is shown at thecompletion in this message.

User Response: Ensure that the action thatcaused this warning to be generated has notresulted in a condition not wanted.

SQL2541W The utility was successful,however the file containing thebackup image could not beclosed.

Explanation: The utility was successful, but thefile containing the backup image could not beclosed.

User Response: Attempt to close the filecontaining the backup image.

SQL2542N No match for a database imagefile was found based on thesource database alias andtimestamp provided.

Explanation: The backup image file filenameconsists of a database alias and a timestampcomponent. A filename is constructed from thesource database alias and timestamp parametersprovided in the Database Restore call. Nofilename existed in the source directory thatmatched based on the source database alias andtimestamp provided.

User Response: Ensure that the databasebackup image resides on the media source.Resubmit the operation by specifying a correcttimestamp to result in a match.

SQL2543N The target directory specified forthe database is not valid.

Explanation: The application calling the Restoreutility has supplied a target directory for the newdatabase to be created. Either this directory doesnot exist, or is not a valid directory for databasecreation. An invalid directory for databasecreation would be a directory of greater than 255characters in length.

User Response: Reissue the Backup or Restorecommand with a valid target directory.

SQL2544N The directory where the databaseis being restored has become full.

Explanation: While the database was beingrestored the directory to which it was beingrestored had become full. The database beingrestored is unusable. The Restore terminates andif the database being restored is a new database,then it is deleted.

User Response: Free up sufficient space on thedirectory for the database, and reissue theRestore, or if restoring to a new database supplya directory with sufficient space to contain thedatabase.

SQL2545W Warning! The backup image onthe TSM server is currently storedon mountable media. The timerequired to make it available isunknown.

Explanation: The backup image is notimmediately accessible by the TSM server. Therestore process can continue and make therequest to the server to retrieve the data. Thetime required is unknown.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2546N The image on media “<media>” isnot the first in sequence from thebackup or copy.

Explanation: During restore or load recovery,the first image from the backup or copy must beprocessed first. The image found on the media isnot the first in sequence.

The utility waits for a response to continue.

User Response: Mount the media with thecorrect backup or copy image and return to theutility with the correct caller action parameter toindicate if processing should continue orterminate.

286 Message Reference, Volume 2

Page 295: Db2 SQL Errors

SQL2547N The database was not restoredbecause the backup image is froma previous release and was anonline backup.

Explanation: The physical log file formats havechanged between these releases, makingrollforward impossible.

User Response: Restore the database using theversion of DB2 used to create the database androllforward to the end of logs. Take an off-linefull database backup at this time. This newbackup image will be restorable on the newrelease of DB2.

SQL2548N Database codepage ″<codepage1>″indicated in the backup imagediffers from that of the currenton-disk database codepage″<codepage2>″. The Restoreoperation has failed.

Explanation: The database contained in thebackup image contains data stored in a codepagedifferent from that of the database into which thedata is being restored.

This problem can be caused by one of thefollowing situations:

1 The database you are restoring into hasa different codepage than that of thedatabase in the backup image.

2 The user is restoring into a newdatabase from a session with a differentcodepage than the backup.

3 The backup image is corrupt, andcontains invalid character setinformation.

User Response:

1 If restoring over an existing database,make sure that the codepage of theexisting database matches that of thebackup image.

2 If restoring to a new database, makesure that the codepage of the session

from which the restore command wasissued is the same as that of the backupimage.

3 Contact IBM Service.

SQL2549N The database was not restoredbecause either all of the tablespaces in the backup image areinaccessible, or one or more tablespace names in list of table spacenames to restore are invalid.

Explanation: The containers which were usedby the table spaces in the backup image are notavailable, are already in use, or one or more tablespace names specified in the list on the restorecommand do not exist in the backup image.

User Response: Use redirected restore toredefine the containers for the table spaces in thisbackup image, or specify a list of valid tablespace names to restore.

SQL2550N Database backed up on node″<node1>″ cannot be restored tonode ″<node2>″.

Explanation: The backup image used for therestore is a backup of a database from a differentnode. You can only restore a backup to the samenode.

User Response: Ensure that you have thecorrect backup image for the node then issue therequest again.

SQL2551N Database with catalog node″<node1>″ cannot be restored to adatabase with catalog node″<node2>″.

Explanation: The catalog node can exist on onlyone node and there is a discrepancy between thebackup image and the node being restored to.This can occur in the following cases:

1. The backup image specified catalog node″<node1>″ and the restore was attempted toan existing database whose catalog node isnode ″<node2>″

Chapter 2. SQL Messages 287

Page 296: Db2 SQL Errors

2. The restore was attempted to a new databaseand the catalog node has not been restoredfirst.

User Response: Verify that the correct backupimage is being restored.

If you are restoring to an existing database andwant to change the catalog node to ″<node2>″,the existing database must be dropped first.

If you are restoring to a new database, restorethe catalog node ″<node1>″ first.

SQL2552N Invalid report file name specifiedin the restore command.

Explanation: The length of the report file nameexceeded the allowed limit of 255.

User Response: Specify a report file namewhose length is within the allowed limit andresubmit the restore command.

SQL2553I The RECONCILE utilitycompleted successfully.

Explanation: The utility completed successfully.

User Response: No action necessary.

SQL2554N The RECONCILE utility failedwith reason code ″<reason-code>″.Possible problem with″<component>″.

Explanation: Possible Reason codes:

1 Unknown connection to a DB2 DataLinks Manager.

2 Table/DATALINK column not definedon the DB2 Data Links Manager.

3 DB2 Data Links Manager may be down.

4 I/O problems.

5 The exception table contains datalinkcolumns that are defined with file linkcontrol.

6 Table is in “Datalink Reconcile NotPossible” state.

7 Exception table not allowed for reconcileon typed tables.

8 ALTER TABLE failed to put the tableinto “Datalink Reconcile Pending” or“Datalink Reconcile Not Possible” state,or failed to take the table out of“Datalink Reconcile Pending” or“Datalink Reconcile Not Possible” state.

9 Data Links support is not turned on.

10 DB2 Data Links Manager is notresponding. The reconcile action did notcomplete.

User Response: Possible Solutions:

1 Make sure that the DB2 Data LinksManager is up and running, and that ithas been registered with the databaseusing the ADD DATALINKSMANAGER command. Try connectingto the database and make a sure acorresponding connection has beenestablished on the DB2 Data LinksManager.

2 The table does not seem to exist on theDB2 Data Links Manager. Nothing toreconcile.

3 DB2 Data Links Manager may be down.Try starting the DB2 Data LinksManager.

4 Ensure you have file permissions andenough space for the report file. A fullyqualified path is required for theDLREPORT parameter. Ensure that thetable being reconciled is not damaged.

5 Redefine all datalink columns in theexception table as “NO LINKCONTROL”.

6 Take the table out of “DatalinkReconcile Not Possible” state using theSET INTEGRITY command. Repeat thereconcile command.

7 Do not specify an exception table.

8 Try issuing a SET INTEGRITY commandto put the table into “Datalink ReconcilePending” state or to reset the “Datalink

288 Message Reference, Volume 2

Page 297: Db2 SQL Errors

Reconcile Pending” or “DatalinkReconcile Not Possible” state.

9 The value of the database managerconfiguration parameter DATALINKS isset to NO. To use RECONCILE, youmust set the value of the parameterDATALINKS to YES.

10 The reconcile command has timed outwaiting for verification from the DB2Data Links Manager. Try the reconcilecommand again.

SQL2560N The target database is notidentical to the source databasefor a restore from a table spacelevel backup.

Explanation: For a restore from a table spacelevel backup, the target database must be eitherthe original database from which the backup istaken or a new database.

User Response: Specify the correct targetdatabase and resubmit the utility command.

SQL2561W Warning! Restoring from a tablespace level backup to a databasewhich does not exist. A databasewith the same attributes in thebackup will be created.

Explanation: For a restore from a table spacelevel backup, the target database must have thesame attributes (database name, alias and seed)as the source database. If the database does notalready exist, it will be created.

User Response: Return to the utility with thecallerac parameter indicating processing tocontinue or end.

SQL2562N Table space level restore from afull database backup is notallowed.

Explanation: For a restore from a full databaselevel backup, the restore type cannot be tablespace level.

User Response: Specify a correct restore type or

use a correct backup image and resubmit theutility command.

SQL2563W The restore process has completedsuccessfully, but one or moretable spaces from the backupwere not restored.

Explanation: The restore process has completedsuccessfully. One or more table spaces that are inthe backup were not restored for one of thefollowing reasons:

v an error was encountered while accessing thecontainers of the table spaces. If the tablespaces have been dropped since the backupwas taken, no further action is necessary.

v the restore command was invoked with a listof table spaces so that only a subset of thetable spaces in the backup were restored. Nofurther action is necessary.

User Response: If this message is not due to asubset restore, use the query table space functionto check the states of the table spaces. If a tablespace is in the ″storage definition pending″ state,the storage definition for the table space must becorrected for restore to complete successfully. Seethe Administration Guide for details aboutrecovering the table space.

SQL2564N The pagesize of one or more tablespaces in the backup image donot match that of thecorresponding destination tablespaces.

Explanation: The target table space pagesizemust match that of the table space pagesize inthe backup image. Restoring to a table space of adifferent pagesize is not supported. The defaultpagesize is 4K.

User Response: Ensure that the table spacebeing restored into has the same pagesize as thetable space in the backup image.

Chapter 2. SQL Messages 289

Page 298: Db2 SQL Errors

SQL2565N The option specified forRESTORE is not allowed with thebackup image provided.

Explanation: The database contained in thebackup image is an existing database and doesnot match the database to be restored. Theoption you have specified for restore requiresthat the database being restored to is new or thesame as in the backup image.

The utility stops processing.

User Response: Resubmit the command withthe correct database name.

SQL2566W The restore process has completedsuccessfully, but one or moretable spaces have their tables putin DRP/DRNP state. Check thedb2diag.log file for details.

Explanation: One or more table spaces havetables in DATALINK Reconcile Pending (DRP) orDATALINK Reconcile Not Possible (DRNP)because of one of the following reasons:

v Restoring to a database that has a differentdatabase name, alias, hostname, or instancethan the backup image. If no rollforwardfollows the restore, any tables withDATALINK columns are placed in DRNPstate.

v Restore is done specifying the WITHOUTDATALINK option and no rollforward followsthe restore. Any tables with DATALINKcolumns are placed in DRP state.

v Restoring from a backup image that hasbecome unusable. If no rollforward follows therestore, any tables with DATALINK columnsare placed in DRNP state.

v DATALINK column information does not existat the DB2 Data Links Manager(s). Affectedtables are placed in DRNP state.

v Restore involving fast reconciliation failedwhile trying to relink files at the DB2 DataLinks Manager(s). Affected tables are placed inDRNP state.

User Response: Look in the db2diag.log file tofind out what tables are put in DRP/DRNP state.See the Administration Guide for information onreconciling tables that are in DRP/DRNP state.

SQL2570N A database cannot be restored ona platform that does not match theplatform on which the backupimage was created.

Explanation: You created the backup image onone type of platform and are trying to restore iton a different platform. However, backup imagesmust be restored on a system whose machinetype and operating system match the system onwhich the backup image was created.

User Response: To use this particular backupimage, restore it on a system that corresponds tothe system on which the backup was taken.

To move a database from one type of platform toanother, use the db2move utility described in theData Movement Utilities Guide and Reference.

SQL2600 - SQL2699

SQL2600W The input parameter pointer tothe authorization block is invalidor the block’s size is incorrect.

Explanation: The pointer to the authorizationstructure parameter is NULL, the pointer to theauthorization structure points to an area that issmaller than the length indicated in the structurelength field, or the authorization structure lengthfield is not set to the correct value.

The command cannot be processed.

User Response: Correct the value of the inputparameter and resubmit the command.

SQL2650N An invalid parameter was passedto the asynchronous read log API.Reason Code = ″<reason-code>″.

Explanation: An invalid parameter was passedto the asynchronous read log API. The possiblereason codes are as follows:

01 Invalid action specified.

290 Message Reference, Volume 2

Page 299: Db2 SQL Errors

02 The starting log sequence number isgreater than or equal to the currentdatabase active log sequence number.

03 The log sequence number rangebounded by the starting and ending logsequence numbers is not large enoughto span a log record.

04 The starting log sequence number doesnot represent the start of an actual logrecord.

05 The starting log sequence number’slocation could not be determined.

06 The ending log sequence number is lessthan or equal to the starting logsequence number.

07 The buffer is not valid for the indicatedsize.

08 The buffer is not of sufficient size tostore a log record.

09 A pointer is not valid.

User Response: For reason code 01, ensure thatthe action is either SQLU_RLOG_QUERY,SQLU_RLOG_READ, orSQLU_RLOG_READ_SINGLE.

For reason code 02, ensure that the starting logsequence number is less than the current activelog sequence number returned in the read loginformation structure.

For reason code 03, ensure that the ending logsequence number is sufficiently larger than thestarting log sequence number.

For reason code 04, ensure that the starting logsequence number is either the initial logsequence number or one byte larger than the lastread log sequence number returned in the readlog information structure.

For reason code 05, ensure that the starting logsequence number resides in a log extent in thedatabase log file path.

For reason code 06, ensure that the ending logsequence number is greater than the starting logsequence number.

For reason code 07, ensure that the buffer has

been allocated and is of the size indicated by thelog buffer size parameter.

For reason code 08, increase the size of theallocated buffer.

For reason code 09, ensure that memory has beencorrectly allocated and the pointers properlyinitialized.

SQL2651N The log records associated withthe database can not beasynchronously read.

Explanation: The asynchronous read log APIwas used against a connected database whichdoes not have LOG RETAIN or USER EXITS ON.Only databases which are forward recoverablemay have their associated logs read.

User Response: Update the databaseconfiguration for the database, identified to theasynchronous read log API, turning LOGRETAIN and/or USER EXITS ON.

SQL2652N Insufficient memory to run theasynchronous log reader.

Explanation: The allocation of the internalbuffers used by the asynchronous read log APIhas failed.

User Response: Increase the amount ofavailable memory available to the process(increase real or virtual memory or removeunnecessary background processes) or decreasethe log sequence number range provided to theasynchronous read log API.

SQL2653W A Restore, Forward or CrashRecovery may have reused logsequence number ranges. Reasoncode ″<reason-code>″.

Explanation: A Restore, Forward or CrashRecovery may have reused log sequence numberranges. The possible reason codes are as follows:

v 01 - Restore has taken place.

v 02 - Forward Recovery (ROLLFORWARD) hastaken place.

v 03 - Crash Recovery has taken place.

Chapter 2. SQL Messages 291

Page 300: Db2 SQL Errors

User Response: No action is required.

SQL2654W The database log has beenasynchronously read to the end ofthe current active log.

Explanation: All log records in the databaseactive log have been read by the asynchronouslog reader.

User Response: No action is required.

SQL2655N The Asynchronous Log Readerencountered log file “<name>”which is not associated with thedatabase being asynchronouslyread.

Explanation: The Asynchronous Log Readerattempted to read log records from the specifiedlog file. The specified log file is not associatedwith the database being asynchronously read.

User Response: Remove this log file from thedatabase log directory. Move the correct log fileinto the database log directory and resubmit thecall to the Asynchronous Read Log API.

SQL2656N The Asynchronous Log Readerhas encountered log file“<name>” which cannot be read.

Explanation: The Asynchronous Log Readerattempted to read log records from the specified

log file. The specified log file has been corruptedand cannot be read.

User Response: Increase the start read logsequence and resubmit the call to theAsynchronous Read Log API to start readingafter the specified log file.

SQL2657N The Asynchronous Log Readerrequires log file “<name>” whichdoes not currently reside in thedatabase log directory.

Explanation: The Asynchronous Log Readerrequires log records from the specified log file.The specified log file does not currently reside inthe database log directory.

User Response: Move the specified log file intothe database log directory of the database beingasynchronously read. If the database log pathwas changed, the log file might be found in theold log path. Resubmit the call to theAsynchronous Read Log API.

SQL2700 - SQL2799

SQL2701N Invalid command line option for″<progname>″. Reason code:″<reason-code>″

Explanation: Command line option for the datasplitting utility is not valid. Valid options are:

v -c ″Configuration file name″

v -d ″Distribution file name″

v -i ″Input file name″

v -o ″Output file prefix″

v -h Usage message

User Response: Given for each reason code:

1 There is an option not started with ’-’sign.

2 Each option except ’h’ (or ’H’) must befollowed by an argument.

3 There is an invalid option.

4 The argument of an option is too long(maximum 80 characters).

292 Message Reference, Volume 2

Page 301: Db2 SQL Errors

SQL2702N Failed to open the configurationfile ″<config-file>″.

Explanation: The utility cannot read theconfiguration file ″<config-file>″.

User Response: Please ensure the configurationfile exists and is readable.

SQL2703N Failed to open the log file″<log-file>″.

Explanation: The utility cannot open the log file″<log-file>″ for writing or appending.

User Response: Please ensure the log file existsand is writable.

SQL2704N Failed to open the input data file″<input-data-file>″.

Explanation: The utility cannot read the inputdata file ″<input-data-file>″.

User Response: Please ensure the input data fileexists and is readable.

SQL2705N Failed to open the inputpartitioning map file″<in-map-file>″.

Explanation: The utility cannot read the inputpartitioning map file ″<in-map-file>″.

User Response: Please ensure the inputpartitioning map file exists and is readable.

SQL2706N Failed to open the outputpartitioning map file″<out-map-file>″.

Explanation: The utility cannot open the outputpartitioning map file ″<out-map-file>″ forwriting.

User Response: Please ensure the outputpartitioning map file is writable.

SQL2707N Failed to open the distributionfile ″<dist-file>″.

Explanation: The utility cannot open thedistribution file ″<dist-file>″ for writing.

User Response: Please ensure the distributionfile is writable.

SQL2708N Failed to open the output data file″<out-data-file>″.

Explanation: The utility cannot open the outputdata file ″<out-data-file>″ for writing.

User Response: Please ensure the output datafile is writable.

SQL2709N Syntax error at line ″<line>″ ofthe configuration file.

Explanation: There is a syntax error in thespecification of a keyword and its argument.

User Response: A keyword and its argumentmust be delimited by an ’=’ sign.

SQL2710N Invalid keyword at line ″<line>″of the configuration file.

Explanation: There is an undefined keyword inthe configuration file.

User Response: Valid keywords (caseinsensitive) are:

v DESCRIPTION, CDELIMITER, SDELIMITER,NODES, TRACE, MSG_LEVEL, RUNTYPE,OUTPUTNODES, NODES, OUTPUTNODES,OUTPUTTYPE, PARTITION, MAPFILI,INFILE, MAPFILO, OUTFILE, DISTFILE,LOGFILE, NEWLINE, HEADER, FILETYPE

SQL2711N Invalid column delimiter(CDELIMITER) at line ″<line>″ ofthe configuration file.

Explanation: The column delimiter(CDELIMITER) specified in the configuration fileis not valid.

User Response: Make sure the column delimiter(CDELIMITER) is a single byte character.

Chapter 2. SQL Messages 293

Page 302: Db2 SQL Errors

SQL2712N Invalid string delimiter(SDELIMITER) at line ″<line>″ ofthe configuration file.

Explanation: The string delimiter(SDELIMITER) specified in the configuration fileis not valid.

User Response: The string delimiter(SDELIMITER) cannot be a period.

SQL2713N Invalid run type (RUNTYPE) atline ″<line>″ of the configurationfile.

Explanation: The value for run type(RUNTYPE) specified in the configuration file isnot valid.

User Response: Valid run type (RUNTYPE) canbe either PARTITION or ANALYZE (caseinsensitive).

SQL2714N Invalid message level(MSG_LEVEL) at line ″<line>″ ofthe configuration file.

Explanation: The value for message level(MSG_LEVEL) specified in the configuration fileis not valid.

User Response: Valid message level(MSG_LEVEL) can be either CHECK orNOCHECK (case insensitive).

SQL2715N Invalid check level(CHECK_LEVEL) at line ″<line>″of the configuration file.

Explanation: The value for check level(CHECK_LEVEL) specified in the configurationfile is not valid.

User Response: Valid check level(CHECK_LEVEL) can be either CHECK orNOCHECK (case insensitive).

SQL2716N Invalid record length (RECLEN)″<reclen>″ at line ″<line>″ of theconfiguration file.

Explanation: The value for record length(RECLEN) ″<reclen>″ specified in theconfiguration file is not valid.

User Response: The record length (RECLEN)must be between 1 and 32767.

SQL2717N Invalid node specification(NODES) at line ″<line>″ of theconfiguration file. Reason code″<reason-code>″.

Explanation: The node specification (NODES) inthe configuration file is not valid.

User Response: Given for each reason code:

1 NODES has already been defined.

2 The format is not valid. A validexample: NODES=(0,30,2,3,10-15,57)

3 Each entry must be numeric databetween 0 and 999.

4 Range specification must be from alower number to a higher number.

SQL2718N Invalid output node specification(OUTPUTNODES) at line″<line>″ of the configuration file.Reason code ″<reason-code>″.

Explanation: The output node specification(OUTPUTNODES) in the configuration file is notvalid.

User Response: Given for each reason code:

1 OUTPUTNODES has already beendefined.

2 The format is not valid. A validexample: OUTPUTNODES=(0,30,2,3,10-15,57)

3 Each entry must be numeric databetween 0 and 999.

4 Range specification must be from alower number to a higher number.

294 Message Reference, Volume 2

Page 303: Db2 SQL Errors

SQL2719N Invalid output type(OUTPUTTYPE) at line ″<line>″of the configuration file.

Explanation: The output type (OUTPUTTYPE)in the configuration file is not valid.

User Response: Valid output types(OUTPUTTYPE) are W (write) or S (stdin), caseinsensitive.

SQL2720N Number of partition keysexceeded the maximum ″256″.This error was detected at line″<line>″ of the configuration file.

Explanation: The number of partitioning keysdefined cannot exceed the maximum limit: 256.

User Response: Remove one or morepartitioning keys defined in the configurationfile.

SQL2721N Invalid partitioning keyspecification (PARTITION) at line″<line>″ of the configuration file.Reason code ″<reason-code>″.

Explanation: A partitioning key specification(PARTITION) in the configuration file is notvalid. Valid format:

PARTITION=<key name>,<position>,<offset>,<len>,<nullable>,<datatype>

If a delimited-data file, <position> must bedefined; otherwise, <offset> and <len> must bedefined.

User Response: Given for each reason code:

1 Fields must be delimited by the ’,’character.

2 <position>, <offset> and <len> must bepositive integers.

3 <nullable> must take a value from{N,NN,NNWD}.

4 Valid <data type> includes: SMALLINT,INTEGER, CHARACTER, VARCHAR,FOR_BIT_CHAR, FOR_BIT_VARCHAR,FLOAT (for binary numerics only),

DOUBLE (for binary numerics only),DATE, TIME, TIMESTAMP,DECIMAL(x,y).

5 For DECIMAL data type, precision (x)and scale (y) must be specified and theymust be positive integers.

6 For CHARACTER or VARCHAR datatype, <len> must be specified.″

SQL2722N Invalid log file specification(LOGFILE) at line ″<line>″ of theconfiguration file.

Explanation: The log file specification(LOGFILE) in the configuration file is not valid.

User Response: The log file specification(LOGFILE) must be in one of the following twoformats:

v LOGFILE=<log file name>,<log type>

v LOGFILE=<log file name>

<log type> can only be W (write) or A (append),case insensitive.

SQL2723N Invalid trace specification(TRACE) at line ″<line>″ of theconfiguration file.

Explanation: The trace specification (TRACE) inthe configuration file is not valid.

User Response: The trace specification (TRACE)must be a positive integer between 0 and 65536(exclusive).

SQL2724N Invalid node list specification.

Explanation: The node list specification is notvalid.

User Response: One and only one of the twoparameters: NODES and MAPFILI (inputpartition map) must be specified in theconfiguration file.

Chapter 2. SQL Messages 295

Page 304: Db2 SQL Errors

SQL2725N Filename for output partition mapwas not specified.

Explanation: If run type is ANALYZE, afilename for the output partition map must bedefined.

User Response: Specify a filename for theoutput partition map.

SQL2726N There is no partitioning keydefined.

Explanation: At least one partitioning key mustbe defined.

User Response: Specify one or morepartitioning keys.

SQL2727N Partition key ″<key-name>″exceeds the record length″<reclen>″.

Explanation: For non-delimited data, startingposition for a key must be less than the recordlength.

User Response: Make sure starting position fora key is less than the record length.

SQL2728N Output node ″<out-node>″ is notdefined in the node list.

Explanation: Output node list must be a subsetof the node list, which is derived from NODESor the input partition map file.

User Response: Make sure all output nodes aredefined in the node list.

SQL2729N Invalid input partition map.

Explanation: There is at least one error in theinput partition map file.

User Response: The input partition map mustcontain no less than 4096 data entries, and eachdata entry must be a number between 0 and 999.

SQL2730N Error while writing header tooutput data file ″<out-data-file>″.

Explanation: An I/O error occurred whilewriting the header to an output data file.

User Response: Check your operating systemdocumentation for file I/O errors and ensure thatthere is sufficient space on the output device.

SQL2731N Error while reading from inputdata file ″<filename>″.

Explanation: An I/O error occurred whilereading from input data file.

User Response: Check your operating systemdocumentation for file I/O errors.

SQL2732N Line ″<line>″ of the input datafile contains binary data.

Explanation: Binary data is not permitted onthe host versions of this utility program.

User Response: Check your input data file.

SQL2733N Run type (RUNTYPE) was notdefined in the configuration file.

Explanation: The run type (RUNTYPE) must bedefined as either PARTITION or ANALYZE.

User Response: Please specify run type(RUNTYPE) in the configuration file.

SQL2734N Invalid specification for parameter32KLIMIT at line ″<line>″ of theconfiguration file.

Explanation: The specification for parameter32KLIMIT in the configuration file is not valid.

User Response: Parameter 32KLIMIT can beeither YES or NO, case insensitive.

296 Message Reference, Volume 2

Page 305: Db2 SQL Errors

SQL2735W The record ″<rec-no>″ of the inputdata file was discarded because itwas an empty record.

Explanation: The record ″<rec-no>″ of the inputdata is discarded because it contains nothing butspaces.

User Response: Check record ″<rec-no>″ in theinput data file.

SQL2736N sqlugrpi_api returned an errorwhen processing record at line″<line>″ of the input data file.

Explanation: Partitioning key fields containinvalid data.

User Response: Check the input data file at line″<line>″.

SQL2737N Failed to write output data file foroutput node ″<out-node>″ whenprocessing record at line ″<line>″of input data file.

Explanation: An I/O error occurred whilewriting a record to the output data file for node″<out-node>″.

User Response: Check your operating systemdocumentation for file I/O errors and ensure thatthere is sufficient space on the output device.

SQL2738W Record at line ″<line>″ of inputdata file has been truncated whenwriting to the output data file fornode ″<out-node>″. Expectedwriting length is ″<reclen>″ whileactual writing length is″<real-len>″.

Explanation: Expected writing length (RECLEN)does not match the actual writing length.

User Response: Adjust record length valuedefined in the configuration file.

SQL2739N The record length was notspecified for a binary numericaldata file.

Explanation: If a binary numerical input datafile, the record length has to be defined.

User Response: Please specify the record lengthin your configuration file.

SQL2740N Float data type is not allowed in anon-binary input data file.

Explanation: Float data type is only supportedwhen the file type is BIN (binary).

User Response: Make sure data types and thetype of input data file match.

SQL2741N Invalid file type specification atline ″<line>″ of the configurationfile.

Explanation: The file type specification(FILETYPE) in the configuration file is not valid.

User Response: Valid values for the file typeparameter are as follows:

v ASC (positional ascii data file)

v DEL (delimited ascii data file)

v BIN (ASC file with all numeric data in binaryformat)

v PACK (ASC file with all decimal data inpacked decimal format)

v IMPLIEDDECIMAL (DEL file with decimaldata in implied decimal format).

All the values are case insensitive.

SQL2742N The length of partition key″<partition-key>″ does not matchits precision.

Explanation: In a binary input data file, thelength of a partition key with decimal data typemust conform to the equation:LENGTH=(PRECISION+2)/2 (integer division),because it is a packed decimal.

User Response: Match the length of adecimal-typed partition key with its precision if

Chapter 2. SQL Messages 297

Page 306: Db2 SQL Errors

the input data file is a binary data file.

SQL2743N The length of partition key″<partition-key>″ does not matchits data type.

Explanation: In a binary input data file, thelength of a partition key with integer, smallinteger, float, and double data type must be apredefined constant, i.e. 4 for integer, 2 for smallinteger, 4 for float, and 8 for double.

User Response: Check partition key definitionsin the configuration file.

SQL2744N Illegal file name specification for″<file>″ at line ″<line>″ of theconfiguration file.

Explanation: The maximum length for a filename is 80 bytes.

User Response: Check the configuration file.

SQL2745N Invalid NEWLINE flag at line″<line>″ of the configuration file.

Explanation: The NEWLINE flag must be eitherYES or NO, and if not given, it is NO.

User Response: Check the specification ofNEWLINE flag in the configuration file.

SQL2746N An incomplete record was foundwhile reading record″<record-number>″ from the inputdata file.

Explanation: If a fixed-length positional ASCfile or a binary numerical data file, each recordhas to be exactly the same length as the value ofthe RECLEN parameter in the configuration file.

User Response: Make sure the input data file iscomplete.

SQL2747N A record was too long whilereading record ″<rec-no>″ fromthe input data file.

Explanation: For a positional ASC input datafile or a delimited data file with parameter

32KLIMIT on, the maximum record length cannot exceed the 32k (bytes) limit.

User Response: Check your input data file andmake sure the record length is less than 32kbytes.

SQL2748N Record ″<record-number>″ has alength of ″<length>″ bytes, whichis too short to hold thepartitioning key ″<key>″.

Explanation: For a positional ASC input datafile or a binary numerical data file, each recordhas to be long enough to hold all partitioningkeys.

User Response: Check the record length of yourinput data file.

SQL2749N Partitioning key ″<key-no>″ ofrecord ″<rec-no>″ was not in thefirst 32k bytes of the record.

Explanation: If a record is greater than 32kbytes long in a delimited data file, allpartitioning keys of each record have to bewithin the first 32k bytes of the record.

User Response: Check record ″<rec-no>″ in theinput data file.

SQL2750N The length of line″<line-number>″ in theconfiguration was more than 255bytes.

Explanation: The maximum length of a line inthe configuration file must be less than 255 bytes.

User Response: Check your configuration fileand make sure all lines are less than 255 bytes.

SQL2751N The actual length″<actual-reclen>″ of record″<rec-no>″ did not match theexpected length ″<exp-reclen>″.

Explanation: If new line checking is requiredfor a fixed length ASC data file (NEWLINEparameter is YES and RECLEN parameter is notzero), the actual length of each record has to

298 Message Reference, Volume 2

Page 307: Db2 SQL Errors

match the expected record.

User Response: Check record ″<rec-no>″ in theinput data file.

SQL2752N Invalid codepage specification″<codepage>″ at line ″<line>″ ofthe configuration file.

Explanation: The codepage specification is notvalid. It must be a positive integer.

User Response: Correct the codepagespecification in the configuration file.

SQL2753N Failed to get the country code andcodepage for the application.Return code from function″<function-name>″ is ″<rc>″.

Explanation: The program failed to get thecountry code and codepage of its environment.

User Response: Check with your databasesystem adminstrator.

SQL2754N Codepage ″<source-cp>″ cannot beconverted to codepage″<target-cp>″.

Explanation: The database does not supportcodepage conversion between those twocodepages.

User Response: Please ensure your data is in aconvertible codepage.

SQL2755N Decimal data can not be in bothIMPLIEDDECIMAL andPACKEDDECIMAL format.

Explanation: Valid format of decimal data isSQL_PACKEDDECIMAL_FORMAT,SQL_CHARSTRING_FORMAT, orSQL_IMPLIEDDECIMAL_FORMAT, mutuallyexclusive.

User Response: Verify the format of yourdecimal data, correct the format value, andresubmit the command.

SQL2761N Only one of table name ornodegroup can be specified.

Explanation: Specify either the table name orthe nodegroup name, but not both.

User Response: Check your command lineoptions.

SQL2762N The utility failed to find thedatabase installation path.

Explanation: The utility needs to know wherethe database manager is installed, then it canfind its bind file.

User Response: Make sure your databasemanager is properly installed.

SQL2763N The table ″<tbl-name>″ was notfound.

Explanation: The table ″<tbl-name>″ cannot belocated in sysibm.systables.

User Response: Make sure the table exists inthe database.

SQL2764N The nodegroup ″<nodegroup>″was not found.

Explanation: The nodegroup ″<nodegroup>″cannot be located in sysibm.sysnodegroupdef.

User Response: Make sure the nodegroup existsin the database.

SQL2765W The utility failed to open outputpartition map file″<out-map-file>″.

Explanation: The utility cannot open the outputpartition map file for writing. It will write theoutput to stdout.

User Response: Check your file accesspermissions.

Chapter 2. SQL Messages 299

Page 308: Db2 SQL Errors

SQL2766N The partition map is not of thecorrect size ″<map-size>″.

Explanation: The size of the partition map isnot correct. Data is corrupted in the database.

User Response: Contact the DatabaseAdministrator to resolve the problem.

SQL2767N A command line option is notvalid.

Explanation: There is an invalid command lineoption.

User Response: Make sure to specify the correctcommand line options.

SQL2800 - SQL2899

SQL2800N CREATE, DROP, or CHANGENODE failed. Reason code″<reason-code>″.

Explanation: The utility failed to add, drop, orchange the node because the input parametersspecified are invalid as indicated by thefollowing reason codes:

v (1) The node number is not specified

v (2) The TCP/IP host name is not specified

v (3) The computer name is not specified

v (4) The node number is invalid.

v (5) The port number is invalid.

v (6) The TCP/IP host name is invalid.

v (7) The port value is not defined for yourinstance in the services file.

v (8) The port value is not in the valid rangedefined for your instance in the services file.

v (9) The node number is not unique.

v (10) The host name/port couple is not unique.

v (11) The host name value has nocorresponding port 0.

User Response: The action corresponding to thereason code is:

v (1) Ensure that the node number is specified

v (2) Ensure that the TCP/IP host name isspecified

v (3) Ensure that the computer name is specified

v (4) Ensure that the node number is between 0and 999.

v (5) Ensure that the port number is between 0and 999.

v (6) Ensure that the host name specified is bothdefined on the system and is operational

v (7) Ensure that the TCP/IP services on yoursystem contains an entry for your instance

v (8) Ensure that you only use port values thatare specified in the services file on yoursystem

v (9) Ensure that the node number specified isunique.

v (10) Ensure that the new host name/port isnot already defined in the db2nodes.cfg file.

v (11) Ensure that the port value 0 has beendefined for host name specified.

SQL2801N The syntax of the DB2NCRTcommand is incorrect.

Explanation: The DB2NCRT utility creates anew node in a partitioned database system.

DB2NCRT /n:node /u:username,password[/i:instance][/h:host][/m:machine][/p:port][/o:instance owning machine][/g:netname]

The command arguments are:

v /n Specify the node number

v /u to specify the account name and passwordfor the DB2 service.

The command options are:

v /i Specify the instance if different from thedefault/current instance

v /h Specify the TCP/IP host name if the hostname is not the machine default TCP/IP hostname

v /m Specify the workstation name if the nodeis created on a remote machine

300 Message Reference, Volume 2

Page 309: Db2 SQL Errors

v /p Specify the logical port number if this isnot the first node on the machine

v /o Specify the computer name of the instanceowning machine when creating the first nodeon a machine.

v /g Specify the network name or IP Address.

User Response: Enter the command again usingvalid parameters.

SQL2802N The syntax of the DB2NCHGcommand is incorrect.

Explanation: The DB2NCHG utility changes orupdates node configuration for a given node in apartitioned database system.

DB2NCHG /n:node [/h:host][/m:machine][/p:port][/i:instance][/u:username,password][/g:netname]

The command options are:

v /h Change the TCP/IP host name

v /m Change the workstation name

v /p Change the logical port number

v /i Specify the instance if different from thedefault/current instance

v /u Change the Logon Account name andpassword

v /g Specify the network name or IP Address

User Response: Issue the DB2NCHG commandwith one of the valid command options.

SQL2803N The syntax of the DB2NDROPcommand is incorrect.

Explanation: The DB2NDROP utility drops anode from a partitioned system.

DB2NDROP /n:node [/i:instance]

The command options are:

v /i Specify the instance if different from thedefault/current instance

User Response: Issue the DB2NDROP

command with one of the valid commandoptions.

SQL2804N The syntax of the DB2NLISTcommand is incorrect.

Explanation: The DB2NLIST utility list allnodes in a partitioned system.

DB2NLIST [/i:instance][/s]

The command options are:

v /i Specify the instance if different from thedefault/current instance

v /s Display node status

User Response: Issue the DB2NLIST commandwith one of the valid command options.

SQL2805N A service error has occurred.Reason code ″<reason-code>″.

Explanation: A service error has occurredduring CREATE, DROP or ADD NODEprocessing as indicated by the following reasoncodes:

v (1) Unable to register the service

v (2) Unable to set the required User RightsPolicy

v (3) Unable to set the Logon Account for theservice

v (4) Unable to delete the service

User Response: The action corresponding to thereason code is:

v (1) If the workstation name is specified duringDB2NCRT, ensure that the workstation nameis correct.

v (2) Ensure that the user name specified isvalid.

v (3) Ensure that the user name and thepassword specified are valid.

v (4) If the node resides on another machine,ensure that the machine is running.

Chapter 2. SQL Messages 301

Page 310: Db2 SQL Errors

If the problem persists, examine the db2diag.logfor problem determination information andcontact an IBM Service Representative forassistance.

SQL2806N Node ″<node>″ not found forinstance ″<instance>″.

Explanation: DB2NDROP failed because thenode does not exist.

User Response: Ensure the node number iscorrect and reissue the command.

SQL2807N Node ″<node>″ already exists forinstance ″<instance>″.

Explanation: DB2NCRT failed because the nodealready exists.

User Response: Ensure the node number iscorrect and reissue the command.

SQL2808W Node ″<node>″ for instance″<instance>″ has been deleted.

Explanation: The DB2NDROP processing hascompleted successfully.

User Response: No further action is required.

SQL2809W Node: ″<node>″ added toinstance: ″<instance>″ {Host:″<host-name>″ Machine:″<machine-name>″ Port:″<port-num>″}

Explanation: The DB2NCRT processing hascompleted successfully.

User Response: No further action is required.

SQL2810W Node: ″<node>″ changed ininstance: ″<instance>″ {Host:″<host-name>″ Machine:″<machine-name>″ Port:″<port-num>″}

Explanation: The DB2NCHG processing hascompleted successfully.

User Response: No further action is required.

SQL2811N The command is invalid becausethe instance is not a partitioneddatabase instance.

Explanation: The command is only valid if theinstance is a partitioned database instance.

User Response: Ensure that the specifiedinstance name is valid. If the instance name isnot specified on the command line, ensure thatthe DB2INSTANCE environment is set to a validpartitioned database instance.

SQL2812N An invalid argument was enteredfor the db2drvmp command.

Explanation: Usage:

db2drvmp add node_numberfrom_drive to_drive

drop node_numberfrom_drive

query [ node_number ][ from_drive ]

reconcile [ node_number ][ from_drive ]

Valid arguments for this command are:

add assign a new database drive map.

drop remove an existing database drive map.

query query a database map.

reconcilerepair a database map drive when theregistry contents are damanged.

node_numberthe node number. The parameter isrequired for add and drop operations.

from_drivethe drive letter to map from. Thisparameter is required for add and dropoperations.

to_driveto drive letter to map to. This parameteris required only for add operation. It isnot applicable for any other operations.

User Response: Enter the command again usingvalid arguments.

302 Message Reference, Volume 2

Page 311: Db2 SQL Errors

SQL2813I The drive mapping from drive″<drive-1>″ to drive ″<drive-2>″was added for node ″<node>″.

Explanation: The drive mapping was addedsuccessfully.

User Response: No action necessary.

SQL2814I The drive mapping from drive″<drive>″ was deleted for node″<node>″.

Explanation: The drive mapping was deletedsuccessfully.

User Response: No action necessary.

SQL2815I The drive mapping for node″<node>″ is: ″<drive-1>″ -″<drive-2>″.

Explanation: Informational message.

User Response: No action necessary

SQL3000 - SQL3099

SQL3001C An I/O error (reason =“<reason>”) occurred whileopening the output file.

Explanation: A system I/O error occurred whileopening the output file.

The command cannot be processed. No data isprocessed.

User Response: For IMPORT/LOAD, verifythat the output file exists. For EXPORT, verifythat the output media has enough free space.Resubmit the command with a valid output filename, including the correct path. Look in themessage file for additional information.

SQL3002C An I/O error occurred whilewriting to the output data file.

Explanation: A system I/O error occurred whilewriting to the output data file. The output maybe incomplete or the disk may be full.

The utility stops processing.

User Response: If the output data file isincomplete, erase it and resubmit the command.

SQL3003C An I/O error occurred whileclosing the output data file.

Explanation: A system I/O error occurred whileclosing the output data file.

The file is not closed.

User Response: If the output data file isincomplete, erase it and resubmit the command.

SQL3004N The filetype parameter is notvalid.

Explanation: The filetype parameter must beDEL, ASC, IXF, WSF, or DB2CS for thecommand.

The filetype parameter must be DEL, IXF, or WSFfor the EXPORT command.

The filetype parameter must be ASC, DEL, IXF, orDB2CS for the LOAD command.

IXF files can not be used to load into a tabledefined on a multinode nodegroup.

The command cannot be processed.

User Response: Resubmit the command with avalid filetype parameter.

SQL3005N Processing was interrupted.

Explanation: An interrupt was received duringprocessing. The user may have pressed theinterrupt key sequence.

The utility stops processing. Any databaseupdates not committed are rolled back.

User Response: Resubmit the command. If

Chapter 2. SQL Messages 303

Page 312: Db2 SQL Errors

doing an import, see Command Reference forinformation on how to use commitcount andrestartcount parameters. If doing a load, seeCommand Reference for information on how torestart the load.

SQL3006C An I/O error occurred whileopening the message file.

Explanation: A system I/O error occurred whileopening the message file. This error can refer toa problem on either the client or the server.

The command cannot be processed.

User Response: Resubmit the command with avalid message file name, including the correctpath.

SQL3007C An I/O error occurred whilewriting to the message file.

Explanation: A system I/O error occurred whilewriting to the message file.

Processing may not have finished.

User Response: If the message file isincomplete, erase it and resubmit the command.

SQL3008N The utility encountered an error″<error>″ while connecting to thedatabase.

Explanation: The IMPORT or EXPORT utilitycould not connect to the database.

No data is imported or exported.

User Response: Look at the error number in themessage for more information. Make changesand resubmit the command.

SQL3009N The Action String parameter isnot valid.

Explanation: The Action String (e.g. ″REPLACEinto ...″) parameter in the command is not valid.The Action String pointer may be incorrect. Thestructure that the Action String points to may beincorrect. The Action String structure may containcharacters that are not valid.

The command cannot be processed.

User Response: Verify the Action String pointerand the structure it points to. Resubmit thecommand with a valid Action String.

SQL3010N The METHOD parameter is notvalid.

Explanation: The METHOD parameter in thecommand is not valid. The METHOD pointermay be incorrect. The structure that theMETHOD points to may be incorrect. TheMETHOD structure may contain characters thatare not valid.

The command cannot be processed.

User Response: Examine the METHOD pointerand the structure it points to. Resubmit thiscommand with a valid METHOD.

SQL3011C There is not enough storage toprocess the command.

Explanation: A memory allocation erroroccurred. Not enough memory is available toprocess the command, or there was an errorfreeing storage.

The command cannot be processed.

User Response: Stop the application. Possiblesolutions include:

v Verify that your system has sufficient real andvirtual memory.

v Remove background processes.

v Increase the util_heap_sz for the database.

v Decrease the size of buffers to use for theLOAD.

v The util_heap_sz is shared by the LOAD,BACKUP and RESTORE utilities, so havefewer concurrent instances of these utilitiesrunning.

SQL3012C A system error occurred.

Explanation: An operating system erroroccurred.

The command cannot be processed.

304 Message Reference, Volume 2

Page 313: Db2 SQL Errors

User Response: Check your message file,correct the problem and resubmit the command.

SQL3013N The length of the filetmod is outof the acceptable range. It shouldbe greater than or equal to zeroand less than or equal to 8000.

Explanation: The filetmod specified is outsidethe acceptable range (greater than or equal tozero and less than or equal to 8000).

The command cannot be processed.

User Response: Examine the filetmod pointerand the structure it points to. Resubmit thecommand with a valid filetmod.

SQL3014C An I/O error occurred whileclosing the message file.

Explanation: A system I/O error occurred whileclosing the message file.

The message file is not closed.

User Response: If the message file isincomplete, resubmit the command.

SQL3015N An SQL error “<sqlcode>”occurred during processing.

Explanation: An SQL error occurred during theutility call.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL3016N An unexpected keyword″<keyword>″ was found in thefiletmod parameter for thefiletype.

Explanation: A keyword that does not apply tothe filetype for the utility was found in thefiletype modifier (the filetmod parameter or thephrase following MODIFIED BY in a CLPcommand).

The utility stops processing.

User Response: Remove the filetype modifier orspecify at least one valid keyword in the filetypemodifier. See the Command Reference for moreinformation on filetype modifiers.

SQL3017N A delimiter is not valid or is usedmore than once.

Explanation: For Delimited ASCII (DEL) files,one of two errors occurred:

v The character specified for either the columndelimiter, character string delimiter, or decimalpoint character is not valid.

v The same character is specified for more thanone of the preceding items.

The command cannot be processed.

User Response: Examine the specifieddelimiters for validity and uniqueness. Resubmitthe command with valid delimiter overrides.

SQL3018N The period was specified as acharacter string delimiter.

Explanation: For Delimited ASCII (DEL), theperiod cannot be specified as the character stringdelimiter.

The command cannot be processed.

User Response: Resubmit the command withvalid delimiter overrides.

SQL3019N No Action String parameter wasspecified in the command.

Explanation: No Action String (e.g. ″REPLACEinto ...″) parameter is specified for this utilitycall. This parameter is required.

The command cannot be processed.

User Response: Resubmit the command with anAction String parameter.

Chapter 2. SQL Messages 305

Page 314: Db2 SQL Errors

SQL3020N The user does not have theauthority to run the specifiedExport command.

Explanation: The user attempted to export datawithout the appropriate authorization (either theSYSADM or DBADM authority), or theCONTROL or SELECT privilege for each tableinvolved in the export.

The export action is not performed.

User Response: Request appropriateauthorization before exporting data from thetables.

SQL3021N The user does not have theauthority to run the specifiedImport command on table“<name>”.

Explanation: The user attempted to import datawithout the appropriate authorization for thespecified option and table.

Import using the INSERT option requires one ofthe following:

v SYSADM or DBADM authority

v CONTROL privilege on the table, view, orentire hierarchy

v INSERT and SELECT privilege on the table,view, or entire hierarchy.

Note: entire hierarchy refers to all subtables orobject views in the hierarchy.

Import to an existing table or view using theINSERT_UPDATE, REPLACE, or theREPLACE_CREATE option, requires one of thefollowing:

v SYSADM or DBADM authority

v CONTROL privilege on the table, view, orentire hierarchy.

Note: entire hierarchy refers to all subtables orobject views in the hierarchy.

Import to a table that does not exist, using theCREATE or REPLACE_CREATE option, requiresone of the following:

v SYSADM or DBADM authority

v CREATETAB authority on the database andone of:

– IMPLICIT_SCHEMA authority on thedatabase, if the schema name of the tabledoes not exist

– CREATEIN privilege on the schema, if theschema of the table exists

The import operation is not performed.

User Response: Ensure that the user has theauthorization to perform the import operation.

SQL3022N An SQL error “<sqlcode>”occurred while processing theSELECT string in the ActionString parameter.

Explanation: In IMPORT or EXPORT, duringprocessing of the SELECT string from the ActionString (e.g. ″REPLACE into ...″) structure, an SQLerror occurred.

The command cannot be processed.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL3023N The database name parameter isnot valid.

Explanation: The database name parameter isnot valid. See the SQLERRD[0] field in theSQLCA for more information.

The database name must contain 1 to 8characters and the characters must be from thedatabase manager base character set.

The command cannot be processed.

User Response: Resubmit the statement with avalid database name parameter.

SQL3025N A parameter specifying a filenameor path is not valid.

Explanation: The parameter contains a path,directory, or file name that is not valid.

306 Message Reference, Volume 2

Page 315: Db2 SQL Errors

For IMPORT and EXPORT, verify the datafileparameter.

For LOAD, verify that each entry in theparameters of type sqlu_media_list: datafile shouldcontain valid filenames; lobpaths copytarget, andworkdirectory should contain valid paths on theserver including the final separator and a nullterminator.

The pointer to lobpaths, copytarget andworkdirectory must be valid or null.

The pointer to the targets in these structuresmust be valid.

Check that sessions and media_type are specifiedcorrectly.

Also, if the lobpaths parameter is specified, checkthat the media_type is the same as that specifiedfor the datafile structure.

If the filetype is IXF, the length of the file namemay be too long.

The command cannot be processed.

User Response: Resubmit the statement with avalid parameter.

SQL3026N The msgfile or tempfiles pathparameter is not valid.

Explanation: For IMPORT or EXPORT, themsgfile parameter contains a path, directory, orfile name that is not valid.

For LOAD, either the msgfile parameter containsa path, directory, or file name that is not valid onthe client, or the tempfiles path is not valid onthe server.

If the database to which the application isconnected is a remote database, the msgfile mustbe fully qualified. For a local database the utilitywill attempt to fully qualify the msgfile if it isnot already fully qualified. Also verify that thepointer to the msgfile is valid.

The command cannot be processed.

User Response: Resubmit the statement with avalid msgfile and/or tempfiles path parameter.

SQL3028N The export method indicator isnot valid. It must be either ’N’ or’D’.

Explanation: The export method indicator mustbe either N for Names or D for Default.

The command cannot be processed.

User Response: Resubmit the statement with avalid method indicator.

SQL3029N No filetype parameter wasspecified.

Explanation: The filetype parameter was eithernot specified or null. The system does not knowwhich format to use for the data file.

The command cannot be processed.

User Response: Resubmit the statement with avalid filetype.

SQL3030C An I/O error (reason =“<reason>”) occurred whileopening the input file.

Explanation: A system I/O error occurred whileopening the input file. This error can refer to aproblem on either the client or the server.

A possible cause may be that the input file is inuse by another application.

The command cannot be processed.

User Response: Ensure that the input file isvalid, including the path, and that it is notcurrently in use by another application.

Resubmit the command. Look in the diagnosticslog file for additional information.

SQL3031C An I/O error occurred whilereading from the input file.

Explanation: A system I/O error occurred whilereading from the input file. This error can referto a problem on either the client or the server.

The command cannot be processed.

Chapter 2. SQL Messages 307

Page 316: Db2 SQL Errors

User Response: Verify that the input file isreadable.

SQL3032N The LOAD/IMPORT methodindicator is not valid for thespecified filetype. It must beeither ’N’, ’P’, or ’default’.

Explanation: For the IXF and WSF filetypes, theLOAD/IMPORT method indicator must be eitherN for Names, P for Positional, or D for Default.

The command cannot be processed.

User Response: Resubmit the command with avalid method indicator.

SQL3033N A keyword such as INSERT,REPLACE, CREATE,INSERT_UPDATE, orREPLACE_CREATE is missingfrom the target specification or itis misspelled.

Explanation: For IMPORT, the Action String (e.g.″REPLACE into ...″) parameter does not containthe keyword INSERT, REPLACE, CREATE,INSERT_UPDATE, or REPLACE_CREATE. ForLOAD, the Action String parameter does notcontain the keyword INSERT, REPLACE, orRESTART. The keyword must be followed by atleast one blank.

The command cannot be processed.

User Response: Resubmit the command with avalid Action String parameter.

SQL3034N The keyword INTO is missingfrom the target specification or itis misspelled.

Explanation: The INTO keyword is missing orspelled incorrectly. INTO must be followed by atleast one blank.

The command cannot be processed.

User Response: Resubmit the command with avalid Action String (e.g. ″REPLACE into ...″)parameter.

SQL3035N The tablename parameter in thetarget specification is not valid.

Explanation: For IMPORT, the tablename in theAction String (e.g. ″REPLACE into ...″) is notvalid. For LOAD, the tablename or the exceptiontablename in the Action String is not valid.

The command cannot be processed.

User Response: Resubmit the command with avalid tablename. Also ensure that all commandkeywords and parameters are entered in thecorrect order.

SQL3036N The tcolumn-list in the targetspecification does not have aclosed parenthesis.

Explanation: The tcolumn-list must be delimitedby parentheses. The list was not terminated bythe closed parenthesis.

The command cannot be processed.

User Response: Resubmit the statement with avalid, complete column list in the Action String(e.g. ″REPLACE into ...″) parameter.

SQL3037N An SQL error “<sqlcode>”occurred during Importprocessing.

Explanation: An SQL error occurred duringprocessing of the Action String (e.g. ″REPLACEinto ...″) parameter.

The command cannot be processed.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL3038N The Action String parametercontains unexpected characters.

Explanation: For IMPORT, there are charactersother than blanks after the closing parenthesis ofthe column list in the Action String (e.g.″REPLACE into ...″) parameter. For LOAD, thereare characters other than blanks after the closingparenthesis of the column list and/or the

308 Message Reference, Volume 2

Page 317: Db2 SQL Errors

exception tablename in the Action Stringparameter.

The command cannot be processed.

User Response: Resubmit the command with avalid Action String parameter.

SQL3039W The memory available to LOADfor DATA BUFFER prohibits fullLOAD parallelism. Loadparallelism of “<value>” will beused.

Explanation: The LOAD utility attempted todetermine the optimal level of CPU parallelismfor SMP exploitation based on the systemconfiguration, or the user specified a value forLOAD parallelism when invoking the utility.However, one of the following limitation wasencountered:

1. The amount of free memory in the utilityheap prohibits this degree of parallelism.

2. The DATA BUFFER parameter was specifiedwith a value too small to allow for thespecified or available parallelism.

A lesser degree of parallelism, requiring lessmemory, will be used.

User Response:

1. Ignore this message, and the LOAD willcomplete normally using the smaller valuefor LOAD parallelism. However, Loadperformance may be less than optimal.

2. Specify a smaller value for LOAD parallelismwhen invoking the utility.

3. Increase the size of the utility heap.

4. Increase the size of the data buffer parameter,or leave the parameter blank and let theLOAD utility determine a default based onthe freespace in the utility heap.

SQL3040N Unable to use the lobpath/lobfileparameters as specified. Reasoncode: “<reason-code>”.

Explanation: The utility is unable to use thelobpath or lobfile parameters as specified for the

reason given by “<reason-code>”. The codes arelisted below.

User Response: Given for each reason code:

1 The lobpath is not a validsqlu_media_list or the values providedare not valid. The media_type must beSQLU_LOCAL_MEDIA and allpathnames must be terminated with avalid path separator.

2 The lobfile is not a valid sqlu_media_listor the values provided are not valid.The media_type must beSQLU_LOCAL_MEDIA.

3 There are not enough lobpath namesprovided. For export, there is notenough space on the paths provided tohold all the lobs.

4 There are not enough lobfile namesprovided. For export, there are morelobs than the number of lobfile namesprovided multiplied bySQLU_MAX_SESSIONS.

5 The combination of a lobpath name andlobfile name would exceed themaximum size of a lobfile name (255bytes).

6 An error occurred while trying to accessthe file.

SQL3042N The LINKTYPE specified for aDATALINK column is invalid.

Explanation: The value specified for LINKTYPEfor a DATALINK column is invalid.

User Response: Check the LINKTYPE specified.Correct the value and resubmit the command.

SQL3043N The DATALINK SPECIFICATIONfor DATALINK column(s) isinvalid.

Explanation: The DATALINK SPECIFICATIONfor DATALINK column(s) is invalid for one ofthe following reasons:

Chapter 2. SQL Messages 309

Page 318: Db2 SQL Errors

v No value is specified forDL_URL_REPLACE_PREFIX.

v No value is specified forDL_URL_DEFAULT_PREFIX.

v No value is specified for DL_URL_SUFFIX.

v Contains keywords other thanDL_URL_REPLACE_PREFIX orDL_URL_DEFAULT_PREFIX orDL_URL_SUFFIX.

User Response: Correct the specification andresubmit the command.

SQL3044N The DATALINK SPECIFICATIONfor a DATALINK column hasduplicate prefix specification.

Explanation: The DATALINK SPECIFICATIONfor a DATALINK column has duplicatespecifications for DL_URL_REPLACE_PREFIX orDL_URL_DEFAULT_PREFIX.

User Response: Remove the duplicatespecification and resubmit the command.

SQL3045N A dcolumn position in theMETHOD parameter is less thanone or greater than the maximumnumber of columns (1024) in aDelimited ASCII file.

Explanation: The dcolumn position is less than 1or greater than the maximum number ofcolumns (1024) in a delimited file.

The command cannot be processed.

User Response: Resubmit the command withvalid dcolumn positions.

SQL3046N The number of columns in theMETHOD parameter is less thanone.

Explanation: For METHOD methods other thanDefault, the number of columns specified mustbe a positive number (greater than 0).

The command cannot be processed.

User Response: Resubmit the command with a

valid number of columns in the METHODparameter.

SQL3047N The LOAD/IMPORT methodspecified in METHOD is notvalid for Delimited ASCII files. Itmust be either ’P’ or ’default’.

Explanation: The only valid LOAD/IMPORTmethods for Delimited ASCII files are P forPositions or D for Default.

The command cannot be processed.

User Response: Resubmit the command with avalid import method.

SQL3048N There are fewer columns specifiedfrom the input file than databasecolumns, but one of the databasecolumns is not nullable.

Explanation: When fewer columns are specifiedin the METHOD list than are specified for thetarget table, the values for the missing inputcolumns are loaded as nulls. Because thecolumns in the target table that correspond toone or more of these input columns are notnullable, null cannot be inserted.

The file cannot be loaded.

User Response: Define a new table that has thesame number of columns as the input file or thathas nullable columns. Resubmit the command.

SQL3049N The data type “<type>” of thedatabase column “<name>” is notcompatible with this format file,but the database column is notnullable.

Explanation: The database column type is notvalid for this format file. The database column isnot nullable so the utility is ended.

The utility stops processing. No data is loaded.

User Response: Redefine the database table sothe columns are compatible with the columnsloaded from the file.

310 Message Reference, Volume 2

Page 319: Db2 SQL Errors

SQL3050W Conversions on the data will bemade between the IXF file codepage and the application codepage.

Explanation: If an IMPORT of an IXF data filehas been issued and the code page of thecharacter data in the IXF file is different from thecode page of the application invoking the importoperation, a conversion will be made from thecode page of the data file to the code page of theapplication and the operation will continue.

If a LOAD of an IXF data file has been issuedand the code page of the character data in theIXF file is different from the database code page,a conversion will be made from the code page ofthe data file to the code page of the database andthe operation will continue.

User Response: If you do not want aconversion to be performed, invoke the utilityusing the FORCEIN option; otherwise no actionis required.

SQL3051W The data to be loaded into“<column_name>” has beenloaded, but conversion from theIXF file code page to theapplication code page has notbeen performed.

Explanation: The data that was loaded into theCLOB or DBCLOB column is stored in a separatefile and no conversions have been performed onit.

To properly load the data, call the utility from anapplication that has the same code page as theIXF file.

User Response: This is a warning only.

SQL3053N There are more than 8191 rows tobe exported to a worksheetformatted file.

Explanation: The maximum number of rowsthat can be placed in a worksheet format file(WSF) is 8191.

The EXPORT utility stops processing after

placing 8191 rows in the file.

User Response: To prevent this error, use aSELECT statement that results in fewer rows toexport, and resubmit the command.

SQL3054N The input file is not a validPC/IXF file. The file is too shortto contain a valid H record.

Explanation: The end of the file was reachedbefore the expected end of the first record. Thefile may not be a PC/IXF file.

The LOAD/IMPORT utility stops processing. Nodata is imported.

User Response: Verify that the input file iscorrect.

SQL3055N The input file is not a validPC/IXF file. The length field inthe first record cannot beconverted to a numeric value.

Explanation: The value in the length field of thefirst record is not the ASCII representation of anumber. The file may not be a PC/IXF file.

The utility stops processing. No data is loaded.

User Response: Verify that the input file iscorrect.

SQL3056N The input file is not a validPC/IXF file. The value in thelength field of the H record is toosmall.

Explanation: The value in the length field of theH record is not large enough for a valid Hrecord. The file may not be a PC/IXF file.

The utility stops processing. No data is loaded.

User Response: Verify that the input file iscorrect.

Chapter 2. SQL Messages 311

Page 320: Db2 SQL Errors

SQL3057N The input file is not a validPC/IXF file. The type field in thefirst record is not H.

Explanation: The type field in the first record isnot H. The first record is not a valid H record.The file may not be a PC/IXF file.

The utility stops processing. No data is loaded.

User Response: Verify that the input file iscorrect.

SQL3058N The identifier field in the Hrecord is not IXF.

Explanation: The identifier field in the H recorddoes not identify the file as a PC/IXF file.

The utility stops processing. No data is loaded.

User Response: Examine the identifier field inthe H record.

SQL3059N The version field in the H recordis not valid.

Explanation: The version field in the H recordcontains a value that is not valid.

The utility stops processing. No data is loaded.

User Response: Examine the version field in theH record.

SQL3060N The HCNT field in the H recordcannot be converted to a numericvalue or the value is out of range.

Explanation: The Heading-record-count field inthe H record is not an ASCII representation of anumber or is a number that is not valid for thisfield.

The utility stops processing. No data is loaded.

User Response: Examine the HCNT field in theH record.

SQL3061N The single-byte and/ordouble-byte code page field in theH record cannot be converted to anumeric value or the value is outof range.

Explanation: The single-byte and/ordouble-byte code page field in the H record isnot an ASCII representation of a number or is anumber that is not valid for this field.

The utility stops processing. No data is loaded.

User Response: Examine the single-byte anddouble-byte code page field in the H record,change them to appropriate values as specified inthe Application Development Guide and resubmitthe command.

SQL3062N The double-byte code page fieldin the H record cannot beconverted to a numeric value orthe value is out of range.

Explanation: The double-byte code page field inthe H record is not an ASCII representation of anumber or is a number that is not valid for thisfield.

The utility stops processing. No data is loaded.

User Response: Examine the double-byte codepage field in the H record, change it to anappropriate value as specified in the ApplicationDevelopment Guide and resubmit the command.

SQL3063N The single-byte code page value“<value 1>” in the H record is notcompatible with the single-bytecode page value “<value 2>” forthe application. The FORCEINoption was not specified.

Explanation: The single-byte code page value inthe H record is not compatible with theapplication code page value. When the FORCEINoption is not used, the data cannot be loadedunless conversion from value 1 to value 2 issupported.

The utility stops processing. No data is loaded.

User Response: To load this data, resubmit the

312 Message Reference, Volume 2

Page 321: Db2 SQL Errors

command with the FORCEIN option.

SQL3064N The double-byte code page value“<value 1>” in the H record is notcompatible with the double-bytecode page value “<value 2>” forthe application. The FORCEINoption was not specified.

Explanation: The double-byte code page valuein the H record is not compatible with theapplication code page value. When the FORCEINoption is not used, the data cannot be loadedunless value 1 and value 2 are the same.

The utility stops processing. No data is loaded.

User Response: To load data where thedouble-byte code page values do not match,resubmit the command with the FORCEINoption.

SQL3065C The value for the application codepage cannot be determined.

Explanation: The system encountered an errorwhile determining the code page of theapplication.

The utility stops processing. No data is loaded orunloaded.

User Response: Contact your technical servicerepresentative.

SQL3066N While reading or looking for theT record, the end of the file wasreached.

Explanation: The end of the file was reachedwhile the system was looking for the T record orwhile it was reading the T record.

The utility stops processing. No data is loaded.

User Response: Examine the T record of theinput file. If the PC/IXF file was copied from onemedium to another, compare the copy with theoriginal or repeat the copy process.

SQL3067N The length field in the T recordcannot be converted to a numericvalue.

Explanation: The length field in the T record isnot an ASCII representation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theT record.

SQL3068N The value in the length field ofthe T record is too small.

Explanation: The value in the length field of theT record is not large enough so the T record isnot valid.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theT record.

SQL3069N The first non-A record followingthe H record is not a T record.

Explanation: After the H record, the first recordnot an A record is also not a T record. The Hrecord must be immediately followed by a Trecord but A records may exist before the Trecord.

The utility stops processing. No data is loaded.

User Response: Examine the records followingthe H record.

SQL3070N The length field in an A record isout of range.

Explanation: The length field in an A record is anumber that is not valid for this field.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theA records.

Chapter 2. SQL Messages 313

Page 322: Db2 SQL Errors

SQL3071N The data-convention field in the Trecord is not C.

Explanation: The data-convention field in the Trecord is a value other than C.

The utility stops processing. No data is loaded.

User Response: Examine the data-conventionfield in the T record.

SQL3072N The data-format field in the Trecord is not M.

Explanation: The data-format field in the Trecord is a value other than M.

The utility stops processing. No data is loaded.

User Response: Examine the data-format fieldin the T record.

SQL3073N The machine format field in the Trecord is not PCbbb (where b =blank).

Explanation: The machine format field in the Trecord is a value other than PCbbb, where each bis a blank.

The utility stops processing. No data is loaded.

User Response: Examine the machine formatfield in the T record.

SQL3074N The data-location field in the Trecord is not I.

Explanation: The data-location field in the Trecord is a value other than I.

The utility stops processing. No data is loaded.

User Response: Examine the data-location fieldin the T record.

SQL3075N The CCNT in the T record cannotbe converted to a numeric valueor the value is out of range.

Explanation: The C-record count field in the Trecord is not an ASCII representation of a

number or is a number that is not valid for thisfield.

The utility stops processing. No data is loaded.

User Response: Examine the CCNT field in theT record.

SQL3076N The name length field in the Trecord cannot be converted to anumeric value or the value is outof range.

Explanation: The name length field in the Trecord is not an ASCII representation of anumber or is a number that is not valid for thisfield.

The utility stops processing. No data is loaded.

User Response: Examine the name length fieldin the T record.

SQL3077N The number of C recordsspecified in the CCNT field in theT record “<value>” exceeds themaximum allowed “<maximum>”.

Explanation: The value in the CCNT field of theT record is larger than the maximum allowed forthe indicated release.

The utility stops processing. No data is loaded.

User Response: Examine the CCNT field in theT record.

SQL3078N The length field in an A recordcannot be converted to a numericvalue.

Explanation: The length field in an A record isnot an ASCII representation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the length fields in theA records.

314 Message Reference, Volume 2

Page 323: Db2 SQL Errors

SQL3079N The length field in a C recordcannot be converted to a numericvalue.

Explanation: The length field in a C record isnot an ASCII representation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theC records.

SQL3080N The value in the length field ofthe C record is too small.

Explanation: The value in the length field of aC record is not large enough so the C record isnot valid.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theC records.

SQL3081N Not enough C records werefound.

Explanation: The number of C records found(in the correct position) is less than the numberexpected from the C-record-count (CCNT) in theT record.

The utility stops processing. No data is loaded.

User Response: Examine the T and C records.

SQL3082N While reading or looking for a Crecord, the end of the file wasreached.

Explanation: The end of the file was reachedwhile the system was looking for a C record orwhile it was still reading a C record.

The utility stops processing. No data is loaded.

User Response: Examine the C records in theinput file. If the PC/IXF file was copied from onemedium to another, compare the copy with theoriginal or repeat the copy process.

SQL3083N The D-record-id field in the Crecord for column “<name>”cannot be converted to a numericvalue.

Explanation: The D-record-id field in the Crecord for the indicated column is not an ASCIIrepresentation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the D-record-id fieldin the C record.

SQL3084N The D-record-position field in theC record for column “<name>”cannot be converted to a numericvalue.

Explanation: The D-record-position field in theC record for the indicated column is not anASCII representation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the D-record-positionfield in the C record.

SQL3085N The D-record-id andD-record-position fields in the Crecord for column “<name>” areout of range or inconsistent withthe previous C record.

Explanation: The D-record-id or theD-record-position fields in the C record for theindicated column contain a value that is eitherout of the value range or is not correct relative tothe previous C record.

The utility stops processing. No data is loaded.

User Response: Examine the D-record-id andD-record-position fields in the C record.

Chapter 2. SQL Messages 315

Page 324: Db2 SQL Errors

SQL3086N There was no source columnspecified to be loaded intodatabase column “<name>” or thespecified source column does notexist, but the database column isnot nullable.

Explanation: Either there was not a PC/IXFcolumn specified to be exported into theindicated column or the specified PC/IXF sourcecolumn does not exist. Nulls cannot be insertedbecause the database column is not nullable.

The utility stops processing. No data is loaded.

User Response: Check the METHOD parameterfor erroneous names or positions or for fewerentries in the METHOD parameter than theAction String (e.g. ″REPLACE into ...″) parameterstates or implies.

SQL3087N The source column specified to beloaded into database column“<name>” is not valid, but thedatabase column is not nullable.

Explanation: The PC/IXF column cannot beloaded into the indicated database column andthe reason was given in a previous message inthe message log. Nulls cannot be insertedbecause the database column is not nullable.

The utility stops processing. No data is loaded.

User Response: Read the previous messages tounderstand why the column is not valid.

SQL3088N The source column specified to beloaded into database column“<name>” is not compatible withthe database column, but thedatabase column is not nullable.

Explanation: The source PC/IXF column is notcompatible with the target database column. Thecolumn types or lengths may be incompatible.Nulls cannot be inserted because the databasecolumn is not nullable.

The utility stops processing. No data is loaded.

User Response: Compare the columns in the

source PC/IXF file with the columns in thedatabase.

SQL3089N A non-D record was found wherea D record was expected.

Explanation: Some record other than a D recordwas found where a D record was expected.

The utility stops processing. No data is loaded.

User Response: Examine the D records in thefile.

SQL3090N The length field in a D recordcannot be converted to a numericvalue.

Explanation: The length field in a D record isnot an ASCII representation of a number.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theD records.

SQL3091N The length field in a D record isout of range.

Explanation: The length field in a D record is anumber that is not valid for this field.

The utility stops processing. No data is loaded.

User Response: Examine the length field in theD records.

SQL3092N The identifier field in a D recorddoes not contain the expectedvalue.

Explanation: The identifier field in a D record isnot valid. One or more D records may have beenwritten out of sequence.

The utility stops processing. No data is loaded.

User Response: Examine the identifier field inthe D records.

316 Message Reference, Volume 2

Page 325: Db2 SQL Errors

SQL3093N The input file is not a valid WSFfile.

Explanation: The first record in the worksheetformat (WSF) file was not a beginning-of-file(BOF) record, or the version of the WSF file isnot supported.

The IMPORT utility stops processing. No data isimported.

User Response: Verify that the file is a validWSF file and that the name was enteredcorrectly.

SQL3094N The input column “<name>” wasnot found, but the correspondingdatabase column is not nullable.

Explanation: The specified column was not inthe input file. Because the correspondingdatabase column is not nullable, data cannot beloaded into the column.

The utility stops processing. No data is loaded.The column names processed before the erroroccurred are in the database

User Response: Verify that the input filecontains the specified column names.

SQL3095N The specified column position“<position>” is not in the validrange of 1 to 256.

Explanation: A column position was specifiedthat was not within the range of 1 to 256.

The utility stops processing. No data is loaded.The column names processed before the erroroccurred are in the database.

User Response: Verify that the specified columnposition is within the range 1 to 256.

SQL3096N The data type “<type>” of thedatabase column “<name>” is notcompatible with any WSF columntype, but the database column isnot nullable.

Explanation: There is not any worksheet format(WSF) column type that is compatible with the

indicated database column. The database columnis not nullable so the IMPORT utility stopsprocessing.

No data is imported.

User Response: Redefine the database table sothe columns are compatible with the columnsbeing imported from the WSF file. Resubmit thecommand.

SQL3097N The record length field in theWSF record is not valid for itsrecord type.

Explanation: The worksheet format (WSF)records have an expected fixed length or avariable-length range. The record does notcontain the fixed length, or the variable length isout of range. Some damage occurred to the WSFfile, or it was generated incorrectly, possibly witha level of the Lotus product not supported by thedatabase manager.

The IMPORT utility stops processing.

User Response: Regenerate the WSF file with asupported level of the Lotus product.

SQL3098N The row number from the inputfile is not in the valid range of 1to 8192.

Explanation: The maximum number of rowsthat a worksheet format (WSF) spreadsheet cancontain is 8192. The cell coordinate contains avalue outside the valid range. Some damageoccurred to the WSF file, or it was generatedincorrectly, possibly with a level of the Lotusproduct not supported by the database manager.

The IMPORT utility stops processing.

User Response: Regenerate the WSF file with asupported level of the Lotus product.

SQL3099N The column number from theinput file is not in the valid rangeof 1 to 256.

Explanation: The maximum number of columnsthat a worksheet format (WSF) spreadsheet cancontain is 256. The cell coordinate contains a

Chapter 2. SQL Messages 317

Page 326: Db2 SQL Errors

value outside the valid range. Some damage hasoccurred to the WSF file, or it was generatedincorrectly, possibly with a level of the Lotusproduct that is not supported by the databasemanager.

The IMPORT utility stops processing.

User Response: Regenerate the WSF file with asupported level of the Lotus product.

SQL3100 - SQL3199

SQL3100W Column number“<column-number>” (identified as“<name>”) in the output DELformat file is longer than 254bytes.

Explanation: The length or maximum length ofthe specified output column is greater than 254bytes. Columns larger than 254 are not supportedby some other products.

The entire field is exported without truncation.

User Response: If the output file cannot beprocessed by another product, export only asubstring of the incorrect column, redefine thetable, or manually truncate the data in the DELcolumn.

SQL3101W There is a character stringdelimiter in column“<column-number>” in row“<row-number>”.

Explanation: The system puts character stringdelimiters around the character strings beingexported but it found a character string thatalready has the delimiter in the character string.

Delimiters will be placed around the characterstring. Future use of that string leads to anappearance of truncation. Processing cancontinue.

User Response: Review the data for the givencolumn and row in the output table or file. Toavoid loss of data, change the character delimiterto some character that is not in the data.

SQL3102W The number of columns in theMETHOD parameter is greaterthan the number of columns inthe Action String (e.g. ″REPLACEinto ...″) parameter.

Explanation: The number of columns takenfrom the input file or table is greater than thenumber to be put in the output table or file.

Only data for the columns indicated in theoutput table or file will be processed. Data in theexcess input columns is not processed.

User Response: Review the data in the outputtable or file.

SQL3103W The number of columns in theMETHOD parameter is less thanthe number of columns in theAction String (e.g. ″REPLACE into...″) parameter.

Explanation: The number of columns takenfrom the input file or table is less than thenumber to be put in the output table or file.

Only data for the columns indicated in the inputtable or file will be processed. Data in the excessoutput columns is not processed.

User Response: Review the data in the outputtable or file.

SQL3104N The Export utility is beginning toexport data to file “<name>”.

Explanation: This is the normal beginningmessage.

User Response: No action is required.

318 Message Reference, Volume 2

Page 327: Db2 SQL Errors

SQL3105N The Export utility has finishedexporting ″<number>″ rows.

Explanation: This is the summary message forthe export utility which is printed at the end ofthe message file. This message will state howmany rows resulting from the SELECT statementwere processed before the export utilityterminated.

User Response: If an sqlcode of 0 was returnedfrom the utility, then no response is required. Ifan sqlcode of 3107 was returned, check themessage file for warnings that occurred duringthe export and resubmit the command if desired.If a negative sqlcode was returned, an erroroccurred during the export and the data file maynot contain all the data requested. The commandshould be resubmitted with the error corrected.

SQL3106N An error occurred whileformatting a message for themessage file.

Explanation: The error message may beincomplete or formatted incorrectly.

User Response: No action is required.

SQL3107W There is at least one warningmessage in the message file.

Explanation: At least one warning was receivedduring processing.

This warning does not affect processing.

User Response: Review the message filewarning.

SQL3108W Unable to access file referencedby a DATALINK value in row“<row-number>” and column“<column-number>”. Reason code= “<reason-code>”.

Explanation: The possible causes of thismessage depend on the value of″<reason-code>″:

1 DATALINK value data location formatis not valid.

2 DATALINK value DB2 Data LinksManager is not registered with thedatabase.

3 DATALINK linktype value is not valid.

4 DATALINK value referenced file cannotbe found by the DB2 Data LinksManager.

5 DATALINK value referenced file isalready linked to the database.

6 DATALINK value referenced file cannotbe accessed for linking. It may be asymbolic link or a file with permissionbit for set user ID (SUID) on or setgroup ID (SGID) on.

7 DATALINK value URL or comment istoo long.

User Response: The action is based on the″<reason-code>″ as follows:

1 Correct the data location format. Ifhostname is not specified, DB2 can usethe local hostname as default only ifsupport for FILE LINK CONTROL isenabled. Refer to the AdministrationGuide for information on enabling thissupport.

2 Ensure that the correct DB2 Data LinksManager is specified and if so have itregistered to the database. RegisteredDB2 Data Links Managers are ignoredunless support for FILE LINKCONTROL is enabled. Refer to theAdministration Guide for informationon enabling this support.

3 Correct the linktype value.

4 Check that the correct file is specifiedand that the file exists

5 Either unlink the existing reference tothe file or do not specify the file in thisstatement.

6 Linking of directories is not allowed.Use the actual file name, not thesymbolic link. If SUID or SGID is on,this file cannot be linked using aDATALINK type.

Chapter 2. SQL Messages 319

Page 328: Db2 SQL Errors

7 Reduce the length of the data locationvalue or the comment.

SQL3109N The utility is beginning to loaddata from file “<name>”.

Explanation: This is the normal beginningmessage. The message may indicate the name ofa temporary file created on the server instead ofthe source file.

User Response: No action is required.

SQL3110N The utility has completedprocessing. “<number>” rowswere read from the input file.

Explanation: This is the normal endingmessage.

User Response: No action is required.

SQL3111C An I/O error occurred whileclosing the input data file.

Explanation: A system I/O error occurred whileclosing the input data file. This error can refer toa problem on either the client or the server.

The file is not closed.

User Response: Examine the input file for anI/O error.

SQL3112W There are fewer input filecolumns specified than databasecolumns.

Explanation: There are fewer columns specifiedin the input file than in the output table. Becausethe extra columns in the table are defined asnullable, the values in those columns are filledwith nulls.

User Response: No action is required.

SQL3113W The data type “<type>” of thedatabase column “<name>” is notcompatible with this format file.Null values are inserted for thecolumn.

Explanation: The database column type is notvalid for this file. Because the column is nullable,nulls are inserted.

Null values are loaded for the indicated column.

User Response: If nulls are not acceptable forthe column, do one of the following:

v Edit the data in the table.

v If possible, use another compatible column inthe database table as the target column andresubmit the command.

v Redefine the database table so the columns arecompatible with the columns being loaded andresubmit the command.

SQL3114W Some data following “<text>” inrow “<row-number>” and column“<column-number>” was notloaded.

Explanation: Some data in the specified rowand column is not loaded, probably because thecolumn contains data as follows:

v A closed string delimiter

v An isolated carriage return or line feed controlcharacter

v A non-delimited string value.

The text that was loaded is shown in the“<text>” token.

The contents of the field may be incomplete.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the command,or edit the data in the table.

320 Message Reference, Volume 2

Page 329: Db2 SQL Errors

SQL3115W The field value beginning“<text>” in row “<row-number>”and column “<column-number>”is longer than the longestallowable table column. The valuewas truncated.

Explanation: The field value is longer than32700 bytes.

The value was truncated after 32700 bytes.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table. Check forunmatched character string delimiters.

SQL3116W The field value in row“<row-number>” and column“<column-number>” is missing,but the target column is notnullable.

Explanation: A null field value was encounteredin the input file. Because the target column in thetable is not nullable, it cannot be loaded.

For files other than ASCII files, the value of thecolumn number specifies the field within the rowof the missing data. For ASCII files, the value ofthe column number specifies the byte positionwithin the row of the missing data.

The row is not loaded.

User Response: If necessary, correct the inputfile and resubmit the command or edit the datain the table.

SQL3117W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a SMALLINT value.A null was loaded.

Explanation: The value in the specified fieldcannot be converted to a SMALLINT value.There may be a data type mismatch. The valuemay be larger than a 2-byte integer.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the row

that contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

SQL3118W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a SMALLINT value,but the target column is notnullable. The row was not loaded.

Explanation: The value in the specified fieldcannot be converted to a SMALLINT value.There may be a data type mismatch. The valuemay be larger than a 2-byte integer. A nullcannot be loaded because the output column inthe table is not nullable.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

The row is not loaded.

User Response: Correct the input file andresubmit the command or edit the data in thetable.

SQL3119W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to an INTEGER value.A null was loaded.

Explanation: There may be a data typemismatch because the value in the specified fieldcannot be converted to an INTEGER value.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifies

Chapter 2. SQL Messages 321

Page 330: Db2 SQL Errors

the byte location within the row where the valuein question begins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

SQL3120W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to an INTEGER value,but the target column is notnullable. The row was not loaded.

Explanation: There may be a data typemismatch because the value in the specified fieldcannot be converted to an INTEGER value. Anull cannot be loaded because the output columnin the table is not nullable.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

The row is not loaded.

User Response: Correct the input file andresubmit the command or edit the data in thetable.

SQL3121W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a FLOAT value. Anull was loaded.

Explanation: The value in the specified fieldcannot be converted to a FLOAT value. Theremay be a data type mismatch.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

SQL3122W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a FLOAT value, butthe target column is not nullable.The row was not loaded.

Explanation: The value in the specified fieldcannot be converted to a FLOAT value. Theremay be a data type mismatch. A null cannot beloaded because the output column in the table isnot nullable.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

The row is not loaded.

User Response: Correct the input file andresubmit the command or edit the data in thetable.

SQL3123W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a PACKEDDECIMAL value. A null wasloaded.

Explanation: The value in the specified fieldcannot be converted to a PACKED DECIMALvalue. There may be a data type mismatch.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

322 Message Reference, Volume 2

Page 331: Db2 SQL Errors

SQL3124W The field value in row“<row-number>” and column“<column-number>” cannot beconverted to a PACKEDDECIMAL value, but the targetcolumn is not nullable. The rowwas not loaded.

Explanation: The value in the specified fieldcannot be converted to a PACKED DECIMALvalue. There may be a data type mismatch. Anull cannot be loaded because the output columnin the table is not nullable.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

The row is not loaded.

User Response: Correct the input file andresubmit the command or edit the data in thetable.

SQL3125W The character data in row“<row-number>” and column“<column-number>” wastruncated because the data islonger than the target databasecolumn.

Explanation: The length of the field data in theinput file was longer than the length of thedatabase field where it is being loaded.

The character data was truncated.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table. The width of thedatabase column cannot be increased. Ifnecessary, define a new table with widercolumns and repeat the process.

SQL3128W The field containing ″<data>″ inrow ″<row-number>″ and column″<column-number>″. wastruncated into a DATE fieldbecause the data is longer thanthe database column.

Explanation: The date value in the specifiedfield is longer than the length of the stringrepresentation of a date.

The date value is truncated to fit into the table.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table.

SQL3129W The date, time, or timestamp fieldcontaining “<text>” in row“<row-number>” and column“<column-number>” was paddedwith blanks.

Explanation: The field data in the input file wasshorter than the database column.

The data on the right is padded with blanks.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table.

SQL3130W The field containing “<text>” inrow “<row-number>” and column“<column-number>” wastruncated into a TIME fieldbecause the data is longer thanthe database column.

Explanation: The time value in the specifiedfield is longer than the length of the stringrepresentation of a time.

The time value is truncated to fit into the table.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table.

Chapter 2. SQL Messages 323

Page 332: Db2 SQL Errors

SQL3131W The field containing “<text>” inrow “<row-number>” and column“<column-number>” wastruncated into a TIMESTAMPfield because the data is longerthan the database column.

Explanation: The timestamp value in thespecified field is longer than the length of thestring representation of a timestamp.

The timestamp value is truncated to fit into thetable.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table.

SQL3132W The character data in column″<column>″ will be truncated tosize ″<size>″.

Explanation: The character data column has adefined size that is longer than the longestdefault character column which can be exported;each value will be truncated to the specified size.

For example, by default, only the firstSQL_LONGMAX bytes of a LOB column will beexported. If the entire LOB column is desired, theLOBSINFILE keyword must be specified in thefiletype modifier and each LOB column will bestored into a separate file.

User Response: This is a warning only. Noaction is required.

SQL3133W The field in row “<row-number>”and column “<column-number>”contains invalid DATALINKvalue. A null was loaded.

Explanation: The DATALINK value in thespecified field is invalid. For delimited ASCII(DEL) files, the value of the column numberspecifies the field within the row that containsthe value in question. For ASCII files, the valueof the column number specifies the byte locationwithin the row where the value in questionbegins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

SQL3134W The field in row “<row-number>”and column “<column-number>”contains invalid DATALINKvalue, but the target column is notnullable. The row was not loaded.

Explanation: The DATALINK value in thespecified field is invalid. For delimited ASCII(DEL) files, the value of the column numberspecifies the field within the row that containsthe value in question. For ASCII files, the valueof the column number specifies the byte locationwithin the row where the value in questionbegins.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand.

SQL3135N The number of columns in theMETHOD parameter is greaterthan the number of columns inthe target table.

Explanation: The number of data columns inthe METHOD parameter must be less than orequal to the number of data columns in theactual table.

User Response: Specify the correct number ofinput columns in the METHOD parameter andresubmit the command.

SQL3137W Row “<row-number>” is tooshort. At least one input valuebeing loaded to a non-nullabledatabase column is missing. Therow was not loaded.

Explanation: If loading from a delimited ASCIIfile, the row contains too few fields. If loadingfrom a non-delimited ASCII file, the row containstoo few bytes of data. There is no input value forat least one non-nullable target column.

The row is not loaded.

324 Message Reference, Volume 2

Page 333: Db2 SQL Errors

User Response: Examine the input file and thecontents of the target table. Correct the input fileand resubmit the command, or edit the data inthe table.

SQL3138W The ending character stringdelimiter was not found beforethe end of the input data file wasreached.

Explanation: The end of the input data file wasreached before the terminating character stringdelimiter was found.

A closing character string delimiter is assumed atthe end of the data.

User Response: Compare the value in theoutput table with the input file. If necessary,correct the input file and resubmit the commandor edit the data in the table.

SQL3139W An error ″<error>″ occurred whilethe utility was disconnecting fromthe database.

Explanation: The IMPORT or EXPORT utilitycould not disconnect from the database.

The output data may be incomplete.

User Response: Use the error number in themessage to determine the exact error.

SQL3142W The column heading for column“<column-number>” is beingtruncated to 240 bytes.

Explanation: The LOTUS 1-2-3** andSymphony** programs have a limit of 240 bytesfor label records. If a column heading greaterthan 240 bytes is specified for export, it is betruncated to 240 bytes.

The column heading is truncated. Processingcontinues.

User Response: Verify that the column headingsare 240 bytes or less. Check for a possible errorin specifying the names for the columns in theoutput worksheet format (WSF) file.

SQL3143W A maximum length of variablelength column“<column-number>” exceeds thelimitation of 240 bytes. Data fromthe column may be truncated.

Explanation: The LOTUS 1-2-3** andSymphony** programs have a limit of 240 bytesfor label records. Whenever a character fieldlonger than 240 bytes is written to a worksheetformat (WSF) file, the data will be truncated to240 bytes.

Continue processing. Subsequent data entries forthe column may be truncated.

User Response: Verify the output. If significantdata from the column is lost because oftruncation, investigate selecting the data from thecolumn in several fields by substringing, orredesign the database.

SQL3144W The length of fixed length column“<column-number>” exceeds the240-byte limitation. Data from thecolumn may be truncated.

Explanation: The Lotus 1-2-3** and Symphony**programs have a limit of 240 bytes for labelrecords. Whenever a character field longer than240 bytes is written to a worksheet format (WSF)file, the data will be truncated to 240 bytes.

All data entries for the column are truncatedwith no additional messages written to themessage log.

Continue processing.

User Response: Verify output. If significant datafrom the column is lost because of truncation,investigate selecting the data from the column inseveral fields by substringing, or redesign thedatabase.

SQL3145W The data for row“<row-number>”, column“<column-number>” is beingtruncated to 240 bytes.

Explanation: The Lotus 1-2-3** and Symphony**programs have a limit of 240 bytes for label

Chapter 2. SQL Messages 325

Page 334: Db2 SQL Errors

records. Whenever a character field longer than240 bytes is written to a worksheet format (WSF)file, the data is truncated to 240 bytes. Thismessage is preceded by message SQL3143associated with the column.

Processing continues. The data is truncated.

User Response: Verify the output. If significantdata from the column is lost because oftruncation, investigate selecting the data from thecolumn in several fields by substringing, orredesign the database.

SQL3146N The DATE or TIMESTAMP valuefor row “<row-number>” andcolumn “<column-number>” isout of range.

Explanation: The value for a date or timestampis not valid. A date value from 01-01-1900 to12-31-2099 is valid for worksheet format (WSF)files.

The cell record is not created.

User Response: Compare the value in theoutput file with the input table. If necessary,correct the input value and resubmit thecommand or edit the data in the table.

SQL3147W More than 2048 rows wereexported into a worksheetformatted file.

Explanation: The number of rows exportedexceeds 2048. The first generation productscannot support more than 2048 rows.

Continue processing.

User Response: The rows beyond 2048 can beread only by second and third generationproducts.

SQL3148W A row from the input file was notinserted into the table. SQLCODE“<sqlcode>” was returned.

Explanation: The database operation to insert arow of data read from the input file failed. Oneor more of the fields in the input file is not

compatible with the database field where thefield is being inserted.

Processing continues with the next row of inputdata.

User Response: See the next message in themessage file for the row number not inserted.Examine the input file and the database contents.If desired, modify the database or modify theinput file and rerun the operation.

SQL3149N “<number-1>” rows wereprocessed from the input file.“<number-2>” rows weresuccessfully inserted into thetable. “<number-3>” rows wererejected.

Explanation: This summary message tells howmany rows of data were read from the input file,how many rows were successfully inserted intothe database table, and how many rows wererejected. If using the INSERT_UPDATE option,the number of rows updated is the number ofrows processed minus the number inserted andrejected.

User Response: None, because this is asummary message. The detail messages maysuggest corrective action.

SQL3150N The H record in the PC/IXF filehas product “<product>”, date“<date>”, and time “<time>”.

Explanation: Information is given about theproduct that created the PC/IXF file and when itwas created.

User Response: No action is required.

SQL3151N No data conversion will be donefrom the single-byte code pagevalue “<code-page>” in the Hrecord to the applicationsingle-byte code page value“<code-page>” because theFORCEIN option was specified.

Explanation: No data conversion will beperformed from the IXF code page to the

326 Message Reference, Volume 2

Page 335: Db2 SQL Errors

application code page because the FORCEINoption was specified.

User Response: No action is required. If theconversion from the IXF file code page to theapplication code page is supported by thedatabase manager, the operation can beresubmitted without the FORCEIN option andthe data will be converted.

SQL3152N The double-byte code page value“<value>” in the H record is notcompatible with the double-bytecode page value “<value>” for theapplication. Data will be insertedbecause the FORCEIN option wasspecified.

Explanation: The double-byte code page valuesin the record and the application are notcompatible. Because the FORCEIN option wasused, the data is inserted.

User Response: No action is required.

SQL3153N The T record in the PC/IXF filehas name “<name>”, qualifier“<qualifier>”, and source“<source>”.

Explanation: Optional information is givenabout the name of the table where data wasextracted, the product that created the table, andthe original source of the data.

User Response: No action is required.

SQL3154W The HCNT value in the H recordand the CCNT value in the Trecord are not compatible. TheCCNT value in the T record willbe used.

Explanation: The HCNT value in the H recordand the CCNT value in the T record do notagree.

The CCNT value in the T record is used.

User Response: Verify that the CCNT value iscorrect. If not, make the necessary changes to the

HCNT or CCNT values and resubmit thecommand.

SQL3155W The name length field in the Crecord for column “<name>” isnot valid. Data from the columnwill not be loaded.

Explanation: The value in the name length fieldin the C record for the indicated column is notvalid.

Data from the indicated column is not loaded.

User Response: Change the name length fieldin the C record and resubmit the command.

SQL3156W The null field in the C record forcolumn “<name>” is not valid.Data from the column will not beloaded.

Explanation: The null field in the C record forthe indicated column is not valid.

Data from the indicated column is not loaded.

User Response: Change the null field in the Crecord and resubmit the command.

SQL3157W The type field in the C record forcolumn “<name>” is not valid.Data from the column will not beloaded.

Explanation: The type field in the C record forthe indicated column is not valid. The code pagevalues may not be compatible with the columntype.

Data from the indicated column is not loaded.

User Response: Change the type field in the Crecord and resubmit the command.

SQL3158W The single-byte code page field inthe C record for column“<name>” is not valid. Data fromthe column will not be loaded.

Explanation: The single-byte code page field inthe C record for the indicated column is notvalid.

Chapter 2. SQL Messages 327

Page 336: Db2 SQL Errors

Data from the indicated column is not loaded.

User Response: Change the single-byte codepage field in the C record and resubmit thecommand.

SQL3159W The double-byte code page fieldin the C record for column“<name>” is not valid. Data fromthe column will not be loaded.

Explanation: The double-byte code page field inthe C record for the indicated column is notvalid.

Data from the indicated column is not loaded.

User Response: Change the double-byte codepage field in the C record and resubmit thecommand.

SQL3160W The column length field in the Crecord for column “<name>” isnot valid. Data from the columnwill not be loaded.

Explanation: The column length field in the Crecord for the indicated column is not valid.

Data from the indicated column is not loaded.

User Response: Change the column length fieldin the C record and resubmit the command.

SQL3161W The precision field in the Crecord for column “<name>” isnot valid. Data from the columnwill not be loaded.

Explanation: The precision field in the C recordfor the indicated column is not valid.

Data from the indicated column is not loaded.

User Response: Change the precision field inthe C record and resubmit the command.

SQL3162W The scale field in the C record forcolumn “<name>” is not valid.Data from the column will not beloaded.

Explanation: The scale field in the C record forthe indicated column is not valid.

Data from the indicated column is not loaded.

User Response: Change the scale field in the Crecord and resubmit the command.

SQL3163W The column length field in the Crecord for floating point column“<name>” is blank. A value of00008 will be used.

Explanation: The column length field in the Crecord for the indicated column is blank.

A column length of 00008 is used.

User Response: No action is required.

SQL3164W The column length field in the Crecord for floating point column“<name>” is not valid. Data fromthe column will not be loaded.

Explanation: The column length field in the Crecord for the indicated column is not valid. Theindicated column is a floating point column.

Data from the indicated column is not loaded.

User Response: Change the column length fieldin the C record and resubmit the command.

SQL3165W The column type field “<type>”in the C record for column“<name>” is not valid. Data fromthe column will not be loaded.

Explanation: The column type in the C recordfor the indicated column is not valid.

Data from the indicated column is not loaded.

User Response: Change the column type fieldin the C record and resubmit the command.

328 Message Reference, Volume 2

Page 337: Db2 SQL Errors

SQL3166W No PC/IXF column was specifiedto be loaded into database column“<name>”, or the specified PC/IXFcolumn does not exist. Nulls willbe inserted.

Explanation: Either there was not a PC/IXFcolumn specified to be loaded into the indicatedcolumn, or the specified PC/IXF source columndoes not exist.

Null values are loaded for the indicated column.

User Response: No action is required. If nullsare not acceptable for this column, check theMETHOD parameter for erroneous names orpositions or for fewer entries in the METHODparameter than columns stated in or implied bythe Action String (e.g. ″REPLACE into ...″)parameter.

SQL3167W The PC/IXF column specified tobe loaded into database column“<name>” is not valid. Nulls willbe inserted.

Explanation: Values in the PC/IXF columncannot be loaded into the indicated databasecolumn and the reason is given in a previousmessage in the log.

Null values are loaded for the indicated column.

User Response: Read the previous messages tounderstand why the column is not valid.

SQL3168W The PC/IXF column specified tobe loaded into database column“<name>” is not compatible withthe database column. Nulls willbe inserted.

Explanation: The source PC/IXF and the targetdatabase column types or lengths may not becompatible.

Null values are loaded for the indicated column.

User Response: Compare the columns in thesource PC/IXF file and the database.

SQL3169N The FORCEIN option may beused to make the PC/IXF column“<name>” acceptable for loadinginto database column “<name>”.

Explanation: This is for information only aboutthe optional use of the FORCEIN option.

User Response: No action required.

SQL3170W The end of the file was reachedwithin a row of data. The partialrow of data was not loaded.

Explanation: The end of the file was reachedbefore the end of the current row of data. Thefile may contain only part of the expected data.

The partial row of data is not loaded.

User Response: If the PC/IXF file was copiedfrom one medium to another, compare the copywith the original or repeat the copy process.

SQL3171W A non-label record was found inthe column header row. Therecord was not processed.

Explanation: The IMPORT utility expects onlylabel records in the column header row (rowone) of the worksheet format (WSF) file.

The system does not process the record andcontinues to the next record.

User Response: Remove all data andinformation except the column headers from thefirst row of the spreadsheet file. Resubmit thecommand.

SQL3172W The specified input column“<name>” was not found. Thecorresponding database columnwill contain null values.

Explanation: The specified input column wasnot found in the input spreadsheet file. Thedatabase column is nullable and contains nullvalues.

User Response: Verify the specified inputcolumn name.

Chapter 2. SQL Messages 329

Page 338: Db2 SQL Errors

SQL3173N The inserted data for column“<name>” will always containfewer characters than the columnwidth.

Explanation: The database column width islarger than the maximum worksheet format(WSF) label record.

Continue processing.

User Response: No action is required.

SQL3174W The data type “<type>” of thedatabase column “<name>” is notcompatible with any WSF columntype. Null values will be insertedfor this column.

Explanation: The database column type is notvalid for a worksheet format (WSF) file. Becausethe column is nullable, nulls are imported for thecolumn.

User Response: If nulls are not acceptable forthe column, do one of the following:

v Edit the data in the table.

v If possible, use another compatible column inthe database table as the target column andresubmit the command.

v Redefine the database table so that thecolumns are compatible with the columnsimported from the WSF file, and resubmit thecommand.

SQL3175W The input record for database row“<row>”, column “<column>” isnot valid.

Explanation: The record in the spreadsheet fileis not compatible with the data type of thedatabase column. If the database column is agraphic data type, the input data may contain anodd number of bytes.

If the column is nullable, a null is inserted. If thecolumn is not nullable, the row is not imported.

User Response: Either edit the data in the tableor verify that the data in the spreadsheet file isvalid for importing into a database manager

database and resubmit the command.

SQL3176W The value for row “<row>”,column “<column>” in the WSFfile is out of range for a datevalue.

Explanation: The record in the spreadsheet filecontains a value that is too large or too small torepresent a valid worksheet format (WSF) date.A valid WSF date is between 1 and 73050,inclusive.

If the column is nullable, a null is inserted. If thecolumn is not nullable, the row is not imported.

User Response: Either edit the data in the tableor verify that the data in the spreadsheet file isvalid for import into a database managerdatabase and resubmit the command.

SQL3177W The value in the WSF file for row“<row>”, column “<column>” isout of range for a time value.

Explanation: The record in the spreadsheet filecontains a value that is either too large or toosmall to represent a valid worksheet format(WSF) time. A WSF time is a value equal to orgreater than zero, but less than one.

If the column is nullable, a null is inserted. If thecolumn is not nullable, the row is not imported.

User Response: Either edit the data in the tableor verify that the value to be imported is a timevalue in the input spreadsheet file and resubmitthe command.

SQL3178W The type of record in the WSF filefor database row“<row-number>”, column“<column-number>” is not validfor representing a time value.

Explanation: The input value is an integervalue. A time value must be represented by afloating point number or a fraction of a day in aworksheet format (WSF) spreadsheet file.

If the column is nullable, a null is inserted. If thecolumn is not nullable, the row is not imported.

330 Message Reference, Volume 2

Page 339: Db2 SQL Errors

User Response: Either edit the data in the tableor verify that the value to be imported is a timevalue in the input spreadsheet file and resubmitthe command.

SQL3179W Row “<row>” in the input file ismissing data for inserting into anon-nullable column in thedatabase. The row was notinserted.

Explanation: The row of data from the inputfile has missing or not valid data for anon-nullable column. The values in theremaining database columns in that row are notinserted.

Processing continues with the next row. The rowis not inserted.

User Response: Either edit the data in the tableor verify that the data in the spreadsheet file isvalid for inserting into a database managerdatabase.

SQL3180W Insert diskette “<number>” intodrive “<drive>”.

Explanation: This is a request for theapplication to prompt the user to place thespecified diskette in the specified drive.

The utility is waiting to be called again after theuser puts the diskette in the drive.

User Response: Prompt the user for the disketteand then return to the utility with the calleracparameter indicating whether processingcontinues or ends.

SQL3181W The end of the file was reachedbefore the expected ending recordwas found.

Explanation: During the load of a PC/IXF filecreated by the database manager, the A record ofsubtype E that is expected as the last A recordwas not found.

The input file probably is damaged.

Continue processing.

User Response: Check for data that was notloaded. If data is missing, edit the table orchange the input file and resubmit the command.If the PC/IXF file was copied from one mediumto another, compare the copy with the original orrepeat the copy process.

SQL3182W Insert diskette “<number>” intodrive “<drive>”. The diskette thatis currently inserted is not theright diskette or the continuationdiskette is not valid.

Explanation: During the load of a PC/IXF filethat is contained on more than one diskette, arequest to insert a diskette was sent to theapplication, a confirmation that the diskette is inthe drive was returned but the continuation fileis not there or is not valid. This action does notapply to the first diskette.

The utility waits for a response from theapplication to either continue processing or stopprocessing.

User Response: Have the user verify that thecorrect diskette is in the drive. If the correctdiskette is in the drive, call the utility again withthe callerac parameter set to stop processing.

SQL3183W Multiple delimiter overrides inthe filetmod parameter are notseparated by blanks.

Explanation: At least one COLDEL, CHARDELor DECPT keyword in the filetmod parameter isnot at the beginning of the filetmod parameterand does not follow a blank (space). Thiscondition may arise during the LOAD/IMPORTor export of delimited ASCII (DEL) files.

The utility stops processing. The erroneousdelimiter overrides are ignored.

User Response: Resubmit the command with acorrect filetmod parameter.

Chapter 2. SQL Messages 331

Page 340: Db2 SQL Errors

SQL3185W The previous error occurred whileprocessing data from row“<row-number>” of the input file.

Explanation: This message provides theidentification of the row where the erroroccurred for the previous message listed in themessage file (for example, SQL3306).

User Response: No action is required.

SQL3186W Data was not loaded into thedatabase, because the log was full.SQLCODE “<sqlcode>” wasreturned. A commit will beattempted and the operation willcontinue if the commit issuccessful.

Explanation: The utility could not insert a rowof data into the database because the databasetransaction log is full.

The completed database transactions arecommitted and the insert is tried again. If therepeated insert continues to indicate that the logis full, the utility stops processing.

User Response: Be aware that a subsequentfailure of the utility causes the database to rollback to the state after the last commit, not to thestate before the utility was initially called.

SQL3187W An error occurred while creatingan index. SQLCODE “<sqlcode>”was returned.

Explanation: The IMPORT utility was creatingan index when an error occurred. An index mayalready exist for some table.

This error occurs only during the import of aPC/IXF file.

The utility continues processing. The file wasimported, but the index was not created on thetable.

Federated system users: in addition to thepreviously listed cause, this error can occur whena CREATE NICKNAME statement was issued atfederated server and the table at the data sourcehad an index or indexes with too many columns,

or the total index row size could not berepresented in the federated server catalog. The“<sqlcode>” in the message provides furtherinformation about the problem encountered.

User Response: Read the next message in themessage log (SQL3189) for the name of the indexthat was not created. Create the index with theCREATE INDEX command.

Federated system users: select from the datasource catalog and the federated server catalog todetermine which index or indexes were notcreated in the federated server catalog. Either:

v Create the indexes using the CREATE INDEXcommand. Remember to truncate columns asappropriate in order to not violate limitswhich caused the index to not be created inthe first place.

v Do nothing and allow federated server tofunction without knowledge about the index.

Both of the previously listed options havepotential performance implications.

SQL3188N An error occurred while erasingthe contents of the table.

Explanation: When running LOAD/IMPORTwith the REPLACE option, the specified databasetable is truncated before inserting the data backinto the table. An error occurred during thetruncation processing.

The utility ends with an error.

User Response: Resubmit the command.

SQL3189N The previous message refers toindex “<name>” with columns“<column list>”.

Explanation: This message always followsmessage SQL3187 when an error occurs whilecreating an index. “<name>” is the name of theindex where the create failed. “<column list>” isa string of index column names. Each columnname in the string is preceded by a plus (+) or aminus (−) sign indicating ascending ordescending order.

The utility continues processing.

332 Message Reference, Volume 2

Page 341: Db2 SQL Errors

User Response: Manually create the index withthe CREATE INDEX command.

SQL3190N The indexixf option is not validfor this Import operation.

Explanation: If INDEXIXF is used in the filetmodparameter of the IMPORT command, each of thefollowing is also required:

v The IMPORT must be replacing the contents ofa table.

v The METHOD parameter must be null.

v Each IXF column must be targeted to adatabase column with the same name.

The utility stops processing. No data is imported.

User Response: Resubmit the command eitherwithout the INDEXIXF option or with the otherparameters that are valid with the INDEXIXFoption.

SQL3191N The field in row“<row-number>”, column“<column-number>” whichbegins with “<string>” does notmatch the user specifiedDATEFORMAT, TIMEFORMAT,or TIMESTAMPFORMAT. Therow will be rejected.

Explanation: The data does not match the userspecified format. This may be caused by missingfields, mismatched column separators, or a valueout of range.

User Response: Examine the input value.Correct the input file or specify aDATEFORMAT, TIMEFORMAT, orTIMESTAMPFORMAT that matches the data andresubmit the command.

SQL3192N In the filetmod a user specifiedformat “<keyword>” beginningwith the string “<string>” is notvalid.

Explanation: The user specified format is notvalid because it may be specified more thanonce, or it may contain an invalid character.

The formats must be enclosed in double-quotes.

Valid DATEFORMAT specifiers include “YYYY”and the “M”, and “D” characters.

Valid TIMEFORMAT specifiers include “AM”,“PM”, “TT”, and the “H”, “M”, and “D”characters.

Valid TIMESTAMPFORMAT specifiers include allof the specifiers for DATEFORMAT andTIMEFORMAT, as well as “UUUUUU”.However, “M” cannot be next to both a dateformat specifier and a time format specifier.

A field separator is neccessary if thecorresponding value in the data file can have avariable length.

The utility stops processing.

User Response: Examine the format specifier.Correct the format, and resubmit the command.

SQL3193N The specified view or summarytable cannot be updated. Youcannot LOAD/IMPORT into thisview or LOAD into this summarytable.

Explanation: The LOAD/IMPORT utility can berun against a view only if the view can beupdated. The specified view is defined such thatdata in it may not be changed. The LOAD utilitycan be run against a summary table only if thesummary table is not replicated. The specifiedtable is a replicated summary table.

The LOAD/IMPORT utility stops processing. Nodata is inserted.

User Response: Resubmit the command withthe name of a table or a view that can beupdated.

SQL3194N The specified table is a systemtable. You cannot load a systemtable.

Explanation: The utility cannot be run against asystem table.

The utility stops processing. No data is loaded.

Chapter 2. SQL Messages 333

Page 342: Db2 SQL Errors

User Response: Resubmit the command with avalid table name.

SQL3195W The diskette “<number>” in drive“<drive>” cannot be used for theoutput file. Insert a formatteddiskette with writable free space.

Explanation: The EXPORT utility cannot use thecurrent diskette for exporting to a PC/IXF file forone of the following reasons:

v The output file cannot be opened on thediskette. The diskette may be unformatted.

v Not enough free space is available on thediskette.

This warning code is a request for theapplication to prompt the user to place anotherdiskette in the specified drive.

The utility is waiting to be called again after theuser puts the diskette in the drive.

User Response: Prompt the user for the disketteand then return to the utility with the calleracparameter indicating whether processingcontinues or ends.

SQL3196N The input file was not found.

Explanation: The source file to be loaded into adatabase could not be found in the pathindicated by the datafile parameter.

The command cannot be processed.

User Response: Verify that the input file doesexist and that the path to it is correct.

SQL3197N An attempt was made to executemultiple copies of import orexport.

Explanation: An attempt was made to executemore than one instance of the import or exportutility on a system where this is not supported.

The command cannot be processed.

User Response: Resubmit the second operationwhen no other processes are attempting toexecute the same utility.

SQL3200 - SQL3299

SQL3201N The specified table cannot bereplaced because another table isdependent on it.

Explanation: A table that is a parent in arelationship with another table cannot bereplaced.

The command cannot be processed.

User Response: Select a different option, suchas INSERT, or select a different target for theutility operation.

SQL3203N The INSERT_UPDATE option isnot permitted for the specifiedtarget because it has no primarykey or all columns are in theprimary key.

Explanation: The INSERT_UPDATE option isonly valid when the target table has a primarykey and the target columns include all columnsof the primary key. In addition, the target tableshould contain at least one column that is notpart of the primary key.

The command cannot be processed.

User Response: Select a different option such asINSERT, or choose a different target for theutility operation.

334 Message Reference, Volume 2

Page 343: Db2 SQL Errors

SQL3204N The INSERT_UPDATE optionmay not be applied to a view.

Explanation: The INSERT_UPDATE option isnot valid for views and a view has been selectedas the target of the utility operation.

The command cannot be processed.

User Response: Select a different option such asINSERT, or choose a different target for theutility operation.

SQL3205N The specified view cannot bereplaced because the base tablehas a dependent.

Explanation: A view whose base table is aparent table in a referential relationship with anytable (including itself) cannot be replaced.

The command cannot be processed.

User Response: Select a different option such asINSERT, or choose a different target for theutility operation.

SQL3206N The specified view cannot bereplaced because its definitioninvolves a subquery.

Explanation: A view whose definition involvesa subquery cannot be replaced. If the viewdefinition depends on the definition of otherviews, the other views cannot containsubqueries. The use of a subquery anywhere inthe definition of any view on which the targetview is based prohibits the REPLACE option.

The command cannot be processed.

User Response: Select a different option, suchas INSERT, or choose a different target for theutility operation.

SQL3207N Invalid table-list provided.Reason code ″<reason-code>″.

Explanation: The traversal-order-list/subtable-list provided is invalid. The explanation for thereason code is:

1. Tables specified in the traversal-order-list arenot in PRE-ORDER fashion.

2. Tables specified in the traversal-order-list arenot connected.

3. Mismatch of schema name found intraversal-order-list/subtable-list.

4. With REPLACE option, some subtables aremissing in the traversal-order-list.

5. Subtable-list is not equal to or a subset of thetraversal-order-list.

User Response: The user action, based on thereason code, is:

1. Make sure the traversal-order-list is inPRE-ORDER fashion.

2. Make sure all tables in the traversal-order-listare connected.

3. Make sure schema names are consistent.

4. When REPLACE option is used, make sureall subtables in the hierarchy are included.

5. Make sure subtable-list is equal to or is asubset of the traversal-order-list.

SQL3208W Importing data from typed tablesinto regular table.

Explanation: User specified to import data fromtyped tables into regular table. Please note,object_id column will not be cast whileimporting.

User Response: Please make sure suchoperation is intentional.

SQL3209N Import with CREATE option doesnot allow renaming subtablename nor attribute names.

Explanation: When CREATE option is used,neither subtable name nor attribute names can berenamed.

User Response: Please check your IMPORTcommand and make sure no subtable-list isspecified.

Chapter 2. SQL Messages 335

Page 344: Db2 SQL Errors

SQL3210N Option ″<option>″ is notcompatible with hierarchy in″<command-name>″.

Explanation: ″<option>″ is not compatible withhierarchy in EXPORT, IMPORT, or LOAD.

User Response: Please check the commandsyntax for hierarchical support.

SQL3211N LOAD does not support typedtables.

Explanation: LOAD does not support typedtables. Please consider IMPORT instead.

User Response: Please use IMPORT to bringhierarchical data into the database.

SQL3212N The TERMINATE option of theLOAD command is not currentlysupported for tables withDATALINK column(s), or tablespaces in delete pending state.

Explanation: An attempt was made to terminatea crashed, interrupted, or forced LOADoperation against a table which containsDATALINK column(s), or a table which residesin table space(s) in delete pending state. Theseare not currently supported.

User Response: Use the RESTART option of theLOAD command to recover a crashed,interrupted, or forced LOAD operation.

SQL3213I The indexing mode is “<mode>”.

Explanation: The indexing mode values are afollows:

REBUILDindexes will be completely rebuilt

INCREMENTALindexes will be extended

DEFERREDindexes will not be updated, but will bemarked as requiring refresh prior tonext access.

User Response: No action is required.

SQL3214N The LOAD utility does notsupport deferred indexing fortables with unique indexes.

Explanation: An indexing mode of DEFERREDwas specified for a table that has unique indexes.This is not valid.

User Response: Specify an indexing mode ofAUTOSELECT, REBUILD or INCREMENTAL,and reissue the command.

SQL3215W The Load utility currently doesnot support INCREMENTALindexing when loading into aDMS table space on tables wherethe table’s index object resides inthe same table space as any of theother target table’s objects, andthe COPY option is also specified.The REBUILD indexing modewill be used instead.

Explanation: INCREMENTAL indexing mode isnot supported for this operation. REBUILDindexing mode is used instead.

User Response: The user can avoid thiswarning by defining the index in a table spacethat is not shared by other objects in the table tobe loaded. Alternatively, avoid use of the COPYoption. Please refer to the DB2 documentation fora full list of alternatives to the COPY option.

SQL3216W The table’s index object was notconsistent at the time the loadutility began. INCREMENTALindexing cannot be performedduring this load utility operation.The REBUILD indexing modewill be used instead.

Explanation: INCREMENTAL indexing can onlybe used on tables that have a consistent indexobject at the time the load utlity begins. Loadingwith indexing mode REBUILD causes the tableindex to be rebuilt in a consistent manner.

User Response: No action required.

336 Message Reference, Volume 2

Page 345: Db2 SQL Errors

SQL3217W The INCREMENTAL indexingmode is supported only whenusing LOAD to append data usingthe INSERT INTO action. Thecurrent LOAD action is“<action>”. The utility will useindexing mode of “<mode>”instead.

Explanation: INCREMENTAL indexing can onlybe used when appending data to a table usingthe load INSERT action. This feature is notsupported with when loading with REPLACE,RESTART, or TERMINATE actions.

User Response: No action necessary.

SQL3218C The LOAD utility cannot proceedbecause it has encountered one ormore damaged index files. Restartthe database and resubmit theLOAD command.

Explanation: The LOAD utility cannot proceedbecause one or more index on disk datastructures for the target table are in aninconsistent state.

User Response: Terminate all applications andissue the RESTART DATABASE command for theaffected database to rebuild the damaged indexor indexes. Then resubmit the LOAD command.

SQL3219N LOAD utility failed to disableconstraint checking for the targettable.

Explanation: The LOAD utility encounteredproblems during its attempt to disable constraintchecking for the target table.

User Response:

v Issue the SET INTEGRITY OFF command onthe target table prior to running the LOADutility.

v If attempting a LOAD in the REPLACE modeafter a previously failed LOAD operation, usethe LOAD TERMINATE command to put thetablespace into an accessible state prior toissuing a LOAD REPLACE command.

SQL3220W Volume <volume-name> was notfound in the <directory-name>directory. Copy the volume intothis directory and continue theLOAD/IMPORT.

Explanation: An attempt to LOAD/IMPORT amultiple IXF file was made, but one of the files ismissing from the directory specified.LOAD/IMPORT tries to find the parts in thesame directory as the first part.

The import will terminate.

User Response:

v Find the part and put it in the same directoryas the first part. Then call LOAD/IMPORTagain with callerac of SQLU_CONTINUE. TheLOAD/IMPORT will continue processing thefile.

v Terminate the LOAD/IMPORT by callingLOAD/IMPORT with a callerac ofSQLU_TERMINATE.

SQL3221W ...Begin COMMIT WORK. InputRecord Count = <count>

Explanation: The import is about to attempt aCOMMIT of the work performed.

User Response: If the SQL3222W message isnot printed immediately after this message, thenthe COMMIT failed and you will need to checkyour table or view to see which records havebeen imported. You can then start the importagain with a RESTARTCOUNT set to the numberof records successfully imported to skip thoserows and import the rest of the file. (If you hadbeen doing a CREATE or REPLACE_CREATE orREPLACE, call the second import with INSERToption.)

SQL3222W ...COMMIT of any databasechanges was successful.

Explanation: The COMMIT was successful.

User Response: None necessary if you get thismessage.

Chapter 2. SQL Messages 337

Page 346: Db2 SQL Errors

SQL3223N The parameter of type pointer to<parameter> is not specifiedproperly.

Explanation: The parameter of type<parameter> is not specified properly. The typesare one of ″struct sqluimpt_in″, ″structsqluimpt_out″, ″struct sqluexpt_out″, ″structsqluload_in″, ″struct sqluload_out″, ″structsqluunld_in″, or ″struct sqluunld_out″. Thepointer should be either a NULL pointer orshould point to the appropriate structure and itssizeOfStruct field should be initialized to one ofSQLUIMPT_IN_SIZE for struct sqluimpt_in,SQLUIMPT_OUT_SIZE for struct sqluimpt_out,SQLUEXPT_OUT_SIZE for struct sqluexpt_out,SQLULOAD_IN_SIZE for struct sqluload_in,SQLULOAD_OUT_SIZE for struct sqluload_out,SQLUUNLD_IN_SIZE for struct sqluunld_in orSQLUUNLD_OUT_SIZE for struct sqluunld_out.

The command cannot be processed.

User Response: Call the utility again with aproper parameter.

SQL3225N The RESTARTCOUNT value isgreater than the number of rowsin the file. No rows were loaded.

Explanation: The utility was called with aRESTARTCOUNT value which was greater thanthe number of rows in the input file resulting inno rows being loaded into the table/view.

User Response: Ensure that theRESTARTCOUNT value is correct or call theutility again with the REPLACE or INSERToption and a correct RESTARTCOUNT value.

SQL3227W Record token ″<token1>″ refers touser record number ″<token2>″.

Explanation: An error or warning wasencountered during LOAD, IMPORT or EXPORTof a table. CPU parallelism was greater than 1 atthe time the problem was encountered, and anSQL message was written which identified theuser record with a special unique token. Thismessage serves to map the unique record tokento the record number of the source user data.

User Response: Refer to the original SQLmessage returned for appropriate action.

SQL3228N DEFERRED INDEXING is notsupported for tables withDATALINK columns.

Explanation: The “indexing mode” option forthe load utility was specified as “deferred”. Thisoption is not supported with tables havingDATALINK columns.

User Response: Reissue the load commandspecifying a different indexing mode.

SQL3250N COMPOUND=″<value>″ is aninvalid value or is not allowed inconjunction with other importparameters.

Explanation: The COMPOUND=x option wasspecified for the import utility and cannot beprocessed due to one of the following reasons:

v It is invalid when the INSERT_UPDATEoption is used.

v The database being imported to is accessedthrough a server or gateway of a previousrelease.

v The value is not within the allowed range of 1to 100. (On DOS or Windows, the maximumvalue is 7).

User Response: Change the filetmod option tocorrect the usage of COMPOUND=x.

SQL3251N ″number″ more errors occurredduring the import.

Explanation: The utility encountered moreerrors than can be relayed in the sqlca(maximum number is 7) while using theCOMPOUND option. Messages for these errorswill not be printed to the message file.

The utility continues processing.

User Response: If you desire all the errormessages for each row inserted during animport, do not use the COMPOUND option oruse a COMPOUND value less than or equal to 7.

338 Message Reference, Volume 2

Page 347: Db2 SQL Errors

SQL3260N An unexpected error occurredwhen accessing the LDAPdirectory. Error code =″<error-code>″.

Explanation: An unexpected error occurredwhen accessing the LDAP directory. Thecommand can not be processed.

User Response: Record the message number(SQLCODE) and the error code. Use theIndependent Trace Facility to obtain the DB2trace. Refer to the Independent Trace Facility inthe Troubleshooting Guide for information onhow to use this facility. Then contact your IBMservice representative.

SQL3261N The REGISTER LDAP commanddid not complete successfullybecause a required inputparameter was not specified.Reason code = ″<reason-code>″.

Explanation: The REGISTER LDAP commanddid not complete successfully because a requiredinput parameter was not specified as indicatedby the following reason codes:

1 The Network Id parameter was notspecified.

2 The Partner LU parameter was notspecified.

3 The Transaction Program (TP) nameparameter was not specified.

4 The Mode parameter was not specified.

5 The Netbios NNAME parameter wasnot specified.

6 The TCP/IP hostname parameter wasnot specified.

7 The TCP/IP service name parameterwas not specified.

8 The IPX Address was not specified.

9 The computer name was not specified.

10 The instance name was not specified.

User Response: Re-submit the command withthe required input parameter

SQL3262N The TCP/IP service name″<name>″ is not valid.

Explanation: The TCP/IP service namespecified is not valid.

User Response: Ensure that the TCP/IP servicename is configured and reserved in the localetc/services file, then re-submit the command.Alternatively, specify the port number that isassigned to the TCP/IP service name.

SQL3263N The protocol type is notsupported.

Explanation: The protocol type specified is notsupported for the command.

User Response: Re-submit the command usinga supported protocol type.

SQL3264N The DB2 server has not beenregistered in LDAP.

Explanation: The command did not completesuccessfully because the DB2 server had not beenregistered in LDAP.

User Response: Register the DB2 server inLDAP using the REGISTER LDAP command.Then re-submit the command.

SQL3265N An unexpected error occurredduring LDAP authentication.

Explanation: Unable to authenticate the LDAPuser due to unexpected LDAP system error.

User Response: Use the Independent TraceFacility to obtain the DB2 trace. Refer to theIndependent Trace Facility in the TroubleshootingGuide for information on how to use this facility.Then contact your IBM service representative.

SQL3266N The LDAP user password isincorrect.

Explanation: The specified password is not acorrect password for the specified userDistinguished Name (DN).

Chapter 2. SQL Messages 339

Page 348: Db2 SQL Errors

User Response: Re-submit the command usingthe correct password.

SQL3267N ″<authid>″ does not havesufficient authority to perform therequested command.

Explanation: The command did not completesuccessfully because the LDAP user did not havesufficient authority to perform the required task.

User Response: Ensure that the LDAP user hasthe authorization to perform the operation.

SQL3268N The LDAP schema is notcompatible with the currentrelease of DB2.

Explanation: The LDAP schema defined at theserver does not contain the definition for the DB2object classes and/or attributes used in thecurrent release of DB2.

User Response: Refer to the AdministrationGuide on how to extend the LDAP schema withDB2 object classes and attributes.

SQL3269N The LDAP server is not available.

Explanation: DB2 was not able to accessinformation in the LDAP directory because theLDAP server was not available.

User Response: Perform the following actions:

1. Ensure that the LDAP server is active.

2. Verify that TCP/IP is configured correctly onyour machine

3. Verify that the DB2LDAPHOST registryvariable is set to the TCP/IP hostname andport number of the LDAP server by runningthe ″db2set DB2LDAPHOST″ command. Ifthe DB2LDAPHOST is not set, you can set itby using the ″db2set DB2LDAPHOST=<host-name>:<port-number>″ command, where<host-name> is the TCP/IP hostname of theLDAP server and <port-number> is theTCP/IP port number of the LDAP server. Thedefault port number is 389.

SQL3270N The LDAP user’s DistinguishedNamed (DN) is not valid.

Explanation: The LDAP user’s DistinguishedNamed (DN) is not valid.

User Response: Re-submit the command usinga valid LDAP user’s DN.

SQL3271N The LDAP user’s DistinguishedName (DN) and/or password isnot defined for the current logonuser.

Explanation: When setting user preferencessuch as CLI configuration or DB2 registryvariable, the LDAP user’s DN and passwordmust be defined for the current logon user.

User Response: Refer to the IBM eNetworkLDAP documentation on how to configure theLDAP user’s DN and password for the currentlogon user.

SQL3272N The node ″<node-name>″ was notfound in the LDAP directory.

Explanation: The command did not completesuccessfully because the node ″<node-name>″was not found in the LDAP directory.

User Response: Ensure the node name is correctand re-submit the command.

SQL3273N The database ″<database-alias>″was not found in the LDAPdirectory.

Explanation: The command did not completesuccessfully because the database″<database-alias>″ was not found in the LDAPdirectory.

User Response: Ensure the database name iscorrect and re-submit the command.

340 Message Reference, Volume 2

Page 349: Db2 SQL Errors

SQL3274W The database was createdsuccessfully. However, thedatabase was not cataloged in theLDAP directory. SQLCODE =″<sqlcode>″.

Explanation: The database was createdsuccessfully. However, the database could not becataloged in the LDAP directory because therewas an error occurred during the operation.

User Response: Correct the error as indicated inthe SQLCODE. Then catalog the database in theLDAP directory using the CATALOG LDAPDATABASE command.

SQL3275W The database was droppedsuccessfully. However, thedatabase was not uncataloged inthe LDAP directory. SQLCODE =″<sqlcode>″.

Explanation: The database was droppedsuccessfully. However, the database could not beuncataloged in the LDAP directory because therewas an error occurred during the operation.

User Response: Correct the error as indicated inthe SQLCODE. Then uncatalog the database inthe LDAP directory using the UNCATALOGLDAP DATABASE command.

SQL3276N Unable to obtain the LDAPnaming context.

Explanation: Unable to query for the LDAPnaming context for the LDAP server.

User Response: Contact your LDAP directoryadministrator to obtain the LDAP namingcontext for the LDAP server that you are using.If you are using IBM eNetwork Directory V2.1,this is the name of the LDAP suffix. Then set thenaming context for the current machine using the″db2set DB2LDAP_BASEDN=<naming-context>″command.

SQL3277N The database ″<database-alias>″already exists in the LDAPdirectory.

Explanation: The command did not completesuccessfully because another database of thesame name already exists in the LDAP directory.

User Response: Re-submit the command usinga different alias name.

SQL3278N The node ″<node>″ already existsin the LDAP directory.

Explanation: The command did not completesuccessfully because another node of the samename already exists in the LDAP directory.

User Response: Re-submit the command usinga different alias name.

SQL3279N The command did not completesuccessfully because LDAP isdisabled.

Explanation: The command did not completesuccessfully because the LDAP support isdisabled on the current machine.

User Response: If the LDAP support isinstalled, enable the LDAP support by runningthe command: ″db2setDB2_ENABLE_LDAP=YES″.

If the LDAP support is not installed, you need torun the setup program and select to install theLDAP support.

SQL3280N The attempt to connect to aDRDA server failed.

Explanation: The attempt to connect to a DRDAserver failed because DB2 Connect is notinstalled on this DB2 client and thegateway-node was not specified when catalogingthis LDAP database.

User Response: Either install DB2 Connect onthis DB2 client or recatalog this LDAP databasewith a valid gateway-node.

Chapter 2. SQL Messages 341

Page 350: Db2 SQL Errors

SQL3281N The OSTYPE parameter is notvalid.

Explanation: The database server was notregistered in LDAP because the OSTYPEparameter specified was not valid. The OSTYPEparameter describes the operating system type ofthe server.

User Response: Resubmit the commandspecifying an operating system type (OSTYPE)that is supported by DB2.

SQL3282N The supplied credentials are notvalid.

Explanation: Either or both the distinguishedname (DN) of the user and the password thatwere specified were not valid.

User Response: Resubmit the command usingvalid values for both the distinguished name(DN) of the user and the password.

SQL3283W The database managerconfiguration was updatedsuccessfully. However, theprotocol information was notupdated in the LDAP directory.SQLCODE = “<sqlcode-value>”.

Explanation: The database managerconfiguration was updated successfully.

However, the protocol information could not beupdated in the LDAP directory because an erroroccurred during the LDAP operation.

User Response: Correct the error as indicated inthe SQLCODE. Then update the protocolinformation in the LDAP directory using theUPDATE LDAP NODE command.

SQL3284N The nodetype parameter is notvalid.

Explanation: The database server was notregistered in LDAP because the nodetypeparameter specified was not valid.

User Response: Use a valid nodetype whenregistering the database server in LDAP. Validvalues for the nodetype parameter are: SERVER,MPP, and DCS.

SQL3300 - SQL3399

SQL3300N The records in the input file arenot in the correct sequence.

Explanation: The records in the worksheetformat (WSF) file are expected to be in ascendingorder (row 1, col 1 ... row 1, col 256; row 2, col 1... row 2, col 256, and so on). Some damage hasoccurred to the WSF file or it was generatedincorrectly, possibly with a level of the Lotusproduct not supported by the database manager.

The IMPORT utility stops processing.

User Response: Regenerate the WSF file with asupported level of the Lotus product.

SQL3301N A BOF record was found in themiddle of the input file.

Explanation: A beginning-of-file (BOF) recordmust be the first record of a worksheet format(WSF) file. It cannot occur at any other locationin the file. Some damage has occurred to theWSF file or it was generated incorrectly, possiblywith a level of the Lotus product not supportedby the database manager.

The IMPORT utility stops processing.

User Response: Regenerate the WSF file with asupported level of the Lotus product.

342 Message Reference, Volume 2

Page 351: Db2 SQL Errors

SQL3302N An EOF record was found beforeany data was imported.

Explanation: The input file is valid, but it didnot contain any usable data to be imported. Thefirst worksheet row is reserved for titleinformation. The second worksheet row is usedfor column labels. Data begins in the third row.

The IMPORT utility stops processing.

User Response: Regenerate the worksheetformat (WSF) file with valid data in the rowsthat the database manager uses for data.

SQL3303N The file type must be IXF whenusing the CREATE orREPLACE_CREATE keywords inthe Action String parameter.

Explanation: File types other than IXF are notallowed with the CREATE orREPLACE_CREATE keywords in the ActionString (e.g. ″REPLACE into ...″) parameter.

The IMPORT utility stops processing. No data isimported.

User Response: Change the file type to IXF, oruse INSERT, INSERT_UPDATE or REPLACE.

SQL3304N The table does not exist.

Explanation: The parameters specified on thecommand require that the table exists.

The utility stops processing. No data is loaded.

User Response: Do one of the following:

v Resubmit the command with a table name ofan existing table.

v If the input file is a PC/IXF file, resubmit thecommand with the CREATE option.

SQL3305N The table cannot be createdbecause it already exists.

Explanation: The CREATE keyword indicatesthat a new table must be created but a table withthe specified name already exists.

The IMPORT utility stops processing. No data isimported.

User Response: Either erase the existing tableor use a keyword other than CREATE andresubmit the command.

SQL3306N An SQL error “<sqlcode>”occurred while inserting a rowinto the table.

Explanation: An SQL error occurred whileinserting a row into the table.

If the SQL error is not severe the row will berejected and the utility continues processing;otherwise the utility stops processing.

User Response: Examine other messages in themessage file for details about the actual errorand resubmit the command, if necessary.

SQL3307N The number of columns in theMETHOD parameter does notmatch the number of entries inthe Action String parameter, or acolumn specified in the METHODparameter does not exist.

Explanation: The CREATE orREPLACE_CREATE option was specified on theIMPORT command. Either:

v If the NAMES or POSITIONS methodindicator was specified in the METHODparameter, the number of columns explicitlyspecified in METHOD is not equal to thenumber of columns explicitly specified in theAction String (e.g. ″REPLACE into ...″)parameter.

v If the DEFAULT method indicator wasspecified in the METHOD parameter, thenumber of columns in the PC/IXF file is lessthan the number of columns specified in theAction String parameter.

v One column specified in the METHODparameter does not exist in the PC/IXF file.

The IMPORT utility stops processing. No table iscreated.

User Response: Either correct the columnsspecified in the METHOD and Action Stringparameters or correct the columns specified inthe METHOD parameter.

Chapter 2. SQL Messages 343

Page 352: Db2 SQL Errors

SQL3308N The code page values of thePC/IXF column “<name>” are notcompatible with the code pagevalues for the application. TheFORCEIN parameter was notspecified.

Explanation: The code page values for thecolumn and the application are not compatible.When the FORCEIN parameter is not specified,the data cannot be loaded if the conversion fromthe IXF file code pate to the application codepage is not supported.

The utility stops processing. No data is loaded.

User Response: To load data with these codepages, resubmit the command with theFORCEIN option.

SQL3309N Column “<name>” in the PC/IXFfile is defined as a graphiccolumn. The FORCEIN parameterwas not specified.

Explanation: During the load of a PC/IXF file, agraphic data column was encountered. Becausethe FORCEIN parameter was not used, the datacannot be loaded.

The utility stops processing. No data is loaded.

User Response: If you want to load the datawith the graphic data, resubmit the commandwith the FORCEIN parameter.

SQL3310N Column “<name>” in the PC/IXFfile is not valid.

Explanation: The CREATE orREPLACE_CREATE option was specified on theIMPORT command. A column with an invalid Crecord was found while importing the PC/IXFfile.

The IMPORT utility stops processing. The table isnot created.

User Response: Verify the column definitioninformation in the input file.

SQL3313N The disk is full. Processing wasended.

Explanation: The disk or diskette is full. Duringthe export to a PC/IXF file, either the PC/IXFdata file is on a fixed disk, or the PC/IXF datafile and the database are on the same drive, orthe PC/IXF data file and the message file are onthe same drive.

The EXPORT utility stops processing. Theexported data is not complete.

User Response: Provide more space on the diskor diskette or specify that the data file be locatedon a different drive than the database or themessage file and resubmit the command.

SQL3314N The date and time fields in an Arecord do not match the date andtime fields in the H record.

Explanation: During the load of a PC/IXF file,an A record was found in the PC/IXF file, thatcontained run identification information (in thedate and time fields) that differs from the runidentification information in the header (H)record. This action does not apply to an A recordat the start of a continuation file.

The input file has probably been damaged.

The utility stops processing.

User Response: Re-create the damaged file, orrepair the damaged file to recover as much dataas possible. Resubmit the command.

SQL3315N The volume fields in an A recordof subtype C are not valid.

Explanation: During the load of a PC/IXF filethat was created by Database Services, an Arecord was found in the PC/IXF file, thatcontained volume information (in the volumefields) that is not valid.

The input file has probably been damaged.

The utility stops processing.

User Response: Re-create the damaged file, orrepair the damaged file to recover as much dataas possible. Resubmit the command.

344 Message Reference, Volume 2

Page 353: Db2 SQL Errors

SQL3316N An I/O error occurred whileclosing part of the input file.

Explanation: During the load of a multiple partPC/IXF file, an I/O error occurred while thesystem was closing one of the files that make upthe input PC/IXF file. This action does not applyto the last file in the group of files that make upthe PC/IXF file.

The utility stops processing.

User Response: Resubmit the command.

SQL3317N The string pointed to by thefiletmod parameter containsconflicting information.

Explanation: The filetmod string defines thegeneration and product family for the outputWSF file. More than one generation or productfamily was defined in the string.

The utility stops processing. The output file isnot created.

User Response: Change the filetmod string todefine only one generation and product family.Resubmit the command.

SQL3318N There are duplicate keywords inthe filetmod parameter.

Explanation: A COLDEL, CHARDEL, orDECPT keyword appears more than once in thefiletmod parameter. This condition may arisewhile using delimited ASCII (DEL) files.

The utility stops processing. No data is loaded orexported.

User Response: Resubmit the command with acorrect filetmod parameter.

SQL3319N An SQL error “<sqlcode>”occurred while creating the table.

Explanation: An SQL error occurred whilecreating the table.

The IMPORT utility stops processing. The tablewas not created. No data was imported.

User Response: Look at the SQLCODE

(message number) in the message for moreinformation. Make changes and resubmit thecommand.

SQL3320N There is no delimiter or decimalpoint character after a keyword inthe filetmod parameter.

Explanation: A COLDEL, CHARDEL, orDECPT keyword is located at the very end of thefiletmod parameter. There is no delimiter ordecimal point character following the keyword.This condition may arise while using delimitedASCII (DEL) files.

The utility stops processing. No data is loaded orexported.

User Response: Resubmit the command with acorrect filetmod parameter.

SQL3321C Data was not imported into thedatabase because the log was full.Recovery was not successful.SQLCODE “<sqlcode>” wasreturned.

Explanation: The IMPORT utility could notinsert a row of data into the database becausethe database transaction log was full. All workwas committed, but the utility could not insertthe row, because the database transaction logremains full.

The utility stops processing. All previous changeswere committed, but the current row was notimported.

User Response: Check the amount of spaceremaining on the filesystem containing yourdatabase files. Consider increasing the maximumlog size in the database configuration file.

SQL3322N An operating system semaphoreerror occurred.

Explanation: An error occurred in the wait/postsemaphores.

The utility stops processing. For the EXPORTutility, data may be incomplete on the media. For

Chapter 2. SQL Messages 345

Page 354: Db2 SQL Errors

the IMPORT utility, data not already committedis rolled back.

User Response: Stop and restart DB2 andresubmit the utility.

SQL3324N Column “<name>” has a type of“<type>” which is not recognized.

Explanation: A column of data returned by theSQL statement is not supported.

Federated system users: The data type of thedata that you want is not supported by either thefederated server or the data source that you wantto access.

User Response: Correct the error and retry thecommand.

Federated system users: Specify a supported datatype and resubmit the program.

SQL3325W All the columns in row″<row-number>″ have NULLvalues; the row will not beincluded in the WSF data file.

Explanation: When you are doing an export ofa WSF file and the SELECT statement results in arow of all NULL values, the row will not beadded to the WSF file. The total number of rowsspecified in message SQL3105N is the number ofrows resulting from the SELECT statement andnot the number of rows in the WSF file.

The command continues processing.

User Response: No action required. This is aninformational message.

SQL3326N The column list following thetable name in the Action Stringparameter is invalid.

Explanation: When you call IMPORT or LOADwith an Action String (e.g. ″REPLACE into ...″)parameter which contains a column list after thetable name, this message will result if it isinvalid. For example, the following Action Stringparameters will fail:

insert into tablea()no columns within the parenthesis

insert into tablea(two words)invalid column name

insert into tablea(grant.col1)column name should not be qualified

insert into tablea(x1234567890123456789)column name too long

insert into tablea(,col1,col2)missing column name

The command cannot continue.

User Response: Change the Action Stringparameter with a valid column list and call theutility again.

SQL3327N A system error occurred (reasoncode1 = “ <reason-code-1>” andreason code2 =“<reason-code-2>”).

Explanation: A system error occurred duringprocessing.

The utility stops processing.

User Response: Record all error informationfrom the SQLCA, if possible. Retain the messagefile. Terminate all applications using thedatabase. Reboot the system. Restart thedatabase. Try the command again.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

SQL3330W In row “<row-number>” acharacter field has an odd lengthbut its target database column is agraphic column. The row was notloaded.

Explanation: Only even length character fieldscan be loaded into graphic database columns.

The row is not loaded.

346 Message Reference, Volume 2

Page 355: Db2 SQL Errors

User Response: Either load the data to a newtable using the CREATE option in the IMPORTcommand or do not load this column into thistable.

SQL3331C The permission setting of a file(or directory) does not allow thespecified access.

Explanation: This may accompany another errormessage. It indicates an attempt was made to getaccess to a file or directory in a way that isincompatible with the attributes of the file. Oneof the following may be the source of thedifficulty:

v Opening a file for writing on a read-onlydevice

v Opening a file for writing on a read-only file

v Opening a directory instead of a file

v Encountering a locking or sharing violation.

The command cannot be processed.

User Response: Retry the utility when the file isnot in use, or retry the utility directing theoutput to a path and file that allows writing.

SQL3332C The maximum number of openfiles has been reached.

Explanation: This message may accompanyanother error message. It indicates that themaximum number of open files has beenreached.

The command cannot be processed.

User Response: Terminate other applications toreduce the number of files open and retry theutility.

SQL3333C The file or directory does notexist.

Explanation: This message may accompanyanother error message. It indicates that a file ordirectory to be accessed does not exist or cannotbe found.

The command cannot be processed.

User Response: Resubmit the command with

the correct file name, including a valid path.

SQL3334C There is not enough storageavailable.

Explanation: This message may accompanyanother error message. It indicates there is notenough storage available to open the file.

The command cannot be processed.

User Response: Stop the application. Possiblesolutions include:

v Verify that your system has sufficient real andvirtual memory.

v Remove background processes.

SQL3335C The file system is full.

Explanation: This message may accompanyanother error message. It indicates there is noavailable space for writing on the device.

The command cannot be processed.

User Response: To make space available on thedevice, delete unneeded files or direct the outputdata to a device with space available.

SQL3337N An I/O error occurred whilewriting data to the server.

Explanation: An I/O error has occurred whileattempting to write data to a temporary file onthe server (temporary files are created in the tmpdirectory under the sqllib directory for theinstance of the database manager). The filesystem on the server may be full.

The utility stops processing. The database isunchanged.

User Response: Contact the SystemAdministrator for the server to make spaceavailable on the server, and resubmit thecommand.

Chapter 2. SQL Messages 347

Page 356: Db2 SQL Errors

SQL3338N An I/O error occurred reading atemporary message file on theserver.

Explanation: A system I/O error has occurredwhile attempting to read the temporary messagefile on the server.

The IMPORT operation is complete; however, themessage file on the database client system maybe empty or incomplete.

User Response: Query the remote database todetermine if the utility operation was successful.

SQL3400 - SQL3499

SQL3400N The method specified inMETHOD is not valid forNon-Delimited ASCII files. Itmust be ’L’ for locations.

Explanation: When loading from anon-delimited ASCII file, columns must beselected by locations in the file.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3401N The method specified inMETHOD is not valid for anyfiletype.

Explanation: The method for selecting columnsin the file is not a value allowed for any filetype.Choose one of the following method indicators:

v P for positions

v N for names

v L for locations

v D for default

Further restrictions are based on filetype.

The command cannot be processed.

User Response: Resubmit the command with avalid method indicator.

SQL3402N A beginning-ending location pairwith both values zero wasspecified for non-nullable column“<name>”.

Explanation: A location pair with both thebeginning and the ending location set to zero

was specified for the indicated column, but thecolumn is not nullable.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3403N The beginning-ending locationpair for inserting into column“<name>” is not valid.

Explanation: The field specification for locatingthe input data for the indicated database columnwithin the input non-delimited ASCII file is notvalid. The field specification has one of thefollowing errors:

v The beginning location is less than zero.

v The ending location is less than zero.

v The ending location is less than the beginninglocation.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3404N The beginning-ending locationpair for inserting into column“<name>” is not valid for anumber.

Explanation: The field specification for locatingthe data for the indicated database columnwithin the input non-delimited ASCII file is notvalid. The location pair defines a field longerthan 50 bytes.

The command cannot be processed.

348 Message Reference, Volume 2

Page 357: Db2 SQL Errors

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3405N The beginning-ending locationpair for insertng into column“<name>” is not valid for a date.

Explanation: The field specification for locatingdata for the indicated database column withinthe non-delimited ASCII file is not valid. Thelocation pair defines a field length that is notvalid for an external representation of a date.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3406N The beginning-ending locationpair for inserting into column“<name>” is not valid for a time.

Explanation: The field specification for locatingthe data in the indicated database column withinthe input non-delimited ASCII file is not valid.The location pair defines a field length that is notvalid for an external representation of a time.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

SQL3407N The beginning-ending locationpair for inserting into column“<name>” is not valid for atimestamp.

Explanation: The field specification for locatingthe data for the indicated database columnwithin the input non-delimited ASCII file is notvalid. The location pair defines a field length thatis not valid for an external representation of atimestamp.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in the file.

SQL3408W The beginning-ending locationpair for inserting into column“<name>” defines a field largerthan the target column. Data maybe truncated.

Explanation: The field specification forobtaining data from the input non-delimitedASCII file defines a field larger than the size (ormaximum size) of the target database column.

The utility continues processing. Truncationoccurs when necessary.

User Response: No action is required.

SQL3409W The beginning-ending locationpair for inserting into column“<name>” defines a field shorterthan the target fixed-lengthcolumn. Data will be padded.

Explanation: The indicated database column isa fixed-length column. The field specification forobtaining data from the input non-delimitedASCII file defines a field smaller than the size ofthe target database column.

The utility continues processing. Values input tothe indicated database column are padded withspaces as necessary, on the right.

User Response: No action is required.

SQL3410N The beginning-ending locationpair for inserting into column“<name>” is not valid for agraphic column.

Explanation: The field specification for locatingthe input data in the ASCII file that is to beinserted into the indicated database columndefines a field with an odd number of bytes.

The command cannot be processed.

User Response: Resubmit the command with avalid set of locations for the columns in thesource file.

Chapter 2. SQL Messages 349

Page 358: Db2 SQL Errors

SQL3411W The field value in row“<row-number>” and column“<column-number>” is not validfor a graphic column. A null wasinserted.

Explanation: The value in the field indicated isnot an acceptable graphic column value. Thevalue may contain an odd number of bytes. ForDEL files, the value of the column numberspecifies a field in the indicated row. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuebegins.

The row is not inserted.

User Response: If a null is not acceptable,correct the input file and resubmit the command,or edit the data in the table.

SQL3412W The field value in row“<row-number>” and column“<column-number>” is not validfor a graphic column but thetarget column is not nullable. Therow was not inserted.

Explanation: The value in the field indicated isnot an acceptable graphic column value. Thevalue may contain an odd number of bytes. Anull cannot be inserted because the targetcolumn is not nullable. For DEL files, the valueof the column number specifies a field in theindicated row. For ASCII files, the value of thecolumn number specifies the byte location withinthe row where the value begins.

The row is not inserted.

User Response: No action is required. If therow is necessary, correct the input file andresubmit the command, or edit the data in thetable.

SQL3413W The field value in row“<row-number>” and column“<column-number>” is too shortfor the target column. A null wasinserted.

Explanation: The value in the specified field isnot acceptable because it is too short for thetarget column. The value of the column numberspecifies the byte location within the row wherethe field begins.

A null value is inserted.

User Response: No action is required. If a nullis not acceptable, correct the inner field andresubmit the command, or edit the data in thetable.

SQL3414N The temporary file ″<filename>″could not be found.

Explanation: At the end of the load phase atemporary file is created with informationnecessary to restart the load. If the load isinterrupted before this point, this file is notcreated.

This message indicates that this file could not befound during load restart.

The utility stops.

User Response: Depending on where theinterrupt occurred, it may be possible to restartthe load at the build phase.

SQL3415W Failed to convert the field valuein row ″<row-number>″ andcolumn ″<column-number>″ fromthe codepage of the input data fileto the codepage of the database. Anull value was loaded.

Explanation: The value in the field indicatedcannot be converted from the codepage of theinput data file to the codepage of the database.

User Response: If a null value is not acceptable,correct the input data file and resubmit thecommand, or edit the data in the table.

350 Message Reference, Volume 2

Page 359: Db2 SQL Errors

SQL3416W Failed to convert the field valuein row ″<row-number>″ andcolumn ″<column-number>″ fromthe codepage of the input data fileto the codepage of the database.The row was not loaded.

Explanation: The value in the field indicatedcannot be converted from the codepage of the

input data file to the codepage of the database.

User Response: No action is required. If therow is necessary, correct the input data file andresubmit the command, or edit the data in thetable.

SQL3500 - SQL3599

SQL3500W The utility is beginning the″<phase>″ phase at time″<timestamp>″.

Explanation: This is an informational messageindicating that a phase is about to begin and thatthe previous phase has ended. The phases are (inorder of appearance):

v LOAD

v BUILD

v DELETE

During the LOAD phase, data is loaded intoyour table. If there are any indexes to be built,BUILD phase will follow the LOAD phase. Ifthere were any duplicate keys found for a uniqueindex, the DELETE phase will follow the BUILDphase.

If the LOAD is terminated before the end of theLOAD, you need to know the phase at whichyou should restart the LOAD.

User Response: No action is required.

SQL3501W The table space(s) in which thetable resides will not be placed inbackup pending state sinceforward recovery is disabled forthe database.

Explanation: COPY NO was specified on theinvocation of LOAD which results in the tablespace(s) in which the table resides being placedinto backup pending state unless forwardrecovery is disabled for the database.

The utility continues.

User Response: No action is required.

SQL3502N The utility has encountered″<number>″ warnings whichexceeds the total number ofwarnings allowed.

Explanation: The number of warnings issuedduring the command has exceeded the totalnumber of warnings that the user specified atinvocation of the utility.

The utility terminates.

User Response: Ensure that the correct data isbeing loaded with the appropriate options orincrease the number of warnings allowed.Resubmit the command.

SQL3503W The utility has loaded″<number>″ rows which equalsthe total count specified by theuser.

Explanation: The number of rows loaded hasequaled the total number of rows that the userspecified at invocation of the utility.

The utility has successfully completed.

User Response: No response required.

SQL3504W A consistency point is beingestablished.

Explanation: Consistency points will beestablished at times other than the regularinterval specified in the SAVECOUNT parameterat invocation when:

Chapter 2. SQL Messages 351

Page 360: Db2 SQL Errors

v the threshold for the amount of meta-data keptin memory or in temporary files has beenreached.

v A device error occurred for the copy imageand the load must terminate.

User Response: If the LOAD continues afterthis message, no action is required. If the LOADterminates, it can be restarted after all errors arecorrected (such as activating a device ordecreasing the interval at which consistencypoints are to be established).

SQL3505N The length specified in thefiletmod for the RECLEN optionis not in the valid range of 1 to32767.

Explanation: In the filetmod parameter, theRECLEN option was specified for an ASC file.The length specified is not valid.

User Response: Correct the length specified andresubmit the command.

SQL3506W The value specified in the nullindicator in row “<row-number>”and column “<column-number>”is not valid. A value of ’N’ will beassumed.

Explanation: For ASC files, a null indicatorcolumn can be specified for each data columnand should contain either a ’Y’ or a ’N’. A ’Y’indicates that the column is a null value and a’N’ indicates that the column contains data. Ifneither of these values are in the null indicatorcolumn, it is assumed to be a ’N’ and data willbe loaded into the column.

User Response: If the data or the null indicatorare incorrect, correct the input file and resubmitthe command.

SQL3507N The column number specified fora null indicator is not in the validrange of 0 to 32767 or the nullindicator parameter is not valid.

Explanation: In the null_ind parameter, columnsfor null indicators were specified for an ASC file

but one of the columns is not valid or the pointerpassed in for the null indicators is not valid.

User Response: Correct the parameter andresubmit the command.

SQL3508N Error in accessing a file or path oftype “<file-type>” during load orload query. Reason code:“<reason-code>”. Path:“<path/file>”.

Explanation: An error occurred while trying toaccess a file during load or load queryprocessing. The utility stops processing.

User Response: If doing a load and the tablespace is not in load pending state, correct theproblem and invoke the load utility again. If thetable space is in load pending state, then invokethe load utility in RESTART or REPLACE mode,or restore a backup of the table space(s). Thestate of the table space can be determined usingthe LIST TABLESPACES command.

The following is a list of reason codes:

1 Unable to open the file.

This could be caused by an incorrect filename or insufficient authority to accessthe file/directory. Correct the problemand either restart or rerun the load.

2 Unable to read/scan the file.

This could be the result of a hardwareerror. If the error is a hardware error,take the appropriate action as specifiedin the Troubleshooting Guide for hardwareproblems and restart or rerun the load.

3 Unable to write to or change size of thefile.

This could be the result of a disk fullcondition or a hardware error. Refer tothe file type list below and either ensurethere is enough space to run the load orspecify a different location to be used.Restart or rerun the load. If the error isa hardware error, take the appropriate

352 Message Reference, Volume 2

Page 361: Db2 SQL Errors

action as specified in the TroubleshootingGuide for hardware problems and restartor rerun the load.

4 The file contains invalid data.

A file required by the load containsincorrect data. See the action describedfor TEMPFILES_PATH.

5 Unable to close the file.

If the load cannot be restarted or rerun,contact your IBM service representative.

6 Unable to delete the file.

If the load cannot be restarted or rerun,contact your IBM service representative.

7 Parameter specified incorrectly. Refer tothe list of file types to determine theparameter in error and rerun the loadwith a valid parameter.

The following is a list of file types:

SORTDIRECTORYEnsure that the workdirectory parameteris specified properly. There must beenough combined space in all thedirectories to hold twice the size of theindex keys for the loaded data. For loadinsert and load restart there must alsobe room for twice the size of the indexkeys of the existing data in the table.

MSGFILEEnsure that the messagefile parameter isspecified properly. There must beenough disk space to write out themessages that occur during the load.

If this is a load query, ensure that thelocal message file parameter is NOT thesame as the messagefile parameter usedfor the load whose status is beingqueried.

TEMPFILES_PATHEnsure that the tempfiles pathparameter is specified properly. See theData Movement Utilities Guide andReference for more details on thisparameter.

SQL3509W The utility has deleted″<number>″ rows from the table.

Explanation: When a table with a unique indexis loaded, rows causing violation of uniquenessof an index will be deleted from the table duringthe delete phase. This message providesinformation on how many rows have beendeleted.

User Response: No action is required.

SQL3510N The working directory for the sortphase cannot be accessed.

Explanation: One or more of the specifiedworking directories for the sort phase either doesnot exist or has no read/write permission.

User Response: Ensure that the specifiedworking directories exist and the read/writepermission is setup correctly and resubmit thecommand.

SQL3511W The file named in row“<row-number>” and column“<column-number>” cannot befound. A null was loaded.

Explanation: The filename in the specified fieldcannot be found. There may be a data typemismatch.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

A null value is loaded.

User Response: Examine the input value. Ifnecessary, correct the input file and resubmit thecommand or edit the data in the table.

Chapter 2. SQL Messages 353

Page 362: Db2 SQL Errors

SQL3512W The file named in row“<row-number>” and column“<column-number>” cannot befound, but the target column isnot nullable. The row was notloaded.

Explanation: The filename in the specified fieldcannot be found. A null cannot be loadedbecause the output column in the table is notnullable.

For delimited ASCII (DEL) files, the value of thecolumn number specifies the field within the rowthat contains the value in question. For ASCIIfiles, the value of the column number specifiesthe byte location within the row where the valuein question begins.

The row is not loaded.

User Response: Correct the input file andresubmit the command or edit the data in thetable.

SQL3513N The codepage of the file does notmatch the codepage of thedatabase. The file cannot beloaded.

Explanation: DB2CS files cannot be loaded intoa database with a codepage that differs from theoriginal database.

User Response: Change the codepage of thedatabase and resubmit the command or useanother filetype (such as PC/IXF) to move yourdata from the original database to the newdatabase.

SQL3514N A utility system error occurred.Function code: “<function>”.Reason code: “<reason-code>”.Error code: “<error-code>”.

Explanation: A system error occurred duringdatabase utility processing.

User Response: Different actions are requireddepending on the value of “<function>”.

The possible function codes are:

v 1 - An error occurred while Load was sorting.

Try to restart the load. If the error persists,provide the function, reason code and errorcode to your technical service representative.

v 2 - An error occurred using the vendor sortutility.

Try the load again using the DB2Client/Server sort utility instead of the vendorsort. To do this, reset the Profile Registry valueat the server to blank. You may have to restartthe Database Manager in order to pick up thenew Profile Registry value. If the errorpersists, provide the function, reason code anderror code to your vendor sort technicalservice representative.

SQL3515W The utility has finished the″<phase>″ phase at time″<timestamp>″.

Explanation: This is an informational messageindicating that a phase has finished. The phasesare (in order of appearance):

v LOAD

v BUILD

v DELETE

User Response: No action is required.

SQL3516N The utility could not restart theload as specified.

Explanation: The Load Utility detecteddiscrepancies in the last consistency pointperformed by Load before failure occurred. Thiscondition might be caused either by a systemerror or an invalid log file.

User Response: Restart the Load at the Buildphase, to bring the table to a consistent state andcreate indexes (if applicable), or perform Loadwith the REPLACE option.

SQL3517N An unexpected record was readfrom the input source.

Explanation: The utility has encountered arecord that is in a format that is not valid. The

354 Message Reference, Volume 2

Page 363: Db2 SQL Errors

source may have been corrupted when copiedfrom the original source.

Processing terminates.

User Response: Copy the record from theoriginal source in binary and restart the LOAD.

SQL3518N The data in the source is notcompatible to the table to beloaded.

Explanation: The source cannot be used to loadthis table because one of the following reasons:

v the table definition does not match the tabledefinition of the source.

v the source was created on a different platformthan the table that is being loaded.

v the source was created from a table that had adifferent codepage from the table that is beingloaded.

User Response: Ensure that both the table andsource are correctly specified. If you want to loaddata from a table with a different definition orfrom a different platform or codepage, useanother filetype such as IXF or DEL.

SQL3519W Begin Load Consistency Point.Input record count = ″<count>″.

Explanation: The Load Utility is about toattempt to perform a Consistency Point tocommit the table data that has already beenloaded.

User Response: If message SQL3520W is notprinted immediately after this message, then theConsistency Point failed. The Load will have tobe restarted at the Build phase, to ensure that thetable is brought back to a consistent state and allindexes (if any) created. It will then be possibleto check which records have been loaded. Startthe Load again with a RESTARTCOUNT set tothe number of records successfully loaded to skipthose rows and load the rest of the file.

If this message is followed by messagesSQL3520W, then this message is informationalonly and no response is required.

SQL3520W Load Consistency Point wassuccessful.

Explanation: The Consistency Point performedby Load was successful.

User Response: This is an informationalmessage only. No response is required.

SQL3521N The input source file″<sequence-num>″ was notprovided.

Explanation: A load was invoked with multipleinput files but not all the files were provided. Forthe DB2CS filetype, all the input source files thatwere created originally must be provided. Forthe IXF filetype, all the input source files must beprovided in the correct order.

The utility terminates.

User Response: Restart the utility providing allthe input source files and setting theRESTARTCOUNT appropriately for the data thatwas already loaded.

SQL3522N A copy target cannot be providedwhen both log retain and userexits are disabled.

Explanation: A copy target has been specifiedon invocation of load for a database that hasboth log retain and user exits disabled. Copytargets are not valid for such databases.

The utility stops processing.

User Response: Verify that the database shouldhave log retain and user exits disabled andinvoke the load without specifying a copy target.

SQL3523W There are no messages to beretrieved from the message file.Reason code: ″<rc>″.

Explanation: No messages are returned from aquery of the LOAD temporary message file. Thepossible return codes are:

1 No LOAD temporary message fileexists.

Chapter 2. SQL Messages 355

Page 364: Db2 SQL Errors

2 There are no messages in the LOADtemporary message file.

User Response: Ensure that a valid table namehas been specified. If the table name is specifiedcorrectly and messages are expected, check thedatabase monitor to verify that the utility isactive and it is not waiting for resources such aslocks. Note that the LOAD temporary messagefile will not be created until the LOAD utility isin progress and it will be deleted after thecompletion of the LOAD utility.

SQL3524N Option ″<option>″ has an invalidvalue of ″<value>″.

Explanation: The value provided must be aninteger value. Its range for each option is asfollows:

1. TOTALFREESPACE: the value must be in therange of 0 to 100, and is interpreted as apercentage of the total pages in the table thatare to be appended to the end of the table asfree space.

2. PAGEFREESPACE: the value must be in therange of 0 to 100, and is interpreted as apercentage of each data page that is to be leftas free space.

3. INDEXFREESPACE: the value must be in therange of 0 to 99, and is interpreted as apercentage of each index page that is to beleft as free space when loading indexes.

The utility stops processing.

User Response: Correct the value and resubmitthe command.

SQL3525W The ″<option-1>″ option isincompatible with the″<option-2>″ option.

Explanation: Incompatible options have beenprovided to the utility.

User Response: Remove or modify one of theoptions and resubmit the command. See theCommand Reference for more information onvalid options.

SQL3526N The modifier clause ″<clause>″ isinconsistent with the current loadoptions. Reason code:″<reason-code>″.

Explanation: The load file type mode (modifier)indicated, is incompatible with yourload/import/export command. This is because ofone of the following reasons:

1. The current option requires you to specify theRECLEN and NOEOFCHAR file typemodifiers. One or more of these options aremissing from your command.

2. The indicated option, such as DEL or ASC, isinconsistent with the format of the input oroutput data file.

3. Generated or identity related file typemodifiers have been specified but the targettable contains no such columns.

4. It is not possible to load a table having anon-identity generated column in a uniqueindex unless the column is specified in theINCLUDE clause of the CREATE INDEXstatement or the GENERATEDOVERRIDE filetype modifier is used.

5. It is not possible to load a table having anon-identity generated column in thepartitioning key unless theGENERATEDOVERRIDE file type modifier isused.

User Response: Check the requirements of theoption you are using. Reissue the commandusing modifier clauses (file type modes) andutility options that are consistent.

SQL3527N The number specified in theFILETMOD parameter for theCODEPAGE option is not valid.

Explanation: In the FILETMOD parameter, theCODEPAGE option was invalid.

User Response: Correct the codepage numberand resubmit the command.

356 Message Reference, Volume 2

Page 365: Db2 SQL Errors

SQL3528W The delimiter (column delimiter,string delimiter, or decimal point)specified in the CLP commandmay get translated from theapplication codepage to thedatabase codepage.

Explanation: When a CLP command is sentfrom the client to the server, it may gettranslated from the codepage of client to thecodepage of server, if they are different.

User Response: To ensure that delimiters arenot converted, they should be specified in hexformat.

SQL3529N The “<operation-name>”operation encountered theunsupported data type“<data-type>” in column“<column-number>”.

Explanation: The “<operation-name>” operationdoes not support data type “<data-type>” foundin column “<column-number>”.

User Response: Please check your tabledefinition and the Data Movement Guide forsupported data types.

SQL3530I The Load Query utility ismonitoring Load progress on node“<node>”.

Explanation: The Load Query utility wasinvoked in an MPP environment.

User Response: No action is necessary.

SQL3531I A LOAD RESTART has occurred.

Explanation: The RESTART option was givenfor the Load currently being queried.

User Response: No action is necessary.

SQL3532I The Load utility is currently inthe “<phase>” phase.

Explanation: This is an informational messageindicating the phase of the Load currently beingqueried.

User Response: No action is necessary.

SQL3533I The Load utility is currentlybuilding index “<number>” of“<number>”.

Explanation: This is an informational messagereturned if the Load currently being queried is inthe BUILD phase.

User Response: No action is necessary.

SQL3534I The Load DELETE phase isapproximately “<number>”percent complete.

Explanation: This is an informational messagereturned if the Load currently being queried is inthe DELETE phase.

User Response: No action is necessary.

SQL3535W The LOAD command parameter“<parameter-name>” is no longersupported; its value will beignored by the LOAD utility.

Explanation: Your LOAD command contains aparameter that is no longer supported.

User Response: Please refer to the DB2documentation for information on temporary sortspace for LOAD and suggestions related toLOAD performance tuning.

SQL3536N System temporary table space“<table-space-name>” is full.

Explanation: The LOAD utility hasencounetered a table space full condition whilesorting index keys.

User Response: Ensure that there is enoughspace allocated to the system temporary tablespace “<table-space-name>”, at least two timesthe total size of the indexes being built. Restartthe LOAD utility.

Chapter 2. SQL Messages 357

Page 366: Db2 SQL Errors

SQL3537N Sort memory could not beallocated during the execution ofthe LOAD utility.

Explanation: Insufficient process virtualmemory is available to the LOAD utility for sortprocessing.

User Response: Terminate the application onreceipt of this message. Ensure there is enoughvirtual memory available for sort processing.

Possible solutions include:

v Disconnect all applications from the databaseand decrease the size of the sort heapparameter (sortheap) in the correspondingdatabase configuration file.

v Remove background processes and/orterminate other currently executingapplications.

v Increase the amount of virtual memoryavailable.

SQL3538N The LOAD QUERY utility failedbecause multiple LOADs areusing the same temporary filespath.

Explanation: At least one other LOAD wasinvoked using the same TEMPFILES PATH asthe queried LOAD and is still in progress. TheLOAD QUERY utility cannot uniquely determinewhich LOAD to query.

User Response: Use the TABLE parameter ofLOAD QUERY instead.

SQL3539N LOAD RESTART cannot proceedbecause LOAD TERMINATE hasbeen attempted at least once.

Explanation: LOAD TERMINATE can only befollowed by LOAD TERMINATE.

User Response: User can proceed with LOADTERMINATE only.

SQL3550W The field value in row“<row-number>” and column“<column-number>” is not NULL,but the target column has beendefined as GENERATEDALWAYS.

Explanation: A non NULL field value wasencountered in the input file Because the target

column is of type GENERATED ALWAYS, thevalue cannot be loaded. The column numberspecifies the field within the row of the missingdata.

User Response: For LOAD, an explicit, nonNULL field value can be loaded into aGENERATED ALWAYS identity column only ifthe identityoverride file type modifier is used.For non-identity GENERATED ALWAYScolumns, the generatedoverride file type modifiercan be used to load explicit, non NULL valuesinto a row. If using these modifiers is notappropriate, the field value must be replacedwith a NULL if LOAD is to accept the row.

For IMPORT there is no way to override aGENERATED ALWAYS column. The field valuemust be removed and replaced with a NULL ifthe utility is to accept the row.

SQL3551W The table contains at least oneGENERATED ALWAYS columnthat the utility will override.

Explanation: An “override” file type modifier(for example, IDENTITYOVERRIDE orGENERATEDOVERRIDE) has been specified.

For IDENTITYOVERRIDE, this may violate theuniqueness property of an identity columndefined as GENERATED ALWAYS.

For GENERATEDOVERRIDE, this may result ina non-identity GENERATED ALWAYS columncontaining a value that does not correspond toits column definition.

User Response: No action is required.

358 Message Reference, Volume 2

Page 367: Db2 SQL Errors

SQL3600 - SQL3699

SQL3600N The IMMEDIATE CHECKEDoption of the SET INTEGRITYstatement is not valid since thetable “<table-name>” is not in thecheck pending state.

Explanation: The data is checked for constraintviolations only if the table is placed in the checkpending state.

User Response: Use the SET INTEGRITYstatement with the OFF option to place a table inthe check pending state.

sqlcode: -3600

sqlstate: 51027

SQL3601W The statement caused one or moretables to automatically be placedin check pending state.

Explanation: There are two situations wherethis occurs.

1. Setting a parent table in a referential structurerequires dependent and descendent tables tobe set in check pending. This is necessary toenforce referential integrity constraints.Adding a foreign key when the parent tableis in a check pending state requires all newdependents and descendents of the parenttable to be placed automatically in checkpending.

2. Setting a base table that has dependentrefresh immediate summary tables requiresthese dependent summary tables to be set incheck pending. This is necessary to enforcethe data relationship between the base tableand the dependent summary table.

User Response: This is a warning message. Theuser must execute the SET INTEGRITY statementwith the IMMEDIATE CHECKED option in orderto validate the integrity on all the dependent anddescendent tables.

sqlcode: +3601

sqlstate: 01586

SQL3602W Check data processing foundconstraint violations and movedthem to exception tables.

Explanation: There are rows that violateconstraints that were specified to be checked bythe SET INTEGRITY statement execution. Thesewere moved to exceptions tables.

User Response: Check the exception tables forrows that violate constraints. The rows have beendeleted from the original table but can becorrected and transferred back from theexception tables.

sqlcode: +3602

sqlstate: 01603

SQL3603N Check data processing throughthe SET INTEGRITY statementhas found integrity violationinvolving a constraint with name“<name>”.

Explanation: A row has been found to violate aconstraint defined on a table specified to bechecked by the SET INTEGRITY statement. Thename “<name>” is either a constraint name orthe name of a generated column.

User Response: The row has not been deletedfrom the table since the FOR EXCEPTION optionwas not used.

It is advisable to execute the SET INTEGRITYstatement using the FOR EXCEPTION optionwhen checking the data. The data may becorrected with the information from theexception table(s).

sqlcode: -3603

sqlstate: 23514

Chapter 2. SQL Messages 359

Page 368: Db2 SQL Errors

SQL3604N Exception table“<excp-table-name>”corresponding to table“<table-name>” in the SETINTEGRITY statement or LOADutility does not have the properstructure, has been defined withunique indexes, constraints,generated columns, or triggers, oris in the check pending stateitself.

Explanation: The exception table correspondingto a table must have its definition similar to thatof the original table. Optional columns for theutility are as specified in the relevant section ofthe documentation describing the exceptiontables. There may not be any generated columnsin the exception table. There must not be anyconstraints or triggers defined on the exceptiontable. The exception table itself should not be inthe check pending state.

User Response: Create the exception table asindicated in the relevant section of thedocumentation and re-run the statement orutility.

sqlcode: -3604

sqlstate: 428A5

SQL3605N Table “<table-name>” named inthe SET INTEGRITY statement iseither not listed to be checked oris an exception table specifiedmore than once.

Explanation: When the FOR EXCEPTIONclause is specified in the SET INTEGRITYstatement, this error could be caused by one ofthe following :

v The table is missing from the list of tables tobe checked

v The table to be checked is the same as anexception table

v The exception table is specified for more thanone table to be checked

User Response: Correct the table names andexecute the command again.

sqlcode: -3605

sqlstate: 428A6

SQL3606N There is a mismatch in thenumber of tables being checkedand in the number of exceptiontables specified in the SETINTEGRITY statement.

Explanation: There must be a one-to-onecorrespondence between the original tables andthe exception tables provided in the list.

User Response: Create the missing exceptiontable if not already done and specify it in the listin order to execute the command again.

sqlcode: -3606

sqlstate: 428A7

SQL3608N Cannot check or reset the CheckPending state on dependent table“<dep-table-name>” using theSET INTEGRITY statement whilethe parent table“<par-table-name>” is in thecheck pending state.

Explanation: The parent table must be clean(not in the check pending state) or be included inthe invocation list in order to

v reset the check pending state of a dependenttable

v check a dependent table.

User Response: Ensure that the parent table isnot in check pending by executing the SETINTEGRITY statement to check the parent table.

It is recommended to check the parent table first.It is also possible to check the dependent tableand include the parent table in the invocationlist. In this case, the command could still fail ifthere are constraint violations in the parent tableand they are not deleted. This can happen if theFOR EXCEPTION option is not used.

In the case of a referential cycle, all tables mustbe included in the invocation list.

sqlcode: -3608

360 Message Reference, Volume 2

Page 369: Db2 SQL Errors

sqlstate: 428A8

SQL3700 - SQL3799

SQL3700W Device ″<device>″ is full. Thereare ″<active-devices>″ other activedevices. Please mount new mediaor take appropriate action.

Explanation: The media on the specified deviceis full. This device is one of the″<active-devices>″ + 1 target devices to whichunloaded data is being directed.

User Response: Take ONE of the followingactions:

v Mount a new target media on the specifieddevice and continue unloading by invokingunload with caller action 1(SQLU_CONTINUE).

OR

v If ″<active-devices>″ is not zero, continue theunload without this device by invoking theUNLOAD utility with the caller action 4(SQLU_DEVICE_TERMINATE).

OR

v Cancel the unload by invoking the UNLOADutility with caller action 2(SQLU_TERMINATE).

SQL3701W The lobpaths parameter wasspecified, but the table does notcontain any LOB or Long data.This parameter will be ignored.

Explanation: The lobpaths parameter specifies aseparate target for LOB and Long data. The tabledoes not contain any LOB or Long data, so thetargets specified by the lobpaths parameter willnot be used.

User Response: No action required.

SQL3702W Warning. SQLCODE ″<sqlcode>″was received for device″<device>″. Unload will attemptto continue without this device.

Explanation: SQLCODE ″<sqlcode>″ wasdetected for the specified device which is one of

the targets for the unload. Unload will continuebut will ignore this device.

User Response: The media loaded on thespecified device will not contain any unloadeddata and should not be included with the mediasupplied to the LOAD utility when the unloadeddata is being loaded. In order to fix the problemwith the device, look up the returned SQLCODEin the Message Reference.

SQL3703W ″<xxx>″ of ″<yyy>″ number oftype ″<type>″ pages have beenunloaded and sent to be writtenout to the target media.

Explanation: The table being unloaded consistsof ″<yyy>″ pages of the specified type of data.″<xxx>″ of these have been processed by theUNLOAD utility and have been sent to a mediawriter which will write the data to the targetmedia.

″<type>″ is one of:

v 0 for regular data

v 2 for Long data and allocation information

v 3 for LOB data

v 4 for LOB allocation information

Note that for Long and LOB data, ″<xxx>″ maybe less than ″<yyy>″ when unload is complete,because unused space is not unloaded, but willbe recreated when the data is reloaded.

Even for regular data, a final message where″<xxx>″ = ″<yyy>″ may not be issued. Insteadmessage 3105 is used to indicate that the unloadcompleted successfully.

User Response: This is an informationalmessage. No action is required.

SQL3704N The num_buffers parameterspecified is invalid.

Explanation: The num_buffers parameterdetermines the number of buffers that the utility

Chapter 2. SQL Messages 361

Page 370: Db2 SQL Errors

will use. The minimum is 2 if the lobpathsparameter is not specified and 3 if the lobpathsparameter is specified. This is the minimumrequired to allow the utility to work. There is,however, an optimal number of buffers that theutility will use if this parameter is not specified.This optimal number is based on the number ofinternal processes that the utility will haverunning and whether or not the lobpathsparameter was specified. If the number of buffersspecified is less than the optimal number, someprocesses will be waiting for buffers to use.Therefore, it is recommended to specify 0 for thisparameter and let the utility choose the numberof buffers. Only specify this parameter if, due tothe size of the utility storage heap, it is necessaryto limit the amount of memory that the utilityuses.

User Response: Resubmit the command using avalid num_buffers parameter.

SQL3705N The buffer size parameterspecified is not valid. The buffersize must be specified as 0 or bebetween 8 and 16384 inclusive.For multiple buffers, the totalbuffer size must not exceed 16384.

Explanation: The application calling the utilityhas supplied a buffer size parameter that is notvalid. The buffer size is used to determine theinternal buffer size. The value is the number of4K pages that are obtained for this buffer. Thevalue must be specified as 0 or be between 8 and16384 inclusive. If there are multiple buffers, thenumber of buffers multiplied by the buffer sizemust not exceed 16834.

When 0 is specified:

v for a table whose regular data is in a databasemanaged storage table space, the defaultbuffer size chosen is the extent size for thetable space or 8, whichever is larger.

v for a table whose regular data is in a systemmanaged storage table space, the defaultbuffer size chosen is 8.

User Response: Reissue the command with avalid buffer size.

SQL3706N A disk full error was encounteredon “<path/file>”.

Explanation: A disk full error was encounteredduring the processing of a database utility. Theutility stops.

User Response: Ensure enough disk space isavailable for the utility or direct the output toother media such as tape.

SQL3707N The sort memory size parameterspecified ″<size1>″ is not valid.The minimum size required is″<size2>″.

Explanation: The sort memory size is not largeenough for sorting the keys of the index(es).

User Response: Reissue the command with avalid sort memory size.

To ensure that only the minimum amount ofstorage is used, specify a value of 0 (to let itdefault). However, using more than theminimum should improve the performance ofthe sort.

SQL3783N An error was encountered whileopening the copy location file.Open file error code is“<errcode>”.

Explanation: During load recovery, an error wasencountered while opening the copy location file.The operating system file open return code isreturned.

User Response: Look at the error code in themessage for more information. Correct the error,if possible, and resubmit the command.

SQL3784W Invalid data was encounteredwhile reading from the copylocation file. Failure occurred atline “<line-no>” with error type“<errtype>”

Explanation: During load recovery, invalid datawas encountered while reading from the copylocation file. The line number and error type are

362 Message Reference, Volume 2

Page 371: Db2 SQL Errors

returned. The utility waits for a response tocontinue.

User Response: Correct the data in the copylocation file and return to the utility with thecorrect caller action parameter to indicate ifprocessing should continue or terminate.

SQL3785N Load recovery for table“<schema.tablename>” at time“<timestamp>” on node“<node-number>” failed due toerror “<sqlcode>” with additionalinformation “<additional-info>”.

Explanation: A severe error occurred duringload recovery. The utility stops processing.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: Examine the error code in themessage for more information. Take correctiveaction and resubmit the command.

SQL3798W An invalid value was used forparameter “<parameter>” toinvoke the roll-forward recoveryAPI to continue load recovery.

Explanation: Load recovery is in progress andone of the parameters passed in is not valid for

the current state of load recovery.

User Response: Correct the value in error andreturn to the utility with the correct caller actionparameter to indicate if processing shouldcontinue or terminate.

SQL3799W Load recovery for table“<schema.tablename>” at time“<timestamp>” on node“<node-number>” is pending dueto warning “<sqlcode>” withadditional information“<additional-info>”.

Explanation: A warning condition isencountered during load recovery. The utilitywaits for a response to continue.

(Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.)

User Response: Examine the error code in themessage for more information. Take correctiveaction and return to the utility with the correctcaller action parameter to indicate if processingshould continue or terminate.

SQL3800 - SQL3899

SQL3802N An invalid quiesce mode“<quiesce-mode>” wasencountered.

Explanation: An invalid quiesce mode waspassed to the quiesce API.

User Response: Resubmit the command withthe correct parameters.

SQL3804N The index is invalid.

Explanation: An invalid index was encounteredduring the processing of a utility command.

User Response: Check in the AdministrationGuide to determine the appropriate way torevalidate the index and resubmit the commandafter the condition is corrected.

SQL3805N The state of the application or ofone or more table spaces for thetable specified prohibits theloadapi action or quiescemode“<action>”. Reason code =“<reason-code>”.

Explanation: The loadapi action (eitherquiescemode or callerac) passed to the load APIis in conflict with either the state of the

Chapter 2. SQL Messages 363

Page 372: Db2 SQL Errors

application or the state of one or more tablespaces for the table.

The possible reason codes are as follows:

01 the state of one of the table spaces forthe table specified prohibits the loadapiaction or quiescemode.

02 the application is not at the start of itslogical unit of work. This conditionprohibits the load action specified.

03 the state of the application prohibits theload action specified.

04 one or more of the table spaces for thetable is already quiesced by themaximum number of quiescers.

05 system catalog table space cannot bequiesced.

06 load copy not allowed when table spaceis in backup pending state.

07 Attempt to restart a load at an incorrectphase

User Response: Corresponding to each of theabove reasons:

01 Resubmit the command with the correctloadapi action or quiescemode, orcorrect the state of the table spaces forthe table.

02 Resubmit the command with the correctload action or complete the currentlogical unit of work by issuing either aCOMMIT or ROLLBACK.

03 Resubmit the command with the correctload action.

04 Determine which table spaces for thetable have reached the maximumnumber of quiescers. QUIESCE RESETthese table spaces.

05 Resubmit the command with a tablewhich is not in the system catalog tablespace.

06 Resubmit the command omitting thecopy parameter

07 Determine at which phase the loadshould be restarted and resubmit thecommand with the correct phase.

SQL3806N Not all table constraints are offfor the table to be loaded.

Explanation: One or more constraints for thetable to be loaded are still on when the load APIis invoked.

User Response: Resubmit the command after alltable constraints are turned off.

SQL3900 - SQL3999

SQL3901N A non-severe system erroroccured. Reason code“<reason-code>”.

Explanation: Processing ended because of anon-severe system error.

User Response: If trace was active, invoke theIndependent Trace Facility at the operatingsystem command prompt. Refer to theIndependent Trace Facility in the TroubleshootingGuide for information on how to use this facility.Then contact your technical servicerepresentative with the following information:

v Problem description

v SQLCODE and embedded reason code

v SQLCA contents if possible

v Trace file if possible.

SQL3902C A system error occurred. Furtherprocessing is not possible. Reasoncode = “<reason-code>”.

Explanation: A system error occurred.

User Response: If trace was active, invoke theIndependent Trace Facility at the operatingsystem command prompt. Refer to theIndependent Trace Facility in the TroubleshootingGuide for information on how to use this facility.Then contact your technical servicerepresentative with the following information:

364 Message Reference, Volume 2

Page 373: Db2 SQL Errors

v Problem description

v SQLCODE and embedded reason code

v SQLCA contents if possible

v Trace file if possible.

SQL3910I Synchronization sessioncompleted successfully.

Explanation:

User Response:

SQL3911I Test synchronization sessioncompleted successfully.

Explanation:

User Response:

SQL3912I STOP completed successfully.

Explanation:

User Response:

SQL3913I STOP issued, but nosynchronization session iscurrently active.

Explanation:

User Response:

SQL3914I A user interrupt was issued. Thesynchronization session stoppedsuccessfully.

Explanation:

User Response:

SQL3915I A user interrupt was issuedbefore the results were uploadedto the satellite control server. Theresults will be uploaded duringthe next synchronization session.

Explanation:

User Response:

SQL3916I A STOP request was received.Synchronization session stoppedsuccessfully.

Explanation:

User Response:

SQL3917I A STOP request was receivedbefore the results were uploadedto the satellite control server. Theresults will be uploaded duringthe next synchronization session.

Explanation:

User Response:

SQL3918I Synchronization progressinformation was obtainedsuccessfully.

Explanation:

User Response:

SQL3919I A STOP request was receivedbefore the satellite could contactthe satellite control server.Synchronization stoppedsuccessfully.

Explanation:

User Response:

SQL3920I The application version on thissatellite does not match one thatis available for the group of thissatellite. Synchronization cannotoccur.

Explanation: The application version reportedby the satellite does not exist at the satellitecontrol server.

User Response: Contact the help desk or yoursystem administrator.

Chapter 2. SQL Messages 365

Page 374: Db2 SQL Errors

SQL3921I This satellite is disabled at thesatellite control server.Synchronization cannot occur.

Explanation: When disabled, the satellite cannotsynchronize.

User Response: Contact the help desk or yoursystem administrator.

SQL3930W There are no synchronizationscripts to execute.

Explanation: No synchronization scripts weredownloaded to the satellite for execution.

User Response: Contact the help desk or yoursystem administrator to ensure thatsynchronization scripts are available on thesatellite control database for this satellite.

SQL3931W The test synchronization sessioncompleted successfully. Thesatellite ID, however, could not befound in the satellite controldatabase.

Explanation: Either the satellite ID is notdefined correctly on the satellite or this satellitehas not been defined in the satellite controldatabase.

User Response: If you use theDB2SATELLITEID registry variable, ensure that itis set to the unique ID for the satellite. If you areusing the operating system logon ID as thesatellite ID, ensure you log on using it.

SQL3932W The test synchronization sessioncompleted successfully. Thesatellite’s application version,however, is not set locally, or doesnot exist for this satellite’s groupat the satellite control server.

Explanation: The application version on thesatellite is different from any that are availablefor this satellite’s group.

User Response: Ensure that the applicationversion on the satellite is set to the correct value.

SQL3933W The test synchronization sessioncompleted successfully. Therelease level of the satellite,however, is not supported by therelease level of the satellitecontrol server.

Explanation: The release level of the satellitemust be within the range of one level above totwo levels below that of the satellite controlserver.

User Response: Contact the help desk or yoursystem administrator.

SQL3934W The test synchronization sessioncompleted successfully. Thissatellite, however, is disabled atthe satellite control server.

Explanation: The satellite has been placed in thedisabled state at the satellite control server.

User Response: Contact the help desk or yoursystem administrator.

SQL3935W The test synchronization sessioncompleted successfully. Thissatellite, however, is in the failedstate at the satellite control server.

Explanation: The satellite is in the failed state atthe control server.

User Response: Contact the help desk or yoursystem administrator.

SQL3936W No progress information isavailable.

Explanation: The synchronization session hasnot reached a stage where the progressinformation has been logged, or there is noactive synchronization session for this satellite.

User Response: Ensure the synchronicationsession is active, or try querying for progressinformation later.

366 Message Reference, Volume 2

Page 375: Db2 SQL Errors

SQL3937W The application version for thissatellite does not match one thatis available for this satellite’sgroup.

Explanation: A satellite can only synchronizewith a particular application version for itsgroup. The application version for this satellite isnot available for the satellite’s group at thecontrol server.

User Response: Ensure that the applicationversion on the satellite is set to the correct value.

SQL3938W An interrupt was issued duringscript execution. Thesynchronization session wasstopped, but the satellite may bein an inconsistent state.

Explanation: An interrupt was issued while thescript execution phase of the synchronizationprocess was being performed. Thesynchronization session was stopped but thesatellite may be in an inconsistent state because ascript may have been halted at an inappropriateplace.

User Response: Contact the help desk or yoursystem administrator.

SQL3942I Synchronization session identifierwas set successfully for thesatellite.

Explanation: The session identifier was setsuccessfully for the satellite.

User Response: No action is required.

SQL3943N Synchronization session identifierexceeds the maximum length of“<length>” characters.

Explanation: The specifed synchronizationsession identifier is longer than the allowedlength of “<length>” characters.

User Response: Ensure that the identifier is nomore than nnn characters.

SQL3944I Synchronization session identifierwas reset successfully for thesatellite.

Explanation: The session identifier was resetsuccessfully for the satellite.

User Response: No action is required.

SQL3945I Synchronization session identifierfor the satellite was retrievedsuccessfully.

Explanation: The session identifier for thissatellite was found and returned successfully.

User Response: No action is required.

SQL3946N Synchronization session identifieroperation failed.

Explanation: The synchronization sessionidentifer operation has failed for an unknownreason.

User Response: Ensure that the product isinstalled correctly. If the failure persists, contactDB2 service.

SQL3950N A synchronization session isactive. Only one synchronizationsession can be active.

Explanation: Only one synchronization sessioncan be active at a time.

User Response: Wait until the currentsynchronization session completes successfullybefore initiating another session.

SQL3951N The satellite ID cannot be foundlocally.

Explanation: Either the operating system logonwas bypassed or the DB2SATELLITEID registryvariable was not set.

User Response: If you are using the operatingsystem logon ID as the satellite ID, log on to theoperating system. If you use theDB2SATELLITEID registry variable, ensure that itis set to the unique ID for the satellite.

Chapter 2. SQL Messages 367

Page 376: Db2 SQL Errors

SQL3952N The satellite ID could not befound at the satellite controlserver.

Explanation: Either the satellite ID is notdefined correctly on this satellite or this satellitehas not been defined at the satellite controlserver.

User Response: If you use theDB2SATELLITEID registry variable, ensure that itis set to the unique ID for the satellite. If you areusing the operating system logon ID as thesatellite ID, ensure you log on using it.Otherwise, contact the help desk or your systemadministrator.

SQL3953N This satellite has been disabled atthe satellite control server.

Explanation: The satellite ID has been disabledat the satellite control server.

User Response: Contact the help desk or yoursystem administrator.

SQL3954N This satellite is in the failed stateat the satellite control server.

Explanation: The satellite is in the failed statebecause a previous synchronization sessionfailed.

User Response: Contact the help desk or yoursystem administrator.

SQL3955N The satellite control databasename its alias could not be found.

Explanation: The satellite control database isnot cataloged correctly.

User Response: Contact the help desk or yousystem administrator.

SQL3956N The application version for thissatellite is not defined locally.

Explanation: The application version is notdefined locally on this satellite or is not definedcorrectly.

User Response: Ensure that the applicationversion is set to the correct value.

SQL3957N Cannot connect to the satellitecontrol server because of acommunication failure:SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An error has been detected by thecommunication subsystem. Refer to “<sqlcode>”for more details.

User Response: Contact the help desk or yoursystem administrator.

SQL3958N Error occurred duringsynchronization session:SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An unknown error has beendetected by the communication subsystem. Referto “<sqlcode>” for more details.

User Response: Contact the help desk or yoursystem administrator.

SQL3959N Synchronization session cannotstart because of a communicationfailure: SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An error has been detected by thecommunication subsystem. Refer to “<sqlcode>”for more details.

User Response: Contact the help desk or yoursystem administrator.

368 Message Reference, Volume 2

Page 377: Db2 SQL Errors

SQL3960N Cannot upload results to thesatellite control server because ofa communication failure:SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An error has been detected by thecommunication subsystem. Refer to “<sqlcode>”for more details.

User Response: Contact the help desk or yoursystem administrator.

SQL3961N Cannot authenticate with thesatellite control server.

Explanation: An authentication error wasdetected while trying to connect to the satellitecontrol database.

User Response: Either the remoteadministrative user ID or the password requiredto connect to the satellite control database wasnot correct, or both. Either provide the correctuser ID and password, or contact the help deskor your system administrator.

SQL3962N Synchronization could not bestarted because of a databaseerror: SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An error preventingsynchronization occurred at the satellite controlserver.

User Response: Attempt to synchronize again.If failure persists, contact the help desk or yoursystem administrator.

SQL3963N Results cannot be uploadedbecause of a database error:SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: An error occurred while uploadingresults to the satellite control server.

User Response: Contact the help desk or yoursystem administrator.

SQL3964N Synchronization failed becausethe release level of the satellite isnot supported by the satellitecontrol server.

Explanation: The release level of the satellitemust be within the range of one level above totwo levels below that of the satellite controlserver.

User Response: Contact the help desk or yoursystem administrator.

SQL3965N Cannot download thesynchronization scripts because ofa satellite control server failure:SQLCODE=“<sqlcode>”SQLSTATE=“<sqlstate>”,tokens=“<token1>”, “<token2>”,“<token3>”.

Explanation: The satellite cannot download thescripts that are required to synchronize thesatellite. One possible reason for this failure isthat the control server cannot instantiateparameterized scripts with the attributes of thesatellite. Another reason is that the satellitecontrol server was temporarily unable tocomplete the request because of resourceconstraints.

User Response: Try the request again. If thefailure persists, contact the help desk or yoursystem administrator.

Chapter 2. SQL Messages 369

Page 378: Db2 SQL Errors

SQL3966N Synchronization session failed.Reason code “<reason-code>”.

Explanation: The synchronization session failedto complete for one of the following reasons:

v (01) Missing authentication information.

v (02) Some scripts required for synchronizationare missing.

v (03) System files are corrupted or missing.

v (04) A system error prevented scripts fromexecuting.

User Response: Try the request again. If failurepersists, contact the help desk or your systemadministrator.

SQL3967N Progress information cannot beretrieved.

Explanation: Progress on this satellite’ssynchronization session cannot be retrieved.Either the data is corrupt, or it does not exist.

User Response: If a synchronization session isactive and no progress information is available,contact the help desk or your systemadministrator.

SQL3968N Synchronization failed tocomplete successfully because of ascript failure. The results of theexecution, however, were sent tothe satellite control server.

Explanation: One of the synchronization scriptsfailed during execution. Either a return code was

not in the defined success code set, or the scriptfailed to execute.

User Response: Contact the help desk or yoursystem administrator.

SQL3969N Synchronization failed because aninterrupt was received duringscript execution.

Explanation: Script execution fails when aninterrupt is received. An abnormal termination ofthis type will cause the synchronization sessionto fail because the system may be in aninconsistent state.

User Response: Contact the help desk or yoursystem administrator.

SQL3970N Synchronization session failedwith, SQLCODE “<sqlcode>”SQLSTATE “<sqlatate>” The errorwas detected at location“<location>”.

Explanation: Script execution failed because ofan unknown error.

User Response: Contact the help desk or yoursystem administrator.

SQL4000 - SQL4099

SQL4001N The character “<character>” incolumn “<column>” on line“<line>” is not valid.

Explanation: The specified character is not avalid character in SQL statements.

The statement cannot be processed.

User Response: Remove or replace the characterthat is invalid.

SQL4002N “<token 1>” and “<token 2>” areundeclared host variables thatcannot both be used as descriptornames in a single SQL statement.

Explanation: The specified identifiers have notbeen declared as host variables. Descriptornames are not declared before using. Becausemore than one descriptor name in a singlestatement is not valid, at least one of the hostvariables is not valid.

370 Message Reference, Volume 2

Page 379: Db2 SQL Errors

The statement cannot be processed.

User Response: Correct the use of descriptornames or undeclared host variables in thestatement. Note that the statement can containadditional undeclared host variables.

SQL4003N The SQL statement on line“<line>” is not supported by thisversion of the precompiler.

Explanation: The release numbers of theprecompiler and the installed version of thedatabase manager are not compatible. Thespecified statement is supported by the databasemanager but not the precompiler.

The statement cannot be processed.

User Response: Repeat the precompile processwith the current version of the precompiler.

SQL4004N The package name is not valid.

Explanation: The package name containscharacters that are not valid. Either the name istoo long or no name was specified with thePACKAGE option.

No package is created.

User Response: Resubmit the command with avalid package name or without the PACKAGEoption.

SQL4005N An invalid token “<token>” wasfound starting in position“<position>” on line “<line>”.

Explanation: A syntax error in the SQLstatement was detected at the specified token“<token>”.

The statement cannot be processed.

User Response: Examine the statement,especially around the specified token. Correct thesyntax.

SQL4006N The structures are nested toodeeply.

Explanation: The number of nested structuresexceeded the maximum of 25.

The statement cannot be processed.

User Response: Reduce the number of nestedstructures.

SQL4007N The host structure“<host-structure>” has no fields.

Explanation: No field can be found within thehost structure “<host-structure>”.

The statement cannot be processed.

User Response: Add a field to the hoststructure.

SQL4008N The host variable “<name>”cannot be uniquely referencedeven with full qualification.

Explanation: The host variable “<name>”matches with at least one other unqualified orpartially qualified host variable even with fullqualification.

The command cannot be processed.

User Response: Rename the host variable.

SQL4009N The expression for data length isinvalid.

Explanation: The expression for data length hassyntax errors or is too complex.

The statement cannot be processed.

User Response: Check the syntax of the sizeexpression.

SQL4010N Illegal nesting of Compound SQLstatements.

Explanation: This error is returned when aBEGIN COMPOUND clause is detected as asub-statement of a Compound SQL statement.

User Response: Resubmit the precompilation

Chapter 2. SQL Messages 371

Page 380: Db2 SQL Errors

without the nested BEGIN COMPOUND.

SQL4011N Invalid SQL sub-statement in aCompound SQL statement.

Explanation: This error is returned when aninvalid sub-statement is detected in a CompoundSQL statement. Valid statements are:

v ALTER TABLE

v COMMENT ON

v CREATE INDEX

v CREATE TABLE

v CREATE VIEW

v Positioned DELETE

v Searched DELETE

v DROP

v GRANT

v INSERT

v LOCK TABLE

v REVOKE

v SELECT INTO

v Positioned UPDATE

v Searched UPDATE

v COMMIT; only when specified as the lastsub-statement.

v RELEASE TO SAVEPOINT; only fornon-atomic Compound SQL

v ROLLBACK TO SAVEPOINT; only fornon-atomic Compound SQL

v SAVEPOINT; only for non-atomic CompoundSQL

User Response: Resubmit the precompilationwithout the invalid sub-statement.

SQL4012N Invalid use of COMMIT in aCompound SQL statement.

Explanation: This error is returned when asub-statement is detected after a COMMIT hasbeen found in a COMPOUND SQL statement.

User Response: Make the COMMITsub-statement the last sub-statement, andresubmit the precompilation.

SQL4013N An END COMPOUND statementwas found without a previousBEGIN COMPOUND statement.

Explanation: This error is returned when anEND COMPOUND statement has been foundwithout a preceding BEGIN COMPOUND.

User Response: Either remove the ENDCOMPOUND, or add a BEGIN COMPOUND,and resubmit the precompilation.

SQL4014N Invalid Compound SQL syntax.

Explanation: This error is returned when aCompound SQL statement contains a syntaxerror. Possible causes include:

v END COMPOUND is missing

v one of the substatements is empty (zero lengthor blank).

User Response: Fix the syntax error andre-precompile.

SQL4015N An error has occurred duringpreprocessing.

Explanation: The external preprocessor hasterminated with one or more errors.

The command cannot be processed.

User Response: Please refer to the “.err” file forthe correponding source file for more details.

SQL4016N The preprocessor specified cannotbe found.

Explanation: The preprocessor specifiedthrough the PREPROCESSOR option cannot befound.

The command cannot be processed.

User Response: Ensure that the preprocessorcan be executed from the current directory, andalso check the syntax of the PREPROCESSORoption.

372 Message Reference, Volume 2

Page 381: Db2 SQL Errors

SQL4017W Preprocessing has completedsuccessfully.

Explanation: Preprocessing of the input file hascompleted successfully using the externalcommand specified through thePREPROCESSOR option.

User Response: No action is required.

SQL4018W Starting to process thepreprocessed file“<preprocessed-file>”.

Explanation: The precompiler is now processingthe preprocessed file.

User Response: No action is required.

SQL4019W Completed processing thepreprocessed file“<preprocessed-file>”.

Explanation: The precompiler has completedprocessing the preprocessed file.

User Response: No action is required.

SQL4020N The ’long’ host variable “<token1>” is not valid. Use ’sqlint32’instead.

Explanation: If the LONGERROR YESprecompile option is in effect or the precompileoption LONGERROR has not been specified andthe platform has 8-byte ’long’s, then theINTEGER host variable must be declared withthe data type ’sqlint32’, not ’long’.

On 64 bit platforms with 8-byte ’long’ types theprecompile option LONGERROR NO can beused to specify that ’long’ host variables are tobe used for BIGINT data types. For maximumportability the use of ’sqlint32’ and ’sqlint64’ arerecommended for INTEGER and BIGINT datatypes respectively.

User Response: Replace the current data type ofthe host variable with the data type specified inthe message.

SQL4100 - SQL4199

SQL4100I The “<sqlflag-type>” SQLlanguage syntax is used for syntaxchecking by the flagger.

Explanation: The SQL statements that havepassed the precompiler checking will be subjectto checking against the specified syntax by theflagger. Warning message will be issued againstthe statement when there is a syntax deviation.

Processing continues.

User Response: None. This is an informationalmessage only.

SQL4102W An SQL syntax deviation hasoccurred at the token starting withthe text ″<text>″.

Explanation: The flagger has detected adeviation from the SQL language syntaxspecified in the SQLFLAG precompiler option.

Processing continues.

User Response: Correct the SQL statement.

SQL4103W A data definition statement is notwithin a CREATE SCHEMAstatement.

Explanation: The FIPS standard requires that alldata definition statements are contained within aCREATE SCHEMA statement.

Processing continues.

User Response: Correct the SQL statement.

SQL4104W There is a non-standardembedded comment.

Explanation: A comment embedded in an SQLstatement does not meet the requirements of thestandard being flagged. The comment does notbegin with at least two consecutive hyphens

Processing continues.

User Response: Correct the SQL statement.

Chapter 2. SQL Messages 373

Page 382: Db2 SQL Errors

SQL4105W An SQL syntax deviation hasoccurred. The statement is notcomplete.

Explanation: The SQL statement has terminatedbefore all required elements have been found.

Processing continues.

User Response: Correct the SQL statement.

SQL4106W The identifier “<identifier>” ismore than 18 characters.

Explanation: Authorization identifier, tableidentifier, column name, correlation name,module name, cursor name, procedure name, orparameter name has a length of more than 18characters.

Processing continues.

User Response: Correct the SQL statement.

SQL4107W Column “<column>” has aninvalid length, precision, or scaleattribute.

Explanation: One of the following conditionshas not been met:

v Length value should be greater than zero.

v Precision value should be greater than zero.

v Scale value should not be greater thanprecision.

Processing continues.

User Response: Correct the SQL statement.

SQL4108W An indicator variable has datatype other than exact numeric, orhas a non-zero scale.

Explanation: Data type of an indicator variableshould be exact numeric with a scale of zero.

Processing continues.

User Response: Correct the SQL statement.

SQL4109W The SET FUNCTIONSPECIFICATION referencescolumn “<column>”.

Explanation: One of the following conditionshas not been met:

v The COLUMN REFERENCE of a DISTINCTSET FUNCTION cannot reference a columnderived from a SET FUNCTIONSPECIFICATION.

v COLUMN REFERENCEs in the VALUEEXPRESSION of an ALL SET FUNCTIONcannot reference a column derived from a SETFUNCTION SPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4110W A VALUE EXPRESSIONcontaining “<column>” cannotinclude operators.

Explanation: A VALUE EXPRESSION cannotinclude operators in an OUTER REFERENCECOLUMN REFERENCE.

Processing continues.

User Response: Correct the SQL statement.

SQL4111W The COLUMN REFERENCE ismissing or is invalid for the ALLcolumn function “<function>”.

Explanation: The VALUE EXPRESSION of anALL SET FUNCTION SPECIFICATION shouldinclude a COLUMN REFERENCE.

Processing continues.

User Response: Correct the SQL statement.

SQL4112W Column “<column>” is notunique and requires qualification.

Explanation: The specified column is notunique within the current scope. Qualificationmust be given to uniquely identify the requiredcolumn.

Processing continues.

374 Message Reference, Volume 2

Page 383: Db2 SQL Errors

User Response: Correct the SQL statement.

SQL4113W A VALUE EXPRESSION may notcontain a SET FUNCTIONSPECIFICATION.

Explanation: The VALUE EXPRESSION of anALL SET FUNCTION may not contain SETFUNCTION SPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4114W Column “<column>” does notidentify a column of a tablewithin the current scope.

Explanation: One of the following conditionshas not been met:

v The table or correlation name used as aqualifier does not exist.

v The column name does not exist within thecurrent scope or the scope of the qualifier.

Processing continues.

User Response: Correct the SQL statement.

SQL4115W A column function that containsthe OUTER REFERENCE column“<column>” is not in thesubquery of a HAVING clause.

Explanation: A column function must becontained in a subquery of a HAVING clause if itcontains an OUTER REFERENCE COLUMNREFERENCE.

Processing continues.

User Response: Correct the SQL statement.

SQL4116W The result of a SUM or AVGfunction cannot be a characterstring.

Explanation: Character string is not valid forthe result of a SUM or AVG SET FUNCTIONSPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4117W Operator “<operator>” is invalidin this context.

Explanation: One of the following conditionshas not been met:

v A VALUE EXPRESSION containing aDISTINCT SET FUNCTION cannot includedyadic operators.

v First character following a monadic operatorcannot be a plus or minus sign.

v VALUE EXPRESSION should not containoperators if PRIMARY is of type characterstring.

Processing continues.

User Response: Correct the SQL statement.

SQL4118W The “<exptype>” EXPRESSION iscomparing incompatible datatypes.

Explanation: The data types of one of thefollowing (identified by exptype) do not match:

v exptype = COMPARISON - Comparisonoperators must match

v exptype = BETWEEN - The three VALUEEXPRESSIONs must match

v exptype = IN - VALUE EXPRESSION,subquery and all VALUE SPECIFICATIONsmust match

v exptype = QUANTIFIED - VALUEEXPRESSION and subquery must match

Processing continues.

User Response: Correct the SQL statement.

SQL4119W The operand in the LIKEpredicate is not a character string.

Explanation: One of the following conditionshas not been met:

v Data type of the column in a LIKE predicate isnot a character string.

v Data type of the pattern in a LIKE predicate isnot a character string.

Chapter 2. SQL Messages 375

Page 384: Db2 SQL Errors

Processing continues.

User Response: Correct the SQL statement.

SQL4120W The ESCAPE character must be aone-byte character string.

Explanation: Escape character in a LIKEpredicate must have the data type of characterstring with a length of 1.

Processing continues.

User Response: Correct the SQL statement.

SQL4121W The WHERE clause, GROUP BYclause, or HAVING clause isinvalid for the grouped view“<schema-name>”.“<view>”.

Explanation: If the table identified in the FROMclause is a grouped view, then the TABLEEXPRESSION must not contain a WHERE clause,GROUP BY clause, or HAVING clause.

Processing continues.

User Response: Correct the SQL statement.

SQL4122W “<schema-name>”.“<name>”occurs more than once in a FROMclause.

Explanation: One of the following conditionshas not been met:

v Table name occurs more than once in a FROMclause.

v Correlation name is identical to a table nameor to another correlation name in a FROMclause.

Processing continues.

User Response: Correct the SQL statement.

SQL4123W Only one table reference isallowed in the FROM clause for aGROUPed view.

Explanation: If the table identified by tablename is a GROUPed view, then the FROM clausemust contain exactly one table reference.

Processing continues.

User Response: Correct the SQL statement.

SQL4124W A reference to column“<column>” derived from acolumn function is invalid in aWHERE clause.

Explanation: A VALUE EXPRESSION directlycontained in the SEARCH CONDITION of aWHERE clause must not include a reference to acolumn derived from a column function.

Processing continues.

User Response: Correct the SQL statement.

SQL4125W A HAVING clause must containthe WHERE clause when theWHERE clause has a columnfunction.

Explanation: If a VALUE EXPRESSION directlycontained in the SEARCH CONDITION is acolumn function, then the WHERE clause mustbe contained in a HAVING clause.

Processing continues.

User Response: Correct the SQL statement.

SQL4126W The COLUMN REFERENCE for“<column>” must be an OUTERREFERENCE.

Explanation: If a VALUE EXPRESSION directlycontained in the SEARCH CONDITION is afunction, then the COLUMN REFERENCE in thecolumn function expression must be an OUTERREFERENCE.

Processing continues.

User Response: Correct the SQL statement.

SQL4127W Column “<column>” is duplicatedwithin the current scope.

Explanation: The specified column is duplicatedwithin the current scope.

Processing continues.

376 Message Reference, Volume 2

Page 385: Db2 SQL Errors

User Response: Correct the SQL statement.

SQL4128W The COLUMN REFERENCE for“<column name>” should be agrouping column or should bespecified within a columnfunction.

Explanation: Each COLUMN REFERENCEcontained in a subquery in the SEARCHCONDITION of a HAVING clause mustreference a grouping column or be specifiedwithin a column function.

Processing continues.

User Response: Correct the SQL statement.

SQL4129W DEGREE of table“<schema-name>”.“<table>”should be 1 when using aSELECT LIST of *.

Explanation: The DEGREE of the TABLEEXPRESSION must be 1 if a SELECT LIST of * isspecified in a subquery of any predicate otherthan an EXISTS predicate.

Processing continues.

User Response: Correct the SQL statement.

SQL4130W The column function is not validfor the TABLE EXPRESSIONbeginning with table“<schema-name>”.“<table>”.

Explanation: One of the following conditionshas not been met:

v If the TABLE EXPRESSION is a grouped view,the SELECT LIST of a subquery cannot containa SET FUNCTION SPECIFICATION.

v If the TABLE EXPRESSION is a grouped view,the SELECT LIST of a QUERYSPECIFICATION cannot contain a columnfunction.

Processing continues.

User Response: Correct the SQL statement.

SQL4131W The COLUMN REFERENCE for“<column>” is invalid.

Explanation: One of the following conditionshas not been met:

v For a GROUPed table, the COLUMNREFERENCE must reference a GROUPingcolumn or be specified within a SETFUNCTION SPECIFICATION.

v If not a GROUPed table and VALUEEXPRESSION includes a SET FUNCTIONSPECIFICATION, then each COLUMNREFERENCE must be specified within a SETFUNCTION SPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4132W DISTINCT is specified more thanonce.

Explanation: One of the following conditionshas not been met:

v DISTINCT must not be specified more thanonce in a QUERY SPECIFICATION, excludingany subquery of that QUERYSPECIFICATION.

v DISTINCT must not be specified more thanonce in a subquery, excluding any subquerycontained in that subquery.

Processing continues.

User Response: Correct the SQL statement.

SQL4133W The COMPARISON PREDICATEsubquery cannot contain aGROUP BY or HAVING clause.

Explanation: If a subquery is specified in aCOMPARISON PREDICATE, then the TABLEEXPRESSION whose FROM clause identifies thenamed table must not contain a GROUP BYclause or a HAVING clause.

Processing continues.

User Response: Correct the SQL statement.

Chapter 2. SQL Messages 377

Page 386: Db2 SQL Errors

SQL4134W The COMPARISON PREDICATEsubquery cannot identify aGROUPed view.

Explanation: If a subquery is specified in aCOMPARISON PREDICATE, then the TABLEEXPRESSION whose FROM clause identifies thenamed table must not identify a GROUPed view.

Processing continues.

User Response: Correct the SQL statement.

SQL4135W There is an invalidAUTHORIZATION IDENTIFIER“<authid>”.

Explanation: The AUTHORIZATIONIDENTIFIER prefixed to the table name isinvalid.

Processing continues.

User Response: Correct the SQL statement.

SQL4136W Table or view“<schema-name>”.“<name>”already exists.

Explanation: The table name or view namespecified already exists in the catalog.

Processing continues.

User Response: Correct the SQL statement.

SQL4137W The COLUMN DEFINITION ismissing.

Explanation: At least one COLUMNDEFINITION should be specified for a CREATETABLE.

Processing continues.

User Response: Correct the SQL statement.

SQL4138W The data type “<type1>” of thetarget is not compatible with thedata type “<type2>” of the source.

Explanation: Data types should match:

v In a FETCH statement, between source andtarget.

v In a SELECT statement, between source andtarget.

Processing continues.

User Response: Correct the SQL statement.

SQL4139I You must specify a VIEWCOLUMN LIST for“<schema-name>”.“<table>”.

Explanation: If any two columns in the tablespecified by the QUERY SPECIFICATION havethe same column name, or if any column of thattable is an unnamed column, then a VIEWCOLUMN LIST must be specified.

Processing continues.

User Response: Correct the SQL statement.

SQL4140W An error has occurred causing theflagger to stop. Module name =″<module-name>″. Internal errorcode = ″<error code>″.

Explanation: The flagger has encountered aninternal error. If the syntax, bindfile or packageoption is also specified, processing continues butflagger operation is discontinued. Otherwise,processing is terminated.

User Response: Record this message number(SQLCODE), module name and error code in themessage. Contact your technical servicerepresentative with the information.

SQL4141W An error has occurred whenattempting to produce message“<message number>” in module“<module name>”.

Explanation: The FLAGGER has attempted toproduce an undefined message.

Processing continues.

User Response: Record this message number(SQLCODE), module name and error code in themessage. Contact your technical servicerepresentative with the information.

378 Message Reference, Volume 2

Page 387: Db2 SQL Errors

SQL4142W There is not enough memory forflagger operation. Internal errorcode = ″<error code>″.

Explanation: There is not enough memory forthe flagger to operate. If the syntax, bindfile orpackage option is also specified, processingcontinues but flagger operation is discontinued.Otherwise, processing is terminated.

User Response: Ensure that your system hassufficient real and virtual memory, and removeany unnecessary background processes.

SQL4143W An error has occurred whenreleasing flagger memory. Internalerror code = ″<error code>″.

Explanation: The flagger cannot releaseallocated memory. If the syntax, bindfile orpackage option is also specified, processingcontinues but flagger operation is discontinued.Otherwise, processing is terminated.

User Response: Restart precompilation ifflagging is required.

SQL4144W Internal error on call to theFLAGGER found in module“<module-name>”. Internal errorcode = “<error code>”.

Explanation: The FLAGGER encountered aninternal error.

Preprocessing continues but FLAGGER operationis discontinued.

User Response: Record this message number(SQLCODE), module name and error code in themessage. Contact your technical servicerepresentative with the information.

SQL4145W Error during FLAGGER access tothe system catalog. Flaggingcontinues to check syntax only.SQLCODE = “<nnn>” SQLERRP= “<modname>” SQLERRD =“<nnn>” Creator =“<creatorname>” Table =“<tablename>”

Explanation: An internal error has occurredduring FLAGGER access to the system catalog.

Processing continues but with flagger syntaxchecking only.

User Response: Record this message number(SQLCODE), module name and error code in themessage. Contact your technical servicerepresentative with the information.

SQL4146W Internal error occurred causing thesemantics processing to stop.Module name = “<modulename>”. Internal error code =“<error code>”.

Explanation: The FLAGGER has encountered asevere internal error in a semantics analysisroutine.

Processing continues but with flagger syntaxchecking only.

User Response: Record this message number(SQLCODE), module name and error code in themessage. Contact your technical servicerepresentative with the information.

SQL4147W Invalid flagger version number.

Explanation: An invalid flagger version numberis passed to the Precompiler Services COMPILESQL STATEMENT API. If the syntax, bindfile orpackage option is also specified, processingcontinues but flagger operation is discontinued.Otherwise, processing is terminated.

User Response: Provide a valid flagger versionnumber. Refer to the Command Reference manual.

Chapter 2. SQL Messages 379

Page 388: Db2 SQL Errors

SQL4170W You must declare column“<column>” as NOT NULL.

Explanation: All columns identified as UNIQUEmust be defined with the NOT NULL option.

Processing continues.

User Response: Correct the SQL statement.

SQL4171W The viewed table“<schema-name>”.“<table>” mustbe updateable.

Explanation: When the WITH CHECK OPTIONclause is specified then the viewed table must beupdateable.

Processing continues.

User Response: Correct the SQL statement.

SQL4172W Invalid number of column names.

Explanation: The number of column names inthe VIEW COLUMN LIST should be the same asthe DEGREE of the table specified by the QUERYSPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4173W You must declare cursor“<cursor>” before using it.

Explanation: The cursor specified has not beendeclared in a DECLARE CURSOR statement.

Processing continues.

User Response: Correct the SQL statement.

SQL4174W Cursor “<cursor>” is alreadydeclared.

Explanation: Cursor specified has already beendeclared in a DECLARE CURSOR statement.

Processing continues.

User Response: Correct the SQL statement.

SQL4175W Only * or column names are validin this context.

Explanation: When UNION is specified, theSELECT LIST for the specification of the twoTABLE EXPRESSIONs identified by the QUERYEXPRESSION and QUERY TERM should consistof * or COLUMN REFERENCE(s).

Processing continues.

User Response: Correct the SQL statement.

SQL4176W The descriptions of tablesidentified by the QUERYEXPRESSION beginning with“<schema-name1>”.“<table1>”and the QUERY TERM beginningwith “<schema-name2>”.“<table2>” should beidentical.

Explanation: When UNION is specified, thedescriptions of the two tables should be identical,except for the column names.

Processing continues.

User Response: Correct the SQL statement.

SQL4177W The SORT SPECIFICATION“<number>” is outside theDEGREE of cursor “<cursor>”.

Explanation: If the SORT SPECIFICATIONcontains an unsigned integer, it should be greaterthan 0 and not greater than the number ofcolumns in the table.

Processing continues.

User Response: Correct the SQL statement.

SQL4178W Table “<schema-name>”.“<table>”is a read-only table.

Explanation: A DELETE, an INSERT, or anUPDATE was specified on a read-only table.

Processing continues.

User Response: Correct the SQL statement.

380 Message Reference, Volume 2

Page 389: Db2 SQL Errors

SQL4179W Table “<schema-name>”.“<table>”must not be identified in a FROMclause of any subquery containedin a SEARCH CONDITION.

Explanation: A table specified in a DELETE oran UPDATE cannot be used in a FROM clause ofany subquery contained in its SEARCHCONDITION.

Processing continues.

User Response: Correct the SQL statement.

SQL4180W Table “<schema-name1>”.“<table1>” is not thefirst table “<schema-name2>”.“<table2>” specified inthe DECLARE CURSORstatement.

Explanation: Table specified in a DELETE or anUPDATE statement should be the first tablespecified in the FROM clause of the DECLARECURSOR statement.

Processing continues.

User Response: Correct the SQL statement.

SQL4181W The number of TARGETSPECIFICATIONs does not matchthe DEGREE of cursor “<cursor>”.

Explanation: The number of TARGETSPECIFICATIONs in the FETCH statement doesnot match the DEGREE of the table specified.

Processing continues.

User Response: Correct the SQL statement.

SQL4182W Target table “<schema-name>”.“<table>” of the INSERTstatement is also in the FROMclause or in the subquery.

Explanation: The named table must not beidentified in a FROM clause of a QUERYSPECIFICATION or of any subquery containedin the QUERY SPECIFICATION.

Processing continues.

User Response: Correct the SQL statement.

SQL4183W The number of columns specifieddoes not match the number ofvalues specified.

Explanation: In an INSERT statement, thenumber of columns specified does not match thenumber of values specified.

Processing continues.

User Response: Correct the SQL statement.

SQL4184W The number of columns specifieddoes not match the DEGREE ofthe QUERY SPECIFICATIONbeginning with table“<schema-name>”.“<table>”.

Explanation: In an INSERT statement, thenumber of columns specified does not match theDEGREE of the table specified in the QUERYSPECIFICATION

Processing continues.

User Response: Correct the SQL statement.

SQL4185W There is a data type or lengthmismatch between column“<column>” and the INSERT orUPDATE item.

Explanation: One of the following conditionshas not been met:

v If the data type of the column name ischaracter string, then the corresponding itemin the INSERT or UPDATE statement shouldbe character string of length equal to or lessthan the length of the column name.

v If the data type of the column name is exactnumeric, then the corresponding item in theINSERT or UPDATE statement should be exactnumeric.

v If the data type of the column name isapproximate numeric, then the correspondingitem in the INSERT or UPDATE statementshould be approximate numeric or exactnumeric.

Chapter 2. SQL Messages 381

Page 390: Db2 SQL Errors

Processing continues.

User Response: Correct the SQL statement.

SQL4186W You cannot use a GROUP BY orHAVING clause or identify aGROUPed view in this context.

Explanation: The table identified in the FROMclause of the TABLE EXPRESSION in a SELECTstatement should not include a GROUP BY orHAVING clause and should not identify aGROUPed view.

Processing continues.

User Response: Correct the SQL statement.

SQL4187W The number of elements specifiedin the SELECT LIST should matchthe number in the SELECTTARGET LIST.

Explanation: In the SELECT statement, thenumber of elements specified in the SELECTLIST should match the number of elements inthe SELECT TARGET LIST.

Processing continues.

User Response: Correct the SQL statement.

SQL4188W A column function is not allowedin a SET clause of an UPDATEstatement.

Explanation: A VALUE EXPRESSION in a SETclause of an UPDATE statement should notinclude a column function.

Processing continues.

User Response: Correct the SQL statement.

SQL4189W You cannot specify NULL forNOT NULL column “<column>”.

Explanation: If NULL is specified in the SETclause of the UPDATE statement, then thecorresponding column should allow nulls.

Processing continues.

User Response: Correct the SQL statement.

SQL4190W A host variable of anunrecognized data type isreferenced. Host variable positionis “<position>”.

Explanation: The host variable reference atposition “<position>” is of a data type notrecognized by the standard.

Processing continues.

User Response: Correct the SQL statement.

SQL4191W The data type of column“<column name>” is notrecognized.

Explanation: The data type of the column is notrecognized by the standard.

Processing continues.

User Response: Correct the SQL statement.

SQL4192W Table “<schema-name>”.“<table>”is not found in the catalog.

Explanation: The named table or view does notexist in the system catalog.

SQL4300 - SQL4399

SQL4300N Java support is not installed orproperly configured on thisplatform.

Explanation: Support for Java stored proceduresand user-defined functions is not installed andconfigured on this server.

User Response: Ensure that a compatible JavaRuntime Environment or Java Development Kitfor the server is installed. Ensure that the″jdk11_path″ configuration parameter is correctlyset.

sqlcode: -4300

382 Message Reference, Volume 2

Page 391: Db2 SQL Errors

sqlstate: 42724

SQL4301N Java interpreter startup orcommunication failed, reasoncode ″<reason-code>″.

Explanation: An error occurred whileattempting to start or communicate with a Javainterpreter. The reason codes are:

1 Java environment variables or Javadatabase configuration parameters areinvalid.

2 A Java Native Interface call to the Javainterpreter failed.

3 The ″db2java.zip″ file may be corrupt ormissing.

4 The Java interpreter has terminateditself and cannot be restarted.

User Response: Ensure that the Java databaseconfiguration parameters (jdk11_path andjava_heap_sz) are correctly set. Ensure that asupported Java runtime environment is installed.Ensure that internal DB2 classes (COM.ibm.db2)are not overridden by user classes.

sqlcode: -4301

sqlstate: 58004

SQL4302N Java stored procedure oruser-defined function ″<name>″,specific name ″<spec-name>″aborted with an exception″<string>″.

Explanation: The Java stored procedure oruser-defined function aborted with a Javaexception. The First Failure Service Log(db2diag.log) contains a Java stack traceback forthe aborted method.

User Response: Debug the Java method toeliminate the exception.

sqlcode: -4302

sqlstate: 38501

SQL4303N Java stored procedure oruser-defined function ″<name>″,specific name ″<spec-name>″could not be identified fromexternal name ″<string>″.

Explanation: The CREATE PROCEDURE orCREATE FUNCTION statement that declaredthis stored procedure or user-defined functionhad a badly formatted EXTERNAL NAMEclause. The external name must be formatted asfollows: ″package.subpackage.class!method″.

User Response: Submit a corrected CREATEPROCEDURE or CREATE FUNCTION statement.

sqlcode: -4303

sqlstate: 42724

SQL4304N Java stored procedure oruser-defined function ″<name>″,specific name ″<spec-name>″could not load Java class″<class>″, reason code″<reason-code>″.

Explanation: The Java class given by theEXTERNAL NAME clause of a CREATEPROCEDURE or CREATE FUNCTION statementcould not be loaded. The reason codes are:

1 The class was not found on theCLASSPATH.

2 The class did not implement therequired interface(“COM.ibm.db2.app.StoredProc” or“COM.ibm.db2.app.UDF”) or lacked theJava “public” access flag.

3 The default constructor failed or wasunavailable.

4 Could not load driver for“jdbc:default:connection”.

5 Could not establish default context.

User Response: Ensure that the compiled″.class″ file is installed in the CLASSPATH, forexample under ″sqllib/function″. Ensure itimplements the required Java interfaces and is″public″.

Chapter 2. SQL Messages 383

Page 392: Db2 SQL Errors

sqlcode: -4304

sqlstate: 42724

SQL4306N Java stored procedure oruser-defined function ″<name>″,specific name ″<spec-name>″could not call Java method″<method>″, signature ″<string>″.

Explanation: The Java method given by theEXTERNAL NAME clause of a CREATE

PROCEDURE or CREATE FUNCTION statementcould not be found. Its declared argument listmay not match what the database expects, or itmay not be a ″public″ instance method.

User Response: Ensure that a Java instancemethod exists with the ″public″ flag and theexpected argument list for this call.

sqlcode: -4306

sqlstate: 42724

SQL4400 - SQL4499

SQL4400N “<authorization-ID>” does nothave the authority to perform thetask at the DB2 AdministrationServer.

Explanation: The user does not have thenecessary authority at the DB2 AdministrationServer to perform the attempted action.

User Response: Attach to the DB2Administration Server using a user ID with thenecessary Authority. Most tasks performed at theDB2 Administration Server require SYSADMauthority.

SQL4401C The DB2 Administration Serverencountered an error duringstartup.

Explanation: An error was encountered duringstartup of the DB2 Administration Server.

User Response: Refer to the DB2Administration Server’s First Failure DataCapture Log for additional information. Take theappropriate action as necessary and attempt torestart the DB2 Administration Server.

If the problem persists contact your technicalservice representative.

SQL4402W The DB2ADMIN command wassuccessful.

Explanation: All processing completednormally.

User Response: No further action is required.

SQL4403N The syntax of the command isinvalid.

Explanation: The command was entered usinginvalid arguments or an invalid number ofparameters.

User Response: Re-submit the command withvalid argument(s).

SQL4404N The DB2 Administration Serverdoes not exist.

Explanation: The DB2 Administration Serverwas not found on the machine.

User Response: Create the DB2 AdministrationServer on the machine.

v On OS/2 or Windows 32-bit operatingsystems, issue the following command:

db2admin create

v On UNIX platforms, ensure that you have rootauthority, and issue the following commandfrom the instance subdirectory in the path ofthe DB2 Universal Database instance, where<ASName> represents the name of theAdministration Server:

dasicrt <ASName>

384 Message Reference, Volume 2

Page 393: Db2 SQL Errors

SQL4405W The DB2 Administration Serveralready exists.

Explanation: The DB2 Administration Serveralready exists on the machine

User Response: No further action is required.

SQL4406W The DB2 Administration Serverwas started successfully.

Explanation: All processing completednormally.

User Response: No further action is required.

SQL4407W The DB2 Administration Serverwas stopped successfully.

Explanation: All processing completednormally.

User Response: No further action is required.

SQL4408N The DB2 Administration Serverwas not dropped because it isactive.

Explanation: The DB2 Administration Servermust be stopped before it can be dropped.

User Response: To stop the DB2 AdministrationServer, enter the following command:

DB2ADMIN STOP

SQL4409W The DB2 Administration Server isalready active.

Explanation: The DB2ADMIN START commandcan not be processed because the DB2Administration Server is already active.

User Response: No further action is required.

SQL4410W The DB2 Administration Server isnot active.

Explanation: The DB2ADMIN STOP commandcan not be processed because the DB2Administration Server is not active.

User Response: No further action is required.

SQL4411N The requested operation is notallowed because the serverinstance is not the DB2Administration Server.

Explanation: The requested operation is onlyvalid when issued against the DB2Administration Server.

User Response: The DB2 Administration Servershould be set up using the DB2ADMINcommand. Refer to the Quick Beginnings forfurther information about the DB2ADMINcommand.

SQL4412N The logon user account for theDB2 Administration Server isinvalid.

Explanation: To perform the requested task, theDB2 Administration Server must be runningunder a valid logon user account. This error iseither caused by the account not being setup, orthe logon user account does not contain a validDB2 user ID.

User Response: If a logon user account hasbeen set up, then ensure that the account uses avalid DB2 user ID.

You can set up the logon user account for theDB2 Administration Server by using thefollowing command:

DB2ADMIN SETID <userid> <password>

SQL4413W Usage: DB2ADMIN creates, drops,starts, or stops the DB2Administration Server.

Explanation: The DB2ADMIN command syntaxis:

DB2ADMIN CREATE [/USER:<username>/PASSWORD:<password>]

DROPSTARTSTOPSETID <username> <password>/h

The command options are:

Chapter 2. SQL Messages 385

Page 394: Db2 SQL Errors

CREATEcreate the DB2 Administration Server

DROP delete the DB2 Administration Server

START start the DB2 Administration Server

STOP stop the DB2 Administration Server

SETID set the logon account for the DB2Administration Server

/USER specify the logon account name duringDB2ADMIN CREATE

/PASSWORDspecify the logon account passwordduring DB2ADMIN CREATE

/h display the usage information

User Response: Issue the DB2ADMINcommand with one of the valid commandoptions.

SQL4414N The DB2 Administration Server isnot active.

Explanation: The request cannot be processedunless the DB2 Administration Server is active.

User Response: Start the DB2 AdministrationServer by issuing the command DB2ADMINSTART, and reissue the request.

SQL4900 - SQL4999

SQL4901N Precompiler Services requiresreinitialization because of aprevious error.

Explanation: On a previous function call, anerror occurred. The requested function callcannot be processed until Precompiler Services isreinitialized.

The function cannot be completed.

User Response: Call the sqlainit function toreinitialize Precompiler Services

SQL4902N At least one of the characters inparameter “<n>” of function“<function>” is not valid.

Explanation: The specified parameter in thespecified function contains at least one characterthat is not valid.

The function cannot be completed.

User Response: Correct the specified parameterand call the function again.

SQL4903N The length of parameter “<n>” offunction “<name>” is not valid.

Explanation: The length of the specifiedparameter in the specified function is not valid.

The function cannot be completed.

User Response: Correct the specified parameterand call the function again.

SQL4904N The pointer to parameter “<n>” offunction “<function>” is notvalid.

Explanation: The pointer to the specifiedparameter in the specified function is not valid.

The function cannot be completed.

User Response: Correct the specified parameterand call the function again.

SQL4905N The value of parameter “<n>” offunction “<function>” is notwithin the valid range.

Explanation: The value of the specifiedparameter in the specified function is outside thevalid range for that parameter. If the specifiedparameter is a structure, it may contain valuesthat are within the valid range but are not validwhen considered together. Some structurescontain headers that specify the allocated sizeand how much of that size is being used. It isnot valid for the allocated size to be less than theused size.

The function cannot be completed.

User Response: Correct the specified parameterand call the function again.

386 Message Reference, Volume 2

Page 395: Db2 SQL Errors

SQL4906N The list of table space namesspecified is an incomplete set forthe rollforward operation.

Explanation: The list of table space names isincomplete for one of the following reasons:

v For point-in-time table space recovery, a tablespace list must be specified.

v For point-in-time table space recovery, aself-contained list of table space names mustbe specified. The table spaces in the list mustcontain all objects of every table included inthe table spaces.

v Point-in-time table space recovery is notallowed for the system catalogs.

v End-of-logs table space recovery is allowed forthe system catalogs but it can be the only tablespace name in the list.

v The CANCEL option for rollforward musthave a table space list if there are no tablespaces in ″rollforward-in-progress″ state.

User Response: Check the table space list andresubmit the rollforward command with thecomplete table space list.

SQL4907W Database ″<name>″ is recoveredbut one or more of the tables inthe table space list included forthe rollforward operation areplaced in check pending states.

Explanation: One or more of the tables involvedin the point-in-time tablespace recovery havereferential constraints with tables outside of thetable space list used for recovery. All these tablesare placed in check pending state. Rollforwardoperation is otherwise completed successfully.

User Response: Check the state for the tables inthe table spaces and take appropriate actions ifnecessary.

SQL4908N The table space list specified forroll-forward recovery on database″<name>″ is invalid on node(s)″<node-list>″.

Explanation: If starting a new table spacerollforward, one or more of the table spaces

specified in the list to be rolled forward is not inrollforward pending state on the specified nodes.If continuing a table space rollforward that isalready in progress, one or more of the tablespaces specified in the list to be rolled forward isnot in rollforward in progress state on thespecified nodes.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

Roll-forward recovery stops.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Use the LIST TABLESPACESSHOW DETAIL command on the nodes specifiedto find out which table spaces are not ready tobe rolled forward. Use the QUERY STATUSoption of the rollforward command to determinethe status of the table space rollforward. If therollforward status is ″TBS pending″, a new tablespace rollforward can be started. If therollforward status is ″TBS working″, a table spacerollforward is already in progress.

If starting a new table space rollforward, put thetablespaces into rollforward pending state byrestoring them.

If continuing a table space rollforward and oneor more of the table spaces involved have beenrestored and put into rollforward pending state,the table space rollforward in progress must becanceled. Submit the rollforward command againwith the CANCEL option and the same tablespace list. When the rollforward in progress iscanceled, the table spaces will have been put intorestore pending state. Restore the table spacesand submit the original rollforward commandagain.

Chapter 2. SQL Messages 387

Page 396: Db2 SQL Errors

SQL4909W Roll forward recovery hascompleted successfully but one ormore table spaces have theirtables put in DRP/DRNP state.Check the db2diag.log file fordetails on node(s) ″<node-list>″.

Explanation: One or more table spaces havetables in DATALINK Reconcile Pending (DRP)state or DATALINK Reconcile Not Possible(DRNP) state for one of the following reasons:

v Restore is done specifying the WITHOUTDATALINK option and rollforward to apoint-in-time follows the restore. Any tableswith DATALINK columns are placed in DRPstate.

v Restoring from a backup image with adifferent database name, alias, hostname, orinstance and rollforward follows the restore.Any tables with DATALINK columns areplaced in DRNP state.

v Restoring from a backup image that hasbecome unusable and rollforward follows therestore. Any tables with DATALINK columnsare placed in DRNP state.

v Rollforward was to a point-in-time, not to theend of logs. Any tables with DATALINKcolumns in that tablespace are placed in DRPstate.

v DATALINK column information does not existat the DB2 Data Links Manager(s). Affectedtables are placed in DRNP state.

v Rollforward involved DATALINK columnsdefined with the ″RECOVERY NO″ option.Affected tables are placed in DRP state.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

(Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Look in the db2diag.log file tofind out what tables are put in DRP/DRNP state.See the Administration Guide for information onreconciling tables that are in DRP/DRNP state.

SQL4910N Overflow log path ″<log-path>″ isnot valid.

Explanation: The overflow log path specified onthe ROLLFORWARD command is not valid. Theoverflow log path must be a directory in a filesystem. This directory must be accessible by theinstance owner id.

User Response: Resubmit the command with avalid overflow log path.

SQL4911N The host variable data type is notvalid.

Explanation: The data type of the host variableis not valid.

The function cannot be completed.

User Response: Correct the data type of thehost variable and call the function again.

SQL4912N The host variable data length isout of range.

Explanation: The length of the host variable isnot valid.

The function cannot be completed.

User Response: Correct the length of the hostvariable and call the function again.

SQL4913N The host variable token ID hasalready been used.

Explanation: The token ID of the host variablehas already been used. The token ID must beunique within the module.

The function cannot be completed.

User Response: Correct the token ID of the hostvariable and call the function again.

SQL4914N The host variable token ID is notvalid.

Explanation: The token ID of the host variableis not valid.

The function cannot be completed.

388 Message Reference, Volume 2

Page 397: Db2 SQL Errors

User Response: Correct the token ID of the hostvariable and call the function again.

SQL4915N The “sqlainit” function hasalready been called.

Explanation: Precompiler Services has alreadybeen initialized.

User Response: No action is required. Continueprocessing.

SQL4916N The “sqlainit” function has notbeen called.

Explanation: Precompiler Services must beinitialized before the requested function call canbe processed.

The function cannot be completed.

User Response: Issue an sqlainit function call toinitialize Precompiler Services.

SQL4917N Element “<number>” in theoption array is not valid.

Explanation: The option array contains anelement with an option.type or option.value that isnot valid. The element number in the message isthe nth element in the option portion of theoption array.

The function cannot be completed.

User Response: Correct the values stored in theoption array. Call the function again.

SQL4918N The term_option parameter offunction “sqlainit” is not valid.

Explanation: The term_option parameter is notvalid.

The function cannot be completed.

User Response: Correct the term_optionparameter and call the function again.

SQL4919N The task_array parameter offunction “sqlacmpl” is too small.

Explanation: The task array structure passed toPrecompiler Services on the sqlacmpl functioncall is too short.

The function did not complete successfully.

User Response: Increase the size of theprecompiler task array structure allocated by theprecompiler. Recompile the application program.

SQL4920N The token_id_array parameter offunction “sqlacmpl” is too small.

Explanation: The token id array structurepassed to Precompiler Services on the sqlacmpl()function call is too small.

The function did not complete successfully.

User Response: Increase the size of theprecompiler token id array structure allocated bythe precompiler. Recompile the applicationprogram.

SQL4930N Bind or precompile option oroption value “<option-name>” isinvalid.

Explanation: Either “<option-name>” is aninvalid bind or precompile option or the valuespecified for this option is invalid. The bind orprecompile cannot continue.

User Response: Correct the bind or precompileoption or option value and retry the bind orprecompile command.

SQL4940N The “<clause>” clause is notpermitted or is required.

Explanation: The indicated clause is either notallowed in the context where it appears in theSQL statement or it is required in the statement.

A subquery, an INSERT statement, or a CREATEVIEW statement cannot have INTO, ORDER BY,or FOR UPDATE clauses. An embedded SELECTstatement cannot have ORDER BY or FORUPDATE clauses. An embedded SELECTstatement cannot contain a set operator except in

Chapter 2. SQL Messages 389

Page 398: Db2 SQL Errors

a subquery. SELECT statements used in cursordeclarations cannot have an INTO clause.

An embedded SELECT statement must have anINTO clause.

The function cannot be completed.

User Response: Remove or add the clause tocorrect the statement.

SQL4941N The SQL statement is blank orempty.

Explanation: The text following EXEC SQL wasblank or empty.

The function cannot be completed.

User Response: Ensure that a valid SQLstatement is provided following the word EXECSQL.

SQL4942N The statement selects anincompatible data type into hostvariable “<name>”.

Explanation: An embedded SELECT statementselects into a host variable “<name>” but thedata type of the variable and the correspondingSELECT list element are not compatible. If thedata type of the column is date and time, thedata type of the variable must be character withan appropriate minimum length. Both musteither be numeric, character, or graphic.

The function cannot be completed.

User Response: Verify that the table definitionsare current and that the host variable has theproper data type.

SQL4943W The number of host variables inthe INTO clause is not the sameas the number of items in theSELECT clause.

Explanation: The number of host variablesspecified in both the INTO clause and theSELECT clause must be the same.

The function is processed.

User Response: Correct the application program

to specify the same number of host variables asSELECT list expressions.

SQL4944N An update or insert value isNULL but the object columncannot contain NULL values.

Explanation: One of the following occurred:

v The update or insert value was NULL but theobject column is declared as NOT NULL in thetable definition. Therefore, null values cannotbe inserted into that column, and values inthat column cannot be set to NULL by anupdate.

v The column name list for the INSERTstatement omits a column that was declared asNOT NULL in the table definition.

v The view for the INSERT statement omits acolumn that was declared as NOT NULL inthe base table definition.

The function cannot be completed.

User Response: Examine the definition of theobject table to determine which columns of thetable have the NOT NULL attribute, and correctthe SQL statement.

SQL4945N The use of a parameter marker isnot valid.

Explanation: Parameter markers can be usedonly in dynamic SQL statements.

The function cannot be completed.

User Response: Use host variables instead ofparameter markers for static SQL statements.

SQL4946N The cursor or statement name“<name>” is not defined.

Explanation: The cursor or statement name“<name>” specified in the statement is notdefined.

The function cannot be completed.

User Response: Check the application programfor completeness and possible spelling errors inthe cursor or statement names.

390 Message Reference, Volume 2

Page 399: Db2 SQL Errors

SQL4947W An INCLUDE SQLDA statementwas encountered and ignored.

Explanation: The FORTRAN precompilershipped by the database manager does notsupport the INCLUDE SQLDA statement.

The statement is ignored. Processing continues.

User Response: No action is required. Toprevent this message, remove the INCLUDESQLDA statement from the program.

SQL4950N Compound SQL statementscontaining user-defined SQLDAsare not supported in thisenvironment.

Explanation: Compound SQL statementscontaining user-defined SQLDAs are notsupported in a 16-bit application.

User Response: Move the statement out of thecompound SQL block or replace the statementwith one that uses host variables instead of anSQLDA.

SQL4951N The sqlda_id parameter offunction “<name>” is not valid.

Explanation: The sqlda_id parameter of thespecified function in the application program isnot valid. The sqlda_id parameter cannot be null.

The function cannot be completed.

User Response: Correct the sqlda_id parameterin the application program.

SQL4952N The sqlvar_index parameter offunction “<name>” is not valid.

Explanation: The sqlvar_index parameter of thespecified function in the application program isnot valid. The sqlvar_index may be larger than thenumber of sqlvar elements in the SQLDA.

The function cannot be completed.

User Response: Correct the sqlvar_indexparameter in the application program.

SQL4953N The call_type parameter offunction “<name>” is not valid.

Explanation: The call_type parameter of thespecified function in the application is not valid.

The function cannot be completed.

User Response: Correct the call_type parameterin the application program.

SQL4954N The section_number parameter offunction “<name>” is not valid.

Explanation: The section_number parameter ofthe specified function in the application programis not valid. Note that for the following SQLstatements, the section_number parameter of thefunction sqlacall() is used to pass in thestatement type:

v CONNECT

v SET CONNECTION

v RELEASE

v DISCONNECT

The function cannot be completed.

User Response: Correct the section_numberparameter in the application program.

SQL4970N Roll-forward recovery on database″<name>″ cannot reach thespecified stop point (end-of-log orpoint-in-time) because of missinglog file(s) on node(s)″<node-list>″.

Explanation: This message is returned in thefollowing situations:

v a request was made to bring the specifieddatabase out of roll-forward pending state byspecifying caller actionSQLUM_ROLLFWD_STOP, SQLUM_STOP,SQLUM_ROLLFWD_COMPLETE, orSQLUM_COMPLETE but the RollforwardDatabase utility cannot find the necessaryarchive log file(s) in the database log directoryor the overflow log directory on the specified

Chapter 2. SQL Messages 391

Page 400: Db2 SQL Errors

node(s) to reach the stopping point from theprevious ROLLFORWARD DATABASEcommand.

v in a multi-node environment, if theRollforward Database utility cannot find thenecessary archive log file(s) to bring a nodeinto synchronization with the catalog node.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

Roll-forward recovery has stopped. The databaseis left in roll-forward pending state.

Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.

User Response: Use the ROLLFORWARDDATABASE command with the QUERY STATUSoption to determine which log files are missing.

Do one of the following:

v Make sure that all archive log files areavailable in the database log directory or theoverflow log path, and issue theROLLFORWARD DATABASE command again.

v If you cannot find the missing log files, restorethe database/table space on all nodes, then dopoint-in-time recovery using a timestamp thatis earlier than that of the earliest missing logfile.

SQL4971N Roll-forward recovery on database″<name>″ on node“<node-number>” failedpreviously while stopping.Roll-forward recovery must bestopped.

Explanation: A request was made to continuerolling forward the specified database byspecifying caller action SQLUM_ROLLFWD. Theprevious iteration of roll-forward recovery failedwhile stopping. If rolling forward at the databaselevel, this means that it failed during logtruncation. Roll-forward recovery for thisdatabase must now be stopped by specifying

caller action SQLUM_ROLLFWD_STOP,SQLUM_STOP,SQLUM_ROLLFWD_COMPLETE, orSQLUM_COMPLETE.

Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.

User Response: Reissue the ROLLFORWARDDATABASE command with caller actionSQLUM_ROLLFWD_STOP, SQLUM_STOP,SQLUM_ROLLFWD_COMPLETE, orSQLUM_COMPLETE. Any stoptime specifiedwill be ignored since the previous stoptime isalready being processed.

SQL4972N Log extent ″<extent>″ on node″<node-number>″ could not bemoved to the database logpath.

Explanation: The Rollforward utility wasinvoked with the STOP option. As part ofroll-forward processing, the log extent ″<extent>″has to be truncated. This extent must exist in thedatabase logpath. Currently, the extent exists inthe overflow log path. An attempt was made tomove the extent from the overflow log path tothe database logpath. The attempt failed.Roll-forward processing has been stopped.

Note : if you are using a partitioned databaseserver, the node number indicates which nodethe error occurred on. Otherwise, it is notpertinent and should be ignored.

User Response: Move the extent from theoverflow log path to the database logpath andthen resubmit the ROLLFORWARD DATABASEcommand.

SQL4973N Forward recovery on database″<name>″ cannot completebecause the log information onnode(s) ″<node-list>″ does notmatch the corresponding record(s)on the catalog node.

Explanation: The Rollforward utility processedall the log files found on each node, but the stoppoints on the specified nodes do not match the

392 Message Reference, Volume 2

Page 401: Db2 SQL Errors

corresponding records on the catalog node. Thiscan be caused by missing log files on either thecatalog node or on the specified nodes, or thecatalog node must be included in the list ofnodes to be rolled forward.

The ROLLFORWARD DATABASE processingstops.

User Response: Do one of the following:

v Check if the catalog node needs to be rolledforward. If it does, submit theROLLFORWARD DATABASE command againand include the catalog node.

v Use the ROLLFORWARD DATABASEcommand with the QUERY STATUS option todetermine which log files are missing. Whenyou find the log files, put them in the log pathor overflow log path and resume forwardrecovery.

v If you cannot find the missing log files, restorethe database on all nodes, then dopoint-in-time recovery using a stoptime that isearlier than that of the earliest missing log file.

SQL4974W The ROLLFORWARD DATABASEQUERY STATUS commandencountered sqlcode ″<sqlcode>″.

Explanation: The ROLLFORWARD DATABASEQUERY STATUS command encountered an errorwith the sqlcode ″<sqlcode>″. The query mightnot be successful on some nodes for variousreasons. The most severe error is indicated by″<sqlcode>″. The roll-forward status is onlyreturned for the successful nodes.

User Response: Look up the sqlcode″<sqlcode>″ in the Message Reference, or online todetermine the problems on the failed nodes. Takethe required corrective actions, then continue theforward recovery on these nodes.

SQL4975W Roll-forward operation wascancelled successfully. Thedatabase or selected table spaceshave to be restored on node(s)″<node-list>″.

Explanation: A roll-forward operation wascancelled before it successfully completed, and

the database or selected table spaces are left in inan inconsistent state. The database or selectedtable spaces are in restore pending state on thelisted nodes.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

Note : if you are using a partitioned databaseserver, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.

User Response: Restore the database or selectedtable spaces on the listed nodes. The table spacesthat are in restore pending state can be identifiedon the specified node(s) by the LISTTABLESPACES command or the db2dart utility.

SQL4976N The ROLLFORWARD DATABASEcommand cannot be submitted ona non-catalog node.

Explanation: The ROLLFORWARD DATABASEcommand is only accepted on the catalog node.

User Response: Submit the command on thecatalog node.

SQL4977N Dropped table export directory″<directory>″ is not valid.

Explanation: The export directory path specifiedon the ROLLFORWARD command is not valid.The export directory path must be a directory ina file system. This directory must be accessibleby the instance owner id.

User Response: Resubmit the command with avalid export directory path.

SQL4978N The dropped table can not beaccessed.

Explanation: The dropped table can not beaccessed. This may be due to the table being putinto unavailable state because of a LOADwithout copy or a NOT LOGGED INITIALLYoperation.

User Response: The table can not be recoveredusing the DROPPED TABLE RECOVERY option.

Chapter 2. SQL Messages 393

Page 402: Db2 SQL Errors

SQL4979W Unable to export the droppedtable data.

Explanation: The command was unable toexport the data of the dropped table whoserecovery is being attempted. This can happenwhen the dropped table id specified on theROLLFORWARD command is invalid, or whennot all of the logs are available for roll forward.This warning will be generated when an erroroccurs during a dropped table recovery using aROLLFORWARD ... AND STOP command.

User Response: Resubmit the command afterensuring that the dropped table id provided isvalid, and that all of the logs are available forroll forward.

SQL4994N Precompilation was endedbecause of a user interruptrequest.

Explanation: Precompilation was terminatedbecause of an interrupt. The user may havepressed an interrupt key sequence.

Processing is terminated. No package wascreated.

User Response: Resubmit the precompilation ifneeded.

SQL4997N The authorization ID is not valid.

Explanation: The authorization ID for theapplication was specified previously but it wasdefined with more than 8 characters or withcharacters that are not valid for an authorizationID.

The authorization ID must not be PUBLIC(public) and it must not begin with SYS (sys),IBM (ibm), or SQL (sql). Also, it must not containthe underscore character or any charactersoutside the database manager base character set.

The function cannot be processed.

User Response: Retry the application with avalid authorization ID.

SQL4998C The application state is in error;the database connection has beenlost.

Explanation: The connection to the database hasbeen lost.

The function cannot be processed.

User Response: Reconnect to the database.

SQL4999N A Precompiler Services orRun-Time Services error occurred.

Explanation: A database manager erroroccurred that prevents Precompiler Services orRun-Time Services from processing function calls.

No Precompiler Services or Run-Time Servicesfunction calls can be processed.

User Response: Record the message number(SQLCODE) and all error information form theSQLCA if possible.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

v Environment: Outer Precompiler UsingPrecompiler Services API

v Required information:

– Problem description

– SQLCODE

– SQLCA contents if possible

– Trace file if possible.

SQL5000 - SQL5099

394 Message Reference, Volume 2

Page 403: Db2 SQL Errors

SQL5001N “<authorization-ID>” does nothave the authority to change thedatabase manager configurationfile.

Explanation: The user attempted to Update orReset the database manager configuration filewithout having SYSADM authority.

The requested change is not made.

User Response: Do not attempt to change thedatabase manager configuration file withoutappropriate authorization. Contact a user withSYSADM authority if a change is required.

SQL5005C System Error.

Explanation: A system error, probably an I/Oerror, was encountered while accessing aconfiguration file.

The command cannot be processed.

User Response: Resubmit the command.

If the error persists, check the db2diag.log file fordetails and ensure that the configuration file isaccessible. If unable to resolve the problem,contact an IBM Service Representative forassistance.

SQL5010N The path name to the databasemanager configuration file is notvalid.

Explanation: An error occurred whiledetermining the path for the database managerconfiguration file. The database managerdirectory structure may have been altered.

The command cannot be processed.

User Response: Resubmit the command. If theerror continues, reinstall the database manager.

SQL5012N The entry in the databasemanager configuration file for themaximum number of segmentsallowed for the DB2 kernel is notin the valid range.

Explanation: The value for the maximumnumber of segments allowed for the DB2 kernelmust be between 8 and 8192.

The requested change is not made.

User Response: Resubmit the command with avalid value for the maximum number of DB2segments allowed.

SQL5018N The entry in the databasemanager configuration file for themaximum number of remoteconnections to the workstation(numrc) is not in the valid range.

Explanation: The value for the maximumnumber of remote connections to the workstationmust be between 1 and 255.

The requested change is not made.

User Response: Resubmit the command with avalid value for the maximum number of remoteconnections to the workstation.

SQL5020N The entry in the databasemanager configuration file for thenode name for the workstation(nname) is not valid.

Explanation: The node name specified in theconfiguration command is not valid. The nodename may be 1 to 8 characters. All the charactersmust be chosen from the database manager basecharacter set.

The command cannot be processed.

User Response: Resubmit the command with avalid node name.

Chapter 2. SQL Messages 395

Page 404: Db2 SQL Errors

SQL5021N The entry in the databasemanager configuration file for theindex recreation time (indexrec) isnot valid. Possible values are 1(during index access) and 2(during database restart).

Explanation: An invalid value was passed toConfiguration Services for the Index RecreationTime flag (indexrec) in the database managerconfiguration file. The invalid value may havebeen entered through the Command LineProcessor or through a program API call. Theonly valid values for the API call are 1 (duringdatabase access), and 2 (during database restart).The valid values for the command line processorare ACCESS and RESTART.

The update to the database managerconfiguration file is rejected.

User Response: Repeat the update request,entering one of the possible values.

SQL5022N The entry in the databaseconfiguration file for the indexrecreation time (indexrec) is notvalid. Possible values are 0 (usesystem setting), 1 (during indexaccess), and 2 (during databaserestart).

Explanation: An invalid value was passed toConfiguration Services for the Index RecreationTime flag (indexrec) in a database configurationfile. The invalid value may have been enteredthrough the Command Line Processor or througha program API call. The only valid values for theAPI call are 0 (use system setting), 1 (duringindex access), and 2 (during database restart).

The valid values for the command line processorare SYSTEM, ACCESS, and RESTART.

The update to the database configuration file isrejected.

User Response: Repeat the update request,entering one of the possible values.

SQL5025C The database managerconfiguration file is not current.

Explanation: The database managerconfiguration file has been updated since youconnected to the database. It is not compatiblewith the configuration for the database to whichyou are connected.

No access is allowed to the database managerconfiguration file.

User Response: Wait until all applicationsdisconnect from the databases. Issue the stopdatabase manager command, and then issue thestart database manager command.

If installing the sample database, drop it andinstall the sample database again.

SQL5028N The value of sysadm_group mustbe the primary group of theinstance owner.

Explanation: An attempt was made to updatesysadm_group in the database managerconfiguration file. For Version 2 of DB2 onUnix-based platforms, this value is only allowedto be the primary group of the instance owner.

User Response: Use the primary group of theinstance owner to update this field in thedatabase manager configuration file onUnix-based platforms.

SQL5030C The release number is not valid.

Explanation: The release number in thedatabase manager configuration file or databaseconfiguration file is not valid.

The command cannot be processed.

User Response: Verify that the release levels ofyour database and DB2 match.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -5030

sqlstate: 58031

396 Message Reference, Volume 2

Page 405: Db2 SQL Errors

SQL5035N The database requires migrationto the current release.

Explanation: The database was created on alower level system release. The Migrate Databasecommand must be used to convert the databaseto the current release level.

The command cannot be processed.

User Response: Perform the Migrate Databasecommand before attempting to use the databasewith the current system release.

If this message is received during a restore, dropthe existing database before proceeding.

sqlcode: -5035

sqlstate: 55001

SQL5040N One of the socket addressesrequired by the TCP/IP serversupport is being used by anotherprocess.

Explanation: One of the socket addressesrequired by the server either is in use by anotherprogram, or has not been freed completely by theTCP/IP subsystem after the database managerhas been stopped.

User Response: If you have just issued db2stop,wait for a couple of minutes so that the TCP/IPsubsystem has enough time to clean up itsresources. Otherwise, make sure no otherprograms on your workstation are using the portnumbers reserved for your service name in the/etc/services file. The port number is acomponent of a socket address.

SQL5042N One of the communicationprotocol server support processesfailed to start up.

Explanation: Due to system call failure, or acommunication subsystem call failure, one of thecommunication protocol server support processesdid not start up successfully.

User Response: You can investigate the problemby either:

v examine the system log records;

v turning on trace, run db2start again, thenexamine the trace record.

SQL5043N Support for one or morecommunications protocols failedto start successfully. However,core database managerfunctionality started successfully.

Explanation: Communication protocol supportdid not start successfully for one or moreprotocols. Possible reasons can include thefollowing:

v Communication subsystem configuration error.

v Communication subsystem call failure.

v Database manager configuration error.

v System call failure.

v Database manager licensing error.

You can still connect to the server withcommunication protocols that did startsuccessfully. Local clients can also connect to theserver.

User Response: The database manager attemptsto start all communication protocols specified bythe DB2COMM environment variable.

Check the diagnostic log (db2diag.log) for detailson this error. The log will contain moreinformation on the cause of the error and alsowhich communication protocol(s) did not startsuccessfully.

This error only affects communication protocolsspecified by the DB2COMM environmentvariable.

SQL5047C Insufficient memory to executethis function.

Explanation: There is not enough memoryavailable to execute this function.

The function cannot be completed.

User Response: Stop the application. Possiblesolutions include:

v Terminate other processes.

v Decrease the values of the configurationparameters that define allocation of memory.

Chapter 2. SQL Messages 397

Page 406: Db2 SQL Errors

v Ensure that your system has sufficient real andvirtual memory.

SQL5048N The release level of the databaseclient is not supported by therelease level of the databaseserver.

Explanation: Database clients can only accessdatabase servers with a release level which is inthe range of one level lower than the client totwo levels higher than the client.

User Response: One or more of the following:

v Upgrade the client release level to fall withinthe range of releases supported by the currentserver release level.

v Upgrade the server release level to a levelsupported by the current client release level.

SQL5050C The content of the databasemanager configuration file is notvalid.

Explanation: The database managerconfiguration file is not valid. The file may havebeen altered by a text editor or a program otherthan the database manager.

The command cannot be processed.

User Response: Reinstall the database manager.

SQL5051N An object qualified by“<qualifier>” cannot be created inschema “<schema-name>”.

Explanation: An object created in a CREATESCHEMA statement is qualified by “<qualifier>”which is different from the schema name. Allobjects created in a CREATE SCHEMA statementmust be either qualified by the schema name“<schema-name>” or not qualified. Unqualifiedobjects are implicitly qualified by the schemaname.

The statement cannot be processed.

User Response: Explicitly qualify the object inthe schema with “<schema-name>” or remove“<qualifier>” from the object name.

sqlcode: -5051

sqlstate: 42875

SQL5055C The content of the databaseconfiguration file is not valid.

Explanation: The database configuration file forthe database is not valid. The file may have beenaltered by a text editor or a program other thanthe database manager.

User Response: Recreate the database or restoreit from a backup version.

sqlcode: -5055

sqlstate: 58031

SQL5060N The configuration parametertoken specified is invalid.

Explanation: A token number specified in thesqlfupd structure passed to a ConfigurationServices API is not valid. It does not representany of the supported configuration parameters.Alternatively, if an UPDATE was attempted, thetoken specified may be that of an unmodifiableconfiguration parameter.

User Response: Choose a valid token numberfrom those specified in the description of theConfiguration Services API in the ApplicationDevelopment Guide. Recode the call to the API,and rerun the program.

SQL5061N An invalid pointer to structuresqlfupd was passed toConfiguration Services.

Explanation: The pointer to structure sqlfupdpassed as a parameter to one of theConfiguration Services APIs was invalid. It iseither NULL, or does not point to an allocatedblock of memory of the size indicated by thecount parameter. See the Application DevelopmentGuide for more information.

User Response: Correct the code which invokesthe Configuration Services API, and retry the APIcall.

398 Message Reference, Volume 2

Page 407: Db2 SQL Errors

SQL5062N An invalid pointer was passedwithin the sqlfupd structure toConfiguration Services.

Explanation: The structure sqlfupd passed as aparameter to one of the Configuration ServicesAPIs contained an invalid pointer. The pointer iseither NULL, or does not point to an allocatedblock of memory. Each token passed in thestructure must have a corresponding pointer to afield that is either passed in or out of the API.See the Application Development Guide for moreinformation.

User Response: Correct the code which invokesConfiguration Services, and rerun the program.

SQL5065C The nodetype value in databasemanager configuration file is notvalid.

Explanation: The nodetype parameter in thedatabase manager configuration file is not valid.

The command cannot be processed.

User Response: Reinstall the database manager.

SQL5066W The database configurationparameter value for token“<token-name>” has beentruncated.

Explanation: The database configurationparameter value is larger than the specifiedtoken can contain.

A new token now represents this databaseconfiguration parameter value and should beused if the value is larger than can be containedby the old token.

User Response: Use the new token for thisdatabase configuration parameter.

SQL5070N The count parameter in theconfiguration command is notvalid. It must be greater than 0.

Explanation: The count value passed as aparameter to a Configuration Services API mustbe greater than 0.

The command cannot be processed.

User Response: Correct the code which invokesConfiguration Services, and rerun the program.

SQL5075N The configuration utility wasinterrupted.

Explanation: An interrupt was received by theconfiguration utility. The user may have pressedthe interrupt key sequence.

The command was not processed. Any requestedchange is not made.

User Response: Resubmit the command.

SQL5081N The entry in the databaseconfiguration file for the size ofthe buffer pool (buffpage) is notin the valid range.

Explanation: The minimum value for the size ofthe buffer pool is two times the maximumnumber of active processes (maxappls). Themaximum value for the size of the buffer pool is524288 (number of 4KB pages) and is operatingsystem dependent. The maximum value underAIX is 51000 (204000 for DB2 Enterprise -Extended Edition) (4KB pages). Under HP-UX,the value must be between 16 and 150000 (4KBpages).

The requested change is not made.

User Response: Resubmit the command with avalid value for the size of the buffer pool.

SQL5083N The entry in the databaseconfiguration file for the initiallog file size (logfile) is not in thevalid range.

Explanation: The value for the initial log filesize must be between 12 and (2**32 − 1).

The requested change is not made.

User Response: Resubmit the command with avalid value for the initial log file size.

Chapter 2. SQL Messages 399

Page 408: Db2 SQL Errors

SQL5091N The entry in the databaseconfiguration file for the size ofone log file extension (logext) isnot in the valid range.

Explanation: The value for the size of one logfile extension must be between 4 and 256.

The requested change is not made.

User Response: Resubmit the command with avalid value for the size of one log file extension.

SQL5092N The entry in the databaseconfiguration file for themaximum allowable number oflog file extensions (logmaxext) isnot in the valid range.

Explanation: The value for the maximumallowable number of log file extensions must bebetween 0 and (2 * 10**6).

The requested change is not made.

User Response: Resubmit the command with avalid value for the maximum allowable numberof log file extensions.

SQL5093N The entry for the databaseconfiguration parameter for thesize of the agent heap is not inthe valid range.

Explanation: The value for the size of the agentheap must be between 2 and 85.

The requested change is not made.

User Response: Resubmit the command with avalid value for the agent heap size.

SQL5099N The new path to the log(newlogpath) in the databaseconfiguration file is not valid.

Explanation: The path to the log file is not validfor one of the following reasons:

v The path string is longer than 242 bytes.

v The path does not exist.

v The first directory in the path has a name inthe form SQLNNNNN, where NNNNN is avalue from 00001 to 99999.

v A file with the correct name was found in thespecified path, but is not a log file for thisdatabase.

v The new path to the log is currently beingused by another database.

v The device specified by the new path is notbig enough to hold the primary log files.

The requested change is not made.

User Response: Resubmit the command with avalid value for the new log path.

sqlcode: -5099

sqlstate: 08004

SQL5100 - SQL5199

SQL5100N The entry in the databasemanager configuration file for thenumber of allowed concurrentdatabases is too large.

Explanation: The requested change would cause(1) the number of allowed concurrent databasesto be too large or (2) the number of segmentsallowed for DB2 to be too small.

The number of allowed concurrent databases isrestricted by the maximum number of segmentsallowed for DB2. The following condition mustalways be true:

segments >= ((number of databases * 5) + 1)

The requested change is not made.

User Response: Do one of the following:

v Increase the maximum number of segmentsallowed for DB2.

v Decrease the number of allowed concurrentdatabases.

400 Message Reference, Volume 2

Page 409: Db2 SQL Errors

SQL5101N The entries in the databaseconfiguration file define log fileparameters (logprimary andlogsecond) that are not in thevalid range.

Explanation: The requested change would causethe total number of logfiles to be out of range.The following condition must always be true:

logprimary + logsecond <= 128

The requested change is not made.

User Response: Do one or both of thefollowing:

v Decrease the number of primary log files.

v Decrease the number of secondary log files.

SQL5103N The entry in the databaseconfiguration file for the size ofthe buffer pool (buffpage) is toosmall for the maximum number ofactive applications (maxappls).

Explanation: The requested change would causethe maximum number of active applications tobe too large for the size of the buffer pool. Thefollowing condition must always be true:

bufferpool_size >(number of active_processes * 2)

The requested change is not made.

User Response: Do one or both of thefollowing:

v Increase the size of the buffer pool.

v Decrease the maximum number of activeprocesses allowed.

SQL5112N The value of the configurationparameter ″<parameter>″ must beeither 0 or 1.

Explanation: The request is not completedbecause the value given for ″<parameter>″ isinvalid.

User Response: Ensure that the value specifiedfor ″<parameter>″ is either 0 or 1, then try therequest again.

SQL5120N Old and new log parameterscannot both be modified at thesame time.

Explanation: The user is attempting to modifyboth the previous log parameters and the newparameters. The application should only supportthe parameters of the current release.

The request is denied.

User Response: Modify only the parameters ofthe current release and retry the command.

SQL5121N The entry in the databaseconfiguration file forconfiguration options is not valid.

Explanation: The value set for database options(SQLF_DETS) is not valid. Valid settings arebetween 0 and 15. The requested change is notmade.

The requested change is not made.

User Response: Resubmit the command with avalid database options value.

SQL5122N Access to the database was invalidbecause of a machine dependentcheck.

Explanation: The database and databaseconfiguration file cannot be accessed because ofcopy protection.

The user request is denied.

User Response: Return to the original databaseand modify the configuration file to turn thecopy protection off, then create a new backupwhich may be used to restore the database. Thismust be done by an individual with SYSADMauthority. If the original database is no longeravailable, contact your service representative.

SQL5123N Database “<name>” cannot beconfigured because an I/O erroroccurred while accessing the logcontrol file.

Explanation: An error occurred while accessingSQLOGCTL.LFH for the specified database.

Chapter 2. SQL Messages 401

Page 410: Db2 SQL Errors

The requested change is not made.

User Response: Restore the database from abackup copy or recreate the database.

SQL5126N An attempt was made to modifythe database managerconfiguration parameter ″<parm>″which is not valid for a node typeof ″<node-type-code>″.

Explanation: The user attempted to modify adatabase manager configuration parameter whichis invalid for the given node type.″<node-type-code″> is defined as follows:

1 Database server with local and remoteclients

2 Client

3 Database server with local clients

4 Partitioned Database Server with localand remote clients

5 Satellite Database Server with localclients

The requested change is not made.

User Response: Resubmit the request with avalid parameter for the given nodetype.

SQL5130N The value specified for theconfiguration parameter″<parameter>″ is not in the validrange of ″<start-of-range>″ to″<end-of-range>″.

Explanation: The request is not done becausethe value of ″<parameter>″ is not within thevalid range.

User Response: Ensure that the value specifiedfor ″<parameter>″ is within the valid range, thentry the request again.

SQL5131N The value specified for theconfiguration parameter″<parameter>″ is not in the validrange. The valid range is ″-1″, orfrom ″<start-of-range>″ to″<end-of-range>″.

Explanation: The request is not done becausethe value of ″<parameter>″ is not within thevalid range.

User Response: Ensure that the value specifiedfor ″<parameter>″ is within the valid range, thentry the request again.

SQL5132N The configuration parameter isnull or too long. The maximumlength is <maximum length>.

Explanation: The configuration parameter is notset or too long.

User Response: Change the value of theconfiguration parameter to within the maximumlength given.

SQL5133N The value “<value>” forconfiguration parameter “<parm>”is invalid. The valid set of valuesis “<value_list>”.

Explanation: “<value>” was the the valuespecified for the configuration parameter“<parm>”. This value is not one of the allowablevalues shown in the “<value_list>”.

Consult the Application Development Guide(SQLFUPD entry) and the Administration Guidefor the meanings of these values.

User Response: Change the value of theconfiguration parameter to one of the valuesshown in the valid list.

SQL5134N The configuration parametertpname contains invalidcharacters.

Explanation: One or more characters in thetpname is not in the valid range. The charactersin the tpname must be one of the following:

402 Message Reference, Volume 2

Page 411: Db2 SQL Errors

v A - Z

v a - z

v 0 - 9

v $

v #

v @

v . (period)

User Response: Change the tpname and retrythe command or function call.

SQL5135N The settings of the maxlocks andmaxappls configurationparameters do not use all of thelocklist space.

Explanation: The number of active processes(maxappls) times the maximum percentage oflock list space for each application (maxlocks)must be greater than or equal to 100. That is:

maxappls * maxlocks >= 100

This ensures that all of the allocated locklistspace can be used.

User Response: Increase the setting formaxappls, maxlocks, or both.

SQL5136N The entry in the databasemanager configuration file for thedefault database path (dftdbpath)is invalid.

Explanation: An invalid value was specified bydftdbpath. The rules for the default databasepath on UNIX-based systems are:

1. the path must follow the operating system’snaming conventions

2. the path must exist

3. the path must be less than or equal to 215characters

The rules for other platforms (such as OS/2,WindowsNT, Windows 95) are:

1. the path must be a drive letter

2. the drive must exist

User Response: Change the dftdbpath and retry

the command or function call.

SQL5137N The entry in the databasemanager configuration file for thediagnostic directory path(diagpath) is invalid.

Explanation: An invalid value was specified fordiagpath. The rules for the diagnostic directorypath are:

1. the path must follow the operating system’snaming conventions

2. the path must exist

3. the path must be less than or equal to 215characters

User Response: Change the diagpath and retrythe command or function call.

SQL5140N The entry in the databasemanager configuration parameter“authentication” must be one ofSERVER, CLIENT, DCS, DCE,KERBEROS, SERVER_ENCRYPT,DCS_ENCRYPT,DCE_SERVER_ENCRYPT, orKRB_SERVER_ENCRYPT.

Explanation: The allowed values for theconfiguration parameter ″authentication″ are:

v SERVER = 0

v CLIENT = 1

v DCS = 2

v DCE = 3

v SERVER_ENCRYPT = 4

v DCS_ENCRYPT = 5

v DCE_SERVER_ENCRYPT = 5

v KERBEROS = 7

v KRB_SERVER_ENCRYPT = 8

The requested change is not made.

User Response: Resubmit the command with avalid value for ″authentication″.

Chapter 2. SQL Messages 403

Page 412: Db2 SQL Errors

SQL5141N The configuration parameteravg_appls is out of range. Thevalid range is from 1 to the valueof maxappls.

Explanation: The allowable range for avg_applsis from 1 to the value of maxappls.

The requested change is not made.

User Response: One or more of the following:

v Change the value of avg_appls to a value in thevalid range.

v Increase the value of maxappls to a highervalue, then set avg_appls again.

SQL5142N The configuration parameteragentpri is not in the valid range.

Explanation: The valid values for agentpri are-1, or a three digit number of which the firstdigit is a priority class ranging from 2 to 4 andthe last two digits are a priority level within theclass in the range of 00 to 31. The priority class isdefined as follows:

2 REGULAR

3 TIMECRITICAL

4 FOREGROUNDSERVER

For example, the number 304 would correspondto a priority class of 3 (TIMECRITICAL), with apriority level of 4.

User Response: Change the value of theconfiguration parameter to a value within thevalid range.

SQL5150N The value specified for theconfiguration parameter″<parameter>″ is less than theminimum allowable value of″<minimum value>″.

Explanation: The request is not completedbecause the value given for ″<parameter>″ is toolow. ″<parameter>″ may not be less than″<minimum value>″

User Response: Ensure that the value specified

for ″<parameter>″ is within the valid range, thentry the request again.

SQL5151N The value specified for theconfiguration parameter″<parameter>″ is less than theminimum allowable value of″<minimum value>″ and is not -1.

Explanation: The request is not completedbecause the value given for ″<parameter>″ isinvalid. Except for an allowable value of -1,″<parameter>″ may not be less than ″<minimumvalue>″.

User Response: Ensure that the value specifiedfor ″<parameter>″ is within the valid range, thentry the request again.

SQL5152N The value specified for theconfiguration parameter″<parameter>″ is greater than themaximum allowable value of″<maximum value>″.

Explanation: The request is not completedbecause the value given for ″<parameter>″ is toohigh. ″<parameter>″ may not be greater than″<maximum value>″

User Response: Ensure that the value specifiedfor ″<parameter>″ is within the valid range, thentry the request again.

SQL5153N The update cannot be completedbecause the following relationshipwould be violated: ″<condition>″

Explanation: A valid configuration file mustmaintain the following relationship:

″<condition>″.

The update request could not be completedbecause the resulting configuration would violatethat relationship.

User Response: Resubmit the request, ensuringthat the relationship is satisfied.

404 Message Reference, Volume 2

Page 413: Db2 SQL Errors

SQL5154N The requested combination ofconfiguration values for″authentication″ and″<parameter>″ is not allowed.

Explanation: The database managerconfiguration parameter ″authentication″ musthave the value ″CLIENT″ if the value of″<parameter>″ is non-default.

The requested change is not made.

User Response: Resubmit the command with avalid combination of configuration parametervalues.

SQL5155W The update completedsuccessfully. The current value ofSORTHEAP may adversely affectperformance.

Explanation: The value of SORTHEAP iscurrently greater than half the value of thedatabase manager configuration parameterSHEAPTHRES. This may cause performance tobe less than optimal.

User Response: Increase the value of thedatabase manager configuration parameterSHEAPTHRES and/or decrease the value ofSORTHEAP so that SHEAPTHRES is at leasttwice as large as SORTHEAP.

A larger ratio is desirable in most cases. See theAdminstration Guide for recommendations onconfiguration parameter tuning.

SQL5156N The value of the databasemanager configuration parameter″trust_allclnts″ must be one ofNO, YES, or DRDAONLY.

Explanation: The allowed values for theconfiguration parameter ″trust_allclnts″ are:

v NO = 0

v YES = 1

v DRDAONLY = 2

The requested change is not made.

User Response: Resubmit the command with avalid value for ″trust_allclnts″.

SQL5180N DB2 is unable to read thefederation configuration file“<file-name>”.

Explanation: The federated configuration filecould not be found, or it could not be opened forreading.

User Response: Specify the federationconfiguration file in the DB2_DJ_INI registryvariable. Be sure that the file exists and isreadable.

SQL5181N The format of line“<line-number>” in the federationconfiguration file “<file-name>”is invalid.

Explanation: The specified line does not havethe proper format. The format should be:<variable-name> = <value>.

User Response: Put the specified line in theformat described in the preceding paragraph.

SQL5182N A required environment variable,“<variable-name>”, has not beenset.

Explanation: In the federated configuration file,the environment variable “<variable-name>” isunlisted, or it is listed but has no value.

User Response: Consult the “AdministrationGuide” to find out what values can be assignedto the environment variable “<variable-name>”.Then use the db2set command to set this variableto the value that you want it to have.

SQL5185N Pass-through to “<server-type>”data sources is not supported.

Explanation: The Pass-Through facility cannotbe used to access “<server-type>” data sources.

User Response: None required.

sqlcode: -5185

sqlstate: 428EV

Chapter 2. SQL Messages 405

Page 414: Db2 SQL Errors

SQL6000 - SQL6099

SQL6000N DB2 Conversion of QMF Data.

Explanation: This is the normal terminationmessage.

User Response: No action is required.

SQL6001N The prefix for the filename wasnot specified.

Explanation: The user executed a module of theSQLQMF facility directly rather than using theSQLQMF facility command.

The command cannot be processed.

User Response: Use the provided SQLQMFfacility command.

SQL6002N Communications Managerencountered a download error.

Explanation: Communications Managerencountered an error during the download of thehost file.

The command cannot be processed.

User Response: Review the CommunicationsManager message log.

SQL6003N The file exported from QMFcontains rows that are too long.The row length is “<number>”.

Explanation: The computed row size (the sumof the computed column sizes) exceeds themaximum of 7000 bytes.

The command cannot be processed.

User Response: Return to your QMF hostsession and run a query with fewer datacolumns selected. EXPORT the data again andthen try the SQLQMF facility command again.

SQL6004N “<function>” returned theunexpected return code “<code>”.

Explanation: An unexpected error occurredduring processing. The Communications

Manager or DB2 may not be installed orconfigured correctly.

The command cannot be processed.

User Response: Ensure that CommunicationsManager has been installed and the appropriatehost communications session is active. Retry thecommand after checking for other errors. If theproblem persists, contact your CommunicationsManager system administrator.

SQL6005N An error occurred while readingthe downloaded QMF file.

Explanation: One of the following conditionswas encountered:

v The file could not be opened.

v The end of file was encountered prematurely.

v There was an I/O error while reading the file.

The command cannot be processed.

User Response: Review the CommunicationsManager message log. Retry the command. If theerror continues, contact your CommunicationsManager system administrator.

SQL6006N An error occurred while writing toan output file.

Explanation: One of the following conditionswas encountered:

v Not enough space exists on the C: drive towrite the data.

v An output file could not be opened.

v An I/O error occurred while writing the file.

v An I/O error occurred while closing the file.

v The file is in use by another OS/2 process.

Federated system users: there isn’t enough spaceto hold the db2djlink output. Additional space isrequired for the temporary files that db2djlinkcreates and uses.

The command cannot be processed.

User Response: Check for sufficient disk space

406 Message Reference, Volume 2

Page 415: Db2 SQL Errors

on the C: drive. Retry the command.

Federated system users: increase the size of thefile system where the federated server isinstalled. To estimate the amount of free spacedb2djlink needs on an AIX operating system,enter:

ls -e /install_directory/lib/libdb2euni.a

This command returns the number of bytes usedby the listed file. Multiply that number by 3. Theresult is an estimate of how much free space isneeded on the file system. Increase the size ofthe file system as necessary and retry thecommand.

SQL6007N The decimal number in row“<row>”, column “<column>”cannot be converted to ASCII.

Explanation: The indicated decimal field couldnot be converted.

The command cannot be processed.

User Response: Verify that the host columndata type is DECIMAL. Retry the QMF EXPORTand then try the SQLQMF facility commandagain. If the error continues, rerun the QMFquery without the named column.

SQL6008N The file specified in the commandis not in QMF data format.

Explanation: The file specified by the filenameparameter is not in the expected QMF format.

The command cannot be processed.

User Response: Verify that you have typed thename correctly. If correct, return to your QMFhost session and issue the command EXPORTDATA TO filename again. Be sure to export usingthe QMF data format.

SQL6009N The file exported from QMFcontains Column “<name>” witha width “<width>” that is toolong. The maximum columnwidth is 4000 bytes.

Explanation: The downloaded QMF file has acolumn width greater than 4000 bytes.

The command cannot be processed.

User Response: Return to your QMF hostsession, rerun the QMF query without the namedcolumn, and export the data again. Then run theSQLQMF facility command again.

SQL6010N The downloaded QMF file hasmore than 255 data columns.

Explanation: The file being processed has morethan 255 data columns.

The command cannot be processed.

User Response: Return to your QMF hostsession and rerun a query, selecting 255 or fewerdata columns. EXPORT the data again and thenrun the SQLQMF facility command again.

SQL6011N The data type “<number>”(“<type-text>”) of column“<name>” (positioned at column“<number>”) cannot be processed.

Explanation: The QMF file contains a columnwith data type that is not supported.

The SQLQMF facility does NOT support thefollowing data types:

v LONG VARCHAR

v LONG VARGRAPHIC.

Only the SQLQMF facility SQLQMFDB supportsgraphic data types.

The command cannot be processed.

User Response: Return to your QMF hostsession and rerun the query without selecting thenamed column. Then run the SQLQMF facilitycommand again.

Chapter 2. SQL Messages 407

Page 416: Db2 SQL Errors

SQL6012N Too many parameters werespecified for the command.

Explanation: Too many parameters werespecified with the command.

The command cannot be processed.

User Response: Retry the command with thecorrect number of parameters.

SQL6013N Host filename “<host filename>”is either too long or does notbegin with an alphabeticcharacter.

Explanation: The host filename does not beginwith an alphabetic character; or, if the host is aVM System, the host filename, filetype, or filemodeare too long.

The command cannot be processed.

User Response: Retry the command with acorrect host filename syntax.

SQL6014N Invalid command syntax, colon(’:’) should follow a keyword.

Explanation: Keyword parameters withoperands require the keyword to be immediatelyfollowed by a “:” character and then theoperand.

The command cannot be processed.

User Response: Verify the command syntax andretry the command.

SQL6015N The keyword is not recognized.

Explanation: The keyword parameter indicator(“/”) was followed by a value that is not akeyword.

The command cannot be processed.

User Response: Retry the command using adifferent keyword value.

SQL6016N Too many operands for theSystem/370 filename “<name>”.

Explanation: If the host is a VM System, thehost file name contains more than threespace-separate tokens. If the host is an MVSSystem, the host filename contains embeddedblanks.

The command cannot be processed.

User Response: Retry the command using adifferent keyword value.

SQL6017N More information may becontained in the Import messagelog “<name>”.

Explanation: The database IMPORT operationterminated with warning or error messages.

The command has left its work files allocated.

User Response: Use the message preceding thismessage and the IMPORT message log, if itexists, to decide if the IMPORT was successfuland to determine corrective action. If the importwas successful, erase the DEL, CRE, COL, andIML files.

SQL6018N No S/370 filename was specified.

Explanation: The S/370 filename is a requiredparameter.

The command cannot be processed.

User Response: Retry the command with a hostfilename.

SQL6019N Communications short session ID“<ID>” is either too long or isinvalid.

Explanation: The value provided for thecommunications short session ID is either longerthan one byte or is not alphabetic.

The command cannot be processed.

User Response: Retry the command with avalid value.

408 Message Reference, Volume 2

Page 417: Db2 SQL Errors

SQL6020N An import option was specifiedwithout also providing a databasename.

Explanation: No database name was providedand an import option was specified.

The command has terminated.

User Response: Retry the command andinclude a database name.

SQL6021N Data was successfully imported.

Explanation: This is a normal ending messagewhen the SQLQMF facility imports data to adatabase.

User Response: No action is required.

SQL6022N System database directory is notshared by all nodes.

Explanation: All nodes should be accessing onephysical copy of the system database directory.

The command cannot be processed.

User Response: Ensure that all nodes areaccessing the system database directory thatresides in the sqllib directory, then try therequest again.

SQL6023N The user does not have theauthority to run the Get TablePartitioning Information utility ontable ″<name>″.

Explanation: The user attempted to retrievepartitioning information on the specified tablewithout the appropriate authorization (either theSYSADM or DBADM authority or theCONTROL or SELECT privilege on the table).

The utility stops processing.

User Response: Do not attempt to call the GetTable Partitioning Information utility withoutappropriate authorization. Contact your systemadministrator for assistance.

SQL6024N Table or index <name> is notdefined on node <node-number>.

Explanation: The application is connected tonode ″<node-number>″, and the table or index″<name>″ is not defined.

The cause is one of the following:

v The node to which the application isconnected is not a member of the nodegroupin which the table or index was created.

v The node is not in use by that nodegroup.

The utility stops processing.

User Response: Connect the application to anode on which the table or index is defined.Determine the nodegroup in which the table wascreated and obtain the list of nodes in thenodegroup by selecting the appropriate rowsfrom the NODEGROUPDEF catalog view. Thenodes whose IN_USE value is set to Y are theones on which the table or index is defined.

SQL6025N Database backed up on node″<node1>″ cannot be restored tonode ″<node2>″.

Explanation: The backup image used for therestore is a backup of the database on a differentnode.

User Response: Ensure that you have thecorrect backup image for the node, then try therequest again.

SQL6026N Database with catalog node″<node1>″ cannot be restored to adatabase with catalog node″<node2>″.

Explanation: The catalog node can exist on onlyone node and there is a discrepancy between thebackup image and the node being restored to.This can occur in the following cases:

v The backup image specified catalog node″<node1>″ and the restore was attempted onan existing database whose catalog node isnode ″<node2>″.

v The restore was attempted to a new databaseand the catalog node has not been restored

Chapter 2. SQL Messages 409

Page 418: Db2 SQL Errors

first. (Restore the catalog node first to createthe database on all nodes).

User Response: Verify that the correct backupimage is being restored.

If you are restoring to an existing database andwant to change the catalog node to ″<node2>″,the existing database must be dropped first.

If you are restoring to a new database, restorethe catalog node ″<node1>″ first.

SQL6027N The path ″<path>″ for thedatabase directory is not valid.

Explanation: The path ″<path>″ specified foreither the CREATE DATABASE or the CATALOGDATABASE command starts with the character’.’ or contains the character string ’/.’.

The command cannot be processed.

User Response: Ensure that the specified pathis a fully qualified path, does not start with thecharacter ’.’, and does not contain the characterstring ’/.’. Then try the request again.

SQL6028N Catalog database failed becausedatabase ″<dbname>″ was notfound in the local databasedirectory.

Explanation: When cataloguing a local databaseinto the system database directory, thecommand/API has to be issued from a node onthe server where the database resides.

User Response: Reissue the command/APIfrom a node where the database resides.

SQL6030N START or STOP DATABASEMANAGER failed. Reason code″<reason-code>″.

Explanation: The reason code indicates theerror. The statement cannot be processed.

(1) Cannot access the sqllib directory of theinstance.

(2) The full path name added to the profilefilename is too long.

(3) Cannot open the profile file.

(4) The nodenum parameter value is notdefined in the db2nodes.cfg file in thesqllib directory.

(5) The nodenum parameter must bespecified when a command option isspecified.

(6) The port parameter value is not valid.

(7) The new couple hostname/port is notunique.

(8) The FORCE option cannot be specifiedwhen the NODENUM option isspecified.

(9) The hostname and port parameters mustbe specified when using the ADDNODEoption.

(10) Cannot update the db2nodes.cfg file inthe sqllib directory for the ADDNODEor RESTART option.

(11) The hostname parameter value is notvalid.

(12) The pointer to the sqledbstrtopt orsqledbstopopt structure is not valid.

(13) No port value is defined for your DB2instance id (/etc/services file onUNIX-based systems).

(14) The port value is not in the valid portrange defined for your DB2 instance id(/etc/services file on UNIX-basedsystems).

(15) A hostname value has no correspondingport 0 defined in the db2nodes.cfg filein the sqllib directory.

(16) The value specified for the command oroption parameter is not valid.

(17) The DROP option cannot be specifiedwhen the NODENUM option is notspecified.

(18) The value specified for the calleracparameter is not valid.

(19) Unable to create the UNIX socket

410 Message Reference, Volume 2

Page 419: Db2 SQL Errors

directory/tmp/db2_<ver>_<rel>/$DB2INSTANCE.

(20) The node number specified with theADDNODE option already exists in thedb2nodes.cfg file or the node has beenalready been added since the last stopdatabase manager command was issued.

(21) The tablespace type specified with theADDNODE option is not valid.

(22) The tablespace node specified with theADDNODE option is out of range.

(23) The computer name parameter must bespecified for the ADDNODE option.

(24) The user name parameter must bespecified for the ADDNODE option.

(25) The computer name is not valid.

(26) The user name is not valid.

(27) The password is not valid.

(28) The password is expired.

(29) The user account specified is eitherdisabled, expired, or restricted.

User Response: The action corresponding to thereason code is:

(1) Ensure that the $DB2INSTANCE useridhas the required permissions to accessthe sqllib directory of the instance.

(2) Change the profile name to a shortername so that the total length of the fullyqualified path added to the profile namelength is smaller than theSQL_PROFILE_SZ defined in the filesqlenv.h.

(3) Ensure that the profile file exists.

(4) Ensure that the nodenum valuespecified is defined in the db2nodes.cfgfile in the sqllib directory and isbetween 0 and 999.

(5) Resubmit the command with thenodenum parameter specified.

(6) Ensure that the port value is between 0

and 999. If a value is not specified, theport value defaults to 0.

(7) Ensure that the new couplehostname/port is not already defined inthe db2nodes.cfg file in the sqllibdirectory.

(8) Do not specify the FORCE option whenyou specify the NODENUM option.

(9) Ensure that the hostname and the portvalues are specified when you specifythe ADDNODE option.

(10) Ensure that the $DB2INSTANCEusername has write access to the sqllibdirectory of the instance, that there issufficient disk space, and the file exists.

(11) Ensure that the specified hostname isdefined on the system.

(12) Ensure that the pointer is not NULL andpoints to the sqledbstrtopt for thesqlepstr() API, or to the sqledbstopoptstructure for the sqlepstp() API.

(13) Ensure that the services file(/etc/services on UNIX-based systems)contains an entry for your DB2 instanceid.

(14) Ensure that you only use port valuesthat are specified in the services file(/etc/services file on UNIX-basedsystems) for your instance.

(15) Ensure that all the hostname valueshave a port 0 defined in thedb2nodes.cfg file in the sqllib directoryincluding the restart option parameters.

(16) Ensure that the value specified for theoption parameter is within the validrange.

(17) Specify the NODENUM option whenyou specify the DROP option.

(18) Ensure that the value specified for thecallerac parameter is within the validrange.

(19) Check the permission of the /tmpfilesystem to make sure all intermediate

Chapter 2. SQL Messages 411

Page 420: Db2 SQL Errors

directories of/tmp/db2_<ver>_<rel>/$DB2INSTANCEcan be created.

(20) Ensure that the correct node number isbeing specified. You must stop thedatabase manager to update thedb2nodes.cfg file with nodes that havebeen added to the system since theprevious stop database managercommand.

(21) Ensure that the value specified for thetablespace type is within the validrange.

(22) Ensure that the tablespace node valuespecified is defined in the db2nodes.cfgand is between 0 and 999.

(23) Specify the computer name of thesystem on which the new node iscreated using the COMPUTER option.

(24) Specify a valid domain account username and password for the new nodeusing the USER and PASSWORDoptions.

(25) Resubmit the command with a validcomputer name.

(26) Resubmit the command with a validuser name.

(27) Resubmit the command with a validpassword.

(28) Change/update the account passwordand resubmit the command.

(29) Resubmit the command with a validuser account.

SQL6031N Error in the db2nodes.cfg file atline number ″<line>″. Reasoncode ″<reason code>″.

Explanation: The statement cannot be processedbecause of a problem with the db2nodes.cfg file,as indicated by the following reason codes:

(1) Cannot access the sqllib directory of theinstance.

(2) The full path name added to thedb2nodes.cfg filename is too long.

(3) Cannot open the db2nodes.cfg file in thesqllib directory.

(4) A syntax error exists at line ″<line>″ ofthe db2nodes.cfg file in the sqllibdirectory.

(5) The nodenum value at line ″<line>″ ofthe db2nodes.cfg file in the sqllibdirectory is not valid.

(6) The nodenum value at line ″<line>″ ofthe db2nodes.cfg file in the sqllibdirectory is out of sequence.

(7) The nodenum value at line ″<line>″ ofthe db2nodes.cfg file in the sqllibdirectory is not unique.

(8) The port value at line ″<line>″ of thedb2nodes.cfg file in the sqllib directoryis not valid.

(9) The hostname/port couple at line″<line>″ of the db2nodes.cfg file in thesqllib directory is not unique.

(10) The hostname at line ″<line>″ of thedb2nodes.cfg file in the sqllib directoryis not valid.

(11) The port value at line ″<line>″ of thedb2nodes.cfg file in the sqllib directoryis not defined for your DB2 instance idin the services file (/etc/services onUNIX-based systems).

(12) The port value at line ″<line>″ of thedb2nodes.cfg file in the sqllib directoryis not in the valid port range defined foryour DB2 instance id in the services file(/etc/services on UNIX-based systems).

(13) The hostname value at line ″<line>″ ofthe db2nodes.cfg file in the sqllibdirectory has no corresponding port 0.

(14) A db2nodes.cfg file with more than oneentry exists, but the database managerconfiguration is not MPP.

412 Message Reference, Volume 2

Page 421: Db2 SQL Errors

(15) The netname at line “<line>” of thedb2nodes.cfg file in the sqllib directoryis not valid.

User Response: The action corresponding to thereason code is:

(1) Ensure that the $DB2INSTANCE useridhas the required permissions to accessthe sqllib directory of the instance.

(2) Make the instance home directory pathname shorter.

(3) Ensure that the db2nodes.cfg file existsin the sqllib directory and is not empty.

(4) Ensure that at least 2 values are definedper line in the db2nodes.cfg file and thatthe file does not contain blank lines.

(5) Ensure that the nodenum value definedin the db2nodes.cfg file is between 0and 999.

(6) Ensure that all the nodenum valuesdefined in the db2nodes.cfg file are inascending order.

(7) Ensure that each nodenum valuedefined in the db2nodes.cfg file isunique.

(8) Ensure that the port value is between 0and 999.

(9) Ensure that the new couplehostname/port is not already defined inthe db2nodes.cfg file.

(10) Ensure the hostname value defined indb2nodes.cfg at line ″<line>″ is bothdefined on the system and operational.

(11) Ensure that the services file(/etc/services on UNIX-based systems)contains an entry for your DB2 instanceid.

(12) Ensure that you only use port valuesthat are specified in the services file(/etc/services file on UNIX-basedsystems) for your instance.

(13) Ensure that the port value 0 has beendefined for the corresponding hostnamein the db2nodes.cfg file.

(14) Perform one of the following actions:

v Remove the db2nodes.cfg file.

v Alter the db2nodes.cfg file to containexactly one entry.

v Install the DB2 Enterprise - ExtendedEdition server.

(15) Ensure the netname value defined indb2nodes.cfg at line “<line>” is bothdefined on the system and operational.

SQL6032W Start command processing wasattempted on ″<total_number>″node(s). ″<number_started>″node(s) were successfully started.″<number_already_started>″node(s) were already started.″<number_not_started>″ node(s)could not be started.

Explanation: The database manager did notstart successfully on all the nodes. Not all of thedata in the database may be accessible. Data onthe nodes that started successfully or werealready running is accessible.

User Response: Check the log file created in thelog directory of the sqllib directory for theinstance to see which nodes did not start.

SQL6033W Stop command processing wasattempted on ″<total_number>″node(s). ″<number_stopped>″node(s) were successfully stopped.″<number_already_stopped>″node(s) were already stopped.″<number_not_stopped>″ node(s)could not be stopped.

Explanation: The database manager did notstop successfully on all the nodes. The databasemanager is still active on the nodes that couldnot be stopped.

User Response: Check the log file created in thelog directory of the sqllib directory for theinstance to see which nodes did not stop.

Chapter 2. SQL Messages 413

Page 422: Db2 SQL Errors

SQL6034W Node “<node>” is not being usedby any databases.

Explanation: During DROP NODE VERIFYprocessing, all databases are scanned to verifythat this node does not exist in the nodegroupsof any database, and that no event monitor isdefined on this node.

User Response: This node can now be removedfrom the system by issuing the ’db2stop dropnodenum <node>’ command.

SQL6035W Node “<node>” is being used bydatabase “<database>”.

Explanation: During DROP NODE VERIFYprocessing, databases are scanned to verify thatthis node does not exist in the nodegroups ofany database, and that no event monitor isdefined on this node. Node “<node>” is beingused by database “<database>” and cannot bedropped.

User Response: You must do the followingbefore dropping the node:

1. Redistribute the data to remove it from thenode using the REDISTRIBUTENODEGROUP command. Use either theDROP NODE option of the REDISTRIBUTENODEGROUP command or the ALTERNODEGROUP statement to drop the nodefrom the nodegroup. This must be done forall nodegroups in which the node to bedropped is a member.

2. Drop any event monitors that are defined onthe node.

3. Issue the ’db2stop drop nodenum <node>’command to drop the node.

SQL6036N START or STOP DATABASEMANAGER command is alreadyin progress.

Explanation: A START DATABASE MANAGERor a STOP DATABASE MANAGER command isalready in progress on the system.

User Response: Wait for the command inprogress to complete, then try the request again.

SQL6037N START or STOP DATABASEMANAGER timeout value wasreached.

Explanation: The start_stop_time value definedin the database manager configuration wasreached at the node. This value specifies thetime, in minutes, in which a node must respondto a Start Database Manager, Stop DatabaseManager or Add Node command.

User Response: Do the following:

v Check the First Failure Service Log(db2diag.log) to see if an error message hasbeen logged for the node which timed out. Ifan error has not been logged, and timeoutspersist, you may need to increase thestart_stop_time value specified in the databasemanager configuration file.

v If the timeout occurred during a StartDatabase Manager command, you should issuea Stop Database Manager command for allnodes which timed out.

v If the timeout occurred during a Stop DatabaseManager command, you should issue a StopDatabase Manager command for all nodeswhich timed out or for all nodes. Any nodewhich is already stopped will return with amessage stating that the node is stopped.

SQL6038N No partitioning key is defined.

Explanation: The user attempted to use the GetRow Partitioning Information utility withoutspecifying a partitioning key.

The utility stops processing.

User Response: Ensure that you specify apartitioning key, then try the request again.

SQL6039N Partitioning column″<column-number>″ is currentlydefined as not nullable.

Explanation: An attempt was made to assign anull value to partitioning column″<column-number>″, which is not nullable.

The utility stops processing.

414 Message Reference, Volume 2

Page 423: Db2 SQL Errors

User Response: Assign a non-null value orchange the type of the partitioning column to benullable.

SQL6040C No FCM buffers are available.

Explanation: No FCM buffer is available.

The statement cannot be processed.

User Response: Try the request again.

If the error persists, increase the number of FCMbuffers (fcm_num_buffers) specified in thedatabase manager configuration file, then try therequest again.

sqlcode: -6040

sqlstate: 57011

SQL6041C No FCM connection entries areavailable.

Explanation: No FCM connection entry isavailable.

The statement cannot be processed.

User Response: Try the request again.

If the error persists, increase the number of FCMconnection entries (fcm_num_connect) specified inthe database manager configuration file, then trythe request again.

sqlcode: -6041

sqlstate: 57011

SQL6042C No FCM message anchors areavailable.

Explanation: No FCM message anchor isavailable.

The statement cannot be processed.

User Response: Try the request again.

If the error persists, increase the number of FCMmessage anchors (fcm_num_anchors) specified inthe database manager configuration file, then trythe request again.

sqlcode: -6042

sqlstate: 57011

SQL6043C No FCM request blocks areavailable.

Explanation: No FCM request block is available.

The statement cannot be processed.

User Response: Try the request again.

If the error persists, increase the number of FCMrequest blocks (fcm_num_rqb) specified in thedatabase manager configuration file, then try therequest again.

sqlcode: -6043

sqlstate: 57011

SQL6044N The syntax of the stringrepresentation ″<string>″ withvalue of datatype″<datatype-value>″ and length″<length>″ is not correct.

Explanation: The specified string cannot berecognized as the target datatype. (TheApplication Development Guide containsinformation on datatypes.) Either the syntax isnot valid or the value is out of range.

The utility stops processing.

User Response: Ensure that the stringrepresentation or the datatype is correct, then trythe request again.

SQL6045N The datatype ″<datatype-value>″of length ″<datatype-length>″ isnot supported.

Explanation: The datatype and data length arenot supported for a partitioning key.

The utility stops processing.

User Response: See the Administration Guide forinformation about datatypes. See the APIReference for information about the Get RowPartitioning Information API.

Chapter 2. SQL Messages 415

Page 424: Db2 SQL Errors

SQL6046N Specified DROP NODE action isnot valid.

Explanation: The value specified for the actionparameter of the DROP NODE command is notvalid. Only the verify mode is supported for theDROP NODE command. The parameter must beset to the value SQL_DROPNODE_VERIFY.

The command cannot be processed.

User Response: Ensure that the action is set toSQL_DROPNODE_VERIFY, then try the requestagain.

SQL6047N Nodegroup cannot beredistributed because table“<name>” does not have apartitioning key.

Explanation: At least one table in thesingle-node nodegroup does not have apartitioning key. All tables in the single-nodenodegroup must have a partitioning key beforethe nodegroup can be redistributed to amultiple-node nodegroup.

The operation was not performed.

User Response: Use the ALTER TABLEcommand to specify partitioning keys for tablesthat do not have one. Then try the request again.

SQL6048N A communication error occurredduring START or STOPDATABASE MANAGERprocessing.

Explanation: A TCP/IP communication erroroccurred while the START or STOP DATABASEMANAGER command was trying to establishconnection with all the nodes defined in thesqllib/db2nodes.cfg file.

User Response: Do the following:

v Ensure that the node has the properauthorization defined in the .rhosts or thehost.equiv files.

v Ensure that the application is not using morethan (500 + (1995 - 2 *total_number_of_nodes)) file descriptors at thesame time.

v Ensure all the DB2 Enterprise - ExtendedEdition environment variables are defined inthe profile file.

v Ensure the profile file is written in the KornShell script format.

v Ensure that all the host names defined in thedb2nodes.cfg file in the sqllib directory aredefined on the network and are running.

SQL6049N The log control file for database″<name>″ could not be found onnode(s) ″<node-list>″.

Explanation: The SQLOGCTL.LFH file for thedatabase is not in the database directory on thespecified node(s).

The database was not started.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Either restore the database froma backup on the specified node(s), or re-createthe database.

SQL6050N An I/O error occurred whileaccessing the log control file fordatabase ″<name>″ on node(s)″<node-list>″.

Explanation: An error occurred while accessingthe SQLOGCTL.LFH file for the database on thespecified node(s).

The database cannot be used.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Either restore the database froma backup on the specified node(s), or re-createthe database.

SQL6051N Database ″<name>″ is notconfigured for roll-forwardrecovery on node(s) ″<node-list>″.

Explanation: The specified database is notconfigured for roll-forward recovery on thespecified node(s).

The database is not rolled forward on all nodes.

416 Message Reference, Volume 2

Page 425: Db2 SQL Errors

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Ensure that recovery is requiredon the specified node(s), then restore the mostrecent backup version of the database on thesenodes.

SQL6052N Cannot roll forward database″<name>″ because it is not inroll-forward pending state onnode(s) ″<node list>″.

Explanation: The specified database is not inthe roll-forward pending state on the specifiednode(s). This may be because the database hasnot been restored, or was restored with theWITHOUT ROLLING FORWARD option, orroll-forward recovery is complete on these nodes.

The database is not rolled forward.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Do the following:

1. Ensure that recovery is required on thespecified node(s).

2. Restore a backup version of the database onthese nodes.

3. Issue the ROLLFORWARD DATABASEcommand.

SQL6053N Error exists in file ″<file>″.Reason code = ″<reason-code>″.

Explanation: There is an error in the specifiedfile as indicated by the reason code:

(1) The number of values in thepartitioning map file is not 1 or 4,096.

(2) The number of values in the distributionfile is not 4,096.

(3) The data in the distribution file is not ina valid format.

(4) The node number in the partitioningmap is not between 0 and 999.

(5) The sum of all the values in thedistribution file is greater than4,294,967,295.

(6) The specified target partition mapcontains a node number that is notdefined in SYSCAT.NODEGROUPDEFfor the specified nodegroup.

User Response: The action corresponding to thereason code is:

(1) Ensure that the partitioning map filecontains only a single value (if theresultant nodegroup is a single-nodenodegroup) or exactly 4,096 values (ifthe resultant nodegroup is a multinodenodegroup).

(2) Ensure that the distribution file containsexactly 4,096 values, one per hashpartition.

(3) Ensure that the values in thedistribution file are integers greater thanor equal to 0, and that the sum of all thedistribution values is less than or equalto 4,294,967,295.

(4) Ensure that the node numbers are in therange of greater than or equal to 0 andless than or equal to 999.

(5) Ensure that the sum of all thedistribution values for the 4,096partitions is less than or equal to4,294,967,295.

(6) Either issue ALTER NODEGROUP toadd the missing node(s) or change thepartitioning map file to exclude thenode(s) not defined insysibm.sysnodegroupdef.

SQL6054N The archive file ″<name>″ is not avalid log file for the database″<name>″ on node″<node-number>″.

Explanation: An archive log file exists in the logdirectory on the specified node, but it is notvalid.

Chapter 2. SQL Messages 417

Page 426: Db2 SQL Errors

The ROLLFORWARD DATABASE processingstops.

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file to thedatabase log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file and issue theROLLFORWARD DATABASE command again.

SQL6055N The archive file ″<name>″ doesnot belong to database ″<name>″on node ″<node-number>″.

Explanation: An archive log file in the logdirectory on the specified node does not belongto the specified database.

The ROLLFORWARD DATABASE processingstops.

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file to thedatabase log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file and issue theROLLFORWARD DATABASE command again.

SQL6056N Nodegroup cannot beredistributed. Reason code =″<reason-code>″.

Explanation: The operation cannot be executed.The reason code indicates the error.

(1) The nodegroup specification is not legal.The resulting nodegroup afterredistribution would not contain anynodes.

(2) A previous redistribution operation didnot complete successfully.

(3) A redistribution operation is already inprogress.

(4) There is no previously abortedredistribution command to CONTINUEor ROLLBACK.

(5) No data redistribution is performedbecause the data in the nodegroup isalready distributed as specified.

(6) The REDISTRIBUTE NODEGROUPcommand was not submitted from thecatalog node.

(7) The REDISTRIBUTE NODEGROUPcommand is not available nor applicablein this non-partitioned version of theproduct.

(8) Redistribution is not allowed if there areuser temporary table spaces in thenodegroup with existing declaredtemporary tables.

User Response: The action corresponding to thereason code is:

(1) Do not drop all the nodes of thenodegroup during redistribution.

(2) Identify why the previous redistributionfailed and take the required correctiveaction. Submit the REDISTRIBUTENODEGROUP command using eitherthe CONTINUE or ROLLBACK option.CONTINUE will complete thepreviously aborted redistributionoperation and ROLLBACK will undothe effects of the previously abortedoperation.

(3) Issue the next REDISTRIBUTIONNODEGROUP command after thecurrent one completes.

(4) You cannot invoke the CONTINUE orROLLBACK option on a nodegroup thatis not associated with a failedredistribution operation.

(5) Try using a different target partitioningmap or distribution file. Otherwise,redistribution is not necessary.

(6) Issue the command again from thecatalog node.

(7) Do not issue the REDISTRIBUTENODEGROUP command using thisversion of the product.

(8) Request redistribution again when there

418 Message Reference, Volume 2

Page 427: Db2 SQL Errors

are no declared temporary tables usingthe user temporary table spaces in thenodegroup.

SQL6057N Archive file ″<name>″ is notassociated with the database″<name>″ that was restored, orwith the log file previouslyprocessed on node″<node-number>″.

Explanation: An archive log file is found in thelog directory on the specified node, but does notbelong to the specified database.

The ROLLFORWARD DATABASE processingstops.

User Response: To determine the correctarchive log file, issue the ROLLFORWARDDATABASE command with the QUERY STATUSoption. Move the correct archive log file to thedatabase log directory or, if the database is in aconsistent state, change the log path to point tothe correct archive file and issue theROLLFORWARD DATABASE command again.

SQL6058N Roll-forward recovery stoppedbecause of error ″<error>″ whileretrieving log file ″<name>″ fordatabase ″<name>″ on node″<node-number>″.

Explanation: Roll-forward processing invokesthe db2uexit to retrieve the log file for thedatabase on the specified node. The error mayhave occurred in the db2uexit.

The ROLLFORWARD DATABASE processingstops.

User Response: See the user exit documentationin the Administration Guide for a description ofthe error, and either resume or terminate theroll-forward recovery.

SQL6059N The point-in-time passed to theRollforward utility must begreater than or equal to″<timestamp>″, because database″<name>″ on node(s)″<node-list>″ contains informationlater than the specified time.

Explanation: An advanced virtual timestamp isin the database backup.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Do one of the following:

v Issue the command again with a point-in-timethat is greater than or equal to ″<timestamp>″.

v Restore an earlier backup on node(s), thenissue the ROLLFORWARD DATABASEcommand again.

SQL6061N Roll-forward recovery on database″<name>″ cannot reach thespecified stop point (end-of-log orpoint-in-time) because of missinglog file(s) on node(s)″<node-list>″.

Explanation: The Rollforward Database utilitycannot find the necessary log file(s) in thelogpath.

User Response: Do one of the following:

v Use the ROLLFORWARD DATABASEcommand with the QUERY STATUS option todetermine which log files are missing. Whenyou find the log files, put them in the log pathand resume forward recovery.

v If you cannot find the missing log files, restorethe database on all nodes, then dopoint-in-time recovery using a timestamp thatis earlier than that of the earliest missing logfile.

Chapter 2. SQL Messages 419

Page 428: Db2 SQL Errors

SQL6062N Roll-forward recovery on database″<name>″ cannot completebecause the log information onnode(s) ″<node-list>″ does notmatch the corresponding record(s)on the catalog node.

Explanation: The Rollforward utility processedall the log files found on each node, but the stoppoints on the specified nodes do not match thecorresponding records on the catalog node. Thiscan be caused by missing log files on either thecatalog node or on the specified nodes, or thecatalog node must be included in the list ofnodes to be rolled forward.

The ROLLFORWARD DATABASE processingstops.

User Response: Do one of the following:

v Check if the catalog node needs to be rolledforward. If it does, submit theROLLFORWARD command again and includethe catalog node.

v Use the ROLLFORWARD DATABASEcommand with the QUERY STATUS option todetermine which log files are missing. Whenyou find the log files, put them in the log pathand resume forward recovery.

v If you cannot find the missing log files, restorethe database on all nodes, then dopoint-in-time recovery using a timestamp thatis earlier than that of the earliest missing logfile.

SQL6063N Roll-forward recovery on database″<name>″ has stopped on node(s)″<node-list>″ due to a change inlog file size.

Explanation: The Rollforward Database utilityhas stopped rolling forward because the log fileshave changed in size. It must be restarted toestablish the new log file size.

If ″,...″ is displayed at the end of the node list,see the diagnostic log for the complete list ofnodes.

Roll-forward recovery has stopped.

(Note : if you are using a partitioned database

server, the node number(s) indicate whichnode(s) the error occurred on. Otherwise, it isnot pertinent and should be ignored.)

User Response: Reissue the ROLLFORWARDcommand to continue.

SQL6064N SQL error ″<sqlcode>″ occurredduring data redistribution.

Explanation: An error occurred during dataredistribution.

The utility stops processing.

User Response: Look at the SQLCODE(message number) in the message for moreinformation. Make any required changes and trythe request again.

SQL6065N An error occurred while writing tofile ″<file>″.

Explanation: One of the following conditionswas encountered:

v The file could not be opened.

v An I/O error occurred while writing to thefile.

v An I/O error occurred while closing the file.

The command or the utility cannot be processed.

User Response: Ensure that the file exists andthat the file permissions allow write access. Trythe command or the utility again.

SQL6067W ROLLFORWARD DATABASEQUERY STATUS commandencountered sqlcode ″<sqlcode>″.

Explanation: The ROLLFORWARD DATABASEQUERY STATUS command encountered an errorwith the sqlcode ″<sqlcode>″. The query mightnot be successful on some nodes for variousreasons. The most severe error is indicated by″<sqlcode>″. The roll-forward status is onlyreturned for the successful nodes.

User Response: Look up the sqlcode″<sqlcode>″ in the DB2 Messages Reference, oronline to determine the problems on the failednodes. Take the required corrective actions, then

420 Message Reference, Volume 2

Page 429: Db2 SQL Errors

continue the forward recovery on these nodes.

SQL6068W Rollforward operation wascancelled successfully. Thedatabase has to be restored onnode(s) ″<node-list>″.

Explanation: A Rollforward operation wascancelled before it successfully completed, andthe database is left in an inconsistent state. Therestore pending flag is on for the listed nodes.

If ″,...″ is displayed at the end of the node list,see the syslog file for the complete list of nodes.

User Response: Restore the database on thelisted nodes.

SQL6069N The ROLLFORWARD DATABASEcommand cannot be submitted ona non-catalog node.

Explanation: The ROLLFORWARD DATABASEcommand is only accepted on the catalog node.

User Response: Submit the command on thecatalog node.

SQL6071N The requested operation cannotbe processed because a new nodehas been added to the system.The system must be stopped andstarted again before the operationcan be done.

Explanation: One of the following:

v The request was issued from the new node,and this node cannot communicate with othernodes.

v A CREATE or DROP DATABASE operationwas requested before all nodes were stoppedand started again to include the new node.

User Response: Issue db2stop to stop all thenodes. When all nodes are successfully stopped,issue db2start to start all the nodes, including thenew node, then try the request again.

sqlcode: -6071

sqlstate: 57019

SQL6072N DB2START with the RESTARToption cannot proceed because thespecified node is already active.

Explanation: The node specified for restart isalready active on the system.

User Response: If necessary, issue a DB2STOPspecifying the node to stop and issue theDB2START command again to restart the node.

SQL6073N Add Node operation failed.SQLCODE = ″<sqlcode>″.

Explanation: The Add Node operation failedwith sqlcode ″<sqlcode>″.

User Response: Check the message associatedwith the sqlcode that is returned in either theDB2 Messages Reference, or online.

Take any required corrective action, then try therequest again.

SQL6074N Add Node operation failedbecause a Create or DropDatabase operation is currentlyexecuting.

Explanation: An Add Node operation cannotexecute concurrently with a Create or DropDatabase operation.

User Response: Wait for the Create or DropDatabase operation to complete, then try therequest again.

SQL6075W The Start Database Manageroperation successfully added thenode. The node is not active untilall nodes are stopped and startedagain.

Explanation: The db2nodes.cfg file is notupdated to include the new node until all nodesare simultaneously stopped by the STOPDATABASE MANAGER (db2stop) command.Until the file is updated, the existing nodescannot communicate with the new node.

User Response: Issue db2stop to stop all thenodes. When all nodes are successfully stopped,

Chapter 2. SQL Messages 421

Page 430: Db2 SQL Errors

issue db2start to start all the nodes, including thenew node.

SQL6076W Warning! This command willremove all database files on thenode for this instance. Beforecontinuing, ensure that there is nouser data on this node by runningthe DROP NODE VERIFYcommand.

Explanation: This procedure will remove all thedatabase partitions from the specified node.

User Response: Ensure that the DROP NODEVERIFY command was run before dropping thisnode. If using the API, ensure that the calleracparameter is specified correctly.

SQL6077W The db2stop DROP NODENUMprocedure ended successfully, butcould not remove all the files. Seethe file ″<file>″ for details.

Explanation: The db2stop DROP NODENUMprocedure ended successfully, but some user datafiles are still on the node.

User Response: Information in ″<file>″ file willindicate the directory structure from which filescould not be deleted.

SQL6078N The db2stop DROP NODENUMprocedure could not update thedatabase information for database″<dbname>″.

Explanation: The db2stop DROP NODENUMprocedure could not access the catalog node fordatabase ″<dbname>″.

User Response: Try the request again. If theproblem persists, contact your servicerepresentative.

SQL6079W The db2stop DROP NODENUMcommand was cancelledsuccessfully.

Explanation: The db2stop DROP NODENUMcommand was stopped before it beganprocessing.

User Response: None.

SQL6080W The Start Database Manageroperation successfully added inthe node, but no databasepartitions have been created onthe node. The node is not activeuntil all nodes are stopped andstarted again.

Explanation: The db2nodes.cfg file is notupdated to include the new node until all nodesare simultaneously stopped by the STOPDATABASE MANAGER (DB2STOP) command.Until the file is updated, the existing nodescannot communicate with the new node.

User Response: Issue DB2STOP to stop all thenodes. When all nodes are successfully stopped,issue DB2START to start all the nodes, includingthe new node. When all nodes are successfullystarted, the database system can be used.

SQL6081 A communication error caused aDB2STOP FORCE command totime out on this node.

Explanation: A communication error occurredon one or more of the database nodes, causingthe DB2STOP FORCE command to time out onthe current node, or, DB2STOP FORCEterminated because a severe error occurredduring FORCE on one or more nodes. Any nodewhere the communication error occurred willreceive the SQL6048N message.

User Response: Do the following:

1. Correct the communication error on the node(or nodes) that received the SQL6048Nmessage.

2. Issue a DB2START command and ensure thatall nodes that received the SQL6048Nmessage started successfully.

422 Message Reference, Volume 2

Page 431: Db2 SQL Errors

3. Issue the DB2STOP FORCE command againfrom any node.

4. Look at the db2diag.log file to find the error,correct it if possible, and reissue theDB2STOP FORCE command from any node.

SQL6100 - SQL6199

SQL6100N The partitioning map in the datafile and the partitioning map forthe database are not the same.

Explanation: The data to be loaded has eithernot been partitioned, or was partitioned with apartitioning map other than the current one forthe nodegroup to which the table belongs. Thedata cannot be loaded.

User Response: If the data was not partitioned,use the db2split program to partition the data,then load the partitioned data.

If the data was partitioned, do one of thefollowing:

v Use the partitioning map from the header ofthe data file to redistribute the nodegroup towhich the table belongs. Then try the requestagain.

v Repartition the data with the currentpartitioning map for the nodegroup. Then trythe request again to load the newly partitioneddata.

SQL6101N This data file contains data fornode “<node-1>” but the Loadutility is connected to node“<node-2>”.

Explanation: The data to be loaded is associatedwith a node number that differs from the nodenumber of the node to which the application isconnected. The data cannot be loaded.

User Response: Either find the data fileassociated with this node and try the requestagain with that data file, or connect to the nodeassociated with this data file and issue therequest at that node.

SQL6102W The parameter “<name>” isreserved for future use. Its valueshould be set to“<default-value>”.

Explanation: A parameter reserved for futurecapabilities has been set to a value that is not itsdefault value. It should be set to the defaultvalue to ensure future compatibility.

User Response: Ensure that the parameter“<name>” is set to the value, “<default-value>”,then try the request again.

SQL6103C An unexpected utility erroroccurred. Reason code =“<reason-code>”.

Explanation: An unexpected utility erroroccurred.

User Response: Record the message number(SQLCODE) and reason code in the message.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. See the Administration Guide forinformation on how to use this facility. Thencontact your technical service representative withthe following information:

v Problem description

v SQLCODE and embedded reason code

v SQLCA contents if possible

v Trace file if possible

SQL6104N The load utility does not supportthe creation of indexes.

Explanation: The load utility does not supportthe creation of indexes, but the table to be loadedhas at least one index defined on it. The indexmay have been explictly created with the

Chapter 2. SQL Messages 423

Page 432: Db2 SQL Errors

CREATE INDEX statement or implicitly createdwhen a primary key was defined for the table.

User Response: Drop all indexes defined on thetable with the DROP INDEX statement. Drop theprimary key with the ALTER TABLE statement.Resubmit the command.

Use CREATE INDEX and ALTER TABLE asrequired to recreate indexes and primary keyafter the load completes successfully.

SQL6105W The Load utility has completedprocessing. A Rollforward done toa point in time after the load willnot succeed. Take a databasebackup now if databaserecoverability is required.

Explanation: No logging is done by the Loadutility. If you try to roll forward with a backupmade before the load, the operation will failwhen it encounters references to the data thatwas loaded.

User Response: To ensure databaserecoverability after the load, do a backup beforethe data is modified.

SQL6106N The filetype modifier″NOHEADER″ was specified, butthe nodegroup on which the tableis defined is not a single-nodenodegroup.

Explanation: The data to be loaded wasspecified as having no header information.However the target table specified is not asingle-node table. The data cannot be loaded.

User Response: The data must be split usingdb2split, then loaded without the ″NOHEADER″option.

SQL6107N The partitioning key informationin the data file is not correct.

Explanation: Either the data was not split withdb2split or the db2split operation was notsuccessful.

User Response: Use the db2split program to

partition the data and then try the request againwith the partitioned data. If the insert-columnoption is being used, ensure that all of thepartitioning columns are specified in the columnlist.

If the problem persists, contact your technicalservice representative with the followinginformation:

v Problem description

v SQLCODE and embedded reason code

v SQLCA contents if possible

v Trace file if possible

SQL6108N The number of partitioning keysdefined in the data file header(“<number-1>”) does not matchthe number of partitioning keysdefined for the table(“<number-2>”).

Explanation: The partitioning columns specifiedin the db2split configuration file were notcorrect. The data was not correctly split.

User Response: Do the following:

1. Ensure that the correct partitioning columnsare specified in the db2split configuration file.

2. Split the data.

3. Issue the Load operation with the newlypartitioned data.

SQL6109N Utility expected partitioningcolumn “<column-name-1>”, butfound partitioning column“<column-name-2>”.

Explanation: In the db2split configuration file:

v One of the partitioning columns defined forthe table was not specified.

v The order of the partitioning columns wasincorrect

v A column was specified that is not apartitioning column for the table.

User Response: Do the following:

1. Ensure that the db2split configuration file iscorrect.

424 Message Reference, Volume 2

Page 433: Db2 SQL Errors

2. Split the data.

3. Issue the Load operation with the newlypartitioned data.

SQL6110N Utility expected partitioningcolumn type “<column-type-1>”for column “<column-name-1>”,but the data file lists it as type“<column-type-2>”.

Explanation: The db2split configuration file isnot correct.

User Response: Do the following:

1. Ensure that the db2split configuration file iscorrect.

2. Split the data.

3. Issue the Load operation with the newlypartitioned data.

SQL6111N Cannot create a subdirectoryunder the path specified bynewlogpath.

Explanation: When the newlogpath parameteris updated, the system attempts to create asubdirectory under the specified path using thenode name as the name of the subdirectory. Oneof the following operating system errorsprevented the creation of the subdirectory:

v The file system or path does not have theappropriate permissions for file creation.

v The file system does not have enough diskspace.

v The file system does not have enough fileblocks or inodes.

The requested change is not made.

User Response: Do one of the following, thentry the request again:

v Ensure that the specified path exists and thatthe filesystem and path have read/writepermissions.

v Specify a different newlogpath.

If the problem persists, see your systemadministrator.

SQL6112N The requested change cannot bedone. The resulting configurationparameter settings are not valid.Reason code ″<reason-code>″.

Explanation: Three rules govern the settings ofsome configuration parameters. The rule thatwould be violated is indicated by the″<reason-code>″:

(1) max_coordagents + num_initagents <=maxagents

(2) num_initagents <= num_poolagents

(3) maxdari <= max_coordagents

User Response: Ensure that the values youspecify do not violate any of the above rules,then try the request again.

SQL6500 - SQL6599

SQL6500W RESTARTCOUNT in the loadcommand may cause someproblems.

Explanation: Since multiple loading processesfor the same table are completely independent, itis almost impossible to have an identicalrestartcount for those multiple loading processes.

User Response: Please make sure you have thecorrect load command in the configuration file.

SQL6501N Database name was not given inthe configuration file.

Explanation: Database name has to be specifiedin the configuration file.

User Response: Please specify the databasename and rerun the command.

Chapter 2. SQL Messages 425

Page 434: Db2 SQL Errors

SQL6502N The path name (parameter:data_path) for data file was notspecified.

Explanation: If the input data file is remote, thefile will be transferred locally. The path to the fileon the remote machine must be supplied.

User Response: Please specify the path name tothe remote data file and rerun the command.

SQL6504N There are errors in the outputnode list specification (parameter:outputnodes) in the configurationfile.

Explanation: The output node list specificationis not valid.

User Response: Check the sample configurationfile, correct your output node list specification,and rerun the command.

SQL6505N There are errors in the split nodelist specification (parameter:splitnodes) in the configurationfile.

Explanation: The split node list specification isnot valid.

User Response: Check the sample configurationfile, correct your split node list specification, andrerun the command.

SQL6506N The program failed to extractpartitioning key information fortable ″<table-name>″ from thesystem catalog table.

Explanation: Either the table is not defined, orit is not defined in an MPP environment.

User Response: Make sure you have the tableproperly defined.

SQL6507N Checking level (parameter:check_level) in the configurationfile is not valid.

Explanation: Checking level (parameter:check_level) can be either CHECK or

NOCHECK. The default is CHECK.

User Response: Correct the parameter in theconfiguration file, and rerun the command.

SQL6508N The program failed to create theoutput pipe for the ftp process.

Explanation: If input data files are remote, theywill be transferred to a local pipe. If this localpipe already exists, the process will fail.

User Response: Please ensure your workingspace is clean.

SQL6509N The program failed to create inputpipes for the splitter processes.

Explanation: The program can not createtemporary input pipes for the splitter processes.

User Response: Please ensure your workingspace is clean.

SQL6510N The program failed to create thetemporary directory at localnon-NFS space of node″<node-num>″.

Explanation: The program needs a temporaryworking directory at local non-NFS space of allsplitting and output nodes.

User Response: Please ensure your workingspace is clean.

SQL6511N The program failed to createoutput for the splitter process atnode ″<node-num>″.

Explanation: The program can not createtemporary output pipes for the splitter at node″<node-num>″.

User Response: Please ensure your workingspace is clean.

426 Message Reference, Volume 2

Page 435: Db2 SQL Errors

SQL6512N The program failed to create inputpipes for the merging process atnode ″<node-num>″.

Explanation: The program can not createtemporary input pipes for the merging process atnode ″<node-num>″.

User Response: Please ensure your workingspace is clean.

SQL6513N The program failed to create theinput pipe for the loading processat node ″<node-num>″.

Explanation: The program can not createtemporary input pipe for the loading process atnode ″<node-num>″.

User Response: Please ensure your workingspace is clean.

SQL6514N The program can not read thenode configuration file:″<node-cfg-file>″.

Explanation: Either the file does not exist, or itis not readable.

User Response: Please check the existence andpermissions of the node configuration file.

SQL6515N The program failed to find a loadcommand in the configurationfile.

Explanation: A CLP load command must besupplied in the configuration file.

User Response: Please specify a CLP loadcommand in the configuration file.

SQL6516N The program failed to connect todatabase ″<db-name>″.

Explanation: Either the database manager hasnot been started yet, or it encountered problems.

User Response: Check your database managerstatus.

SQL6517N The program failed to extract thenode list, where the table″<tbl-name>″ is defined, from thesystem catalog table.

Explanation: Either the table is not defined, orit is not defined in an MPP environment.

User Response: Check how the table wasdefined in the database.

SQL6518N The record length (reclen in theload command) is not valid.

Explanation: Valid record is between 1 to 32768.

User Response: Please correct the record length,and rerun the command.

SQL6519N The mode (parameter: mode)″<mode>″ in the configuration fileis not valid.

Explanation: The running mode of this programcan be: SPLIT_ONLY, LOAD_ONLY,SPLIT_AND_LOAD (default), or ANALYZE.

User Response: Please correct the mode in theconfiguration file.

SQL6520N The program failed to createoutput pipes for the process,which generates the headerinformation for split file.

Explanation: The program can not create outputpipes for the process, which generates the headerinformation for split file.

User Response: Please ensure your workingspace is clean.

SQL6521N The configuration file ″<cfg-file>″for this program doesn’t exist.

Explanation: The program needs aconfiguration file.

User Response: Please create a configurationfile.

Chapter 2. SQL Messages 427

Page 436: Db2 SQL Errors

SQL6522N The program found a path namefor the input data files in the loadcommand.

Explanation: Path name for input data files inthe load command is not allowed. There is aseparate parameter (data_path) for this purpose.

User Response: Please correct the configurationfile.

SQL6523N The element ″<node-num>″ in thesplit node list (parameter:SplitNodes) is not defined in thenode configuration (db2nodes.cfg)file.

Explanation: All nodes in the split node listmust have an entry in the node configurationfile.

User Response: Please correct your split nodelist.

SQL6524N The element ″<node-num>″ in theoutput node list (parameter:Outputnodes) is not a member ofthe node list where the table isdefined.

Explanation: All nodes in the output node listmust be members of the node list where thetable is defined.

User Response: Please correct your output nodelist.

SQL6525N The program can not read theinput data file ″<file-name>″.

Explanation: Either the input data file was notfound, or it is not readable.

User Response: Please check the existence andpermissions of the input data file.

SQL6526N The program can not write incurrent working directory″<cwd>″.

Explanation: The current working directory isnot writable.

User Response: Please check the permission ofcurrent working directory.

SQL6527N The node where statistic data willbe collected, (parameter:run_stat_node), is not a memberof the output node list.

Explanation: The node where statistic data willbe collected must be a member of the outputnode list.

User Response: Please correct therun_stat_node parameter.

SQL6528N Record length was not specifiedin the load command.

Explanation: If the BINARYNUMERICS orPACKEDDECIMAL modifier is specified in theload command, record length (reclen) must bespecified in the load command as well.

User Response: Please correct the loadcommand.

SQL6529N The No Header option(NOHEADER) was not specifiedin the load command.

Explanation: If a table is defined in a singlenode nodegroup, the NOHEADER modifier mustbe specified in the load command.

User Response: Please correct the loadcommand.

SQL6530N The data type of one partitioningkey is float or double.

Explanation: If the input file is a non-binarydata file, float or double columns can not bedefined as partitioning key.

User Response: Supply a binary data file, orchange the definition of your table.

SQL6531N The program failed to resettablespace quiesce.

Explanation: There are probably on-goingloading processes. Make sure all previous

428 Message Reference, Volume 2

Page 437: Db2 SQL Errors

loading processes are completed before anotherAutoLoader session can be started.

User Response: Check the processes status onyour machine.

SQL6532N A savecount in the load commandcan not be set to non-zero.

Explanation: The savecount in the loadcommand can not be set to non-zero if there aremultiple splitting nodes, the mode isSPLIT_AND_LOAD, and the command is eithera REPLACE INTO or INSERT INTO loadcommand.

User Response: Please correct the loadcommand.

SQL6533N A restartcount in the loadcommand can not be set tonon-zero.

Explanation: Because multiple splitting nodesproduce random order of records for loadingprocess(es), using RESTART INTO with arestartcount can not guarantee a successfulrecovery.

User Response: Please correct the loadcommand.

SQL6534N There is an error in the .netrc file″<netrc-file>″.

Explanation: Either the .netrc file could not befound, or there is no entry for remote host″<machine>″, or the permissions of the file arenot correct.

User Response: Please check the existence andpermission of the .netrc file.

SQL6535N The mode SPLIT_ONLY orANALYZE is not valid.

Explanation: If a table is defined in a singlenode nodegroup, either splitting or analyzing isnot necessary.

User Response: Please change the mode toLOAD_ONLY or SPLIT_AND_LOAD.

SQL6536N The program ″<progname>″ failedto open file ″<filename>″ forreading.

Explanation: An AutoLoader process can notsuccessfully open a file or pipe for reading.

User Response: Please ensure everything iscorrect in the configuration file.

SQL6537N The program ″<progname>″ failedto open file ″<filename>″ forwriting.

Explanation: An AutoLoader process can notsuccessfully open a file or pipe for writing.

User Response: Please ensure everything iscorrect in the configuration file.

SQL6538N The program failed to read thesplit file ″<split-file>″.

Explanation: When the program is invoked inLOAD_ONLY mode, the input data file musthave already been split, and all split files mustbe readable by the program.

User Response: Check whether or not the inputdata file has been split, and the accesspermissions of the resulting split files.

SQL6539N There is at least one command in″<cmd-list>″ not found in theworking environment.

Explanation: The execution of this programdepends on a number of common Unixcommands. The process fails if any one of themis not available in the working environment.

User Response: Make sure you have allnecessary commands properly installed on yoursystem.

SQL6540N File type ″<file-type>″ specified inthe load command is not valid.

Explanation: Valid file types are ASC (positionalASCII) or DEL (delimited ASCII).

Chapter 2. SQL Messages 429

Page 438: Db2 SQL Errors

User Response: Correct the load command inthe configuration file.

SQL6550N The partitioning map file″<map-file-name>″ could not beopened for writing.

Explanation: The file name and path for thepartitioning map could not be opened. An erroroccurred.

User Response: Confirm that the partitioningmap file name and file path were specifiedcorrectly and that the file can be openned forwriting.

SQL6551N An error occurred whileattempting to write to thepartition map file.

Explanation: A filesystem error occurred whenwriting to the partitioning map file.

User Response: Check that the file path iscorrect, and that the target device has sufficientspace to hold the partitioning map output.

SQL6552N An error occurred whileattempting to open a temporaryconfiguration file ″<filename>″for writing.

Explanation: The file name and path for atemporary file could not be opened. An erroroccurred.

User Response: Confirm that the utilitytemporary file storage path was specifiedcorrectly and that the path allows for files to beopenned for writing.

SQL6553N An error occurred whileattempting to write to a temporaryconfiguration file ″<filename>″.

Explanation: A filesystem error occurred whenwriting to a temporary file.

User Response: Check that the file path iscorrect, and that the target device has sufficientspace for the file data.

SQL6554N An error occurred whenattempting to remotely execute aprocess.

Explanation: The utility attempted to start achild process on a different database partition,but an error occurred.

User Response:

v If no user ID or password was provided to theutility for remote access, ensure that the userID invoking the utility is authorized to executeprograms on the target node(s).

v If a user ID and password were supplied tothe utility confirm that they were suppliedcorrectly.

v If running on NT make sure the DB2installation has correctly defined an NTService for the splitter operation on all nodes.

v If you are unable to resolve this problem,please contact DB2 service.

SQL6555N The AutoLoader utilityencountered an unexpectedcommunications error.

Explanation: The utility encountered an errorattempting one of the following operations:

v Attempting to connect to a TCP/IP socket.

v Attempting to read or write a TCP/IP msg.

v Attempting to initialize TCP/IPcommunications

v Attempting to retrieve a complete host name.

v Attempting to select an active TCP/IP socket.

v Attempting to close an active socket.

v Attempting to retrieve a port number.

User Response:

v If service name setup was required for theversion of the AutoLoader you are using,ensure that the service names have beendefined correctly.

v If you are running concurrent AutoLoaderjobs, ensure that you have followed thedocumented setup requirements to avoidservice name conflicts between the concurrentutility jobs.

430 Message Reference, Volume 2

Page 439: Db2 SQL Errors

v If the problem persists, contact your DB2Service representative.

SQL6556W An incomplete record wasdetected at the end of file″<filename>″.

Explanation: An incomplete data record wasfound at the end of a data file provided to theutility by the user.

User Response: Examine the source data forsyntactical correctness.

SQL6557N Failed to retrieve the default nodenumber.

Explanation: The utility attempted to determinea default node number, but was unable to.

User Response: State source and target nodenumbers explicitly in the utility configurationfile, or contact DB2 Service for assistance.

SQL6558N The utility failed to determine thecurrent working directory and/ordrive.

Explanation: The utility attempted to determinethe current working directory and/or drive butencountered an error.

User Response: Contact DB2 Service forassistance.

SQL6559N An invalid command line optionwas provided to the AutoLoaderutility.

Explanation: The user specified a command lineoption for the AutoLoader utility which is eithernot supported, or obsolete.

User Response: Refer to the AutoLoaderdocumentation, or online help, for the supportedoptions and features.

SQL6560N Node ″<node-number>″ which isan execution node for splittingdoes not appear in thedb2nodes.cfg file.

Explanation: A node specified as an executionnode for splitting does not appear to be amember in the db2nodes.cfg file. The workinteded to complete on this node can not bestarted.

User Response: Add the node to the node listdefinition in the db2nodes.cfg file, or specify analternate node for the split operation which is amember of the node configuration.

SQL6561N Target node ″<node-number>″ forload does not appear in thenodegroup.

Explanation: A node was specified as a targetnode for loading, but this node is apparently nota member of the node group being loaded.

User Response: Check the nodegroup definitionand confirm that the target node specified forloading is part of this nodegroup. If the node isnot part of the nodegroup correct the utilitytarget node specification to include the correctlist of nodes. If the node is part of thenodegroup, please contact DB2 Service forassistance.

SQL6562N The utility is unable to retrievethe instance name.

Explanation: The utility attempted to retrievethe instance name but encountered an error.

User Response: Confirm that the utility isrunning on a node with DB2 installed, and avalid instance is running. For additional help,please contact DB2 Service.

SQL6563N Failed to retrieve the current userID.

Explanation: The utility attempted to retrievethe current user ID for the ID, but an error wasencountered.

User Response: Contact DB2 Service.

Chapter 2. SQL Messages 431

Page 440: Db2 SQL Errors

SQL6564N The password supplied is notvalid.

Explanation: The user supplied an explicitpassword to the utility, but the password is notvalid.

User Response: Supply a valid password.

SQL6565I Usage: db2atld [-configconfig-file] [-restart] [-terminate][-help]

Explanation:

v The ’-config’ option will run this programusing a user specified configuration file; thedefault is autoload.cfg.

v The ’-restart’ option will run this program inrestart mode; the configuration file should notbe modified since the last incompleteAutoLoader job.

v The ’-terminate’ option will run this programin terminate mode; the configuration fileshould not be modified since the lastincomplete AutoLoader job.

v The ’-help’ option will generate this helpmessage.

The AutoLoader configuration file is a usersupplied file which contains the LOADcommand to be executed, the target database,and several optional parameters that the usermay specify. The sample configuration file,’AutoLoader.cfg’, supplied in the samplesdirectory contains inline comments whichdescribe the available options and their defaults.When running this program with ’-restart’ and’-terminate’ option, user should not modify theconfiguration file from their last incomplete job.

User Response: Refer to the DB2documentation for further details about theAutoLoader utility.

SQL6566N The LOAD command is missingfrom the AutoLoaderconfiguration file.

Explanation: The LOAD command is missingfrom the AutoLoader configuration file. The

parameter must be specified.

User Response: Ensure that you have specifiedthe correct configuration file for the AutoLoader,and that the LOAD command is specified inside.

SQL6567N The ″<option-name>″ optionappears multiple times in theAutoLoader configuration file.

Explanation: An option parameter was specifiedmultiple times inside the AutoLoaderconfiguration file.

User Response: Correct the configuration file sothat each option appears at most only once.

SQL6568I The AutoLoader is now issuingall LOAD requests.

Explanation: The AutoLoader is starting theLOAD operation on each of the target LOADpartitions.

User Response: This is an informationalmessage.

SQL6569I The AutoLoader is now issuingall split requests.

Explanation: The AutoLoader is now issuingthe split operation on each of the target splitpartitions.

User Response: This is an informationalmessage.

SQL6570I The AutoLoader is waiting for allsplitters to complete.

Explanation: The AutoLoader is waiting for allsplitters to complete.

User Response: This is an informationalmessage.

SQL6571I The AutoLoader is waiting for allLOAD operations to complete.

Explanation: The AutoLoader is waiting forLOAD operations to complete.

432 Message Reference, Volume 2

Page 441: Db2 SQL Errors

User Response: This is an informationalmessage.

SQL6572I The LOAD operation has begunon partition ″<node-number>″.

Explanation: The LOAD operation has begunon the specified partition.

User Response: This is an informationalmessage.

SQL6573I The remote execution of thesplitter utility on partition″<node-number>″ finished withremote execution code ″<code>″.

Explanation: The remote execution of thesplitter utility on the specified partition hascompleted.

User Response: This is an informationalmessage.

SQL6574I The utility has read ″<MB-count>″megabytes from the source data.

Explanation: This information is generatedperiodically to provide status to the user on theprogress of large AutoLoader jobs.

User Response: This is an informationalmessage.

SQL6575I The utility has completed reading″<MB-count>″ megabytes fromthe user data.

Explanation: This message is written at thecompletion of the AutoLoader run to indicate thetotal volume of user data that has beenprocessed.

User Response: This is an informationalmessage.

SQL6576N The AutoLoader utilityencountered a threading error.Reason code ″<reason-code>″,return code ″<ret-code>″.

Explanation: The following is an explanation ofthe reason code ″<reason-code>″:

v 1 - The AutoLoader utility tried to create athread but failed with return code″<ret-code>″.

v 2 - The AutoLoader utility tried to wait for athread to finish, but failed with return code″<ret-code>″.

User Response: Ensure that you are running onan operating system which supports threadedapplications, and that your thread limit perprocess is sufficient. The thread requirements areas follows:

v One thread for every load process which mustbe started,

v One thread for every splitter process,

v One thread for data feeding to the splitterprocesses.

SQL6577N The AutoLoader utility does notsupport the ROWCOUNT optionin the load command.

Explanation: The ROWCOUNT option in theload command is not supported in theAutoLoader utility.

User Response: Correct your load command inthe AutoLoader configuration file, and resubmityour command.

SQL6578N Invalid AutoLoader option.RESTART/TERMINATE optioncan only be specified withSPLIT_AND_LOAD orLOAD_ONLY mode.

Explanation: RESTART/TERMINATE option inAutoLoader can only work withSPLIT_AND_LOAD or LOAD_ONLY mode.

User Response: Please check the AutoLoaderconfiguration file or the autloader option flags.

Chapter 2. SQL Messages 433

Page 442: Db2 SQL Errors

SQL6579N Invalid LOAD command in theAutoLoader configuration file.RESTART and TERMINATEoptions of the AutoLoader areused to perform LOAD RESTARTand LOAD TERMINATEoperation respectively.

Explanation: Users should not specify RESTARTnor TERMINATE in the LOAD command.Instead, the RESTART and TERMINATE optionsof the AutoLoader should be used.

User Response: Without modifing theAutoLoader configuration file, users shouldlaunch db2atld with option RESTART orTERMINATE.

SQL6580I LOAD is restarting on node″<node-num>″ in phase″<restarting-phase>″.

Explanation: AutoLoader has acknowledgedthat LOAD is restarting in either

LOAD/BUILD/DELETE phase.

User Response: This is an informationalmessage.

SQL6581I Load cannot restart on node″<node-num>″.

Explanation: AutoLoader has acknowledgedthat LOAD cannot be restarted on a given node.

User Response: This is an informationalmessage.

SQL6582I Restarting LOAD on node″<node-num>″ is not required.

Explanation: AutoLoader has acknowledgedthat LOAD does not need to be restarted on agiven node.

User Response: This is an informationalmessage.

SQL7000 - SQL7099

SQL7001N Unknown command“<command>” was requested.

Explanation: The command submitted to REXXcould not be recognized.

The command cannot be processed.

User Response: Verify that the command is avalid SQL statement and rerun the procedure.Note that all commands must be in uppercase.

SQL7002N The cursor name is invalid.

Explanation: The user specified an incorrectcursor name.

The command cannot be processed.

User Response: Verify that the cursor name isone of the form “c1” through “c100”.

SQL7003N The statement name is invalid.

Explanation: The user has specified an incorrectstatement name.

The command cannot be processed.

User Response: Verify that the statement nameis of the form “s1” through “s100”.

SQL7004N The syntax of the request isinvalid.

Explanation: REXX was unable to parse thecommand string submitted.

The command cannot be processed.

User Response: Use proper command syntax.

SQL7005W The cursor used by this OPENstatement has not been declared.

Explanation: An OPEN statement wasattempted without a declaring a cursor.

434 Message Reference, Volume 2

Page 443: Db2 SQL Errors

The command cannot be processed.

User Response: Insert a DECLARE statementbefore the OPEN statement and rerun theprocedure.

SQL7006N Invalid keyword “<keyword>”given on “<request>”.

Explanation: The statement contains a not validkeyword “<keyword>”.

The command cannot be processed.

User Response: Specify the correct keywordformat.

SQL7007N REXX variable “<variable>” doesnot exist.

Explanation: A REXX variable that did not existin the REXX variable pool was passed.

The command cannot be processed.

User Response: Verify that all variable names inthe host-variable list are assigned before thecommand that failed. Then run the procedureagain.

SQL7008N REXX variable “<variable>”contains inconsistent data.

Explanation: A variable that containedinconsistent data was passed to REXX.

The command cannot be processed.

User Response: If the variable is an SQLDA,verify that the data and length fields have beenassigned correctly. If it is a REXX variable, verifythat the type of data is appropriate to thecommand where it is being used.

SQL7009N Truncated REXX variable“<variable>”.

Explanation: The variable “<variable>” passedto REXX contained inconsistent data. The datastring from “<variable>” was truncated.

The command cannot be processed.

User Response: Verify that the data length is

consistent with the length given in the inputSQLDA, and run the procedure again.

SQL7010N Invalid scan ID “<ID>”.

Explanation: The scan ID “<variable>” passedto REXX did not exist or contained inconsistentor missing data.

The command cannot be processed.

User Response: Verify that the data containedin the scan ID has been assigned correctly, andrun the procedure again.

SQL7011N Required parameter“<parameter>” not given.

Explanation: The parameter “<parameter>” isrequired by REXX command syntax but was notspecified.

The command cannot be processed.

User Response: Specify the required parametervalue, and run the procedure again.

SQL7012N Attempted ISL change whileconnected to a database.

Explanation: Isolation level (ISL) may not bechanged while connected to a database.

The command is ignored.

User Response: If a change in isolation level isnecessary, disconnect from the current database,then set the isolation level and connect to thedatabase.

SQL7013N Mismatched cursor and statementname or hold attribute.

Explanation: In REXX, the cursor and statementname form must be ’cnn’ and ’snn,’ where ’nn’ isa number from 1 to 100. The numbers must bethe same for a cursor and statement pair. Also, c1through c50 are declared without hold and c51through c100 with hold.

The command is ignored.

User Response: Verify that the cursor and

Chapter 2. SQL Messages 435

Page 444: Db2 SQL Errors

statement numbers match and rerun theprocedure.

SQL7014N Incorrect number of host variablecomponents.

Explanation: In REXX, the first component of acompound host variable lists a number which isnot equal to the actual number of componentsdefined.

The command is ignored.

User Response: Verify that the number in thefirst component matches the number ofcomponents actually defined and rerun theprocedure.

SQL7015N The variable name “<variable>” isnot valid in REXX.

Explanation: The variable name specified is notvalid in REXX. The name must conform to thelanguage requirements.

The command cannot be processed.

User Response: Change the name to one thatconforms to the REXX requirements andresubmit the command.

SQL7016N Invalid syntax provided to theSQLDB2 interface. Related Error:“<db2_error>”. The commandcannot be processed.

Explanation: Invalid syntax was provided to theSQLDB2 interface, e.g. both an input file and acommand were specified.

User Response: Look up the related error codefor more information.

SQL7032N SQL procedure“<procedure-name>” not created.Diagnostic file is “<file-name>”.

Explanation: SQL Procedure“<procedure-name>” was not created. One of thefollowing has occurred:

v Support for SQL stored procedures is notinstalled and configured on this server. You

need to have the DB2 ApplicationDevelopment Client and a C compiler installedon the server to create SQL procedures. Youmay need to set the DB2 registry variableDB2_SQLROUTINE_COMPILER_PATH topoint to a script or batch file that containsenvironment settings for the C compiler onyour platform.

v DB2 failed to precompile or compile the SQLstored procedure. DB2 creates an SQLprocedure as a C program that containsembedded SQL. Errors not found during theinital parsing of the CREATE PROCEDUREstatement can be found during the precompileor compile stage.

For UNIX platforms, the full path of the file thatcontains diagnostic information is:

$DB2PATH/function/routine/sqlproc/ \$DATABASE/$SCHEMA/tmp/“<file-name>”

where $DATABASE represents the name of thedatabase, and $SCHEMA represents the schemaname of the SQL procedure.

For OS/2 and Windows 32-bit operating systems,the full path of the file that contains diagnosticinformation is:

%DB2PATH%\function\routine\sqlproc\ \%DATABASE%\%SCHEMA%\tmp\“<file-name>”

where %DATABASE% represents the name of thedatabase, and %SCHEMA% represents theschema name of the SQL procedure.

User Response: Ensure that both a compatibleC compiler and a DB2 Application DevelopmentClient are installed on the server. If a precompileor compile error occurred, refer to the messagesfrom the precompiler or compiler in thediagnostic file “<file-name>”.

Ensure that the DB2 registry variableDB2_SQLROUTINE_COMPILER_PATH is set topoint to a script or batch file that sets up the Ccompiler environment. On a UNIX operatingsystem, for example, you may create a scriptcalled “sr_cpath” in the/home/DB2INSTANCE/sqllib/function/routine

436 Message Reference, Volume 2

Page 445: Db2 SQL Errors

directory. To set the DB2 registry variableDB2_SQL_ROUTINE_COMPILER_PATHaccordingly, issue the following command:

db2set DB2_SQLROUTINE_COMPILER_PATH = \“/home/DB2INSTANCE/sqllib/function/ \routine/sr_cpath”

sqlcode: -7032

sqlstate: 42904

SQL7035W The executable of the SQLprocedure “<procedure-name>” isnot saved in the database catalog.

Explanation: The executable of the SQLprocedure exceeds the limit of 2 megabytes andtherefore cannot be stored in the databasecatalog. It will not be recovered automatically atdatabase restore time or on ROLLBACK of aDROP PROCEDURE statement.

User Response: If the warning resulted from aCREATE PROCEDURE statement, ensure that

you keep a backup of the executable associatedwith SQL procedure “<procedure-name>”. If thewarning was issued during a restore operation ora ROLLBACK of a DROP PROCEDUREstatement, then the executable associated with“<procedure-name>” must be manuallysynchronized with the SQL procedure that isdefined in the catalog.

sqlcode: +7035

sqlstate: 01645

SQL7099N Invalid error “<error>” hasoccurred.

Explanation: A REXX internal error hasoccurred.

The command cannot be processed.

User Response: Verify that REXX is installedproperly and rerun the procedure. If the errorcontinues, note the error number and call thedealer.

SQL8000 - SQL8099

SQL8000N DB2START processing failed; avalid product license was notfound.

Explanation: A valid license key could not befound and the evaluation period has expired.

User Response: Install a license key for thefully entitled version of the product. You canobtain a license key for the product by contactingyour IBM representative or authorized dealer.

SQL8001N DB2 connect processing failed; avalid product license was notfound.

Explanation: A valid license key could not befound and the evaluation period has expired.

User Response: Install a license key for thefully entitled version of the product. You canobtain a license key for the product by contactingyour IBM representative or authorized dealer.

sqlcode: -8001

sqlstate: 42968

SQL8002N DRDA connect processing failed;a valid product license was notfound.

Explanation: A valid license key could not befound and the evaluation period has expired.

User Response: Install a license key for thefully entitled version of the product. You canobtain a license key for the product by contactingyour IBM representative or authorized dealer.

sqlcode: -8002

sqlstate: 42968

Chapter 2. SQL Messages 437

Page 446: Db2 SQL Errors

SQL8006W The product ″<product-name>″does not have a valid license keyinstalled. If you have licensed thisproduct, please ensure the licensekey is properly installed. If alicense key is not installed, thisproduct will be enabled for a″<number>″ day evaluationperiod. USE OF THE PRODUCTFOR THE EVALUATION PERIODCONSTITUTES ACCEPTANCEOF THE TERMS OF THE IBMEVALUATION AGREEMENT INTHE EVALUATE.AGR FILE,LOCATED IN THE FOLLOWINGDIRECTORY: ″<directory-name>″.

Explanation: A valid license key has not beeninstalled for this product. The product will beenabled to operate for a limited period of timefor evaluation purposes. THE EVALUATIONPERIOD IS CONTROLLED BY A TIMEDISABLING DEVICE.

User Response: If you have purchased a fullyentitled version of this product, please installyour license key as described in the productinstallation documentation. If you have alreadyinstalled the license key, please verify yourlicense file for accuracy.

USE OF THE PRODUCT FOR THEEVALUATION PERIOD IS SUBJECT TO THETERMS OF THE IBM EVALUATIONAGREEMENT IN THE EVALUATE.AGR FILE.YOUR USE OF THE PRODUCT DURING THEEVALUATION PERIOD CONSTITUTES YOURACCEPTANCE OF THESE TERMS.

If you do not accept the terms, you are notauthorized to use the product and you mustde-install it. You can obtain a license key for thefully authorized program with the product bycontacting your IBM representative or authorizeddealer.

SQL8007W There are ″<number>″ day(s) leftin the evaluation period for theproduct ″<text>″. For evaluationlicense terms and conditions, referto the IBM Evaluation Agreementin the EVALUATE.AGR file,located in the following directory:″<text>″.

Explanation: A valid license key has not beeninstalled for this product. The evaluation periodwill expire after the specified number of days.

User Response: The product is operating inevaluation mode, and is enabled for a limitedperiod of time. When the evaluation period hasexpired it will not execute until a license key forthe fully entitled version of the product isinstalled.

You can obtain a license key for the product bycontacting your IBM representative or authorizeddealer.

SQL8008N The product ″<text>″ does nothave a valid license key installedand the evaluation period hasexpired. Functions specific to thisproduct are not enabled.

Explanation: A valid license key could not befound and the evaluation period has expired.

User Response: Install a license key for thefully entitled version of the product. You canobtain a license key for the product by contactingyour IBM representative or authorized dealer.

SQL8009W The number of concurrent usersof the DB2 Workgroup producthas exceeded the definedentitlement of ″<number>″.Concurrent user count is″<number>″.

Explanation: The number of concurrent usershas exceeded the number of defined DB2concurrent user entitlements.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional DB2 user entitlements and update the

438 Message Reference, Volume 2

Page 447: Db2 SQL Errors

DB2 license information in the License Center.

sqlcode: +8009

sqlstate: 01632

SQL8010W The number of concurrent usersof the DB2 Connect product hasexceeded the defined entitlementof ″<number>″. Concurrent usercount is ″<number>″.

Explanation: The number of concurrent usershas exceeded the number of defined DB2concurrent user entitlements.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional DB2 user entitlements and update theDB2 license information in the License Center.

sqlcode: +8010

sqlstate: 01632

SQL8011W One or more database partitionsdoes not have a valid DB2 licensekey installed for the″<product-name>″ product. Referto db2diag.log for moreinformation.

Explanation: A valid license key has not beeninstalled for this product on all databasepartitions. The product will be enabled tooperate for a limited period of time forevaluation purposes. THE EVALUATIONPERIOD IS CONTROLLED BY A TIMEDISABLING DEVICE.

User Response: Check the db2diag.log for moreinformation indicating which database partitionsare encountering the license problem. If you havepurchased a fully entitled version of this product,please install your license key as described in theproduct installation documentation. If you havealready installed the license key, please verifyyour license file for accuracy.

USE OF THE PRODUCT FOR THEEVALUATION PERIOD IS SUBJECT TO THETERMS OF THE IBM EVALUATIONAGREEMENT IN THE EVALUATE.ARG FILE.

YOUR USE OF THE PRODUCT DURING THEEVALUATION PERIOD CONSTITUTES YOURACCEPTANCE OF THESE TERMS.

If you do not accept the terms, you are notauthorized to use the product and you mustde-install it. You can obtain a license key for thefully authorized program with the product bycontacting your IBM representative or authorizeddealer.

SQL8012W The number of concurrent usersof the DB2 Enterprise product hasexceeded the defined entitlementof ″<number>″. Concurrent usercount is ″<number>″.

Explanation: The number of concurrent usershas exceeded the number of defined DB2concurrent user entitlements.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional DB2 user entitlements and update theDB2 license information in the License Center.

sqlcode: +8012

sqlstate: 01632

SQL8013W The number of concurrentdatabase connections to the DB2Connect product has exceeded thedefined entitlement of″<number>″. Database connectioncount is ″<number>″.

Explanation: The license for the DB2 Connectproduct you are using supports a limited numberof concurrent database connections. You haverequested a number of connections that exceedsthis limit.

User Response: Upgrade to a version of theDB2 Connect product with a higher limit ofconcurrent database connections.

DB2 Connect Enterprise Edition users: obtainlicenses for additional users by purchasingAdditional User Packs.

sqlcode: +8013

sqlstate: 01632

Chapter 2. SQL Messages 439

Page 448: Db2 SQL Errors

SQL8014N The version of the DB2 Connectproduct you are using is notlicensed for use with TCP/IPprotocol. Upgrade to a fullfunction DB2 Connect product touse TCP/IP.

Explanation: This version of DB2 Connect islimited to SNA connectivity. TCP/IP connectionsare not supported.

User Response: Upgrade to a full function DB2Connect product such as DB2 Connect PersonalEdition or DB2 Connect Enterprise Edition to useTCP/IP.

sqlcode: -8014

sqlstate: 42968

SQL8015N The version of the DB2 Connectproduct you are using is notlicensed for updating multipledatabases in the same transaction.

Explanation: This version of DB2 Connect islimited to working with a single database in atransaction. It does not support 2-phase commitprotocol.

User Response: Upgrade to a full function DB2Connect product such as DB2 Connect PersonalEdition or DB2 Connect Enterprise Edition to beable to update multiple databases in a singletransaction.

sqlcode: -8015

sqlstate: 42968

SQL8016N The user “<user-name>” is notdefined as a registered user forthe product “<product-name>”.

Explanation: The user has not been registeredto use this product.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional DB2 registered user entitlements andupdate the registered user list for this product inthe License Center.

SQL8017W The number of processors on thismachine exceeds the definedentitlement of“<licensed-quantity>” for theproduct “<product-name>”. Thenumber of processors on thismachine is “<processor-quanity>”.

Explanation: The number of online processorsexceeds the number of processors specified inyour license configuration.

User Response: Purchase additional processorentitlements from your IBM representative orauthorized dealer and update your license byusing the License Center or the db2licmcommand line utility.

sqlcode: +8017

SQL8018W The number of concurrent usersof this product has exceeded thedefined entitlement of“<number>”. Concurrent usercount is “<number>”.

Explanation: The number of concurrent usershas exceeded the number of defined concurrentuser entitlements.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional user entitlements and update the DB2license information in the License Center.

sqlcode: +8018

sqlstate: 01632

SQL8019N There was an error updating thelicense for the OLAP Starter Kit.RC = “<reason-code>”.

Explanation: The license utility could notupdate the OLAP Starter Kit license because ofan unknown error.

User Response: Try the command again. If theproblem persists, please contact an IBM servicerepresentative.

sqlcode: -8019

440 Message Reference, Volume 2

Page 449: Db2 SQL Errors

SQL8020W The number of concurrentnon-DB2 data sources for oneserver has exceeded the definedentitlement of“<number-sources>”. Currentnumber of non-DB2 data sourcesis “<number-entitled>”.

Explanation: The number of concurrentnon-DB2 data sources has exceeded the numberof defined entitlements.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional entitlements and then update the DB2license information in the License Center.

sqlcode: +8020

SQL8021W The data source “<source-name>”is not defined as a registered datasource for “<product-name>”.

Explanation: The data source has not beenconfigured as a registered data source. You mustpurchase entitlements for all non-DB2 datasources.

User Response: Contact your IBMrepresentative or authorized dealer to obtainadditional data source entitlements and updatethe registered data source list for this product inthe License Center.

sqlcode: +8021

SQL8100 - SQL8199

SQL8100N The table is full.

Explanation: When creating a database thefollowing parameters may be specified:

v maximum number of pages per segment perfile

v number of segments

Each table part may now have multiple fileswithin the database segments. The file can growuntil it reaches its maximum size in a segment(maximum number of pages per segment) andthen it moves to the next segment to add moredata. This occurs until it has used the maximumnumber of pages per segment in all configuredsegments, and the table becomes full.

Therefore, the total amount of space per databasepart is the product of the maximum number ofpages and the number of segments. The tablewill be full if any of the table parts use all oftheir configured space.

Federated system users: this situation can also bedetected by the data source.

User Response:

v Delete rows from the table

v Reorganize the table to make more space

v Create a new database with larger values formaximum pages per segment and number ofsegments, back up the original database andrestore to the new database.

Federated system users: isolate the problem tothe data source failing the request (refer to theTroubleshooting Guide to determine which datasource is failing to process the SQL statement)and:

v Take the necessary steps to increase the spacein the table at the data source.

v If the table is on the federated server, create anew database with larger values for maximumpages per segment and number of segments.Back up the original database and restore tothe new database.

SQL8101N A database segment may beincorrect.

Explanation: This error could occur in twoways:

1. Every database segment has an identifier file.The file may be missing or the contents of thefile may be incorrect.

2. One, or more, previously allocated databasesegments are missing.

User Response:

Chapter 2. SQL Messages 441

Page 450: Db2 SQL Errors

v Check to ensure that the file systems aremounted correctly

v Restore the database from a backup

v Call your IBM service representative

SQL9300 - SQL9399

SQL9301N An invalid option is specified oran option parameter is missing.

Explanation: Either the option specified isinvalid or an option parameter is not specified.

The command cannot be processed.

User Response: Correct the option and resubmitthe command.

SQL9302N Invalid option parameter:“<option-parameter>”.

Explanation: The option parameter specified isinvalid.

The command cannot be processed.

User Response: Correct the option parameterand resubmit the command.

SQL9303N No <option> is specified.

Explanation: The required option “<option>” isnot specified.

The command cannot be processed.

User Response: Resubmit the command withthe required option.

SQL9304N Unable to open file “<filename>”for writing.

Explanation: The command cannot beprocessed.

User Response: Ensure that the system canaccess the file.

SQL9305N The <name> is too long. Themaximum length is <max-length>.

Explanation: The <name> is longer than themaximum length of <max-length>.

The command cannot be processed.

User Response: Ensure that the <name> doesnot exceed the maximum length.

SQL9306N One or more of the field namesare too long. The maximumlength is <max-length>.

Explanation: The total length of a field nameincludes the specified prefix and/or a columnsuffix, which can either be its name or itsnumber. This total length must not exceed themaximum length.

The command cannot be processed.

User Response: Ensure that all the field namesdo not exceed the maximum length.

SQL9307N Remarks cannot be retrieved fromthe database. Error code =“<sqlcode>”.

Explanation: An error has occurred whenattempting to retrieve the remarks of a columnfrom the database.

The command cannot be processed.

User Response: Check the error code for moreinformation.

SQL9308W SQL data type “<sqltype>” of thecolumn “<colname>” is notsupported.

Explanation: The SQL data type “<sqltype>” isnot supported in the specified host language.

No declaration is generated for this column.

User Response: Ensure that this is the desiredtable.

442 Message Reference, Volume 2

Page 451: Db2 SQL Errors

SQL9320I Connecting to the database“<database>”...

Explanation: The utility is attempting toconnect to the database “<database>”.

User Response: See the error message fordetails if it fails.

SQL9321I Binding the utility automatically...

Explanation: The utility is attempting to binditself to the database.

User Response: See the error message fordetails if it fails.

SQL9322I Retrieving column informationfrom the table “<table>”...

Explanation: The utility is attempting to retrievecolumn information from the table “<table>”.

User Response: See the error message fordetails if it fails.

SQL9323I Generating declarations to the file“<filename>”...

Explanation: The utility is attempting togenerate declarations to the file “<filename>”.

User Response: See the error message fordetails if it fails.

SQL9324I Disconnecting from the database“<database>”...

Explanation: The utility is attempting todisconnect from the database “<database>”.

User Response: See the error message fordetails if it fails.

SQL10000 - SQL10099

SQL10002N The password supplied is toolong.

Explanation: The length of the password isexpected to be 18 characters or less. However, ifthe password is to be verified for an APPCconversation, it must be 8 characters or less.

User Response: Ensure that the password is notlonger than the limit allowed.

sqlcode: -10002

sqlstate: 28000

SQL10003C There are not enough systemresources to process the request.The request cannot be processed.

Explanation: The database manager could notprocess the request due to insufficient systemresources. The resources that can cause this errorinclude:

v The amount of memory in the system

v The number of message queue identifiersavailable in the system.

User Response: Stop the application. Possiblesolutions include:

v Remove background processes.

v Terminate other applications using the aboveresources.

v If you are using Remote Data Services,increase the Remote Data Services heap size(rsheapsz) in the server and clientconfiguration because at least one block isused per application.

NOTE: This is applicable only for releases ofDB2 prior to Version 2.

v Decrease the values of the configurationparameters that define allocation of memory,including udf_mem_sz if UDFs are involved inthe failing statement.

sqlcode: -10003

sqlstate: 57011

Chapter 2. SQL Messages 443

Page 452: Db2 SQL Errors

SQL10004C An I/O error occurred whileaccessing the database directory.

Explanation: Either the system databasedirectory or the local database directory cannotbe accessed. This error may occur not only whenthe system is cataloging or uncataloging adatabase but also when the system is accessing adatabase that is cataloged in the directory.

The command cannot be processed.

User Response: Possible solutions include:

v If the local database directory is damaged,restore the databases that were cataloged therefrom backup versions and catalog them.

If installing the sample database, drop it andinstall the sample database again.

sqlcode: -10004

sqlstate: 58031

SQL10005N The mode parameter“<parameter>” in the CONNECTTO statement is not valid. It mustbe SHARE for shared access,EXCLUSIVE for exclusive use orEXCLUSIVE MODE ON SINGLENODE for exclusive use on singlenode. For DB2 Connectconnections, only SHARE mode issupported. EXCLUSIVE MODEON SINGLE NODE is onlysupported in MPP configuration.

Explanation: The mode parameter of theCONNECT TO statement must be SHARE forshared, EXCLUSIVE for exclusive use orEXCLUSIVE MODE ON SINGLE NODE forexclusive use on single node. If connecting to adatabase using DB2 Connect, only shared accessis allowed. EXCLUSIVE MODE ON SINGLENODE is only supported in MPP configuration.

The command cannot be processed.

User Response: Resubmit the command with avalid mode parameter.

SQL10007N Message “<msgno>” could not beretrieved. 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 invalidinstance. Correct it and try again.

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

3. The message file could not be found. Eitherthe file does not exist, or the directory themessage file should be in does not exist.Check that a either a ’prime’ directory (thedefault) or a directory with the same name asthe ’LANG’ environment variable existsunder the message directory.

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

5. LC_CTYPE is set to a locale which thedatabase does not support. Correct it and tryagain.

6. An unexpected system error occurred. Tryexecution again. If problem persists, contactyour IBM representative.

7. Not enough memory. An attempt to getprivate memory failed. Try again.

User Response: Reissue the command afterverifying the following:

v ensure that the DB2INSTANCE environmentvariable is set to the correct literal string forthe username attempting this command

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

v ensure that the LANG environment variable isset to the correct value for the installedlanguage, or is set to ’C’ (defaults to whateveris in the ’prime’ directory), on the usernameattempting this command

If all of the above are correct and the error stilloccurs, reinstall DB2.

444 Message Reference, Volume 2

Page 453: Db2 SQL Errors

SQL10009N The codeset “<codeset>” and/orterritory “<territory>” that hasbeen specified is not valid.

Explanation: This version of the databasemanager does not support the active codeset orterritory or both, as specified by the CreateDatabase command.

The command cannot be processed.

User Response: Refer to the Create Databasecommand in the Administration Guide for detailsof valid codeset and territory pairs supported bythe database manager.

SQL10010N The specified library, “<name>”,was loaded, but the function“<function>” could not beexecuted.

Explanation: The function routine within thelibrary cannot be found.

The command cannot be processed.

User Response:

1. If it is a DARI library, ensure the DARIlibrary is built correctly. Make sure that thefunction routine is exported through the’export file’.

2. For other libraries, user may have to reinstallthe database manager instance or thedatabase manager product.

sqlcode: -10010

sqlstate: 42724

SQL10011N An interrupt was received whileloading the specified DARIlibrary “<name>”.

Explanation: When loading the DARI library,the command was interrupted, perhaps by theinterrupt key (usually Ctrl+Break or Ctrl+C).

Processing is stopped.

User Response: Resubmit the command.

sqlcode: -10011

sqlstate: 42724

SQL10012N An unexpected operating systemerror was received while loadingthe specified library ″<name>″.

Explanation: An unexpected error occurredwhen trying to load the library module specifiedin the program name field.

User Response: Resubmit the current command.If the error continues, stop the database managerand start it again. If the error continues, reinstallthe database manager.

If reinstallation does not correct the error, recordthe message number (SQLCODE) and allinformation in the SQLCA if possible.

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then contact IBM asspecified in this guide.

sqlcode: -10012

sqlstate: 42724

SQL10013N The specified library ″<name>″could not be loaded.

Explanation: The library module could not befound.

User Response: For DARI users, ensure that thespecified library is available.

v If the client application uses a fully qualifiedpath name to specify the DARI library, theDARI library must be stored in the givendirectory path. If the client application doesnot use the path name, the DARI library mustbe stored in the default directory(<InstanceHomeDir>/sqllib/function). Where<InstanceHomeDir> is the home directory ofthe database manager instance.

v If the error message occurs during databasemanager start time then the user will have toreinstall the DB2 instance or the databasemanager product.

Chapter 2. SQL Messages 445

Page 454: Db2 SQL Errors

Federated system users: if the error messageoccurs as a result of issuing db2start on thefederated system and the “<name>” is “fromDB2_DJ_COMM” then the federated serverexperienced a problem loading one of thewrapper modules identified by theDB2_DJ_COMM environment variable. TheDB2_DJ_COMM environment variable must beupdated to contain only valid wrapper modules.

If the error message occurs as a result of issuingdb2start on the federated system and the“<name>” is not “from DB2_DJ_COMM”, theuser must re-install the federated instance.

If the library identifies a wrapper module, thatmodule must be installed, link-edited (asrequired), and available in the correct directory.Refer to the Installation and ConfigurationSupplement for more information aboutconfiguring wrapper modules.

sqlcode: -10013

sqlstate: 42724

SQL10014N The invoking DARI programname “<name>” specified is notvalid.

Explanation: The DARI library module or theDARI program name syntax is not correct.

User Response: Ensure that the DARI library orprogram name is specified correctly.

sqlcode: -10014

sqlstate: 42724

SQL10015N There are not enough systemresources to load the specifiedlibrary ″<name>″.

Explanation: There is not enough memory toload the library module.

User Response: Stop the application. Possiblesolutions are:

v Remove background processes.

v Decrease the values of the configurationparameters that define the allocation ofmemory.

v Install more memory.

sqlcode: -10015

sqlstate: 42724

SQL10017N The SQL CONNECT RESETstatement is not allowed in aDatabase Application RemoteInterface (DARI) procedure.

Explanation: The remote procedure contains anSQL CONNECT RESET statement.

User Response: Remove the SQL CONNECTRESET statement and retry the remote procedure.

sqlcode: -10017

sqlstate: 38003

SQL10018N The disk is full. Processing wasended.

Explanation: The disk is full. During the exportto a PC/IXF file, either the PC/IXF data file is ona fixed disk, or the PC/IXF data file and thedatabase are on the same file system, or thePC/IXF data file and the message file are on thesame file system.

The EXPORT utility stops processing. Theexported data is not complete.

User Response: Provide more space on the diskor specify that the data file be located on adifferent file system than the database or themessage file and resubmit the command.

SQL10019N The database cannot be accessedin the specified path.

Explanation: The database cannot be accessedfor one of the following reasons:

v The path does not contain a database image.

v Permissions on the path are incorrect.

User Response: Ensure that the path references

446 Message Reference, Volume 2

Page 455: Db2 SQL Errors

a valid database and that the permissions arecorrect.

sqlcode: -10019

sqlstate: 58031

SQL10021N The file permissions do not allowwrite access to the database.

Explanation: A write operation was attemptedto a database residing on a file system which

does not allow write access.

The statement cannot be processed.

User Response: Verify that the file permissionsfor the file system on which the database residesallow write access.

SQL20000 - SQL20099

SQL20005N The internal identifier limit forobject type “<type>” has beenexceeded.

Explanation: The create of an object of type“<type>” cannot be processed because the nextinternal identifier for the object would exceed themaximum value.

The statement cannot be processed.

User Response: Drop objects of type “<type>”that are not being used any more.

sqlcode: -20005

sqlstate: 54035

SQL20010N Mutation method “<method-ID>”is not allowed when the instanceof the structured type is NULL.

Explanation: The method “<method-ID>” is amutator method that is specified with aninstance of a structured type that is null. Mutatormethods cannot be processed on a null instance.In some cases, the method name is not available.

The statement cannot be processed.

User Response: Determine the null instance thatis used with a mutator method. Use aconstructor function to create a non-null instanceof the structured type before using any mutatormethods on the instance.

To determine the method name associated withthe “<method-ID>”, use the following query:

SELECT FUNCSHEMA, FUNCNAME, SPECIFICNAMEFROM SYSCAT.FUNCTIONSWHERE FUNCID = INTEGER(“<method-ID>”)

sqlcode: -20010

sqlstate: 2202D

SQL20011N Transform group “<group-name>”is already defined for a subtypeor supertype of data type“<type-name>”.

Explanation: A transform group called“<group-name>” already exists for a type in thesame hierarchy as “<type-name>”. It may bedefined for a supertype or subtype of“<type-name>”. A transform group name canonly be used once within a structured typehierarchy.

The statement cannot be processed.

User Response: Change the name of thetransform group.

sqlcode: -20011

sqlstate: 42739

SQL20012N Type “<type-name>” does nothave any associated transformgroups to drop.

Explanation: There are no transforms definedfor “<type-name>”. There is nothing to drop.

Chapter 2. SQL Messages 447

Page 456: Db2 SQL Errors

The statement did not drop any transformgroups.

User Response: Ensure the name of the type(including any required qualifiers) is correctlyspecified in the SQL statement and that the typeexists.

sqlcode: -20012

sqlstate: 42740

SQL20013N The object “<super-object-name>”is not valid as a supertype,supertable, or superview of object“<sub-object-name>”.

Explanation: If the statement resulting in theerror is creating a type, then“<super-object-name>” is a type that cannot bebe a supertype of “<sub-object-name>” becauseit is not a user-defined structured type.

If the statement resulting in the error is creatinga table, then “<super-object-name>” is a tablethat cannot be be a supertable of table“<sub-object-name>” because it is not defined asa typed table or the type of table“<super-object-name>” is not the directsupertype of the type used in defining table“<sub-object-name>”.

If the statement resulting in the error is creatinga view, then “<super-object-name>” is a viewthat cannot be be a superview of view“<sub-object-name>” because it is not defined asa typed view or the type of view“<super-object-name>” is not the directsupertype of the type used in defining view“<sub-object-name>”.

The statement cannot be processed.

User Response: Specify a valid type, table, orview in the UNDER clause of the CREATEstatement.

sqlcode: -20013

sqlstate: 428DB

SQL20014N The transform group“<group-name>”“<transform-type>” transformfunction for type “<type-name>”is not valid. Reason code =“<reason-code>”.

Explanation: The “<transform-type>” transformfunction in transform group “<group-name>” isnot valid. The reason is based on the“<reason-code>” as follows.

1 There can only be one parameter for aFROM SQL transform function.

2 The parameter of a FROM SQLtransform function must be of type“<type-name>”.

3 The RETURNS data type of a TO SQLtransform function must be of type“<type-name>”.

4 The RETURNS type of a FROM SQLtransform function that returns a scalarmust be a built-in data type other thanDECIMAL.

5 All of the RETURNS types of a FROMSQL transform function that returns ascalar must be built-in data types otherthan DECIMAL.

6 There must be at least one parameter fora TO SQL transform function.

7 The parameter types for a TO SQLtransform function must all be built-indata types other than DECIMAL.

8 The TO SQL transform function must bea scalar function.

9 The FROM SQL transform functionmust be written using LANGUAGESQL, or must use another FROM SQLtransform function that is written usingLANGUAGE SQL.

10 The TO SQL transform function must bewritten using LANGUAGE SQL or use aTO SQL transform function that iswritten using LANGUAGE SQL.

The statement cannot be processed.

448 Message Reference, Volume 2

Page 457: Db2 SQL Errors

User Response:

1 Specify a FROM SQL transform functionwith a signature that has only oneparameter.

2 Specify a FROM SQL transform functionwhere the type of the parameter is thesame as “<type-name>”.

3 Specify a TO SQL transform functionwhere the RETURNS type is the same as“<type-name>”.

4 Specify a FROM SQL transform functionwith a RETURNS type that is a built-indata type other than DECIMAL.

5 Specify a FROM SQL transform functionwhere each element of the row has aRETURNS type that is a built-in datatype other than DECIMAL.

6 Specify a TO SQL transform functionwith a signature that has at least oneparameter.

7 Specify a TO SQL transform functionwhere all the parameter types arebuilt-in data types other thanDECIMAL.

8 Specify a TO SQL transform functionthat is a scalar function.

9 Specify a FROM SQL transform functionthat is written using LANGUAGE SQL,or that uses another FROM SQLtransform function that is written usingLANGUAGE SQL.

10 Specify a TO SQL transform functionthat is written using LANGUAGE SQLor that uses a TO SQL transformfunction that is written usingLANGUAGE SQL.

sqlcode: -20014

sqlstate: 428DC

SQL20015N A transform group“<group-name>” is not definedfor data type “<type-name>”.

Explanation: A specified transform group“<group-name>” is not defined for the data type“<type-name>”. The data type “<type-name>”may have been explicitly specified in thestatement or may be implicit based on the use ofa structured type that requires the existence ofthe transform group for the data type.

If “<group-name>” is empty, either theTRANSFORM GROUP bind option or theCURRENT DEFAULT TRANSFORM GROUPspecial register was not specified and thereforethere was no transform for “<type-name>”.

The statement cannot be processed.

User Response: Define transform group“<transform-type>” for data type “<type-name>”using the CREATE TRANSFORM statement. Ifthe error occurred when dropping the transform,no action is required because the transformgroup did not exist for the data type.

If “<group-name>” is empty, specify theTRANSFORM GROUP bind option on theCURRENT DEFAULT TRANSFORM GROUPspecial register.

sqlcode: -20015

sqlstate: 42741

SQL20016N The value of the inline lengthassociated with type“<type-name>” is too small.

Explanation: The definition for structured type“<type-name>” has an INLINE LENGTH valuespecified that is smaller than the size returned bythe constructor function (32 + 10 *number_of_attributes) for the type and is lessthan 292.

The statement cannot be processed.

User Response: Specify an INLINE LENGTHvalue that is at least the size returned by theconstructor function for the type or is at least292. If this error occurs when altering the type(or some supertype of this type) to add an

Chapter 2. SQL Messages 449

Page 458: Db2 SQL Errors

attribute, either the attribute cannot be added orthe type must be dropped and re-created with alarger INLINE LENGTH value.

sqlcode: -20016

sqlstate: 429B2

SQL20017N Addition of this subtype exceedsthe maximum number of levels ofa type hierarchy.

Explanation: The maximum number of levels ina type hierarchy is 99. Adding this type wouldexceed the maximum.

The statement cannot be processed.

User Response: Do not add any more subtypesto this type hierarchy.

sqlcode: -20017

sqlstate: 54045

SQL20018N Row function “<function-name>”must return at most one row.

Explanation: The function is a defined to returna single row. The result of the processing thefunction is more than one row.

User Response: Ensure that the function isdefined in such a way that at most one row isreturned.

sqlcode: -20018

sqlstate: 21505

SQL20019N The result type returned from thefunction body cannot be assignedto the data type defined in theRETURNS clause.

Explanation: The data type of each columnreturned by the function body must beassignable to the corresponding column specifiedin the RETURNS clause. If the function is ascalar function, there is only one column.

User Response: Change the RETURNS type orthe type returned from the function body so that

the data types of corresponding columns areassignable.

sqlcode: -20019

sqlstate: 42866

SQL20020N Operation “<operation-type>” isnot valid for typed tables.

Explanation: The operation identified by“<operation-type>” cannot be performed on atyped tables.

The statement cannot be processed.

User Response: Remove the ADD COLUMNclause or SET DATATYPE clause from the ALTERstatement. Columns can only be added byre-defining the table with a structured type thatincludes the new column as an attribute.Similarly, the data type of a column can only bechanged by re-defining the table with a type thatincludes the column with a different data type.

sqlcode: -20020

sqlstate: 428DH

SQL20021N Inherited column or attribute“<name>” cannot be changed ordropped.

Explanation: The value of “<name>” identifieseither a column name or an attribute name(depending on the statement context) that isinherited from a typed table, typed view, orstructured type above it in the table, view, ortype hierarchy.

v In the CREATE TABLE statement, the WITHOPTIONS clause cannot be specified forcolumn “<name>” in the CREATE TABLEstatement because it is inherited from asupertable in the table hierarchy.

v In the ALTER TABLE statement, the SETSCOPE clause cannot be specified for column“<name>” because it is inherited from asupertable in the table hierarchy.

v In the CREATE VIEW statement, the WITHOPTIONS clause cannot be specified forcolumn “<name>” in the CREATE VIEW

450 Message Reference, Volume 2

Page 459: Db2 SQL Errors

statement because it is inherited from asuperview in the view hierarchy.

v In the ALTER TYPE statement, the DROPATTRIBUTE clause cannot be specified forattribute “<name>” because it is inheritedfrom a supertype in the type hierarchy.

The statement cannot be processed.

User Response: The options for a column mayonly be set or altered for the table or view in thetyped table hierarchy or typed view hierarchywhere the column is introduced. An attribute canonly be dropped from the data type in the typehierarchy where the attribute was introduced.

sqlcode: -20021

sqlstate: 428DJ

SQL20022N The scope for the referencecolumn ″<column-name>″ isalready defined.

Explanation: The scope for the referencecolumn ″<column-name>″ cannot be addedbecause it is already defined.

The statement cannot be processed.

User Response: Remove the ADD SCOPEclause from the ALTER TABLE statement.

sqlcode: -20022

sqlstate: 428DK

SQL20023N Parameter ″<parm-number>″ ofthe external or sourced functionhas a scope defined.

Explanation: A reference type parameter shouldnot have a scope defined when used withexternal or sourced user defined functions.

The statement cannot be processed.

User Response: Remove the SCOPEspecification from the definition of the parameter.

sqlcode: -20023

sqlstate: 428DL

SQL20024N The scope table or view“<target-name>” is not definedwith structured type“<type-name>”.

Explanation: The scope table or view“<target-name>” is not valid for use as the scopeof this reference because it is:

v not a typed table or

v not a typed view or

v the type of the table or view is not the same asthe target type of the REF type.

The statement cannot be processed.

User Response: Specify the scope of thereference using a typed table or typed view withthe same type as the target type of the REF type.

sqlcode: -20024

sqlstate: 428DM

SQL20025N SCOPE is not specified in theRETURNS clause of an externalfunction or is specified in theRETURNS clause of a sourcedfunction.

Explanation: There are two possible causes:

v A reference type must have a scope definedwhen used as the result of a user-definedexternal function.

v A reference type cannot have a scope definedwhen used as the result of an user-definedsourced function. The function will use thescope of the source function.

The statement cannot be processed.

User Response: When defining an externalfunction with a reference type as a returns type,ensure that the SCOPE clause is specified. Whendefining SOURCED function with a referencetype as a returns type, ensure that the SCOPEclause is not specified.

sqlcode: -20025

sqlstate: 428DN

Chapter 2. SQL Messages 451

Page 460: Db2 SQL Errors

SQL20026N The type ″<type-name>″ is not astructured type or is not aninstantiable structured type.

Explanation: The statement requires astructured type that can be instantiated. The type“<type-name>” is either:

v not a structured type; or

v a structured type that is defined as notinstantiable.

The statement cannot be processed.

User Response: Verify that the correct typename is used in the statement.

sqlcode: -20026

sqlstate: 428DP

SQL20027N The subtable or subview“<sub-object-name>” was notcreated because subtable orsubview “<object-name>” withtype “<type-name>” alreadyexists.

Explanation: Within a typed table or viewhierarchy, only one subtable or subview mayexist of a particular subtype. The table or view“<sub-object-name>” cannot be created sincethere is already a table or view of type“<type-name>” defined. The table or view thatalready exists is “<object-name>”.

The statement cannot be processed.

User Response: Verify that the subtable orsubview is being created with the correct typeand that the subtable is being created under thecorrect supertable or the subview is beingcreated under the correct superview.

sqlcode: -20027

sqlstate: 42742

SQL20028N The table or view “<table-name>”cannot have a different schemaname from the other tables orviews in the same hierarchy.

Explanation: All tables in a typed tablehierarchy must have the same schema name andall views in a typed view hierarchy must havethe same schema name.

The statement cannot be processed.

User Response: Verify that the schema name ofthe table or view is correct. If a hierarchy nameis specified, verify that its schema name matchesthe schema name of the root table or view. If asubtable is being created, verify that it is beingcreated under the correct supertable. If a subviewis being created, verify that it is being createdunder the correct superview.

sqlcode: -20028

sqlstate: 428DQ

SQL20029N ″<operation>″ cannot be appliedto a subtable.

Explanation: The operation ″<operation>″ wasapplied to a table that is not the root of a tablehierarchy.

The statement cannot be processed.

User Response: Specify the root table of thetable hierarchy in the operation.

sqlcode: -20029

sqlstate: 428DR

SQL20030N Attributes of a structured type“<type-name>” cannot be addedor dropped when a typed table,typed view, or index extension“<object-name>” is dependent onthe type.

Explanation: The attributes of a structured typecannot be added or dropped if a typed table ortyped view of the structured type or any of itssubtypes currently exists. Attributes of astructured type also cannot be added or droppedwhen a column exists in the table that directly or

452 Message Reference, Volume 2

Page 461: Db2 SQL Errors

indirectly uses “<type-name>”. Also, attributes ofa structured type cannot be added or droppedwhen the type “<type-name>” or one of itssubtypes is used in an index extension. The table,view, or index extension “<object-name>” is onetable, view, or index extension that is dependenton the structured type “<type-name>”. Theremay be other tables, views, or index extensionsthat are dependent on the type or one of itsproper subtypes.

The statement cannot be processed.

User Response: Verify that the right type isbeing altered or drop any tables, views, andindex extensions that are dependent on thestructured type “<type-name>”.

sqlcode: -20030

sqlstate: 55043

SQL20031N ″<Object>″ may not be defined ona subtable.

Explanation: Primary key and uniqueconstraints can only be defined on the root tableof a typed table hierarchy. Similarly, uniqueindexes can only be defined on the root table ofa typed table hierarchy.

The statement cannot be processed.

User Response: Unique indexes, Primary key orunique constraints can only be defined on theroot table of a table hierarchy.

sqlcode: -20031

sqlstate: 429B3

SQL20032N Index on the specified columnscannot be defined on subtable“<table-name>”.

Explanation: The columns specified for theindex were all introduced at a higher level in thetyped table hierarchy than subtable“<table-name>”. Therefore, the index cannot becreated on this subtable.

The statement cannot be processed.

User Response: Determine the table in the tablehierarchy where all of the columns are included

for the first time. Use this as the table namewhen creating the index.

sqlcode: -20032

sqlstate: 428DS

SQL20033N An expression including“<partial-expression>” does notinclude a valid scoped reference.

Explanation: The expression that includes“<partial-expression>” requires an operand thatis reference type with a scope defined. If theexpression includes the DEREF function, theargument of the function must be a referencetype with a scope defined.

For the dereference operator (->), the leftoperand needs to be a reference type with ascope defined.

The statement cannot be processed.

User Response: Correct the SQL statementsyntax so the operand or argument is a referencetype with a scope defined.

sqlcode: -20033

sqlstate: 428DT

SQL20034N The data type ″<list-type-name>″is not included in a structureddata type hierarchy that includesthe data type ″<left-type-name>″of the left operand of the TYPEpredicate.

Explanation: All the data types listed in theTYPE predicate must be included in a data typehierarchy that includes the data type of the leftoperand of the TYPE predicate. The data type″<left-type-name>″ is not a structured data type(not part of any type hierarchy) or the data type″<list-type-name>″ is not included in the datatype hierarchy that includes ″<left-type-name>″.

The statement cannot be processed.

User Response: Ensure that the data type of theexpression and all listed data types in the TYPEpredicate are structured data types within thesame data type hierarchy. If ″<left-type-name>″ is

Chapter 2. SQL Messages 453

Page 462: Db2 SQL Errors

SYSIBM.REFERENCE, use DEREF to make theresult data type of the expression a structureddata type.

sqlcode: -20034

sqlstate: 428DU

SQL20035 Invalid left operand of adereference operator. Pathexpression starts with“<expression-string>”.

Explanation: The left operand of the dereferenceoperator in a path expression is not valid.Possible causes are:

v The left operand includes a column functionthat uses a column function as an argument.

v The left operand expression includes a columnfunction and a reference to a column that isnot in the GROUP BY clause.

User Response: Correct the left operand of thedereference operator for the path expression thatstarts with “<expression-string>”.

sqlcode: -20035

sqlstate: 428DV

SQL20036N The object identifier column“<column-name>” cannot bereferenced using the dereferenceoperator.

Explanation: The dereference operator is usedwith “<column-name>” as the right operand.This column is the object identifier column of thetarget table of the dereference and is not validfor this operator.

The statement cannot be processed.

User Response: Correct the name of the columnin the dereference operation.

sqlcode: -20036

sqlstate: 428DW

SQL20037N Object identifier column isrequired to create the root table orroot view “<object-name>” of atyped table or view hierarchy.

Explanation: When creating the root table of atyped table hierarchy, an object identifier (OID)column must be defined (using the REF ISclause) on the CREATE TABLE statement.

When creating the root view of a typed viewhierarchy, an object identifier (OID) column mustbe defined (using the REF IS clause) on theCREATE VIEW statement.

The statement cannot be processed.

User Response: Add the required OID column(REF IS clause) to the CREATE TABLE orCREATE VIEW statement.

sqlcode: -20037

sqlstate: 428DX

SQL20038N The “<keywords>” clause cannotbe specified with the EXTENDUSING clause.

Explanation: The EXTEND USING clause in theCREATE INDEX statement cannot be specifiedwith the “<keywords>” clause.

The statement cannot be processed.

User Response: Remove the specification of“<keywords>” clause or the EXTEND USINGclause from the CREATE INDEX statement.

sqlcode: -20038

sqlstate: 42613

SQL20039N The definition of index“<index-name>” does not matchthe definition of index extension“<index-ext-name>”.

Explanation: The index definition and the indexextension definition do not match. The followinglists the possibilities for where the definitions donot match.

v The number of arguments following the indexextension name in the EXTEND USING clause

454 Message Reference, Volume 2

Page 463: Db2 SQL Errors

is not the same as the number of instanceparameters of the index extension.

v The data types of the arguments following theindex extension name in the EXTEND USINGclause do not match exactly (including lengthor precision and scale) the data types of thecorresponding instance parameters of theindex extension.

v The number of columns specified for the indexis not same as the number of source keyparameters of the index extension.

v The data types of the index columns do notmatch exactly (including length or precisionand scale) the data types of the correspondingsource key parameters of the index extension.There is an exception to exact matching ofdata types for the case of subtypes. Thecolumn of the index may be a subtype of thedata type specified as the correspondingsource key parameter.

The statement cannot be processed.

User Response: Change the index definition sothat the index extension matches.

sqlcode: -20039

sqlstate: 428E0

SQL20040N Number or type of the result ofthe range-producing tablefunction “<range-function-name>”, is inconsistent with thatof key transformation tablefunction “<transform-function-name>” for index extension“<index-ext-name>”.

Explanation: The range-producing functionmust:

v return up to twice as many columns asreturned by the key transformation function

v have an even number of columns (the first halfof the return columns are the start key valuesand the second half of the return columns arethe stop key values)

v have the each start key column with the sametype as the corresponding stop key column

v have the the type of each start key column bethe same as the corresponding transformationfunction column.

More precisely, let a1:t1,... an:tn be the functionresult columns and data types of the keytransformation function. The function resultcolumns of the range-producing function mustbe b1:t1,...,bm:tm,c1:t1,...,cm:tm, where m <= n andthe ″b″ columns are the start key columns andthe ″c″ columns are the stop key columns.

The statement cannot be processed.

User Response: Specify a range-producing tablefunction that is consistent with the keytransformation table function.

sqlcode: -20040

sqlstate: 428E1

SQL20041N Number or the type of target keyparameters does not match withthe number or type of keytransform function“<function-name>” for indexextension “<index-ext-name>”.

Explanation: The number of target keyparameters has to match with the number ofresults returned by the key transform function. Inaddition, the type of the target key parametersmust exactly match the corresponding functionresult types.

The statement cannot be processed.

User Response: Specify the correct number andtype of parameters as the target key parameters.

sqlcode: -20041

sqlstate: 428E2

SQL20042N The maximum allowable“<parm-type>” parameters isexceeded in index extension“<index-ext-name>”. Themaximum is “<max-value>”.

Explanation: Too many parameters werespecified. If “<parm-type>”is INDEXEXTENSION, then up to “<max-value>” instance

Chapter 2. SQL Messages 455

Page 464: Db2 SQL Errors

parameters may be specified. If “<parm-type>”isINDEX KEYS, then up to “<max-value>” keysource parameters may be specified.

The statement cannot be processed.

User Response: Specify no more than themaximum number of parameters.

sqlcode: -20042

sqlstate: 54046

SQL20043N Argument for routine“<routine-name>” is not valid.Reason code = “<reason-code>”.

Explanation: The routine “<routine-name>”could be the transformation function, therange-producing function, or a routine (functionor method) referenced in the FILTER USINGclause. The reason code indicates why anargument is not valid:

1 For a key transformation function, theargument is not an observer method oran index extension instance parameter.

2 The expression used as the argumentuses a routine that specifiesLANGUAGE SQL.

3 The expression used as the argument isa subquery.

4 The data type of an expression used asthe argument cannot be a structuredtype.

5 The argument of a key transformationfunction cannot have a data type ofstructured data type, LOB, DATALINK,LONG VARCHAR, or LONGVARGRAPHIC.

The statement cannot be processed.

User Response: Specify a valid argument forthe function.

sqlcode: -20043

sqlstate: 428E3

SQL20044N The routine “<routine-name>” orthe CASE expression is not validin a CREATE INDEXEXTENSION or CREATEFUNCTION statement. Reasoncode = “<reason-code>”.

Explanation: A routine (function or method)“<routine-name>” used in the CREATE INDEXEXTENSION or CREATE FUNCTION statementis not valid where it is used. If “<routine-name>”is empty, then the CASE expression used forfiltering is not valid. The reason code indicatesthe reason.

1 The key transformation function is not atable function.

2 The key transformation function is notan external function.

3 The key transformation function is avariant function.

4 The key transformation function is anexternal action function.

5 The range-producing function is not atable function.

6 The range-producing function is not anexternal function.

7 The range-producing function is avariant function.

8 The range-producing function is anexternal action function.

9 The index-filter function is not anexternal function.

10 The index-filter function is a variantfunction.

11 The index-filter function is an externalaction function.

12 The result type of a filter function orCASE expression is not an integer datatype.

13 A subquery is used in a CASEexpression or as an argument of a filterfunction.

456 Message Reference, Volume 2

Page 465: Db2 SQL Errors

The statement cannot be processed.

User Response: If “<routine-name>” is notempty, specify a routine that conforms to therules for a function or method specified in thespecific clause of the CREATE INDEXEXTENSION or CREATE FUNCTION statement.Otherwise, specify a CASE expression thatconforms to the rules for a CASE expression inthe FILTER USING clause.

sqlcode: -20044

sqlstate: 428E4

SQL20045N The data type of instanceparameter “<parameter-name>” isinvalid in index extension“<index-ext-name>”.

Explanation: An instance parameter must beone of the following data types: VARCHAR,VARGRAPHIC, INTEGER, DECIMAL, orDOUBLE.

The statement cannot be processed.

User Response: Specify a valid data type forthe instance parameter “<parameter-name>”.

sqlcode: -20045

sqlstate: 429B5

SQL20046N SELECTIVITY clause following“<predicate-string>” can only bespecified for a valid user-definedpredicate.

Explanation: The SELECTIVITY clause isspecified with a predicate that does not include avalid user-defined function. A valid user-definedfunction includes a PREDICATES clause with aWHEN clause that matches the predicate. TheSELECTIVITY clause cannot be specified exceptwith a user-defined predicate.

The statement cannot be processed.

User Response: Remove the SELECTIVITYclause following the predicate.

sqlcode: -20046

sqlstate: 428E5

SQL20047N The search method“<method-name>” is not found inthe index extension“<index-ext-name>”.

Explanation: The method “<method-name>”referenced in an exploitation rule of theuser-defined predicate has to match one of thesearch methods specified in the index extension“<index-ext-name>”.

The statement cannot be processed.

User Response: Specify a method defined in theindex extension.

sqlcode: -20047

sqlstate: 42743

SQL20048N The search argument of method“<method-name>” does not matchthe one in the correspondingsearch method in the indexextension “<index-ext-name>”.

Explanation: The search argument provided formethod “<method-name>” does not match theargument of the corresponding search method inthe index extension “<index-ext-name>”. Eitherthe number of arguments or the type of thearguments do not match the defined number ortype of the parameters.

The statement cannot be processed.

User Response: Specify a search argument thatmatches the paramters defined in the indexextension.

sqlcode: -20048

sqlstate: 428E6

SQL20049N Type of an operand following thecomparison operator in the ASPREDICATE WHEN clause doesnot exactly match the RETURNStype.

Explanation: The definition of the user-definedpredicate is not valid. In the AS PREDICATEWHEN clause, the type of the operand followingthe the comparison operator is not an exact

Chapter 2. SQL Messages 457

Page 466: Db2 SQL Errors

match with the RETURNS type of the function.

The statement cannot be processed.

User Response: Specify an the operand with thecorrect data type.

sqlcode: -20049

sqlstate: 428E7

SQL20050N The search target or searchargument “<parameter-name>”does not match a name in thefunction being created.

Explanation: Each search target in an indexexploitation rule has to match some parametername of the function that is being created. Eachsearch argument in an index exploitation rulemust match either an expression name in theEXPRESSION AS clause or a parameter name ofthe function being created. Parameter namesmust be specified in the parameter list for thefunction.

The statement cannot be processed.

User Response: Specify only valid names of thefunction in the search target or search argument.

sqlcode: -20050

sqlstate: 428E8

SQL20051N The argument“<parameter-name>” cannotappear as both a search target anda search argument in the sameexploitation rule.

Explanation: In the exploitation clause, afunction parameter cannot be specified as anargument following KEY and as an argument ofthe method specified following the USEkeyword.

The statement cannot be processed.

User Response: Specify a parameter name ofthe function in no more than on of the searchtarget or the search argument.

sqlcode: -20051

sqlstate: 428E9

SQL20052N Column “<column-name>” is anobject identifier column whichcannot be updated.

Explanation: The UPDATE statement includessetting a column that is an object identifier (OID)column. An OID column cannot be updated.

The statement cannot be processed.

User Response: Remove the SET of″<column-name>″ from the UPDATE statement.

sqlcode: -20052

sqlstate: 428DZ

SQL20053N Fullselect in typed view“<view-name>” is not valid.Reason code = “<reason-code>”.

Explanation: The fullselect specified in thedefinition of typed view “<view-name>” doesnot conform to the rules for the fullselect of atyped view. Possible reason codes follow.

1 A subview definition contains acommon table expression, OR a branchin a subview definition does not rangeover a single table, view, nickname oran alias.

2 The row-set of a branch over atable-hierarchy cannot be proven by thedatabase manager to be distinct fromthe row-set of all branches over thesame table-hierarchy in the rest of thetyped view hierarchy.

3 The first expression of a branch over ahierarchy in the root view is:

v not the object identifier column of thetyped table or typed view referencedin the FROM clause and theUNCHECKED option in the REF ISclause is not used OR

v if the table in the FROM clause is nottyped, the column is nullable or doesnot have a unique index defined ononly that column and the

458 Message Reference, Volume 2

Page 467: Db2 SQL Errors

UNCHECKED option in the REF ISclause is not used OR

v not identical to the expression in thebranch over the same hierarchy in thesubview.

4 A table or view over which a branch ofa subview ranges is not a subtable orsubview of the table or view referencedin any branch of the superview andeither the subview uses EXTEND AS orthe root view does not have theUNCHECKED option in the REF ISclause turned on.

5 The fullselect includes references to theNODENUMBER or PARTITIONfunctions, non-deterministic functions,or functions defined to have externalaction.

6 A branch in a subview cannot rangeover an OUTER table or view if anybranch in its superview ranges over atable or view in the same hierarchywithout using OUTER.

7 A subview ranges over a view in itsown view hierachy.

8 A subview uses a set operation otherthan UNION ALL in its definition ORUNION ALL is used in the definitionwithout specifying the UNCHECKEDoption in the REF IS clause of the rootview.

9 A subview contains two branches of aUNION ALL that range over the sametable hierarchy or view hierarchy.

10 The subview definition contains aGROUP BY or HAVING clause.

User Response: Change the fullselect of theview definition based on the “<reason-code>”.

1 Use only one table or view in the FROMclause. Encapsulate complex selects intoviews that the typed view can rangeover using the UNCHECKED option ofthe root view’s REF IS clause.

2 Specify a different table or view in the

FROM clause of each branch that is notthe same as one already used in theview hierarchy or use a predicates thatclearly define the row-set for eachbranch as distinct compared to therow-sets for other branches in the typedview hierarchy.

3 Ensure that the first column of the rootview conforms to the rules to be a validobject identifier column for the typedview. Consider using the UNCHECKEDoption in the ref is clause.

4 Specify a subtable or subview of thetable or view specified in the FROMclause of a branch of the superview. Oruse the UNCHECKED option in the rootview definition in conjunction with theAS (without EXTEND) clause in thesubview definition.

5 Remove the reference to the functionfrom the fullselect.

6 If this is the first subview to use OUTERin a branch over this hierarchy, changethe FROM clause so that OUTER is notused. If the superview uses OUTER,include OUTER in the FROM clause ofthe subview.

7 Do not source a subview on other viewsin the same hierarchy.

8 If UNION ALL was used, use theUNCHECKED option in the REF ISclause of the rootview to allow multiplebranches in the subview definition. Forother set operations encapsulate the setoperation into a view and use theUNCHECKED option in the subview toallow sourcing on common views.

9 Unify the branches to a select over theircommon supertable or superview anduse predicates (e.g. the type predicate)to filter for the desired rows.

10 Encapsulate the GROUP BY andHAVING clause into a view and use theUNCHECKED option in the root viewto allow sourcing on common views.

Chapter 2. SQL Messages 459

Page 468: Db2 SQL Errors

sqlcode: -20053

sqlstate: 428EA

SQL20054N The table “<table-name>” is in aninvalid state for the operation.Reason code = “<reason-code>”.

Explanation: The table is in a state that doesnot allow the operation. The reason codeindicates the state of the table that prevents theoperation.

21 The table is in Datalink ReconcilePending (DRP) state or DatalinkReconcile Not Possible (DRNP) state.

22 The function cannot be used in agenerated column.

The statement cannot be processed.

User Response: The action is based on thereason code as follows.

21 Refer to the Administration Guide forinformation on Datalink ReconcilePending (DRP) and Datalink ReconcileNot Possible (DRNP) states to takeappropriate action.

22 Use SET INTEGRITY FOR <table-name>OFF before altering the table. Then alterthe table and use SET INTEGRITY FOR<table-name> IMMEDIATE CHECKEDFORCE GENERATED to generate thevalues for the new or altered column.

sqlcode: -20054

sqlstate: 55019

SQL20055N A result column data type in theselect list is not compatible withthe defined data type for column″<column-name>″.

Explanation: The data type of the select listexpression corresponding to ″<column-name>″ isincompatible with the data type for the attributeof the structured type. Both must be:

v Numeric

v Character

v Graphic

v Dates or character

v Times or character

v Timestamps or character

v Datalinks

v the same distinct types

v reference types where the target type of theselect list expression is a subtype of the targettype of the attribute.

The statement cannot be processed.

User Response: Examine the current definitionfor the table and the associated structured type.Ensure the select list expession data type for thespecified column is a compatible type.

sqlcode: -20055

sqlstate: 42854

SQL20056N Processing on DB2 Data LinksManager “<name>” encounteredan error. Reason code =“<reason-code>”.

Explanation: The processing on the DB2 DataLinks Manager for the statement encountered anerror as indicated by the following reason codes.

01 An inconsistency was detected betweenthe data on the DB2 Data LinksManager and a DATALINK value in atable.

02 The DB2 Data Links Manager reached aresource limit during the processing.

99 The DB2 Data Links Managerencountered an internal processingerror.

The statement cannot be processed.

User Response: The action is based on thereason code as follows.

01 Run the reconcile utility on the table.

02 The DB2 Data Links Manageradministrator should identify the

460 Message Reference, Volume 2

Page 469: Db2 SQL Errors

resource from the diagnostic logs andtake corrective action.

99 Save the diagnostic logs from the DB2Data Links Manager and the databasemanager and contact IBM service.

sqlcode: -20056

sqlstate: 58004

SQL20057N Column ″<column-name>″ insubview ″<view-name>″ cannotbe defined as read only when thecorresponding column isupdatable in the superview.

Explanation: The column identified by″<column-name>″ in the subview″<view-name>″ is defined (implicitly) as readonly. The superview of ″<view-name>″ includesthe corresponding column that is updatable. Acolumn cannot be changed from updatable toread only in a typed view hierarchy.

The statement cannot be processed.

User Response: Change the CREATE VIEWstatement so that the column of the subview″<view-name>″ is updatable or drop thesuperview(s) and recreate them using the READONLY clause to force the column to be read only.

sqlcode: -20057

sqlstate: 428EB

SQL20058N The fullselect specified for thesummary table ″<table-name>″ isnot valid.

Explanation: The summary table definition hasspecific rules regarding the contents of thefullselect. Some rules are based on the summarytable options (REFRESH DEFERRED orREFRESH IMMEDIATE) while others are basedon whether or not the table is replicated. Thefullselect in the CREATE TABLE statement thatreturned this condition violates at least one ofthe rules as described in the SQL Reference.

The statement cannot be processed.

User Response: Change the fullselect in theCREATE TABLE statement so that so that itconforms to the rules based on the summarytable options and whether or not the summarytable is replicated.

sqlcode: -20058

sqlstate: 428EC

SQL20059W The summary table″<table-name>″ may not be usedto optimize the processing ofqueries.

Explanation: The summary table is defined withREFRESH DEFERRED and a fullselect that iscurrently not supported by the database managerwhen optimizing the processing of queries. Therules are based on the summary table options(REFRESH DEFERRED or REFRESHIMMEDIATE). The fullselect in the CREATETABLE statement that returned this conditionviolates at least one of the rules as described inthe SQL Reference.

The summary table is successfully created.

User Response: No action is required. If thesummary table was intended for use inoptimizing the processing of queries, redefine thefullselect to ensure that it is a subselect thatincludes a GROUP BY clause.

sqlcode: +20059

sqlstate: 01633

SQL20060N The key transform table functionused by the index extension ofindex “<index-id>” of table“<table-id>” in “<tbspace-id>”generated duplicate rows.

Explanation: The key transform table functionspecified by the GENERATE USING clause of theindex extension used by index “<index-id>”generated duplicate rows. For a given invocationof the key transform table function, no duplicaterows should be produced. This error is occuredwhen inserting or updating the key value for theindex “<index-id>” of table “<table-id>” in tablespace “<tbspace-id>”.

Chapter 2. SQL Messages 461

Page 470: Db2 SQL Errors

The statement cannot be processed.

User Response: The code for the key transformtable function used by the index extension ofindex “<index-id>” must be modified to avoidthe creation of duplicate rows.

To determine the index name, use the followingquery:

SELECT IID, INDSCHEMA, INDNAMEFROM SYSCAT.INDEXES AS I,

SYSCAT.TABLES AS TWHERE IID = <index-id>

AND TABLEID = <table-id>AND TBSPACEID = <tbspace-id>AND T.TBASCHEMA = I.TABSCHEMAAND T.TABNAME = I.TABNAME

sqlcode: -20060

sqlstate: 22526

SQL20062N Transform function“<transform-type>” in transformgroup “<group-name>” for type“<type-name>” cannot be used fora function or method.

Explanation: The transform function defined inthe transform group “<group-name>” for type“<type-name>” cannot be used for a function ormethod because the transform function is notwritten in SQL (defined with LANGUAGE SQL).The transform group cannot be used for thisfunction or method.

The statement cannot be processed.

User Response: Specify a transform group fortype “<type-name>” that has the transformfunctions defined with LANGUAGE SQL.

sqlcode: -20062

sqlstate: 428EL

SQL20063N TRANSFORM GROUP clausemust be specified for type“<type-name>”.

Explanation: The function or method includes aparameter or returns data type of “<type-name>”that does not have a transform group specified.

The statement cannot be processed.

User Response: Specify a TRANSFORMGROUP clause with a transform group name thatis defined for “<type-name>”.

sqlcode: -20063

sqlstate: 428EM

SQL20064N Transform group “<group-name>”does not support any data typespecified as a parameter orreturned data type.

Explanation: The transform group“<group-name>” specified in the TRANSFORMGROUP clause is not defined for any data typethat is included in the parameter list or theRETURNS clause of a function or method.

The statement cannot be processed.

User Response: Remove the transform groupfrom the function or method definition.

sqlcode: -20064

sqlstate: 428EN

SQL20065N Transform group “<group-name>”for data type “<type-name>”cannot be used to transform astructured type for use with aclient application.

Explanation: The transform group“<group-name>” for data type “<type-name>”defines a transform function that cannot be usedwhen performing transforms for clientapplications. The possible reasons for this arebased on the definition of the transform functionthat is not supported for client applications. Theunsupported transform function may be:

v a FROM SQL function that is a ROW function

v a TO SQL function has more than oneparameter

The statement cannot be processed.

User Response: For static embedded SQL,specify a different transform group using theTRANSFORM GROUP bind option. For dynamicSQL, specify a different transform group using

462 Message Reference, Volume 2

Page 471: Db2 SQL Errors

the SET DEFAULT TRANSFORM GROUPstatement.

sqlcode: -20065

SQL20066N The “<transform-type>” transformfunction is not defined in thetransform group “<group-name>”for data type “<type-name>”.

Explanation: The “<transform-type>” transformfunction of transform group “<group-name>” fordata type “<type-name>” is required for atransform group used in a function or methoddefinition.

The statement cannot be processed.

User Response: If creating a function ormethod, specify a different transform group inthe function or method definition. If referencinga structured type in a dynamic SQL statement,specify a different transform group for theCURRENT DEFAULT TRANSFORM GROUPspecial register. Alternatively, add a“<transform-type>” transform function to thetransform group “<group-name>” for data type“<type-name>”.

sqlcode: -20066

sqlstate: 42744

SQL20067N The “<transform-type>” transformfunction is defined more thanonce in the transform group“<group-name>” for data type“<type-name>”.

Explanation: A TO SQL or FROM SQLtransform function can only be specified once ina transform group. The transform group“<group-name>” for data type “<type-name>”has at least two FROM SQL or TO SQL (or both)transform functions defined.

The statement cannot be processed.

User Response: Delete the TO SQL or FROMSQL definitions from “<group-name>” in thetransform definition so that there is only one ofeach.

sqlcode: -20067

sqlstate: 42628

SQL20068N The structured type“<type-name>” may not bedefined so that one of its attributetypes directly or indirectly usesitself. The attribute“<attribute-name>” causes thedirect or indirect use.

Explanation: Direct use: Type A is said todirectly use type B if one of the following is true:

v Type A has an attribute of type B

v Type B is a subtype of A, or a supertype of A.

Indirect use: Type A is said to indirectly use typeB if the following is true:

v Type A uses type C, and type C uses type B.

You cannot define a type so that one of itsattribute types directly or indirectly uses itself.The type for attribute “<attribute-name>” is thecause of the direct or indirect use.

User Response: Evaluate the type and removethe attribute type that causes the direct orindirect use.

sqlcode: -20068

sqlstate: 428EP

SQL20069N The RETURNS type of the“<routine-type>”“<routine-name>” is not the sameas the subject type.

Explanation: The method “<method-name>”specifies SELF AS RESULT. The RETURNS datatype of the method must be the same as thesubject data type of the method.

User Response: Change the RETURNS type ofthe method “<method-name>” to match thesubject type.

sqlcode: -20069

sqlstate: 428EQ

Chapter 2. SQL Messages 463

Page 472: Db2 SQL Errors

SQL20075N The index or index extension“<index-name>” cannot be createdor altered because the length of“<column-name>” is more than255 bytes.

Explanation: The index could not be created oraltered because the key column length is greaterthan 255.

v “<index-name>” is the index name.

v “<column-name>” is the name of the keycolumn. If this error was returned from anALTER TABLE operation, then the value of“<column-name>” is the column number ofthe table.

The index extension could not be created becausea column returned by the GENERATE KEYfunction is greater than 255 bytes.

v “<index-name>” is the index extension name.

v “<column-name>” is the name of a columnreturned by the GENERATE KEY function.

The statement could not be processed. Thespecified index or index extension was notcreated, or the table could not be altered.

User Response: If creating an index, eliminatethe column from the index definition. If alteringa table, reduce the new column length to thepermitted maximum. If creating an indexextension, specify a different GENERATE KEYfunction, or redefine the function to eliminate thecolumn.

sqlcode: -20075

sqlstate: 54008

SQL20076N The instance for the database isnot enabled for the specifiedaction or operation. Reason code =“<reason-code>”.

Explanation: An error has been detected at theinstance level. The requested operation cannot becompleted because a specified functional areawas not installed or because a specifiedfunctional area was not enabled to the instance.

The following is the list of reason codes and

associated functional areas you can enable at theinstance level:

1. The ability to execute distributed requestoperations against multiple data sources in asingle statement.

User Response: Enable the instance for therequested action or operation. First, install thespecified functional area if it is missing. Then,enable the specified functional area. Enablementsteps vary by “<reason-code>”:

1. Set the DBM variable <DREQ> to ON andthen restart the database manager. For afederated server, set the DBM variable<FEDERATED> to YES and then restart thedatabase manager.

sqlcode: -20076

sqlstate: 0A502

SQL20077N Cannot construct structured typeobjects that have Datalink typeattributes.

Explanation: An attempt was made to invokethe constructor of a structured type which has aDatalink and/or a Reference type attribute. Thisfunctionality is currently not supported. InVersion 6.1 or earlier, this error may also beissued for a structured type object with aReference type attribute.

The statement cannot be processed.

User Response: The error can be corrected bydoing one of the following:

1. Removing the invocation of the constructor ofthe type from the program.

2. Removing any Datalink (or Reference) typeattributes from the definition of thestructured type (this may not be possible ifthere are any tables that depend on this type).

sqlcode: -20077

sqlstate: 428ED

464 Message Reference, Volume 2

Page 473: Db2 SQL Errors

SQL20078N Hierarchy object “<object-name>”of type “<object-type>” can not beprocessed using operation“<operation-type>”.

Explanation: The operation “<operation-type>”was attempted using a hierarchy object named“<object-name>” of type “<object-type>”. Thisoperation does not support processing of ahierarchy object.

The statement could not be processed.

User Response: Verify that the correct objectname was used. For objects types TABLE orVIEW, the object must be the name of a subtablein the table or view hierarchy. In some cases, theobject must specifically name the root table. Forobjects of type index, the name must be a nameof an index created on a subtable.

sqlcode: -20078

sqlstate: 42858

SQL20080N Method specification for“<method-name>” cannot bedropped because a method bodyexists.

Explanation: The method specification“<method-name>” still has an existing methodbody that must be dropped before the methodspecification can be dropped.

The statement cannot be processed.

User Response: Use the DROP METHODstatement with the same method specification todrop the method body and then issue the ALTERTYPE statement again to drop the methodspecification.

sqlcode: -20080

sqlstate: 428ER

SQL20081N The method body cannot bedefined for a LANGUAGE“<language-type>” methodspecification “<method-name>”.

Explanation: The methodspecification“<method-name>” is defined with

LANGUAGE “<language-type>”. If theLANGUAGE is SQL, the method body must bean SQL control statement. For other languages,the EXTERNAL clause must be specified.

The statement cannot be processed.

User Response: Change the method body tomatch the LANGUAGE specified in the methodspecification.

sqlcode: -20081

sqlstate: 428ES

SQL20082N The dynamic type“<expression-type-id>” of theexpression is not a subtype of thetarget data type “<target-type-id>”in a TREAT specification.

Explanation: The dynamic data type of theresult of the expression specified in the TREATspecification is “<expression-type-id>”. Thespecified target data type “<target-type-id>” is aproper subtype of “<expression-type-id>” whichis not allowed.

The statement cannot be processed.

User Response: Change the “<target-type-id>”of the TREAT specification to a supertype of“<expression-type-id>” or change the expressionso that the dynamic data type of the result is asubtype of “<target-type-id>”.

To determine the data type names for“<expression-type-id>” and “<target-type-id>”,use the following query:

SELECT TYPEID, TYPESCHEMA, TYPENAMEFROM SYSCAT.DATATYPESWHERE TYPEID IN INTEGER(“<expression-type-id>”),INTEGER(“<target-type-id>”))

sqlcode: -20082

sqlstate: 0D000

Chapter 2. SQL Messages 465

Page 474: Db2 SQL Errors

SQL20083N The data type of the valuereturned by “<routine-type>”“<routine-id>” does not match thedata type specified as RESULT.

Explanation: The method “<routine-id>”specifies SELF AS RESULT and therefore requiresthat the data type of the value returned must bethe same as the subject data type used to invokethe method. The RETURN statement in either theSQL method body or in the TO SQL transformfunction for the type of an external methodresulted in the incorrect data type.

The statement cannot be processed.

User Response: Change the RETURN statementof the method or transform function to ensurethat the data type of the returned value is alwaysthe subject type used to invoke the method.

To determine the routine name associated withthe “<routine-id>”, use the following query:

SELECT FUNCSCHEMA, FUNCNAME, SPECIFICNAMEFROM SYSCAT.FUNCTIONSWHERE FUNCID = INTEGER(“<routine-id>”)

sqlcode: -20083

sqlstate: 2200G

SQL20084N The “<routine-type>”“<routine-name>” would definean overriding relationship with anexisting method.

Explanation: A method MT, with subject type T,is defined to override another method MS, withsubject type S, if all of the following conditionsare true:

v MT and MS have the same unqualified nameand the same number of parameters.

v T is a proper subtype of S.

v The non-subject parameter-types of MT are thesame as the corresponding non-subjectparameter-types of MS. (Here, “same” appliesto the basic type, such as VARCHAR,disregarding length and precision).

No method may override, or be overridden by,another method. Furthermore, a function and a

method may not be in an overriding relationship.This means that if the function were a methodwith its first parameter as subject S, it must notoverride another method of any supertype of Sand it must not be overriden by another methodof any subtype of S.

The statement cannot be processed.

User Response: Change the routine that isbeing defined to use a different routine namethan “<routine-name>” or change the parametersof the routine.

sqlcode: -20084

sqlstate: 42745

SQL20085N A routine defined withPARAMETER STYLE JAVA cannothave structured type“<type-name>” as a parametertype or as the returns type.

Explanation: A routine is defined withPARAMETER STYLE JAVA and one of theparameter types or a returns type is definedusing the structured type “<type-name>”. This isnot supported by this version of DB2.

The statement cannot be processed.

User Response: Change to a different parameterstyle for the routine or remove the structuredtype from the routine definition.

sqlcode: -20085

sqlstate: 429B8

SQL20086N Length of the structured typevalue for a column exceeds thesystem limit.

Explanation: The value for a structured typecolumn exceeds 1 gigabyte in overall size,including descriptor data for the instance. Thecolumn could be one that is being inserted orupdated directly or it may be a column that isgenerated.

The statement cannot be processed.

User Response: Reduce the size of the

466 Message Reference, Volume 2

Page 475: Db2 SQL Errors

structured type value that is being assigned tothe column.

sqlcode: -20086

sqlstate: 54049

SQL20087N DEFAULT or NULL cannot beused in an attribute assignment.

Explanation: The UPDATE statement is usingan attribute assignment to set the value of anattribute in a structured type column. This formof assignment statement does not allow the useof the keyword DEFAULT or the keyword NULLas the right hand side of the assignment.

The statement cannot be processed.

User Response: Specify an expression for theright hand side of the attribute assignment orchange the assignment so it is not using theattribute assignment syntax.

sqlcode: -20087

sqlstate: 428B9

SQL20089N A method name cannot be thesame as a structured type namewithin the same type hierarchy.

Explanation: A specified method name is thesame as the structured type which is defined forone of the supertypes or subtypes of thestructured type.

The statement cannot be processed.

User Response: Specify a different name for themethod.

sqlcode: -20089

sqlstate: 42746

SQL20090W The use of the structured typehaving attribute“<attribute-name>” of typeDATALINK is effectively limitedto the type of a typed table ortype view.

Explanation: The attribute “<attribute-name>”is defined with a type of DATALINK or adistinct type based on a DATALINK. Astructured type that includes such an attributecan only be used as the type of a table or view. Ifused as the type of a column of a table or view itcan only be assigned the null value.

The statement continued processing.

User Response: Consider the intended use ofthe structured type. If the type will be used as acolumn data type, then remove the attribute“<attribute-name>” from the structured type oruse a data type other than DATALINK for theattribute.

sqlcode: +20090

sqlstate: 01641

SQL20093N The table “<table-name>” cannotbe converted to or from asummary table. Reason code =“<reason-code>”.

Explanation: The ALTER TABLE statement isbeing used to change a table from a summarytable to DEFINITION ONLY or to convert aregular table to a summary table. The ALTERTABLE statement failed as indicated by thefollowing reason codes.

1 The table is a typed table or hierarchytable.

2 The table is not a summary table andDEFINITION ONLY was specified.

3 The table is a replicated summary tableand DEFINITION ONLY was specified.

4 The table has at least one triggerdefined.

5 The table has at least one checkconstraint defined.

Chapter 2. SQL Messages 467

Page 476: Db2 SQL Errors

6 The table has at least one uniqueconstraint or unique index defined.

7 The table has at least one referentialconstraint defined.

8 The table is referenced in the definitionof an existing summary table.

9 The table is referenced directly orindirectly (through a view, for example)in the fullselect.

10 The table is already a summary table.

11 The number of columns of the existingtable does not match the number ofcolumns defined in the select list of thefullselect.

12 The data types of the columns of theexisting table do not exactly match thecorresponding columns in the select listof the fullselect.

13 The column names of the columns ofthe existing table do not exactly matchthe corresponding column names in theselect list of the fullselect.

14 The nullability characteristics of thecolumns of the existing table do notexactly match the nullabilitycharacteristics of the correspondingcolumns in the select list of thefullselect.

15 The conversion cannot be performed ifthere are any other table alterations inthe same ALTER TABLE statement.

User Response: The action is based on thereason code as follows.

1 The table cannot be converted to asummary table. Create a new summarytable instead.

2 There is no need to convert this table.No action required.

3 A replicated table can only be asummary table. Create a new tableinstead.

4 Drop any triggers and try the ALTERTABLE statement again.

5 Drop any check constraints and try theALTER TABLE statement again.

6 Drop any unique constraints and uniqueindexes. Try the ALTER TABLEstatement again.

7 Drop any referential constraints and trythe ALTER TABLE statement again.

8 Drop the summary table that referencesthe table and try the ALTER TABLEstatement again.

9 A summary table cannot reference itself.Modify the fullselect to remove thedirect or indirect reference to the tablebeing altered.

10 The operation is not allowed since thetable is already a summary table.

11 Modify the fullselect to include thecorrect number of columns in the selectlist.

12 Modify the fullselect so that the resultcolumn data types exactly match thedata types of the corresponding existingcolumns.

13 Modify the fullselect so that the resultcolumn names exactly match thecolumn names of the correspondingexisting columns.

14 The table cannot be converted to asummary table unless the nullabilitycharacteristics can be matched. Create anew summary table instead.

15 Perform the other table alterations in anALTER TABLE statement that does notinclude the SET SUMMARY AS clause.

sqlcode: -20093

sqlstate: 428EW

468 Message Reference, Volume 2

Page 477: Db2 SQL Errors

SQL20094N The column “<column-name>” isGENERATED using an expressionand cannot be used in theBEFORE trigger “<trigger-name>”.

Explanation: The value for column“<column-name>” is generated using anexpression and cannot be named in the columnname list of a BEFORE UPDATE trigger or

referenced as a new transition variable in aBEFORE trigger.

User Response: Remove the reference to“<column-name>” in the trigger“<trigger-name>”.

sqlcode: -20094

sqlstate: 42989

SQL20100 - SQL20199

SQL20108N A result set contains anunsupported data type in position“<position-number>” for thecursor “<cursor-name>” openedby the stored procedure“<procedure-name>”.

Explanation: The stored procedure named byprocedure-name cannot return at least one of itsquery result sets named by cursor-name becauseat least one of the columns, columnposition-number contains a data type which isnot supported by either the DRDA ApplicationRequestor (client) or the DRDA ApplicationServer (server). As such the call to the storedprocedure fails.

User Response: Modify the OPEN statement(and subsequent FETCH statements) for cursorcursor-name in the stored procedureprocedure-name on the server to not select theunsupported data type in columnposition-number. The client application whichinvoked the stored procedure may need to bemodified to reflect the change in the storedprocedure.

sqlcode: -20108

sqlstate: 56084

SQL20109W Error in DB2 debugger support.Reason code: “<reason-code>”.

Explanation: The debugger support had anerror situation which will disable debugging, butnot affect normal execution. The following is alist of reason codes:

1. The debugger support is not installed.

2. There has been a syntax error in IP address ofdebugger client in the debugger table.

3. A timeout in the communication between thedebugger backend and the debugger clientoccurred.

4. A problem occured accessing the debuggertable DB2DBG.ROUTINE_DEBUG.

User Response:

1. Verify that you install the debugger option onthe DB2 server machine.

2. Make sure that the IP address in thedebugger table has the correct syntax.

3. Check that the debugger demon on the clientis started and that the ports on the client andserver match.

4. Verify that you have created the debuggertables with the correct layout.

sqlcode: +20109

sqlstate: 01637

SQL20111N A SAVEPOINT, RELEASESAVEPOINT, or ROLLBACK TOSAVEPOINT statement cannot beissued in this context. Reasoncode = “<reason-code>”.

Explanation: The statement cannot be processedbecause it violates a restriction as indicated bythe following reason code:

1. Savepoint cannot be issued inside a trigger.

2. Savepoint cannot be issued inside a globaltransaction.

The statement cannot be processed.

Chapter 2. SQL Messages 469

Page 478: Db2 SQL Errors

User Response: Remove the SAVEPOINT,RELEASE SAVEPOINT, or ROLLBACK TOSAVEPOINT statement in the trigger or globaltransaction.

sqlcode: -20111

sqlstate: 3B503

SQL20112N A SAVEPOINT cannot be setbecause a SAVEPOINT alreadyexists and nested SAVEPOINTSare not supported.

Explanation: An error occurred in aSAVEPOINT or atomic compound SQLstatement. A savepoint already exists and nestedsavepoints are not supported in thisenvironment.

User Response: If re-establishing an existingsavepoint is necessary, issue the RELEASESAVEPOINT statement to free the existingsavepoint, and then reissue the SAVEPOINTstatement. For atomic compound SQL, aSAVEPOINT cannot be set until after the end ofthe compound statement.

sqlcode: -20112

sqlstate: 3B002

SQL20113N Null cannot be returned frommethod “<method-id>” definedwith SELF AS RESULT.

Explanation: The method with methodidentifier “<method-id>” is defined with SELFAS RESULT. The invocation of the method useda non-null instance of a structured type so themethod cannot return a null instance.

User Response: Change the methodimplementation to ensure that a null value is notreturned as the return value for the method. Onepossibility is to set all the attributes of thereturned structured type to null value. Todetermine the name of the method that failed,use the following query:

SELECT FUNCSCHEMA, FUNCNAME, SPECIFICNAMEFROM SYSCAT.FUNCTIONSWHERE FUNCID = method-id

sqlcode: -20113

sqlstate: 22004

SQL20114W Column “<column-name>” intable “<table-name>” is not longenough for the defined length ofthe USER default value.

Explanation: The column “<column-name>” isdefined with a length that is less than 128 bytes.The clause DEFAULT USER has been specifiedfor this column. Since the USER special registeris defined as VARCHAR(128), any attempt toassign the default value for “<table-name>” by auser with a user ID longer than the columnlength results in an error. A user with a user IDlonger than the column length would never beable to insert or update this column to thedefault value.

User Response: If your system standards wouldnot allow a user ID to exceed the length of thecolumn, then this warning may be ignored. Toprevent this warning from occuring, the length ofthe column must be at least 128 bytes. You canchange the column length by dropping andcreating the table again, or, if the data type isVARCHAR, by using ALTER TABLE to increasethe length of the column.

sqlcode: +20114

sqlstate: 01642

SQL20115N The “<routine-type>”“<routine-name>” cannot be usedas a “<transform-type>” transformfunction in transform group“<group-name>”.

Explanation: If “<routine-type>” is FUNCTION,then the function defined by “<routine-name>”cannot be used as a transform function because itis a builtin function. If “<routine-type>” isMETHOD, then the method defined by“<routine-name>” cannot be used as a transformfunction because it is a method.

The statement cannot be processed.

User Response: Specify a different function for

470 Message Reference, Volume 2

Page 479: Db2 SQL Errors

the “<transform-type>” transform function oftransform group “<group-name>”.

sqlcode: -20115

sqlstate: 428EX

SQL20116N The data type of the search target“<parameter-name>” does notmatch that of the source keyspecified in the index extension“<index-extension-name>”.

Explanation: If the search target is of a built-inor distinct data type, its type must exactly matchthat of the source key specified in the indexextension. If the data type of the search target isa structured type, it must be in the samestructured type hierarchy as the data type of thesource key in the index extension.

The statement cannot be processed.

User Response: Specify a search target with adata type that matches that of the source key inthe index extension.

sqlcode: -20116

sqlstate: 428EY

SQL20117N A window specification for anOLAP function is not valid.Reason code = “<reason-code>”.

Explanation: The window specification (OVERclause) of an OLAP function invocation is notcorrectly specified. The incorrect specification isindicated by the “<reason-code>”.

1 RANGE is specified without an ORDERBY in the window specification.

2 RANGE is specified and the windowORDER BY clause includes more thanone sort-key-expression.

3 RANGE is specified and the data typeof the range value cannot be used in asubtraction expression with the datatype of the sort-key-expression in thewindow ORDER BY clause.

4 UNBOUNDED PRECEDING is specified

after CURRENT ROW or UNBOUNDEDFOLLOWING is specified beforeCURRENT ROW.

The statement cannot be processed.

User Response: Change the windowspecification to correct the invalid specificationindicated by the “<reason-code>”.

1 Add a window ORDER BY clause toeach window specification that specifiesRANGE.

2 Ensure that each window specificationthat includes RANGE has exactly onesort-key-expression in the windowORDER BY clause.

3 For each window specification thatincludes RANGE, ensure that the rangevalue can be subtracted from thesort-key-expression in the windowORDER BY clause, which must be anumeric type or a datetime type. Fordatetime sort-key-expressions, the rangevalue must be the specific datetimeduration DECIMAL type with thecorrect precision and scale.

4 Ensure that any window specificationusing “BETWEEN” and “CURRENTROW” has the “UNBOUNDEDPRECEDING” before “AND CURRENTROW” or “UNBOUNDEDFOLLOWING” after “CURRENT ROWAND”.

sqlcode: -20117

sqlstate: 428EZ

SQL20118N Structured type “<type-name>”has more than the maximumnumber of allowable attributes.The maximum is “<max-value>”.

Explanation: The maximum number ofattributes, including inherited attributes, allowedfor each structured type has been exceeded withthe definition of structured type “<type-name>”.The maximum number of attributes, including

Chapter 2. SQL Messages 471

Page 480: Db2 SQL Errors

inherited attributes, is “<max-value>”.

The statement cannot be processed.

User Response: Ensure that the number ofattributes for the structured type does not exceedthe limit.

sqlcode: -20118

sqlstate: 54050

SQL20119N A ROW function must define atleast two columns.

Explanation: A function that specifies ROW inthe RETURNS clause must include a column listwith at least two columns.

User Response: Either remove the ROWkeyword from the RETURNS clause to make it ascalar function or specify multiple columns inthe column list of the RETURNS clause.

sqlcode: -20119

sqlstate: 428F0

SQL20120N An SQL TABLE function mustreturn a table result.

Explanation: An SQL function that specifiesTABLE in the RETURNS clause must return aresult that is a table. With the exception of ascalar fullselect, a scalar expression cannot bereturned as the result of an SQL TABLE function.

User Response: Either remove the TABLEkeyword from the RETURNS clause to make it ascalar function or specify a fullselect in theRETURN statement of the TABLE function body.

sqlcode: -20120

sqlstate: 428F1

SQL20200 - SQL20299

SQL20200N The install or replace of“<jar-id>” failed as “<url>” couldnot be located.

Explanation: The URL specified on the install orreplace jar procedure did not identify a valid jarfile.

User Response: Reissue the install or replace jarprocedure with a URL that identifies a valid jarfile.

sqlcode: -20200

sqlstate: 46001

SQL20201N The install, replace or remove of“<jar-id>” failed as the jar nameis invalid.

Explanation: The jar name specified on theinstall, replace or remove jar procedure wasinvalid. For example, the jar id may be of theimproper format, may not exist to be replaced orremoved, or can not be installed as it alreadyexists.

User Response: Ensure the jar id is of the

correct format. If the jar id exists, it may need tobe removed before it can be installed. For theremove or replace procedures, ensure the jar idexists.

sqlcode: -20201

sqlstate: 46002

SQL20202N The replace or remove of“<jar-id>” failed as “<class>” is inuse.

Explanation: The specified class in the jar file iscurrently in use by a defined procedure, or thereplacement jar file does not contain the specifiedclass for which a procedure is defined.

User Response: Ensure all proceduresreferencing the classes being removed aredropped and resubmit the replace or removeprocedure.

sqlcode: -20202

sqlstate: 46003

472 Message Reference, Volume 2

Page 481: Db2 SQL Errors

SQL20203N User defined function orprocedure “<function-name>” hasa Java method with an invalidsignature.

Explanation: The signature of the java methodused to implement the function or procedure wasinvalid. For example, the method may haveparameters that are not mappable to theparameters on the corresponding createstatement or the method for a procedure mayspecify a return value.

User Response: Reissue the correspondingCREATE statement specifying parameters thatmatch the Java method, or correct the parametersor return type of the Java method and rebuildthe class.

sqlcode: -20203

sqlstate: 46007

SQL20204N The user defined function orprocedure “<function-name>” wasunable to map to a single Javamethod.

Explanation: The identified function orprocedure either failed to find a matching Javamethod, or found more than 1 matching Javamethod.

User Response: Correct either the Java methodor corresponding create statement so that thefunction or procedure call resolves to a singleJava method.

sqlcode: -20204

sqlstate: 46008

SQL20205N The user defined function orprocedure “<function-name>” hasan input argument with a nullvalue that could not be passed tothe method.

Explanation: A function created with ″CALLEDON NULL INPUT″ or procedure has an input

parameter with a null value but the Javadatatype of this argument does not support nullvalues. Examples of Java datatypes that do notsupport null values are BOOLEAN, BYTE,SHORT, INT, LONG or DOUBLE.

User Response: If the method is to be calledwith null values, ensure the input Java types arecapable of accepting a null value. For functions,the function could also be created with″RETURNS NULL ON NULL INPUT″.

sqlcode: -20205

sqlstate: 39004

SQL20206W The procedure “<function-name>”returned too many result sets.

Explanation: The specified procedure returnedmore results sets than were specified on theCREATE PROCEDURE statement.

User Response: Modify the procedure to returnfewer result sets, or drop and recreate theprocedure specifying the correct number of resultsets.

sqlcode: +20206

sqlstate: 0100E

SQL20207N The install or remove jarprocedure for “<jar-id>” specifiedthe use of a deploymentdescriptor.

Explanation: The DEPLOY or UNDEPLOYparameter of the install or replace jar procedurewas non-zero; this parameter is not supportedand must be zero.

User Response: Reissue the procedure with theDEPLOY or UNDEPLOY parameter set to zero.

sqlcode: -20207

sqlstate: 46501

SQL29000 - SQL29100

Chapter 2. SQL Messages 473

Page 482: Db2 SQL Errors

SQL29000N The value specified forDYN_QUERY_MGMT is notvalid. DB2 Query Patroller is notinstalled on this server.

Explanation: The attempt to update thedatabase configuation parameterDYN_QUERY_MGMT to ENABLE failed becausethe DB2 Query Patroller server is not installed.

User Response: Install the DB2 Query Patrollerserver.

SQL29001N This database client level is notcompatible with the level of DB2Query Patroller server you arerunning on.

Explanation: The client and server code are notcompatible.

SQL29002N DB2 Query Patroller is notinstalled on this server.

Explanation: DB2 Query Patroller server tablesdo not exist on the server.

User Response: Install the DB2 Query Patrollerserver.

SQL29003N DB2 Query Patroller could notload Java class “<class-name>”,reason code “<reason-code>”.

Explanation: An error occurred while trying toload the Java class “<class-name>”. The reasoncodes are:

1 The class was not found on theCLASSPATH.

User Response: Ensure the “<class-name>” isinstalled in the CLASSPATH.

SQL29004N DB2 Query Patroller class“<class-name>” cannot callmethod “<method-name>” withsignature “<signature>”.

Explanation: The Java method“<method-name>” cannot be found.

User Response: Ensure that the correct versionof the DB2 Query Patroller client is installed.

SQL29005N User “<user-ID>” is not definedin the user profile table.

Explanation: User “<user-ID>” is not defined inthe user profile table. The user, or the group towhich the user belongs, must be defined in theuser profile table.

User Response: Use Query Administration todefine the user in the user profile table.

SQL29006N Java exception“<exception-string>” was thrown.

Explanation: Java exception“<exception-string>” was thrown.

User Response: Please refer to the First FailureData Service Log (db2diag.log) for additionalinformation.

If the problem persists contact your technicalservice representative.

SQL29007N DB2 Query Patroller Server is notavailable.

Explanation: DB2 Query Patroller server is notrunning.

User Response: Start DB2 Query Patrollerserver and resubmit your query.

SQL29008N Error encountered during jobsequence number generation.

Explanation: An error was encountered duringjob sequence number generation.

User Response: Please refer to the First FailureData Service Log (db2diag.log) and the DB2Query Patroller log file (syserr.log) for additionalinformation.

If the problem persists contact your technicalservice representative.

474 Message Reference, Volume 2

Page 483: Db2 SQL Errors

SQL29009N Error encountered whensubmitting a new job. Reasoncode “<reason-code>”.

Explanation: An error was encountered duringsubmission of a new job.

User Response: Examine the reason code andresubmit the query.

SQL29010N The query has been cancelled.

Explanation: User has cancelled the query.

SQL29011I Job “<job-ID>” has beensubmitted.

Explanation: Job “<job-ID>” has been submittedto the DB2 Query Patroller server.

SQL29012N Job “<job-ID>” has been aborted.

Explanation: Job “<job-ID>” has been aborted.

User Response: Use QueryMonitor or theiwm_cmd command to examine the reason forthe aborted job and resubmit the query.

SQL29013I Job “<job-ID>” has been held.

Explanation: Job “<job-ID>” has been put onhold.

SQL29014N The value specified for DB2registry variable“<registry-variable>” is invalid.

Explanation: The value specified for“<registry-variable>” is invalid because of thefollowing restrictions by “<registry-variable>”:

DQP_NTIERThe value must be one of OFF,RUN[:timeout], or CHECK[:timeout].

DQP_LAST_RESULT_DESTThe length must not exceed 32characters.

DQP_TRACEFILEThe length must not exceed 256characters.

User Response: Correct the value of the DB2registry variable “<registry-variable>” with thedb2set command and resubmit the query.

SQL29015N Error encountered during jobcancellation. Reason code:“<reason-code>”.

Explanation: An error was encountered whiletrying to cancel a job. The reason code maps toan SQL or DB2 message.

User Response: Examine the reason code,correct the error, and retry the action again.

SQL29016N The data source on the client doesnot match the data source on theDB2 Query Patroller server.

Explanation: The data source to which theclient is connected does not match the datasource that is used by the DB2 Query Patrollerserver.

User Response: Ensure that the DB2DBDFTprofile variable on the DB2 Query Patrollerserver matches the client data source name.

SQL29017N Job “<job-id>” has beencancelled.

Explanation: Job “<job-id>” has been cancelled.

User Response: None.

SQL29018N The DB2 Query Patroller Client isnot installed.

Explanation: The user is querying a databasewhich has enabled the database configurationparameter DYN_QUERY_MGMT. However, theDB2 Query Patroller client code is not installedon the client machine.

User Response: Install the QueryEnablercomponent of the DB2 Query Patroller client.

SQL29019N Jobs have been scheduled on theDB2 Query Patroller server.

Explanation: Jobs have been scheduled on theDB2 Query Patroller server.

Chapter 2. SQL Messages 475

Page 484: Db2 SQL Errors

User Response: None.

SQL30000 - SQL30099

SQL30000N Execution failed because of aDistributed Protocol Error thatwill not affect the successfulexecution of subsequentcommands or SQL statements:Reason Code “<reason-code(subcode)>”.

Explanation: A system error occurred thatprevented successful processing of the currentenvironment command or SQL statement. Thismessage (SQLCODE) is produced at statementcompilation or execution time.

The command or statement cannot be processed.The current transaction is not rolled back and theapplication remains connected to the remotedatabase.

User Response: Record the message numberand the reason code. Record all error informationfrom the SQLCA, if possible. Attempt to rerunthe application.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Required information:

v Problem description

v SQLCODE and reason code

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30000

sqlstate: 58008

SQL30002N The SQL statement cannot beexecuted due to a prior conditionin a chain of statements.

Explanation: An SQL statement was chained toPREPARE, but the PREPARE statement has

received a warning SQLCODE that requires theprogram or end user to either re-issue thechained statement or issue a different SQLrequest. This error can occur only in aclient/server environment.

v A distributed client using DRDA has chainedan OPEN statement to a PREPARE, but thePREPARE statement received SQLCODE+1140.

The statement cannot be executed as chained.

User Response: The statement must be sentagain as a separate request.

sqlcode: -30002

sqlstate: 57057

SQL30020N Execution failed because of aDistributed Protocol Error thatwill affect the successfulexecution of subsequentcommands and SQL statements:Reason Code “<reason-code>”.

Explanation: A system error occurred thatprevented successful execution of the currentenvironment command or SQL statement, as wellas any subsequent commands or SQL statements.

The command or statement cannot be processed.The current transaction is rolled back and theapplication is disconnected from the remotedatabase.

User Response: Record the message number(SQLCODE) and the reason code. Record allerror information from the SQLCA, if possible.Attempt to connect the remote database andrerun the application.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Required information:

476 Message Reference, Volume 2

Page 485: Db2 SQL Errors

v Problem description

v SQLCODE and reason code

v SQLCA contents if possible

v Trace file if possible.

Some possible reason codes include:

121C Indicates that the user is not authorizedto perform the requested command.

1232 The command could not be completedbecause of a permanent error. In mostcases, the server will be in the processof an abend.

220A The target server has received an invaliddata description. If a user SQLDA isspecified, ensure that the fields areinitialized correctly. Also, ensure that thelength does not exceed the maximumallowed length for the data type beingused.

If you are using the DB2 Connectproduct in a gateway serverenvironment with downlevel clients, thiserror may occur if your application’shost variables and the queried table’scolumn descriptions do not match.

sqlcode: -30020

sqlstate: 58009

SQL30021N Execution failed because of aDistributed Protocol Error thatwill affect the successfulexecution of subsequentcommands and SQL statements:Manager “<manager>” at Level“<level>” not supported.

Explanation: A system error occurred thatprevented successful connection of theapplication to the remote database. This message(SQLCODE) is produced for SQL CONNECTstatement. ″<manager>″ and ″<level>″ arenumeric values that identify the incompatibilitybetween the client and the server.

The command cannot be processed.

User Response: Record the message number,the “<manager>”, and “<level>” values. Recordall error information from the SQLCA, ifpossible. Attempt to connect to the remotedatabase again.

If the problem persists, invoke the IndependentTrace Facility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility. Then, contact yourservice representative with the followinginformation:

v Problem description

v SQLCODE and reason code

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30021

sqlstate: 58010

SQL30040N Execution failed because ofunavailable resources that will notaffect the successful execution ofsubsequent commands and SQLstatements: Reason “<reason>”.Type of Resource“<resource-type>”. Resource name“<resource-name>”. Product ID“<product-ID>”.

Explanation: The application cannot process thecommand or SQL statement because the specifiedresource has run out. The current transaction isnot rolled back and the application remainsconnected to the remote database.

The command cannot be processed.

User Response: Increase the size of thespecified resource and resubmit the command.

sqlcode: -30040

sqlstate: 57012

Chapter 2. SQL Messages 477

Page 486: Db2 SQL Errors

SQL30041N Execution failed because ofunavailable resources that willaffect the successful execution ofsubsequent commands and SQLstatements: Reason “<reason>”.Type of Resource“<resource-type>”. Resource name“<resource-name>”. Product ID“<product-ID>”.

Explanation: The application cannot process thecommand or SQL statement because resourcesare not available at the remote database. ThisSQLCODE is produced at statement compilationor processing time.

Federated system users: this situation can also bedetected by the data source.

If the “<resource name>” is “Encrypt” or“Decrypt”, the user exits for passwordencryption or decryption are unavailable or hadan error.

The command or statement cannot be processed.

User Response: Investigate the remote databasesystem environment.

Federated system users:

v If the password encryption or decryption userexit failed, “<reason>” is the integer value thatthe federated server received when invokingthe user exit. Ensure that no errors occurredwhen the encryption and decryption user exitswere link-edited with the federated server.

If using a user-supplied user exit, please checkthe user exit source code to determine why the“<reason>” was returned. If the error is foundin the user exit source code, fix the error,link-edit the object code with the federatedserver, and reissue the failing command orstatement.

v For all other cases, isolate the problem to thedata source failing the request (refer to theproblem determination guide to determinewhich data source is failing in processing anSQL statement), correct the problem at thedata source, and reissue the failing commandor statement.

sqlcode: -30041

sqlstate: 57013

SQL30050N “<number>” command or SQLstatement invalid while bind is inprogress.

Explanation: An application attempted to issuea command or SQL statement that is not validwhile a precompile/bind operation is inprogress. <number> is a numeric value thatidentifies the erroneous command or SQLstatement.

The command or statement is not processed.

User Response: If the application is not thedatabase manager precompiler/binder, verifythat bind is not active before issuing thecommand or SQL statement.

If the application is the database managerprecompiler/binder, record the message number(SQLCODE) and the <number> value. Record allerror information from the SQLCA, if possible.Attempt to perform the bind operation again.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and reason code

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30050

sqlstate: 58011

SQL30051N Bind process with the specifiedpackage name and consistencytoken not active.

Explanation: An attempt has been made toissue a precompile/bind operation when

478 Message Reference, Volume 2

Page 487: Db2 SQL Errors

precompile/bind is not active or an attempt wasmade to use an invalid package name and/orconsistency token during an activeprecompile/bind operation.

The command or statement cannot be processed.

User Response: If the application is not thedatabase manager precompiler/binder, verifythat precompile/bind is active before issuing thebind operation and that correct information isbeing passed on the bind operation.

If the application is the database managerprecompiler/binder, record the message number(SQLCODE) and all error information from theSQLCA, if possible. Attempt to perform theoperation again.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and reason code

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30051

sqlstate: 58012

SQL30052N Program preparation assumptionsare incorrect.

Explanation: The SQL statement being compiledis not recognized by the precompiler and cannotbe processed by the database.

The statement cannot be processed.

User Response: Ensure that the statement iscorrect and attempt to perform the operationagain. If the problem continues, remove thestatement from the program.

sqlcode: -30052

sqlstate: 42932

SQL30053N The value for OWNER failed theauthorization check at the remotedatabase.

Explanation: The value specified for theOWNER option on the precompile/bind failedthe authorization check at the remote database.This SQLCODE is produced duringprecompile/bind. It is not produced by thedatabase manager precompiler/binder.

The precompile/bind operation cannot beprocessed.

User Response: Ensure that you are authorizedto use the ID specified for the OWNER option,or do not use the OWNER option.

sqlcode: -30053

sqlstate: 42506

SQL30060N “<authorization-ID>” does nothave the privilege to performoperation “<operation>”.

Explanation: Authorization ID<authorization-ID> attempted to perform thespecified <operation> without having beengranted the proper authorization to do so. ThisSQLCODE is produced at statement compilationor processing time.

The statement cannot be processed.

User Response: Ensure that the<authorization-ID> has been granted theauthorization necessary to perform the desiredoperation.

sqlcode: -30060

sqlstate: 08004

SQL30061N The database alias or databasename “<name>” was not found atthe remote node.

Explanation: The database name is not anexisting database at the remote database node.

Chapter 2. SQL Messages 479

Page 488: Db2 SQL Errors

The statement cannot be processed.

User Response: Resubmit the command withthe correct database name or alias.

Federated system users: check to ensure that theentry in SYSCAT.SERVERS correctly specifies thedatabase name of the data source.

sqlcode: -30061

sqlstate: 08004

SQL30070N “<command-identifier>”Command is not supported.

Explanation: The remote database received acommand that it does not recognize. The currentenvironment command or SQL statement cannotbe processed successfully, nor can anysubsequent commands or SQL statements.

The current transaction is rolled back and theapplication is disconnected from the remotedatabase. The statement cannot be processed.

User Response: Record the message number(SQLCODE) and the command identifier. Recordall error information from the SQLCA, ifpossible. Attempt to connect to the remotedatabase and rerun the application.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and command identifier

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30070

sqlstate: 58014

SQL30071N “<object-identifier>” Object is notsupported.

Explanation: The remote database received datait does not recognize. The current environmentcommand or SQL statement cannot be processedsuccessfully, nor can any subsequent commandsor SQL statements.

The current transaction is rolled back and theapplication is disconnected from the remotedatabase. The command cannot be processed.

User Response: Record the message number(SQLCODE) and the object identifier. Record allerror information from the SQLCA, if possible.Attempt to connect to the remote database andrerun the application.

If sufficient memory resources exist and theproblem continues,

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and object identifier

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30071

sqlstate: 58015

SQL30072N “<parameter-identifier>”Parameter is not supported.

Explanation: The remote database received datait does not recognize. The current environmentcommand or SQL statement cannot be processedsuccessfully, nor can any subsequent commandsor SQL statements.

The command cannot be processed.. The currenttransaction is rolled back and the application isdisconnected from the remote database.

480 Message Reference, Volume 2

Page 489: Db2 SQL Errors

User Response: Record the message number(SQLCODE) and the parameter identifier. Recordall error information from the SQLCA, ifpossible. Attempt to connect to the remotedatabase and rerun the application.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and parameter identifier

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30072

sqlstate: 58016

SQL30073N “<parameter-identifier>”Parameter value “<value>” is notsupported.

Explanation: The remote database received datait does not recognize. The current environmentcommand or SQL statement cannot be processedsuccessfully, nor can any subsequent commandsor SQL statements.

The current transaction is rolled back and theapplication is disconnected from the remotedatabase. The command cannot be processed.

User Response: Record the message number(SQLCODE) and the parameter identifier. Recordall error information from the SQLCA, ifpossible. Attempt to connect to the remotedatabase and rerun the application.

If sufficient memory resources exist and theproblem continues,

If trace was active, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information on

how to use this facility. Contact your technicalservice representative with the followinginformation:

Required information:

v Problem description

v SQLCODE, parameter identifier, and value

v SQLCA contents if possible

v Trace file if possible.

Some possible parameter identifiers include:

002F The target server does not support thedata type requested by the applicationrequester. For example, when DB2Connect is used to connect to DB2 2.3,this error will be returned unless theproper PTF is applied to DB2 2.3.Ensure that the level of the server issupported by the requester.

119C, 119D, 119EThe target server does not support theCCSID requested by the applicationrequester. Ensure the CCSID used by therequester is supported by the server.

v 119C - Verify the single-byte CCSID.

v 119D - Verify the double-byte CCSID.

v 119E - Verify the mixed-byte CCSID.

sqlcode: -30073

sqlstate: 58017

SQL30074N “<reply-identifier>” Reply is notsupported.

Explanation: The client received a reply it doesnot recognize. The current environmentcommand or SQL statement cannot be processedsuccessfully, nor can any subsequent commandsor SQL statements.

The current transaction is rolled back and theapplication is disconnected from the remotedatabase. The statement cannot be processed.

User Response: Record the message number(SQLCODE) and the reply identifier. Record allerror information from the SQLCA, if possible.

Chapter 2. SQL Messages 481

Page 490: Db2 SQL Errors

Attempt to connect to the remote database andrerun the application.

If sufficient memory resources exist and theproblem continues, invoke the Independent TraceFacility at the operating system commandprompt. Refer to the Independent Trace Facilityin the Troubleshooting Guide for information onhow to use this facility.

Contact your technical service representativewith the following information:

Required information:

v Problem description

v SQLCODE and reply identifier

v SQLCA contents if possible

v Trace file if possible.

sqlcode: -30074

sqlstate: 58018

SQL30080N A communication error“<reason-code>” occurred sendingor receiving data from the remotedatabase.

Explanation: The “<reason-code>” contains theoriginal error codes reported by CommunicationsManager.

For APPC error codes, the format ispppp-ssssssss-dddddddd where pppp is the primaryreturn code, ssssssss is the secondary return codeand dddddddd is the sense data. Each of theseerror code values is represented in hexadecimalnotation. Possible primary and secondary errorcodes include 0003-00000004 and 0003-00000005,which indicate that a conversation with theDatabase Server could not be allocated. Sensedata will only be displayed for an APPCALLOCATE error.

The command cannot be processed. Theconnection attempted to the database isunsuccessful or the current transaction to theconnected database is rolled back and theapplication is disconnected from the remotedatabase.

Refer to the document IBM Communications

Manager 1.0 APPC Programming Guide andReference (SC31-6160) for explanation of theAPPC primary and secondary return codes. Fordetails of APPC sense data, refer to the IBMCommunications Manager 1.0 Problem DeterminationGuide (SC31-6156).

User Response: Ensure that both the databasemanager and Communications Manager arestarted at the Database Server and that allCommunications Manager configurationparameters are correct. Also, consult theCommunications Manager/2 APPC ProgrammingGuide & Reference for further information.

Note: If the reason code embedded in yourmessage is 0003-084C0001 one possiblecause for this message is that you aretrying to make a remote connection to aworkstation that is not a server. Verify thatthe remote workstation is a server. If it isnot a server, install the database manageras a server.

sqlcode: -30080

sqlstate: 08001

SQL30081N A communication error has beendetected. Communication protocolbeing used: <protocol>.Communication API being used:<interface>. Location where theerror was detected: <location>.Communication functiondetecting the error: <function>.Protocol specific error code(s):<rc1>, <rc2>, <rc3>.

Explanation: An error has been detected by thecommunication subsystem.

If the connection has already been established,possible causes include the following:

v A communication subsystem error at the clientnode or server node has caused the connectionto go down.

v A communication subsystem error at theSOCKS server, if one is being used, has causedthe connection to go down.

482 Message Reference, Volume 2

Page 491: Db2 SQL Errors

v A network error has caused the connection togo down.

v The database agent at the server was forced offby the system administrator.

v The database agent at the server wasterminated due to an abnormal termination ofa key database manager process.

If you are trying to establish a new connection,possible causes include the following:

v The remote database server has not beencataloged correctly at the client.

v The database manager configuration file at theserver has not been configured with the propercommunication parameters.

v The communication subsystem at the clientnode or server node has not been configuredcorrectly, or has not been started successfully.

v The communication subsystem at the SOCKSserver, if one is being used, has not beenconfigured correctly, or has not been startedsuccessfully.

v The DB2COMM environment variable at theserver doesn’t specify the communicationprotocol used by the client.

v The database manager at the server has notbeen started, or has not been startedsuccessfully. One or more of thecommunication protocols specified byDB2COMM may not have been successfullystarted.

Refer to the token values for details. Dependingon the protocol being used and thecommunication function invoked, some tokensmay not be applicable. The following is theexplanation of the token values:

<protocol>The actual communication protocolbeing used. Valid token values are:

v TCP/IP

v APPC

v NETBIOS

v IPX/SPX

<interface>The application programming interface

used to invoke the abovecommunication protocol services. Validtoken values are:

v SOCKETS

v SOCKS

v CPI-C

v DLR or DD

v TLI or Connection/Bindery

<location>This is a protocol specific ID whichuniquely identifies the node thatdetected the error. If the protocol beingused is:

v TCP/IP

The format of the ID is the Internetaddress in dot notation.

v APPC

The format of the ID is the fullyqualified LU name(networkID.LUname).

v NETBIOS

The format of the ID is theWorkstation name (nname).

v IPX/SPX

The format of the ID is the networkaddress and node address inhexadecimal notation (network.node).

If the location information is notavailable at the time that the erroroccurred, this token is not filled in.

<function>The name of the communicationsubsystem function that returned theerror code(s).

<rc1>, <rc2>, <rc3>The list of the available error codes andsubcodes that are specific to eachprotocol being used. Tokens that are notapplicable contain ″*″.

If the protocol being used is:

v TCP/IP

– If present, <rc1> contains theglobal errno value from the TCP/IP

Chapter 2. SQL Messages 483

Page 492: Db2 SQL Errors

sockets function call. When usingWindows Sockets, if present, <rc1>contains the error from the TCP/IPsockets function call returned byWSAGetLastError().

– If present, <rc2> contains theglobal h_errno value from theTCP/IP database function call.When using Windows Sockets, ifpresent, <rc2> contains the errorfrom the TCP/IP database functioncall returned byWSAGetLastError().

– If <rc3> is present and contains″0″, it means that the TCP/IPconnection has been closed. Thiscould be caused by one of thefollowing:

- The database agent at the serverwas forced off by the systemadministrator.

- A database agent could not bestarted at the server because themaxagents database managerconfiguration parameter hasbeen exceeded. Check the FirstFailure Service Log(DB2DIAG.LOG) at the server tosee if an error message has beenlogged.

- The database agent at the serverwas terminated due to anabnormal termination of a keydatabase manager process.

Note: When using Windows Sockets,if the <function> isWSAStartup, and <rc1> is 0,then <rc2> contains theWindows Sockets Specificationversion level requested by DB2,and <rc3> contains theWindows Sockets Specificationversion level supported by theWindows Sockets DLL.

v APPC

<rc1> contains the return code fromthe CPI-C function. If present, <rc2>

contains the global errno value fromthe CPI-C function call. <rc3> is notapplicable.

v NETBIOS

<rc1> contains the return code fromthe call to NetBIOS. <rc2> and <rc3>are not applicable.

v IPX/SPX

<rc1> contains the global t_errnovalue from the call to TLI Services, orthe return code from the call toNetWare Connection or BinderyServices. If the <rc1> t_errno isTLOOK, <rc2> contains the TLI eventthat has occurred. If the <rc2> eventis T_DISCONNECT, <rc3> containsthe disconnect reason code. On AIX, ifthe <rc1> t_errno is TSYSERR, <rc3>contains the system errno (defined insys/errno.h). If <rc1> contains theerror return code from a call to AIXNetWare Connection or BinderyServices, <rc2> contains the errorgenerator.

See the Communications Errors appendix of theMessages Reference for more information onspecific communication error codes.

User Response:

If the connection has already been established,check if:

1. The database agent at the server has beenforced off.

2. The database manager at the server hasabnormally terminated.

3. A communication subsystem or network errorhas occurred. See the Messages Reference formore information on specific communicationerror codes.

If you are trying to establish a new connection,check if:

1. The remote database server is catalogedproperly on the client node.

2. The database manager configuration file atthe server is configured with the propercommunication related parameters. If the

484 Message Reference, Volume 2

Page 493: Db2 SQL Errors

database manager configuration parametershave been updated at the server, ensure thatyou stop and then re-start the databasemanager, for the changes to take effect.

3. The communication subsystems on bothclient and server nodes are configured andstarted up properly.

4. The DB2COMM environment variable at theserver specifies the communication protocolused by the client.

5. The database manager at the server issuccessfully started. Start database managerprocessing at the server should have returnedSQL1063, and not SQL5043. If SQL5043 isreturned, check the First Failure Service Log(DB2DIAG.LOG) for more information.

6. A communication subsystem or network errorhas occurred.

If the problem persists, consult with yournetwork administrator and/or communicationexpert to determine the cause of the problemusing the set of tokens provided.

sqlcode: -30081

sqlstate: 08001

SQL30082N Attempt to establish connectionfailed with security reason″<reason-code>″(″<reason-string>″).

Explanation: The attempt to connect to theremote database server was rejected due toinvalid or incorrect security information. Thecause of the security error is described by the<reason-code> and corresponding<reason-string> value.

The following is a list of reason codes andcorresponding reason strings:

0 (NOT SPECIFIED)The specific security error is notspecified.

1 (PASSWORD EXPIRED)The password specified in the requesthas expired.

2 (PASSWORD INVALID)The password specified in the request isnot valid.

3 (PASSWORD MISSING)The request did not include a password.

4 (PROTOCOL VIOLATION)The request violated security protocols.

5 (USERID MISSING)The request did not include a userid.

6 (USERID INVALID)The userid specified in the request is notvalid.

7 (USERID REVOKED)The userid specified in the request hasbeen revoked.

8 (GROUP INVALID)The group specified in the request is notvalid.

9 (USERID REVOKED IN GROUP)The userid specified in the request hasbeen revoked in the group.

10 (USERID NOT IN GROUP)The userid specified in the request is notin the group.

11 (USERID NOT AUTHORIZED AT REMOTELU) The userid specified in the request is not

authorized at the remote Logical Unit.

12 (USERID NOT AUTHORIZED FROMLOCAL LU)

The userid specified in the request is notauthorized at the remote Logical Unitwhen coming from the local LogicalUnit.

13 (USERID NOT AUTHORIZED TO TP)The userid specified in the request is notauthorized to access the TransactionProgram.

14 (INSTALLATION EXIT FAILED)The installation exit failed.

15 (PROCESSING FAILURE)Security processing at the server failed.

16 (NEW PASSWORD INVALID)the password specified on a change

Chapter 2. SQL Messages 485

Page 494: Db2 SQL Errors

password request did not meet theserver’s requirements.

17 (UNSUPPORTED FUNCTION)the security mechanism specified by theclient is invalid for this server. Sometypical examples:

v The client sent a new password valueto a server that does not support theDRDA change password function.

v The client sent DCE authenticationinformation to a server that does notsupport DCE.

v The client sent SERVER_ENCRYPT orDCS_ENCRYPT authenticationinformation to a server that does notsupport password encryption.

v The client sent a userid (but nopassword) to a server that does notsupport authentication by userid only.

18 (NAMED PIPE ACCESS DENIED)The named pipe is inaccessible due to asecurity violation.

19 (USERID DISABLED or RESTRICTED)The userid has been disabled, or theuserid has been restricted fromaccessing the operating environment atthis time.

20 (MUTUAL AUTHENTICATION FAILED)The server being contacted failed topass a mutual authentication check. Theserver is either an imposter, or the ticketsent back was damaged.

21 (RESOURCE TEMPORARILYUNAVAILABLE)

Security processing at the server wasterminated because a resource wastemporarily unavailable. For example,on AIX, no user licenses may have beenavailable.

User Response: Ensure that the proper useridand/or password is supplied.

The userid may be disabled, the userid may berestricted to accessing specific workstations, orthe userid may be restricted to certain hours ofoperation.

For reason code 17, retry the command with asupported authentication type.

For reason code 20, make sure the authenticationmechanism for the server is started, and retry.

sqlcode: -30082

sqlstate: 08001

SQL30083N Attempt to change password foruser id ″<uid>″ failed withsecurity reason ″<reason-code>″(″<reason-string>″).

Explanation: The attempt to change passwordwas rejected due to invalid or incorrect securityinformation. The cause of the security error isdescribed by the ″<reason-code>″ andcorresponding ″<reason-string>″ values.

The following is a list of reason codes andcorresponding reason strings:

0 (NOT SPECIFIED)The specific security error is notspecified.

1 (CURRENT PASSWORD INVALID)The old password specified in therequest is not vaild.

2 (NEW PASSWORD INVALID)The password specified in the request isnot valid under the password rulesimposed by the system where passwordwas to be changed.

3 (CURRENT PASSWORD MISSING)The request did not include an oldpassword.

4 (NEW PASSWORD MISSING)The request did not include a newpassword.

5 (USERID MISSING)The request did not include a userid.

6 (USERID INVALID)The userid specified in the request is notvalid.

7 (USERID REVOKED)The userid specified in the request has

486 Message Reference, Volume 2

Page 495: Db2 SQL Errors

been revoked. Passwords can not bechanged for revoked userids.

14 (INSTALLATION EXIT FAILED)The installation security exit failed.

15 (PROCESSING FAILURE)Security processing at the server failed.

17 (UNSUPPORTED FUNCTION)Change password funcion is notsupported by the system.

19 (USERID DISABLED or RESTRICTED)The userid has been disabled, or theuserid has been restricted fromaccessing the operating environment atthis time.

24 (USERNAME AND/OR PASSWORDINVALID)

The username specified, passwordspecified, or both, are invalid.

User Response: Ensure that the proper userid,current and new passwords are supplied. Forreason code 14, check the file db2pem.log in theinstance subdirectory (typicaly ″db2″) for adetailed description of the problem encountered.

The userid may be disabled, the userid may berestricted to accessing specific workstations, orthe userid may be restricted to certain hours ofoperation.

sqlcode: -30083

sqlstate: 08001

SQL30090N Operation invalid for applicationexecution environment. Reasoncode = “<reason-code>”

Explanation: The operation is invalid for theapplication execution environment. For example,an operation might be invalid for applicationsthat have special restrictions on statements orAPIs - applications such as those that operate inan XA Distributed Transaction Processingenvironment, such as CICS; those that operatewith CONNECT type 2 connection settings; orthose that use federated system functionality toupdate multiple heterogeneous data sources. Theoperation was rejected.

Possible reason codes are:

v 01 - an SQL request that changes data (such asan INSERT or a CREATE) was issued against aread-only database; or, a stored procedure wasinvoked against a read-only database.Read-only databases include the followingtypes:

– Databases accessed using DRDA whenoperating in a unit of work which hasconnection setting SYNCPOINTTWOPHASE and executing in anon-XA/DTP environment when either aSynchpoint Manager is not being used orthe remote DRDA database does notsupport level 2 DRDA protocol.

– Databases accessed by DRDA in anXA/DTP environment when either aSynchpoint Manager gateway is unavailableor the remote DRDA database does notsupport level 2 DRDA protocol.

– Databases which were not the first databaseupdated when the SYNCPOINTONEPHASE connection setting is in effectfor the unit of work.

v 02 - an API such as Precompile, Bind, orReorganize Table which causes internalcommits was issued in an application whichhas the setting CONNECT type 2 or isoperating in an XA/DTP environment.

v 03 - an SQL OPEN for a held cursor wasissued while in an XA/DTP environmentwhen using an ENCINA or TUXEDOtransaction processing monitor.

v 04 - a DISCONNECT statement was issuedwhile in an XA/DTP environment.

v 05 - A compound SQL statement whichcontains a COMMIT statement was issued in aCONNECT type 2 or XA/DTP environment.

v 06 - The SET CLIENT API was issued in anXA/DTP environment.

v 07 - A second database is being accessedwithin a unit of work for which two-phasecommit coordination is not being supplied bythe transaction manager. To ensure dataintegrity, the operation has been disallowed.

v 08 - An attempt was made to access a databasefor use of commit coordination from a source

Chapter 2. SQL Messages 487

Page 496: Db2 SQL Errors

different from a concurrently connecteddatabase. The two types of coordinationcannot be mixed, and operations against thecurrent database are rejected.

v 09 - An attempt was made to execute anXA/DTP local transaction against a databaseaccessed under Synchpoint Managercoordination.

v 10 - An SQL OPEN for a held cursor wasissued in either of these cases:

– XA/DTP environment, or

– federated server accessing a nicknamedefined on a two phase commit datasource

Cursor hold is not supported in theseenvironments.

v 11 - An operation is not supported forpass-through.

v 12 - The insert/update/delete operationrequires the existence of a timestamp columnand a unique index due to the restriction onthe data source.

For an update/delete operation accessing datasources:

– Fujitsu RDB2 requires the existence of aunique index.

v 13 - A positioned UPDATE or DELETEoperation requires the existence of a column inthe SELECT list of the cursor, but that columndoes not exist in the SELECT list of the cursor.

v 14 - An illegal combination of updatablecursors, cursor hold, and isolation level ofRepeatable Read exists. Invalid combinationsare:

– Isolation level Repeatable Read and a WITHHOLD cursor

– A WITH HOLD cursor with FOR UPDATE

v 15 - Reserved for future use

v 16 - Illegal type column and protocol columnvalue combination in SYSCAT.SERVERS.

v 17 - The REORG utility cannot be issuedagainst a nickname.

v 18 - An update request (or, a DDL operationthat results in the update of a system catalogtable) has been issued that would result inmultiple data sources being updated when one

or more of the data sources in the unit of workonly supports one-phase commit. Possiblecauses are:

– An attempt was made to update a datasource that only supports one-phasecommit, but a different data source hasalready been updated in the same unit ofwork.

– An attempt was made to update a datasource that supports two-phase commit, buta different data source that only supportsone-phase commit has already beenupdated in the same unit of work.

– An attempt was made to update a localfederated server table, but a data sourcethat only supports one-phase commit hasalready been updated in the same unit ofwork.

– An attempt was made to update a datasource that only supports one-phase commitwhen the application is operating with aCONNECT type 2 connection setting.

v 19 - The application host variable data type isnot supported by the data source in apass-through session.

v 20 - SET CLIENT INFORMATION was issuedwhile a Unit of Work is in progress.

v 21 - The operation that you want performed atthe specified data source(s) is not supportedby the wrapper by which DB2 accesses thedata source(s). Consult the documentation tofind out what operations this wrappersupports.

User Response:

Correct the problem by doing one of thefollowing steps:

v For reasons 01, 02, 03, 04, 06, or 19, remove thestatement or API which is not supported.

v Alternately, for reasons 01, 02, 03, 04, or 06,execute the application in a differentenvironment which supports the failingstatement or API.

v For reason 05 move the COMMIT requestoutside of the compound statement.

v For reason 07, ensure that only one database isaccessed within a unit of work for which

488 Message Reference, Volume 2

Page 497: Db2 SQL Errors

EXEC SQL COMMIT or EXEC SQLROLLBACK will be issued in place ofsyncpoint requests to an external transactionmanager. If multiple databases must beaccessed within the unit of work, utilize thecommitment control interface provided by theexternal transaction manager product.

v For reason 08, ensure that all databases beingaccessed within a unit of work are under thecommitment control of the same type ofrequest: external transaction processingmonitor (such as CICS SYNCPOINT) or localCOMMIT and ROLLBACK EXEC SQL.

v For reason 09, do one of the following steps:

– Execute the transaction as an XA/DTPglobal transaction.

– Access the database in a non-XA/DTPenvironment.

– Do not use the services of the SynchpointManager for the database connection if thetransaction is read-only.

v For reasons 10 through 17 (federated serverusers), isolate the problem to the data sourcefailing the request (see the TroubleshootingGuide) and examine the restrictions for thatdata source.

v For reason 18, do one of the following steps:

– Submit a COMMIT or ROLLBACK beforeissuing an update to a different data source.

– If multiple data sources need to be updatedwithin a unit of work, make sure thetwo_phase_commit server option has beenset to ’Y’ for all the data sources that needto be updated. See the SQL Reference forinformation on setting the value used forthe two_phase_commit setting.

– If the data source to be updated supportsonly one-phase commit and the applicationis operating with a CONNECT type 2connection setting, change the application tooperate with a CONNECT type 1connection setting.

v For reason 20, submit a Commit or Rollbackbefore invoking the API.

sqlcode: -30090

sqlstate: 25000

SQL30100 - SQL30199

SQL30101W Bind options specified onREBIND request are ignored.

Explanation: Bind options were specified on theREBIND request however the database serverdoes not support respecification of any bindoptions. The bind options specified will beignored and the options from the original BINDrequest will be used.

User Response: No action is required. This is awarning situation only.

If the database server returned an additionalwarning SQLCA, the ″sqlerrmc″ tokens willindicate the following information about thisadditional SQLCA in this order:

v sqlcode (SQL return code)

v sqlstate (universal SQL return code)

v sqlerrp (product name)

v sqlerrmc (SQL message tokens)

sqlcode: +30101

sqlstate: 01599

Chapter 2. SQL Messages 489

Page 498: Db2 SQL Errors

490 Message Reference, Volume 2

Page 499: Db2 SQL Errors

Chapter 3. SQLSTATE Messages

This section lists the SQLSTATEs and their meaning. The SQLSTATEs aregrouped by class code; for subcodes, see the corresponding tables.

Table 1. SQLSTATE Class Codes

ClassCode

Meaning For subcodes, refer to...

00 Unqualified Successful Completion Table 2 on page 492

01 Warning Table 3 on page 492

02 No Data Table 4 on page 495

07 Dynamic SQL Error Table 5 on page 496

08 Connection Exception Table 6 on page 496

09 Triggered Action Exception Table 7 on page 496

0A Feature Not Supported Table 8 on page 497

0D Invalid Target Type Specification Table 9 on page 497

0F Invalid Token Table 10 on page 497

0K Invalid RESIGNAL Statement Table 11 on page 497

20 Case Not Found for CASE Statement Table 12 on page 497

21 Cardinality Violation Table 13 on page 498

22 Data Exception Table 14 on page 498

23 Constraint Violation Table 15 on page 499

24 Invalid Cursor State Table 16 on page 500

25 Invalid Transaction State Table 17 on page 500

26 Invalid SQL Statement Identifier Table 18 on page 501

28 Invalid Authorization Specification Table 19 on page 501

2D Invalid Transaction Termination Table 20 on page 501

2E Invalid Connection Name Table 21 on page 501

34 Invalid Cursor Name Table 22 on page 502

38 External Function Exception Table 23 on page 502

39 External Function Call Exception Table 24 on page 503

3B Invalid SAVEPOINT Table 25 on page 503

40 Transaction Rollback Table 26 on page 504

42 Syntax Error or Access Rule Violation Table 27 on page 504

© Copyright IBM Corp. 1993, 2000 491

Page 500: Db2 SQL Errors

Table 1. SQLSTATE Class Codes (continued)

ClassCode

Meaning For subcodes, refer to...

44 WITH CHECK OPTION Violation Table 28 on page 515

46 Java DDL Table 29 on page 515

51 Invalid Application State Table 30 on page 516

54 SQL or Product Limit Exceeded Table 31 on page 516

55 Object Not in Prerequisite State Table 32 on page 518

56 Miscellaneous SQL or Product Error Table 33 on page 519

57 Resource Not Available or OperatorIntervention

Table 34 on page 519

58 System Error Table 35 on page 521

Class Code 00 Unqualified Successful Completion

Table 2. Class Code 00: Unqualified Successful Completion

SQLSTATEValue

Meaning

00000 Execution of the SQL statement was successful and did not result in anytype of warning or exception condition.

Class Code 01 Warning

Table 3. Class Code 01: Warning

SQLSTATEValue

Meaning

01002 A DISCONNECT error occurred.

01003 Null values were eliminated from the argument of a column function.

01004 The value of a string was truncated when assigned to a host variable.

01005 Insufficient number of entries in an SQLDA.

01007 A privilege was not granted.

0100C One or more adhoc result sets were returned from the procedure.

0100D The cursor that was closed has been re-opened on the next result setwithin the chain.

0100E The procedure generated more than the maximum allowed number ofresult sets. Only the first integer result sets have been returned to thecaller.

492 Message Reference, Volume 2

Page 501: Db2 SQL Errors

Table 3. Class Code 01: Warning (continued)

SQLSTATEValue

Meaning

01503 The number of result columns is larger than the number of host variablesprovided.

01504 The UPDATE or DELETE statement does not include a WHERE clause.

01506 An adjustment was made to a DATE or TIMESTAMP value to correct aninvalid date resulting from an arithmetic operation.

01509 Blocking was cancelled for a cursor because there is insufficient storagein the user virtual machine.

01515 The null value has been assigned to a host variable, because the non-nullvalue of the column is not within the range of the host variable.

01516 An inapplicable WITH GRANT OPTION has been ignored.

01517 A character that could not be converted was replaced with a substitutecharacter.

01519 The null value has been assigned to a host variable, because a numericvalue is out of range.

01524 The result of a column function does not include the null values thatwere caused by evaluating an arithmetic expression.

01526 Isolation level has been escalated.

01539 Connection is successful but only SBCS characters should be used.

01543 A duplicate constraint has been ignored.

01545 An unqualified column name has been interpreted as a correlatedreference.

01550 The index was not created, because an index with the specifieddescription already exists.

01560 A redundant GRANT has been ignored.

01562 The new path to the log (newlogpath) in the database configuration fileis invalid.

01563 The current path to the log file (logpath) is invalid. The log file path isreset to the default.

01564 The null value has been assigned to a host variable, because division byzero occurred.

01586 Setting OFF the constraints for a parent table in a referential structurehas resulted in one or more descendent tables being automatically placedinto a check-pending state

01589 A statement contains redundant specifications.

Chapter 3. SQLSTATE Messages 493

Page 502: Db2 SQL Errors

Table 3. Class Code 01: Warning (continued)

SQLSTATEValue

Meaning

01592 In a CREATE FUNCTION statement that references a SOURCE function,either:v an input parameter has a larger length, precision, or scale than that of

the corresponding parameter of the source function; orv the RETURNS or CAST FROM parameter has a smaller length,

precision, or scale than that of the source function; orv the CAST FROM parameter in the CREATE FUNCTION statement has

a larger length, precision, or scale than that of the RETURNSparameter.

Truncation may occur at run time (and may result in an error at thattime).

01594 Insufficient number of entries in an SQLDA for ALL information (i.e. notenough descriptors to return the distinct name).

01595 The view has replaced an existing, invalidated view.

01596 Comparison functions were not created for a distinct type based on along string data type.

01598 An attempt has been made to activate an active event monitor ordeactivate an inactive event monitor.

01599 Bind options were ignored on REBIND.

01602 The optimization level has been reduced.

01603 CHECK DATA processing found constraint violations and moved themto exception tables.

01604 The SQL statement was explained and not executed.

01605 A recursive common table expression may contain an infinite loop.

01606 The node or system database directory is empty.

01607 The difference between the times on nodes in a read-only transactionsexceed the defined threshold.

01609 The procedure generated more than the maximum allowed number ofresult sets. Only the first integer result sets have been returned to thecaller.

01610 One or more ad hoc result sets were returned from the procedure.

01611 The cursor that was closed has been re-opened on the next result setwithin the chain.

01616 The estimated CPU cost exceeds the resource limit.

01618 Redistribute nodegroup is required to change data partitioning.

01620 Some base tables of UNION ALL may be the same table.

01621 The retrieved LOB value may have been changed.

494 Message Reference, Volume 2

Page 503: Db2 SQL Errors

Table 3. Class Code 01: Warning (continued)

SQLSTATEValue

Meaning

01622 Statement completed successfully but a system error occurred after thestatement completed.

01623 Value of DEGREE is ignored.

01626 The database has only one active bufferpool.

01627 The DATALINK value may not be valid because the table is in reconcilepending or reconcile is not possible state.

01632 The number of concurrent connections has exceeded the definedentitlement for the product.

01633 The summary table may not be used to optimize the processing ofqueries.

01636 Integrity of non-incremental data remains unverified by the databasemanager.

01637 Debugging is not enabled.

01639 The view or summary table may require the invoker to have necessaryprivileges on data source objects.

01641 Datalink type attributes limit the use of the structured type.

01642 Column not long enough for the largest possible USER default value.

01643 Assignment to an SQLSTATE or SQLCODE variable in an SQL routinemay be over-written and does not activate any handler.

01645 The executable for the SQL procedure is not saved in the databasecatalog.

01HXX Valid warning SQLSTATEs returned by a user-defined function orexternal procedure CALL.

Class Code 02 No Data

Table 4. Class Code 02: No Data

SQLSTATEValue

Meaning

02000 One of the following exceptions occurred:v The result of the SELECT INTO statement or the subselect of the

INSERT statement was an empty table.v The number of rows identified in the searched UPDATE or DELETE

statement was zero.v The position of the cursor referenced in the FETCH statement was

after the last row of the result table.

Chapter 3. SQLSTATE Messages 495

Page 504: Db2 SQL Errors

Class Code 07 Dynamic SQL Error

Table 5. Class Code 07: Dynamic SQL Error

SQLSTATEValue

Meaning

07001 The number of host variables is not the same as the number of parametermarkers.

07002 The call parameter list or control block is invalid.

07003 The statement identified in the EXECUTE statement is a select-statement,or is not in a prepared state.

07004 The USING clause is required for dynamic parameters.

07005 The statement name of the cursor identifies a prepared statement thatcannot be associated with a cursor.

07006 An input host variable cannot be used, because of its data type.

Class Code 08 Connection Exception

Table 6. Class Code 08: Connection Exception

SQLSTATEValue

Meaning

08001 The application requester is unable to establish the connection.

08002 The connection already exists.

08003 The connection does not exist.

08004 The application server rejected establishment of the connection.

08007 Transaction resolution unknown.

08502 The CONNECT statement issued by an application process running witha SYNCPOINT of TWOPHASE has failed, because no transactionmanager is available.

Class Code 09 Triggered Action Exception

Table 7. Class Code 09: Triggered Action Exception

SQLSTATEValue

Meaning

09000 A triggered SQL statement failed.

496 Message Reference, Volume 2

Page 505: Db2 SQL Errors

Class Code 0A Feature Not Supported

Table 8. Class Code 0A: Feature Not Supported

SQLSTATEValue

Meaning

0A001 The CONNECT statement is invalid, because the process is not in theconnectable state.

0A502 The action or operation is not enabled for this database instance.

Class Code 0D Invalid Target Type Specification

Table 9. Class Code 0D: Invalid Target Type Specification

SQLSTATEValue

Meaning

0D000 The target structured data type specification is a proper subtype of thesource structured data type.

Class Code 0F Invalid Token

Table 10. Class Code 0F: Invalid Token

SQLSTATEValue

Meaning

0F001 The LOB token variable does not currently represent any value.

Class Code 0K Invalid RESIGNAL statement

Table 11. Class Code 0K: Invalid RESIGNAL statement

SQLSTATEValue

Meaning

0K000 RESIGNAL statement is not within a handler.

Class Code 20 Case Not Found for Case Statement

Table 12. Class Code 20: Case Not Found for Case Statement

SQLSTATEValue

Meaning

20000 The case was not found for the CASE statement.

Chapter 3. SQLSTATE Messages 497

Page 506: Db2 SQL Errors

Class Code 21 Cardinality Violation

Table 13. Class Code 21: Cardinality Violation

SQLSTATEValue

Meaning

21000 The result of a SELECT INTO is a result table of more than one row, orthe result of the subquery of a basic predicate is more than one value.

21501 A multiple-row INSERT into a self-referencing table is invalid.

21502 A multiple-row UPDATE of a primary key is invalid.

21504 A multiple-row DELETE from a self-referencing table with a delete ruleof RESTRICT or SET NULL is invalid.

21505 A row function must return not more than one row.

Class Code 22 Data Exception

Table 14. Class Code 22: Data Exception

SQLSTATEValue

Meaning

22001 Character data, right truncation occurred; for example, an update orinsert value is a string that is too long for the column, or a datetimevalue cannot be assigned to a host variable, because it is too small.

22002 A null value, or the absence of an indicator parameter was detected; forexample, the null value cannot be assigned to a host variable, because noindicator variable is specified.

22003 A numeric value is out of range.

22004 A null value cannot be returned either from a procedure defined asPARAMETER STYLE GENERAL, or from a type-preserving methodinvoked with a non-null argument.

22007 An invalid datetime format was detected; that is, an invalid stringrepresentation or value was specified.

22008 Datetime field overflow occurred; for example, an arithmetic operationon a date or timestamp has a result that is not within the valid range ofdates.

2200G The most specific type does not match.

22011 A substring error occurred; for example, an argument of SUBSTR is outof range.

22012 Division by zero is invalid.

22018 The character value for the CAST, DECIMAL, FLOAT, or INTEGERscalar function is invalid.

22019 The LIKE predicate has an invalid escape character.

498 Message Reference, Volume 2

Page 507: Db2 SQL Errors

Table 14. Class Code 22: Data Exception (continued)

SQLSTATEValue

Meaning

22021 A character is not in the coded character set.

22024 A NUL-terminated input host variable or parameter did not contain aNUL.

22025 The LIKE predicate string pattern contains an invalid occurrence of anescape character.

2202D Null instance used with a mutator method.

22501 The length control field of a variable length string is negative or greaterthan the maximum.

22504 A mixed data value is invalid.

22506 A reference to a datetime special register is invalid, because the TODclock is malfunctioning or the operating system timezone parameter isout of range.

22522 A CCSID value is not valid at all, not valid for the data type or subtype,or not valid for the encoding scheme.

22526 A key transform function generated no rows or duplicate rows.

Class Code 23 Constraint Violation

Table 15. Class Code 23: Constraint Violation

SQLSTATEValue

Meaning

23001 The update or delete of a parent key is prevented by a RESTRICT updateor delete rule.

23502 An insert or update value is null, but the column cannot contain nullvalues.

23503 The insert or update value of a foreign key is invalid.

23504 The update or delete of a parent key is prevented by a NO ACTIONupdate or delete rule.

23505 A violation of the constraint imposed by a unique index or a uniqueconstraint occurred.

23510 A violation of a constraint on the use of the command imposed by theRLST table occurred.

23511 A parent row cannot be deleted, because the check constraint restricts thedeletion.

23512 The check constraint cannot be added, because the table contains rowsthat do not satisfy the constraint definition.

Chapter 3. SQLSTATE Messages 499

Page 508: Db2 SQL Errors

Table 15. Class Code 23: Constraint Violation (continued)

SQLSTATEValue

Meaning

23513 The resulting row of the INSERT or UPDATE does not conform to thecheck constraint definition.

23514 Check data processing has found constraint violations.

23515 The unique index could not be created or unique constraint added,because the table contains duplicate values of the specified key.

23520 The foreign key cannot be defined, because all of its values are not equalto a parent key of the parent table.

23521 The update of a catalog table violates an internal constraint.

23522 The range of an identity column has been exhausted.

Class Code 24 Invalid Cursor State

Table 16. Class Code 24: Invalid Cursor State

SQLSTATEValue

Meaning

24501 The identified cursor is not open.

24502 The cursor identified in an OPEN statement is already open.

24504 The cursor identified in the UPDATE, DELETE, SET, or GET statement isnot positioned on a row.

24506 The statement identified in the PREPARE is the statement of an opencursor.

24514 A previous error has disabled this cursor.

24516 A cursor has already been assigned to a result set.

Class Code 25 Invalid Transaction State

Table 17. Class Code 25: Invalid Transaction State

SQLSTATEValue

Meaning

25000 An update operation is invalid for the application executionenvironment.

25001 The statement is only allowed as the first statement in a unit of work.

25501 The statement is only allowed as the first statement in a unit of work.

500 Message Reference, Volume 2

Page 509: Db2 SQL Errors

Class Code 26 Invalid SQL Statement Identifier

Table 18. Class Code 26: Invalid SQL Statement Identifier

SQLSTATEValue

Meaning

26501 The statement identified does not exist.

Class Code 28 Invalid Authorization Specification

Table 19. Class Code 28: Invalid Authorization Specification

SQLSTATEValue

Meaning

28000 Authorization name is invalid.

Class Code 2D Invalid Transaction Termination

Table 20. Class Code 2D: Invalid Transaction Termination

SQLSTATEValue

Meaning

2D521 SQL COMMIT or ROLLBACK are invalid in the current operatingenvironment.

2D528 Dynamic COMMIT is invalid for the application execution environment.

2D529 Dynamic ROLLBACK is invalid for the application executionenvironment.

Class Code 2E Invalid Connection Name

Table 21. Class Code 2E: Invalid Connection Name

SQLSTATEValue

Meaning

2E000 Connection name is invalid.

Chapter 3. SQLSTATE Messages 501

Page 510: Db2 SQL Errors

Class Code 34 Invalid Cursor Name

Table 22. Class Code 34: Invalid Cursor Name

SQLSTATEValue

Meaning

34000 Cursor name is invalid.

Class Code 38 External Function Exception

Table 23. Class Code 38: External Function Exception

SQLSTATEValue

Meaning

38XXX Valid error SQLSTATEs returned by a user-defined function, externalprocedure, or trigger.

38001 The external function is not allowed to execute SQL statements.

38002 The external function attempted to modify data, but the function was notdefined as MODIFIES SQL DATA.

38003 The statement is not allowed in a function or procedure.

38004 The external function attempted to read data, but the function was notdefined as READS SQL DATA.

38501 Error occurred while calling a user-defined function, external procedure,or trigger (using the SIMPLE CALL or SIMPLE CALL WITH NULLScalling convention).

38502 The external function is not allowed to execute SQL statements.

38503 A user-defined function has abnormally terminated (abend).

38504 A user-defined function has been interrupted by the user to stop aprobable looping condition.

38506 Function failed with error from OLE DB provider.

502 Message Reference, Volume 2

Page 511: Db2 SQL Errors

Table 23. Class Code 38: External Function Exception (continued)

SQLSTATEValue

Meaning

38552 A function in the SYSFUN schema (supplied by IBM) has abnormallyterminated.

One of the following reason codes can be found in the message text:01 Numeric value out of range02 Division by zero03 Arithmetic overflow or underflow04 Invalid date format05 Invalid time format06 Invalid timestamp format07 Invalid character representation of a timestamp duration08 Invalid interval type (must be one of 1, 2, 4, 8, 16, 32, 64, 128,

256)09 String too long10 Length or position in string function out of range11 Invalid character representation of a floating point number

Class Code 39 External Function Call Exception

Table 24. Class Code 39: External Function Call Exception

SQLSTATEValue

Meaning

39001 A user-defined function has returned an invalid SQLSTATE.

39004 A null value is not allowed for an IN or INOUT argument.

39501 The eye-catcher associated with an argument was modified.

Class Code 3B Invalid SAVEPOINT

Table 25. Class Code 3B: Invalid SAVEPOINT

SQLSTATEValue

Meaning

3B001 The savepoint is not valid.

3B002 The maximum number of savepoints has been reached.

3B501 A duplicate savepoint name was detected.

3B502 A RELEASE or ROLLBACK TO SAVEPOINT was specified, but asavepoint does not exist.

Chapter 3. SQLSTATE Messages 503

Page 512: Db2 SQL Errors

Table 25. Class Code 3B: Invalid SAVEPOINT (continued)

SQLSTATEValue

Meaning

3B503 A SAVEPOINT, RELEASE SAVEPOINT, or ROLLBACK TO SAVEPOINTis not allowed in a trigger or global transaction.

Class Code 40 Transaction Rollback

Table 26. Class Code 40: Transaction Rollback

SQLSTATEValue

Meaning

40001 Deadlock or timeout with automatic rollback occurred.

40003 The statement completion is unknown.

40504 A system error has caused the unit of work to be rolled back.

40506 The current transaction was rolled back because of an SQL error.

Class Code 42 Syntax Error or Access Rule Violation

Table 27. Class Code 42: Syntax Error or Access Rule Violation

SQLSTATEValue

Meaning

42501 The authorization ID does not have the privilege to perform the specifiedoperation on the identified object.

42502 The authorization ID does not have the privilege to perform theoperation as specified.

42504 A specified privilege cannot be revoked from a specifiedauthorization-name.

42506 Owner authorization failure occurred.

42508 The specified database privileges cannot be granted to PUBLIC.

42509 SQL statement is not authorized, because of the STATICRULES option.

42601 A character, token, or clause is invalid or missing.

42602 A character that is invalid in a name has been detected.

42603 An unterminated string constant has been detected.

42604 An invalid numeric or string constant has been detected.

42605 The number of arguments specified for a scalar function is invalid.

42606 An invalid hexadecimal constant has been detected.

42607 An operand of a column function is invalid.

504 Message Reference, Volume 2

Page 513: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42608 The use of NULL or DEFAULT in VALUES is invalid.

42609 All operands of an operator or predicate are parameter markers.

42610 A parameter marker is not allowed.

42611 The column or argument definition is invalid.

42612 The statement string is an SQL statement that is not acceptable in thecontext in which it is presented.

42613 Clauses are mutually exclusive.

42614 A duplicate keyword is invalid.

42615 An invalid alternative was detected.

42617 The statement string is blank or empty.

42618 A host variable is not allowed.

42621 The check constraint is invalid.

42622 A name or label is too long.

42623 A DEFAULT clause cannot be specified.

42625 A CASE expression is invalid.

42627 RETURNS clause must be specified prior to predicate specification usingthe EXPRESSION AS clause.

42628 A TO SQL or FROM SQL transform function is defined more than oncein a transform definition.

42629 Parameter names must be specified for SQL routines.

42630 An SQLSTATE or SQLCODE variable declaration must not be in a nestedcompound statement.

42631 A RETURN statement in an SQL function or method must include areturn value.

42701 A duplicate column name in an INSERT or UPDATE statement wasdetected.

42702 A column reference is ambiguous, because of duplicate names.

42703 An undefined column, attribute, or parameter name was detected.

42704 An undefined object or constraint name was detected.

42705 An undefined server-name was detected.

42707 A column name in ORDER BY does not identify a column of the resulttable.

42709 A duplicate column name in a PRIMARY, UNIQUE, or FOREIGN KEYclause was detected.

Chapter 3. SQLSTATE Messages 505

Page 514: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42710 A duplicate object or constraint name was detected.

42711 Duplicate column name or attribute name was detected in the objectdefinition or ALTER statement.

42712 A duplicate table designator was detected in the FROM clause.

42713 A duplicate object was detected in a list of objects.

42720 The nodename for the remote database was not found in the nodedirectory.

42723 A function with the same signature already exists in the schema.

42724 Unable to access an external program used for a user-defined function ora procedure.

42725 A function was referenced directly (not by either signature or by specificinstance name), but there is more than one specific instance of thatfunction.

42726 Duplicate names for named derived tables were detected.

42727 No default primary tablespace exists for the new table.

42728 A duplicate node was detected in the nodegroup definition.

42729 The node is not defined.

42730 The container name is already used by another tablespace.

42731 The container name is already used by this tablespace.

42732 A duplicate schema name in the SET CURRENT PATH statement wasdetected.

42734 A duplicate parameter-name, SQL variable-name, cursor-name,condition-name, or label was detected.

42735 Nodegroup for the table space is not defined for the buffer pool.

42736 The label specified on the LEAVE statement is not found or not valid.

42737 The condition specified in the handler is not defined.

42738 A duplicate column name or unnamed column was specified in aDECLARE CURSOR statement of a FOR statement.

42739 A duplicate transform was detected.

42740 No transforms were found for the specified type. No transforms weredropped.

42741 A transform group is not defined for a data type.

42742 Subtable or subview of the same type already exists in the typed table ortyped view hierarchy.

42743 The search method is not found in the index extension.

506 Message Reference, Volume 2

Page 515: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42744 A TO SQL or FROM SQL transform function is not defined in atransform group.

42745 The routine would define an overriding relationship with an existingmethod.

42746 A method name cannot be the same as a structured type name within thesame type hierarchy.

42802 The number of insert or update values is not the same as the number ofcolumns.

42803 A column reference in the SELECT or HAVING clause is invalid, becauseit is not a grouping column; or a column reference in the GROUP BYclause is invalid.

42804 The result expressions in a CASE expression are not compatible.

42805 An integer in the ORDER BY clause does not identify a column of theresult table.

42806 A value cannot be assigned to a host variable, because the data types arenot compatible.

42807 The INSERT, UPDATE, or DELETE is not permitted on this object.

42808 A column identified in the INSERT or UPDATE statement is notupdateable.

42809 The identified object is not the type of object to which the statementapplies.

42810 A view is identified in a FOREIGN KEY clause.

42811 The number of columns specified is not the same as the number ofcolumns in the SELECT clause.

42813 WITH CHECK OPTION cannot be used for the specified view.

42815 The data type, length, scale, value, or CCSID is invalid.

42816 A datetime value or duration in an expression is invalid.

42818 The operands of an operator or function are not compatible.

42819 An operand of an arithmetic operation or an operand of a function thatrequires a number is not a number.

42820 A numeric constant is too long, or it has a value that is not within therange of its data type.

42821 An update or insert value is not compatible with the column.

42823 Multiple columns are returned from a subquery that is allowed only onecolumn.

42824 An operand of LIKE is not a string, or the first operand is not a column.

Chapter 3. SQLSTATE Messages 507

Page 516: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42825 The rows of UNION, INTERSECT, EXCEPT, or VALUES do not havecompatible columns.

42826 The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have thesame number of columns.

42827 The table identified in the UPDATE or DELETE is not the same tabledesignated by the cursor.

42828 The table designated by the cursor of the UPDATE or DELETE statementcannot be modified, or the cursor is read-only.

42829 FOR UPDATE OF is invalid, because the result table designated by thecursor cannot be modified.

42830 The foreign key does not conform to the description of the parent key.

42831 A column of a primary or unique key cannot allow null values.

42832 The operation is not allowed on system objects.

42834 SET NULL cannot be specified, because the foreign key does not allownull values.

42835 Cyclic references cannot be specified between named derived tables.

42836 The specification of a recursive, named derived table is invalid.

42838 An invalid use of a tablespace was detected.

42839 Indexes and long columns cannot be in separate tablespaces from thetable.

42840 An invalid use of the AS CAST option was detected.

42841 A parameter marker can not be a user-defined type or reference type.

42842 A column definition is invalid, because a specified option is inconsistentwith the column description.

42845 An invalid use of a VARIANT or EXTERNAL ACTION function wasdetected.

42846 Cast from source type to target type is not supported.

42852 The privileges specified in GRANT or REVOKE are invalid orinconsistent. (For example, GRANT ALTER on a view.)

42853 Both alternatives of an option were specified, or the same option wasspecificed more than once.

42854 A result column data type in the select list is not compatible with thedefined type in a typed view or summary table definition.

42855 The assignment of the LOB to this host variable is not allowed. Thetarget host variable for all fetches of this LOB value for this cursor mustbe a locator or a LOB variable.

508 Message Reference, Volume 2

Page 517: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42858 Operation cannot be applied to the specified object.

42863 An undefined host variable in REXX has been detected.

42866 The data type in either the RETURNS clause of the CAST FROM clausein the CREATE FUNCTION statement is not appropriate for the datatype returned from the sourced function or RETURN statement in thefunction body.

42875 The object to create within CREATE SCHEMA must have the samequalifier as the schema name.

42877 The column name cannot be qualified.

42878 An invalid function or procedure name was used with the EXTERNALkeyword.

42879 The data type of one or more input parameters in the CREATEFUNCTION statement is not appropriate for the corresponding data typein the source function.

42880 The CAST TO and CAST FROM data types are incompatible, or wouldalways result in truncation of a fixed string.

42881 Invalid use of a row based function.

42882 The specific instance name qualifier is not equal to the function namequalifier.

42883 No function was found with a matching signature.

42884 No function or procedure was found with the specified name andcompatible arguments.

42885 The number of input parameters specified on a CREATE FUNCTIONstatement does not match the number provided by the function named inthe SOURCE clause.

42886 The IN, OUT, or INOUT parameter attributes do not match.

42887 The function is not valid in the context where it occurs.

42888 The table does not have a primary key.

42889 The table already has a primary key.

42890 A column list was specified in the references clause, but the identifiedparent table does not have a unique constraint with the specified columnnames.

42891 A duplicate UNIQUE constraint already exists.

42893 The object or constraint cannot be dropped, because other objects aredependent on it.

42894 The DEFAULT value is invalid.

Chapter 3. SQLSTATE Messages 509

Page 518: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42895 For static SQL, an input host variable cannot be used, because its datatype is not compatible with the parameter of a procedure or user-definedfunction.

428A0 An error occurred with the sourced function on which the user-definedfunction is based.

428A1 Unable to access a file referenced by a host file variable.

428A2 A table cannot be assigned to a multi-node node group, because it doesnot have a partition key.

428A3 An invalid path has been specified for an event monitor.

428A4 An invalid value has been specified for an event monitor option.

428A5 An exception table named in a SET INTEGRITY statement either doesnot have the proper structure, or it has been defined with generatedcolumns, constraints, or triggers.

428A6 An exception table named in a SET INTEGRITY statement cannot be thesame as one of the tables being checked.

428A7 There is a mismatch in the number of tables being checked and in thenumber of exception tables specified in the SET INTEGRITY statement.

428A8 Cannot reset the check-pending state using the SET INTEGRITYstatement on a descendent table while a parent table is in thecheck-pending state.

428A9 The node range is invalid.

428B0 Illegal nesting inside ROLLUP, CUBE, or GROUPING SETS.

428B1 Incorrect number of table space container specifications that are notdesignated for specific nodes.

428B2 The path name for the container is not valid.

428B3 An invalid SQLSTATE was specified on RAISE_ERROR.

428C0 The node cannot be dropped, because it is the only node in thenodegroup.

428C1 Only one ROWID column can be specified for a table.

428C2 Examination of the function body indicates that the given clause shouldhave been specified on the CREATE FUNCTION statement.

428C4 The number of elements on each side of the predicate operator is not thesame.

428C5 No data type mapping was found for a data type from the data source.

428C9 A ROWID column cannot be specified as the target column of an INSERTor UPDATE.

510 Message Reference, Volume 2

Page 519: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

428CA A table in append mode cannot have a clustered index.

428CB The page size for a table space must match the page size of theassociated bufferpool.

428D1 Unable to access a file referenced by a DATALINK value.

428D4 A cursor specified in a FOR statement cannot be referenced in an OPEN,CLOSE, or FETCH statement.

428D5 The ending label does not match the beginning label.

428D6 UNDO is not allowed for NOT ATOMIC statements.

428D7 The condition value is not allowed.

428D8 The declaration or use of the SQLSTATE or SQLCODE variable is notvalid.

428DB An object is not valid as a supertype, supertable, or superview.

428DC The function is not valid as the transform for this type.

428DD A required transform is not defined.

428DE PAGESIZE value is not supported.

428DF Data types specified in CREATE CAST are not valid.

428DG Function specified in CREATE CAST is not valid.

428DH Operation is not valid for typed tables.

428DJ Inherited column or attribute cannot be changed or dropped.

428DK The scope for the reference column is already defined.

428DL Parameter of external or sourced function has a scope defined.

428DM The scope table or view is not valid for the reference type.

428DN SCOPE is not specified in the RETURNS clause of an external function oris specified in the RETURNS clause of a sourced function.

428DP The type is not a structured type.

428DQ A subtable or subview cannot have a different schema name than itssupertable or superview.

428DR Operation cannot be applied to a sub-table.

428DS Index on the specified columns cannot be defined on subtable.

428DT Operand of expression is not a valid scoped reference type.

428DU A type is not included in the required type hierarchy.

428DV Invalid left operand of a dereference operator.

Chapter 3. SQLSTATE Messages 511

Page 520: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

428DW Object identifier column cannot be referenced using the dereferenceoperator.

428DX Object identifier column is required to define the root table or root viewof a typed table or typed view hierarchy.

428DY Table statistics cannot be updated for a subtable.

428DZ An object identifier column cannot be updated.

428E0 Definition of index does not match the definition of the index extension.

428E1 Result of the range-producing table function is inconsistent with that ofthe key transformation table function for the index extension.

428E2 Number or the type of key-target parameters does not match with thenumber or type of key transform function for the index extension.

428E3 Argument for function in index extension is not valid.

428E4 Function is not supported in CREATE INDEX EXTENSION statement.

428E5 SELECTIVITY clause can only be specified with a user-defined predicate.

428E6 The search argument of method in the user-defined predicate does notmatch the one in the corresponding search method of the indexextension.

428E7 Type of the operand following the comparison operator in theuser-defined predicate does not match the RETURNS data type.

428E8 A search target or search argument parameter does not match aparameter name of the function being created.

428E9 An argument parameter name cannot appear as both a search target andsearch argument in the same exploitation rule.

428EA A fullselect in a typed view is not valid.

428EB A column in a subview cannot be read only when the correspondingcolumn in the superview is updatable.

428EC The fullselect specified for the summary table is not valid.

428ED Structured types with Datalink or Reference type attributes cannot beconstructed.

428EE Option is not valid for this data source.

428EF Value for the option is not valid for this data source.

428EG Missing required option for this data source.

428EH Cannot ADD an option that is already defined.

428EJ Cannot SET or DROP an option that has not been ADDed.

512 Message Reference, Volume 2

Page 521: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

428EK The qualifier for a declared global temporary table name must beSESSION.

428EL A transform function is not valid for use with a function or method.

428EM The TRANSFORM GROUP clause is required.

428EN A transform group is specified that is not used.

428EP A structured type cannot depend on itself either directly or indirectly.

428EQ The returns type of the routine is not the same as the subject type.

428ER A method specification cannot be dropped before the method body isdropped.

428ES A method body does not correspond to the language type of the methodspecification.

428EU TYPE or VERSION is not specified in the server definition.

428EV Pass-through facility is not supported for the type of data source.

428EW The table cannot be converted to or from a summary table.

428EX Routine cannot be used as a transform function because it is either abuiltin function or a method.

428EY The data type of the search target in a user-defined predicate does notmatch the data type of the source key of the specified index extension.

428EZ A window specification for an OLAP function is not valid.

428F0 A ROW function must include at least two columns.

428F1 An SQL TABLE function must return a table result.

428F2 The data type of the RETURN statement value in an SQL proceduremust be INTEGER.

42901 A column function does not include a column name.

42903 A WHERE clause or SET clause includes an invalid reference, such as acolumn function.

42904 The SQL procedure was not created because of a compile error.

42907 The string is too long.

42908 The statement does not include a required column list.

42911 A decimal divide operation is invalid, because the result would have anegative scale.

42912 A column cannot be updated, because it is not identified in the UPDATEclause of the select-statement of the cursor.

42914 The DELETE is invalid, because a table referenced in a subquery can beaffected by the operation.

Chapter 3. SQLSTATE Messages 513

Page 522: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

42915 An invalid referential constraint has been detected.

42916 The alias cannot be created, because it would result in a repetitive chainof aliases.

42917 The object cannot be explicitly dropped.

42918 A user-defined data type cannot be created with a system-defined datatype name (for example, INTEGER).

42919 Nested compound statements are not allowed.

42921 Containers cannot be added to the tablespace.

42925 Recursive named derived tables cannot specify SELECT DISTINCT andmust specify UNION ALL.

42928 WITH EMPTY TABLE cannot be specified for a table that has adependent REFRESH IMMEDIATE summary table.

42932 The program preparation assumptions are incorrect.

42939 The object cannot be created, because the specified identifier is reservedfor system use.

42962 A long column, LOB column, or structured type column cannot be usedin an index, a key, or a constraint.

42968 The connection failed, because there is no current software license.

42969 The package was not created and the current unit of work was rolledback, because of internal limitations or an invalid section number.

42972 An expression in a join-condition references columns in more than one ofthe operand tables.

42985 The statement is not allowed in a routine.

42987 The statement is not allowed in a procedure or trigger.

42989 A GENERATED column that is based on an expression cannot be used ina BEFORE trigger.

42991 The BOOLEAN data type is currently only supported internally.

42993 The column, as defined, is too large to be logged.

42994 Raw device containers are not currently supported on this system.

42995 The requested function does not apply to global temporary tables.

42997 A unique index or unique constraint is not allowed because the keycolumns are not a superset of the partitioned key columns.

429A0 A foreign key cannot reference a parent table defined as not loggedinitially.

429A1 Nodegroup is not valid for the table space.

514 Message Reference, Volume 2

Page 523: Db2 SQL Errors

Table 27. Class Code 42: Syntax Error or Access Rule Violation (continued)

SQLSTATEValue

Meaning

429A9 SQL statement cannot be processed by DataJoiner.

429B2 Specified inline length value for the structured type is too small.

429B3 Object may not be defined on a subtable.

429B4 Data filter function cannot be a LANGUAGE SQL function.

429B5 Data type of instance parameter in index extension is not valid.

429B8 A routine defined with PARAMETER STYLE JAVA cannot have astructured type as a parameter or returns type.

429B9 DEFAULT or NULL cannot be used in an attribute assignment.

429BA A federated view or summary table definition does not reference anickname or OLE DB table function.

429BB A data type specified for a parameter or variable is not supported in aSQL routine.

429BC There are multiple container actions in the ALTER TABLESPACEstatement.

Class Code 44 WITH CHECK OPTION Violation

Table 28. Class Code 44: WITH CHECK OPTION Violation

SQLSTATEValue

Meaning

44000 The INSERT or UPDATE is not allowed, because a resulting row doesnot satisfy the view definition.

Class Code 46 Java DDL

Table 29. Class Code 46: Java DDL

SQLSTATEValue

Meaning

46001 Java DDL - Invalid URL.

46002 Java DDL - Invalid jar name.

46003 Java DDL - Invalid class deletion.

46007 Java DDL - Invalid signature.

46008 Java DDL - Invalid method specification.

46501 Java DDL - Optional component not implemented.

Chapter 3. SQLSTATE Messages 515

Page 524: Db2 SQL Errors

Class Code 51 Invalid Application State

Table 30. Class Code 51: Invalid Application State

SQLSTATEValue

Meaning

51002 The package corresponding to an SQL statement execution request wasnot found.

51003 Consistency tokens do not match.

51004 An address in the SQLDA is invalid.

51005 Thr previous system error has disabled this function.

51008 The release number of the precompiled program is not valid.

51015 An attempt was made to execute a section that was found to be in errorat bind time.

51017 The user is not logged on.

51021 SQL statements cannot be executed until the application process executesa rollback operation.

51022 A CONNECT that specifies an authorization name is invalid when aconnection (either current or dormant) already exists to the server namedin that CONNECT statement.

51023 The database is already in use by another instance of the databasemanager.

51024 A view cannot be used, because it has been marked inoperative.

51025 An application in the XA transaction processing environment is notbound with SYNCPOINT TWOPHASE.

51026 An event monitor cannot be turned on, because its target path is alreadyin use by another event monitor.

51027 The IMMEDIATE CHECKED option of the SET INTEGRITY statement isnot valid since a table is not in the check-pending state.

51028 A package cannot be used, because it is marked inoperative.

51030 The procedure referenced in a ALLOCATE CURSOR, or an ASSOCIATELOCATORS statement has not yet been called within the applicationprocess.

Class Code 54 SQL or Product Limit Exceeded

Table 31. Class Code 54: SQL or Product Limit Exceeded

SQLSTATEValue

Meaning

54001 The statement is too long or too complex.

516 Message Reference, Volume 2

Page 525: Db2 SQL Errors

Table 31. Class Code 54: SQL or Product Limit Exceeded (continued)

SQLSTATEValue

Meaning

54002 A string constant is too long.

54004 The statement has too many table names or too many items in a SELECTor INSERT list.

54006 The result of concatenation is too long.

54008 The key is too long, has too many columns, or a key column is too long.

54010 The record length of the table is too long.

54011 Too many columns were specified for a table or view.

54023 The limit for the number of parameters or arguments for a function or aprocedure has been exceeded.

54028 The maximum number of concurrent LOB handles has been reached.

54029 The maximum number of open directory scans has been reached.

54030 The maximum number of event monitors are already active.

54031 The maximum number of files have already been assigned the eventmonitor.

54032 The maximum size of a table has been reached.

54033 The maximum number of partitioning maps has been reached.

54034 The combined length of all container names for the tablespace is toolong.

54035 An internal object limit exceeded.

54036 The path name for the container is too long.

54037 The container map for the tablespace is too complicated.

54038 Maximum depth of cascaded triggers exceeed.

54045 Maximum levels of a type hierarchy exceeded.

54046 The maximum allowable parameters is exceeded in an index extension.

54047 The maximum size of a table space is exceeded.

54048 A temporary table space with sufficient page size does not exist.

54049 Length of an instance of a structured type exceeds system limit.

54050 The maximum allowable attributes is exceeded in a structured type.

Chapter 3. SQLSTATE Messages 517

Page 526: Db2 SQL Errors

Class Code 55 Object Not in Prerequisite State

Table 32. Class Code 55: Object Not in Prerequisite State

SQLSTATEValue

Meaning

55001 The database must be migrated.

55002 The explanation table is not defined properly.

55006 The object cannot be dropped, because it is currently in use by the sameapplication process.

55007 The object cannot be altered, because it is currently in use by the sameapplication process.

55009 The system attempted to write to a read-only file or a write-protecteddiskette.

55012 A clustering index already exists on the table.

55019 The table is in an invalid state for the operation.

55022 The file server is not registered with this database.

55023 An error occured calling a routine.

55024 The tablespace cannot be dropped, because data related to a table is alsoin another tablespace.

55025 The database must be restarted.

55026 A temporary tablespace cannot be dropped.

55031 The format of the error mapping file is incorrect.

55032 The CONNECT statement is invalid, because the database manager wasstopped after this application was started.

55033 An event monitor cannot be activated in the same unit of work in whichit is created or modified.

55034 The event monitor is in an invalid state for the operation.

55036 The node cannot be dropped, because it has not been removed from thepartitioning map.

55037 The partitioning key cannot be dropped, because the table is in amulti-node nodegroup.

55038 The nodegroup cannot be used, because it is being rebalanced.

55039 The access or state transition is not allowed, because the tablespace is notin an appropriate state.

55041 Containers cannot be added to a tablespace while a rebalance is inprogress.

55043 Attributes of a structured type cannot be altered when a typed table ortyped view based on the type exists.

518 Message Reference, Volume 2

Page 527: Db2 SQL Errors

Class Code 56 Miscellaneous SQL or Product Error

Table 33. Class Code 56: Miscellaneous SQL or Product Error

SQLSTATEValue

Meaning

56031 The clause or scalar function is invalid, because mixed and DBCS dataare not supported on this system.

56033 The insert or update value of a long string column must be a hostvariable or NULL.

56084 LOB data is not supported in DRDA.

56091 Multiple errors occurred as a result of executing a compound SQLstatement.

56092 The type of authorization cannot be determined, because theauthorization name is both a user id and group id.

56097 LONG VARCHAR and LONG VARGRAPHIC fields are not permitted inTABLESPACEs which are built on DEVICEs.

56098 An error occurred during implicit rebind or prepare.

56099 The REAL data type is not supported by the target database.

560A0 Action on a LOB value failed.

560AA The clause or scalar function is invalid, because UCS-2 is not supportedon this system.

560AC Wrapper definition cannot be used for the specified type or version ofdata source.

560AF PREPARE statement is not supported when using gateway concentrator.

560B0 Invalid new size value for table space container resizing.

Class Code 57 Resource Not Available or Operator Intervention

Table 34. Class Code 57: Resource Not Available or Operator Intervention

SQLSTATEValue

Meaning

57001 The table is unavailable, because it does not have a primary index.

57003 The specified bufferpool has not been activated.

57007 The object cannot be used, because a DROP or ALTER is pending.

57009 Virtual storage or database resource is temporarily unavailable.

57011 Virtual storage or database resource is not available.

57012 A non-database resource is not available. This will not affect thesuccessful execution of subsequent statements.

Chapter 3. SQLSTATE Messages 519

Page 528: Db2 SQL Errors

Table 34. Class Code 57: Resource Not Available or Operator Intervention (continued)

SQLSTATEValue

Meaning

57013 A non-database resource is not available. This will affect the successfulexecution of subsequent statements.

57014 Processing was canceled as requested.

57016 The table cannot be accessed, because it is inactive.

57017 Character conversion is not defined.

57019 The statement was not successful, because of a problem with a resource.

57020 The drive containing the database is locked.

57021 The diskette drive door is open.

57022 The table could not be created, because the authorization ID of thestatement does not own any suitable dbspaces.

57030 Connection to application server would exceed the installation-definedlimit.

57032 The maximum number of concurrent databases have already beenstarted.

57033 Deadlock or timeout occurred without automatic rollback.

57036 The transaction log does not belong to the current database.

57046 A new transaction cannot start because the database or instance isquiesced.

57047 An internal database file cannot be created, because the directory is notaccessible.

57048 An error occurred while accessing a container for a tablespace.

57049 The operating system process limit has been reached.

57050 The file server is not currently available.

57051 The estimated CPU cost exceeds the resource limit.

57052 Node is unavailable, because it does not have containers for alltemporary table spaces.

57055 A temporary table space with sufficient page size was not available.

57056 Package is not available because the database is in NO PACKAGE LOCKmode.

57057 The SQL statement cannot be executed due to a prior condition in aDRDA chain of SQL statements.

520 Message Reference, Volume 2

Page 529: Db2 SQL Errors

Class Code 58 System Error

Table 35. Class Code 58: System Error

SQLSTATEValue

Meaning

58004 A system error (that does not necessarily preclude the successfulexecution of subsequent SQL statements) occurred.

58005 A system error (that prevents the successful execution of subsequent SQLstatements) occurred.

58008 Execution failed due to a distribution protocol error that will not affectthe successful execution of subsequent DDM commands or SQLstatements.

58009 Execution failed due to a distribution protocol error that causeddeallocation of the conversation.

58010 Execution failed due to a distribution protocol error that will affect thesuccessful execution of subsequent DDM commands or SQL statements.

58011 The DDM command is invalid while the bind process in progress.

58012 The bind process with the specified package name and consistency tokenis not active.

58014 The DDM command is not supported.

58015 The DDM object is not supported.

58016 The DDM parameter is not supported.

58017 The DDM parameter value is not supported.

58018 The DDM reply message is not supported.

58023 A system error has caused the current program to be canceled.

58030 An I/O error has occurred.

58031 The connection was unsuccessful, because of a system error.

58032 Unable to use the process for a fenced mode user-defined function.

58034 An error was detected while attempting to find pages for an object in aDMS tablespace.

58035 An error was detected while attempting to free pages for an object in aDMS tablespace.

58036 The internal tablespace ID specified does not exist.

Chapter 3. SQLSTATE Messages 521

Page 530: Db2 SQL Errors

522 Message Reference, Volume 2

Page 531: Db2 SQL Errors

Appendix A. Communications Errors

If your application returns an sqlcode of -30081, it means that acommunications error has been detected. The actual error encountered by thecommunication subsystem is returned in the list of error tokens for the 30081error message. The following lists possible communications errors that can bereturned.

The error codes are grouped by protocol as follows:v “TCP/IP”v “APPC” on page 527v “NETBIOS” on page 529v “IPX/SPX” on page 531

TCP/IP

When using TCP/IP in a Unix environment, the following table lists some ofthe errnos which the user may encounter most frequently. It is NOT acomplete list of errors. Errnos can be found in the file /usr/include/sys/errno.h.The errno number itself is indicated for each operating system.

Table 36. Unix TCP/IP errnos.

ErrnoErrno Number

DescriptionAIX HP-UX Solaris UnixWare Linux

EINTR 4 4 4 4 4Interrupted systemcall.

EAGAIN 11 11 11 11 11Resource temporarilyunavailable.

EBUSY 16 16 16 16 16 Resource busy.

EMFILE 24 24 24 24 24The per-process filedescriptor table isfull.

EPIPE 32 32 32 32 32 Broken pipe.

EADDRINUSE 67 226 125 125 98The specified addressis already in use.

ENETDOWN 69 228 127 127 100The network isdown.

ENETUNREACH 70 229 128 128 101No route to thenetwork is available.

© Copyright IBM Corp. 1993, 2000 523

Page 532: Db2 SQL Errors

Table 36. Unix TCP/IP errnos. (continued)

ErrnoErrno Number

DescriptionAIX HP-UX Solaris UnixWare Linux

ENETRESET 71 230 129 129 102The network hasdropped theconnection on reset.

ECONNRESET 73 232 131 131 104Connection has beenreset by the partner.

ENOBUFS 74 233 132 132 105

Insufficient bufferspace resources wereavailable in thesystem to completethe call.

ENOTCONN 76 235 134 134 107The socket is notconnected.

ETIMEDOUT 78 238 145 145 110The connection timedout.

ECONNREFUSED 79 239 146 146 111

The connection hasbeen refused. If youare trying to connectto the database,check that thedatabase managerand TCP/IP protocolsupport at the serverhave been startedsuccessfully.

If using SOCKSprotocol support, alsoensure that TCP/IPprotocol support atthe SOCKS serverhas been startedsuccessfully.

EHOSTDOWN 80 241 147 147 112 The host is down.

EHOSTUNREACH 81 242 148 148 113No route to the hostis available.

For more information on Unix TCP/IP communication errors, refer to thetechnical reference manuals for the appropriate operating system. You can alsoissue the following command:

man function-name

524 Message Reference, Volume 2

Page 533: Db2 SQL Errors

where function-name represents the name of the function that returned anerror. The man pages might provide you with additional information abouterrors returned by specific functions.

When using OS/2 TCP/IP, the following is a list of errnos which the user mayencounter most frequently. It is NOT a complete list of errors. Errnos can befound in the file nerrno.h This file is part of the TCP/IP product include files.It may not be present on your system if they have not been installed. Theerrno number itself is in parentheses.v SOCEINTR (10003): Interrupted system call.v SOCEMFILE (10024): Too many open files.v SOCEPIPE (10032): Broken pipe.v EADDRINUSE (10048): The specified address is already in use.v ENETDOWN (10050): The network is down.v ENETUNREACH (10051): No route to the network is available.v ENETRESET (10052): The network has dropped the connection on reset.v SOCECONNABORTED (10053): The software caused a connection abort.v ECONNRESET (10054): Connection has been reset by the partner.v ENOBUFS (10055): No buffer space available.v ENOTCONN (10057): The socket is not connected.v ETIMEDOUT (10060): The establishment of a connection timed out before a

connection was made.v ECONNREFUSED (10061): The connection has been refused. If you are

trying to connect to the database, check that the database manager andTCP/IP protocol support at the server has been started successfully.If using SOCKS protocol support, also ensure that TCP/IP protocol supportat the SOCKS server has been started successfully.

v EHOSTDOWN (10064): The host is down.v EHOSTUNREACH (10065): No route to the host is available.v SOCEOS2ERR (10100): OS/2 error.

For more information on OS/2 TCP/IP communication errors, refer to theOS/2 TCP/IP documentation.

When using TCP/IP or IPX/SPX on a Windows 32-bit operating system, thefollowing is a list of error codes which the user may encounter mostfrequently. It is NOT a complete list of errors. Errors returned byWSAGetLastError() can be found in the file winsock.h. This file may not beinstalled on your system if you do not have a development environmentinstalled. Detailed information about errors returned by specific functions aredocumented in the Windows Sockets 2 Application Programming Interface.

Appendix A. Communications Errors 525

Page 534: Db2 SQL Errors

You can get a copy of this specification from the following website:http://www.stardust.com/winsock/ws_specs.htm.v WSAEINVAL (10022): If this error is received on function WSASTARTUP,

then the Windows Sockets version supported by the application is notsupported by this DLL.

v WSAEMFILE (10024): There are no file descriptors available.v WSAEWOULDBLOCK (10035): The socket is marked as non-blocking and

the operation would block.v WSAEINPROGRESS (10036): A blocking Windows Sockets operation is in

progress.v WSAENOPROTOOPT (10042): The option is unknown or unsupported.v WSAEADDRINUSE (10048): The specified address is already in use.v WSAENETDOWN (10050): The network subsystem has failed.v WSAENETUNREACH (10051): The network can’t be reached from this host

at this time.v WSAENETRESET (10052): The connection has been broken due to remote

host resetting.v WSAECONNABORTED (10053): The virtual circuit was aborted due to

timeout or other failure. The network has dropped the connection on reset.v WSAECONNRESET (10054): Connection has been reset by the partner.v WSAENOBUFS (10055): No buffer space available, too many connections.v WSAENOTCONN (10057): The socket is not connected.v WSAETIMEDOUT (10060): The establishment of a connection timed out

before a connection was made.v WSAECONNREFUSED (10061): The connection has been refused. If you are

trying to connect to the database, check that the database manager andTCP/IP protocol support at the server has been started successfully.

v WSAEHOSTUNREACH (10065): The network can’t be reached from thishost at this time.

v WSASYSNOTREADY (10091): The underlying network subsystem is notready for network communication.

v WSAVERNOTSUPPORTED (10092): The version of Windows Sockets APIsupport requested is not provided by this particular Windows Socketsimplementation.

v WSAHOST_NOT_FOUND (11001): Host not found.v WSATRY_AGAIN (11002): Host not found. Request to retrieve the

hostname’s IP address from the name server failed.v WSANO_DATA (11004): Valid name, no data record of requested type. The

name server or hosts file does not recognize the hostname, or the servicename is not specified in the services file.

526 Message Reference, Volume 2

Page 535: Db2 SQL Errors

For more information on TCP/IP communication errors under Windows, referto the Windows Sockets documentation.

APPC

Below is a list of CPI-C function return codes which the user may encountermost frequently. It is NOT a complete list of return codes. The number inparentheses indicates the defined number corresponding to the return code.v CM_ALLOCATE_FAILURE_NO_RETRY (1): Allocation failed because of a

non-temporary condition. For example, the session cannot be activated dueto a system definition error or session-activation protocol error. This returncode is also returned when the session is deactivated because of a sessionprotocol error before the conversation can be allocated.

v CM_ALLOCATE_FAILURE_RETRY (2): Allocation failed because of atemporary condition. For example, the session cannot be activated due to atemporary lack of resources at the local system or remote system.

v CM_CONVERSATION_TYPE_MISMATCH (3): Allocation failed because theremote program does not support the conversation type in the allocationrequest. This is likely a problem with the TP at the server. Ensure that theTP at the server is configured to support a conversation type of basic.

v CM_TPN_NOT_RECOGNIZED (9): This error occurs when the allocaterequest is sent to the remote system. It indicates that the remote systemdoes not recognize the transaction program name specified in the request. Ifyou are not using global directory services, ensure that the TP namespecified in the CPI-C Side Information profile at the client, matches the TPname specified at the server. If you are using global directory services,request your database administrator’s help to ensure that the TP namespecified in the global directory entry matches the TP name specified at theserver.

v CM_TP_NOT_AVAILABLE_NO_RETRY (10): This error occurs when theallocate request is sent to the remote system. It indicates that the remote LUrecognizes the TP name sent, but cannot start the program. Also check thatthe userid specified in the TPN profile at the server is valid.

v CM_TP_NOT_AVAILABLE_RETRY (11): This error occurs when the allocaterequest is sent to the remote system. It indicates that the remote LUrecognizes the TP name sent, but for some reason which may be temporary,it cannot start the program. Ensure that the database manager and APPCprotocol support at the server have been started successfully.

v CM_DEALLOCATED_ABEND (17): This error occurs when the remoteprogram deallocates the conversation. This can occur if the remote programhas abnormally terminated, or has encountered a fatal error condition. Ifyou are trying to connect to DB2 for AIX, check that the database managerand APPC protocol support at the server have been started successfully. Foran AIX server, this error could also be caused by one of the following:

Appendix A. Communications Errors 527

Page 536: Db2 SQL Errors

– The database agent at the server was forced off by the systemadministrator.

– A database agent could not be started at the server because the maxagentsdatabase manager configuration parameter has been exceeded. Check theFirst Failure Service Log (DB2DIAG.LOG) at the server to see if an errormessage has been logged.

– The database agent at the server was terminated due to an abnormaltermination of a key database manager process.

v CM_PRODUCT_SPECIFIC_ERROR (20): A product-specific error has beendetected, and a description of the error has been stored in the product’ssystem error log. Check that the local APPC subsystem has been startedsuccessfully. For Communication Server for AIX, to get more informationabout a product-specific error, it is necessary to check the value of theglobal variable errno. See the section below for more information onpossible errnos that can be returned. Communication Server for OS/2records errors in the OS/2 system error log.

v CM_RESOURCE_FAILURE_NO_RETRY (26): This error occurs when theconversation terminates prematurely (on either the remote or local end)from an error related to resources (such as sessions or links). For an OS/2server, this error could also be caused by one of the following:– The database agent at the server was forced off by the system

administrator.– A database agent could not be started at the server because the maxagents

database manager configuration parameter has been exceeded. Check theFirst Failure Service Log (DB2DIAG.LOG) at the server to see if an errormessage has been logged.

– The database agent at the server was terminated due to an abnormaltermination of a key database manager process.

v CM_RESOURCE_FAILURE_RETRY (27): This error occurs when theconversation terminates prematurely (on either the remote or local end) forabout the same reason as the NO_RETRY condition described above. Theonly difference is that the error may not be permanent.

For the most part, CPI Communications return codes are enough to deducethe cause of the error. But when CM_PRODUCT_SPECIFIC_ERROR isreturned, additional information is provided.

For Communication Server for AIX, the errno provides additional information.Below is a list of some of the more common errnos. It is NOT a complete list.Errnos numbered 101 and higher can be found in the file/usr/include/luxsna.h, which contains the Communication Server for AIXspecific errnos. Most of these errnos are translated to CPI-C return codes.Lower-numbered errnos are related to AIX problems and can be found in thefile /usr/include/sys/errno.h. The errno number itself is in parentheses.

528 Message Reference, Volume 2

Page 537: Db2 SQL Errors

v EBADF (9): This is a ″bad file descriptor″ error. If this error occurs whentrying to connect to the database, it usually means that the SNA subsystemat the server has not been started, or that there is some problem with theSNA configuration profiles. Check that the SNA subsystem at the server hasbeen started. Check that the link station to the server node can be activated.

v EACCESS (13): This is a ″permission denied″ error. If this error occurs whentrying to connect to the database, it usually means that there is someproblem with the SNA configuration profiles.

On HP-UX, for SNAPlus2, please refer to the /usr/include/sys/errno.h filefor a description of the error.

For OS/2, when CPI Communications returnsCM_PRODUCT_SPECIFIC_ERROR, an entry is created in the error log.Information in the error log entry identifies CPIC as the originator. IfCommunications Server/2 (CS/2) is installed, CS/2 records the error in theOS/2 system error log. Refer to the problem determination guide for thespecific product, for a complete description of the error, and therecommended action to take.

For more information on CPI Communications errors, refer to SystemsApplication Architecture Common Programming Interface CommunicationsReference.

NETBIOS

When using NetBIOS, the following is a list of hexadecimal return codes thatthe user may encounter most frequently. It is NOT a complete list of returncodes.01 Invalid buffer length03 Invalid command05 Command timed out06 Message incomplete07 Data not received08 Invalid local session number09 No resource available0A Session closed

This error could be caused by one of the following:v The database agent at the server was forced off by the system

administrator.v A database agent could not be started at the server because the

maxagents database manager configuration parameter has beenexceeded. Check the First Failure Service Log (DB2DIAG.LOG) atthe server to see if an error message has been logged.

Appendix A. Communications Errors 529

Page 538: Db2 SQL Errors

v The database agent at the server was terminated due to anabnormal termination of a key database manager process.

0B Command cancelled0D Duplicate name used on the network. Ensure that the nname

parameter defined in the database manager configuration file isunique on the network.

0E Name table full0F Command completed (name has active sessions and is now

deregistered)11 Local session table full12 Session open rejected13 Invalid name number14 Remote name not found

If this error occurs when trying to connect to the database, ensurethat:v The database manager has been successfully started at the server,

and NetBIOS support has also been successfully started.v The server nname specified in the NETBIOS node entry at the

client, matches the workstation name specified in the databasemanager configuration file at the server.

15 Local name not found16 Name in use on remote node17 Name deleted18 Session ended abnormally19 Name conflict detected21 Interface busy22 Too many commands outstanding23 Invalid adapter24 Command already completed26 Command invalid to cancel30 Name defined by another environment34 Environment not defined, RESET must be issued35 Required operating system resources exhausted, retry later36 Max applications exceeded37 No SAPs available38 Requested resources not available39 Invalid NCB address3A Invalid reset3B Invalid NCB DD ID3C Segment lock unsuccessful3F Device driver open error.40 OS error detected4F Perm ring statusF6 Unexpected CCB errorF8 Adapter open error

530 Message Reference, Volume 2

Page 539: Db2 SQL Errors

F9 Adapter support software internal errorFA Adapter checkFB NetBIOS not operationalFC Open failuresFD Unexpected adapter closeFF Command in process

For more information on NetBIOS return codes, refer to the Local AreaNetwork technical reference.

IPX/SPX

When using IPX/SPX on Windows 32-bit operating systems, refer to theTCP/IP section for a list of the most frequently encountered errors. Errorsreturned by both TCP/IP and IPX/SPX on Windows systems conform to theWINSOCK specifications. When using IPX/SPX on OS/2 or Unix systems, thefollowing is a list of t_errnos which the user may encounter most frequently. Itis NOT a complete list of errors. Error values can be found in the file tiuser.h.The t_errno number itself is in parentheses.v TBADF (4): Specified file handle does not refer to a transport endpoint.v TNOADDR (5): Transport provider could not allocate an address.v TOUTSTATE (6): A function was issued in the wrong sequence.v TSYSERR (8): A system error occurred during execution of this function.v TLOOK (9): An asynchronous event has occurred on this connection.v TNODATA (13): No data is currently available from the transport provider.v TADDRBUSY (23): Specified address is in use and the transport provider

could not allocate a new address.

When the first error token specifies t_errno = TLOOK, the second error tokenspecifies an event. Below is a list of events which the user may encounter mostfrequently. It is NOT a complete list of events. Events can be found in the filetiuser.h. The event value is in parentheses.v T_DISCONNECT (0x0010): Disconnect received.

This error could be caused by one of the following:– The server was not started, or IPX/SPX support on the server was not

started. Check the First Failure Service Log (DB2DIAG.LOG) at theserver to see if messages have been logged.

– The node directory information specified on the client is incorrect.– The client or server IPX/SPX communications stack was not installed

and/or configured properly.– The database agent at the server was forced off by the system

administrator.

Appendix A. Communications Errors 531

Page 540: Db2 SQL Errors

– A database agent could not be started at the server because the maxagentsdatabase manager configuration parameter has been exceeded. Check theFirst Failure Service Log (DB2DIAG.LOG) at the server to see if an errormessage has been logged.

– The database agent at the server was terminated due to an abnormaltermination of a key database manager process.

When the first error token specifies t_errno = TLOOK, and the second errortoken specifies the event T_DISCONNECT, the third error token specifies adisconnect reason code. Below is a list of disconnect reason codes which the usermay encounter most frequently. It is NOT a complete list of reason codes.Disconnect reason codes can be found in the file tispxipx.h. On UNIXplatforms, the reason codes are defined in the file spx_app.h. The reason codevalue is in parentheses.v TLI_SPX_CONNECTION_TERMINATED (0xEC): Disconnect received from

remote peer.v TLI_SPX_CONNECTION_FAILED (0xED): Connection failure.

For more information on TLI IPX/SPX communication errors, refer to theTransport Layer Interface documentation.

When using OS/2 IPX/SPX file server addressing, the following is a list ofreturn values which the user may encounter most frequently. It is NOT acomplete list of errors. Return values can be found in the file nwerror.h.

0x880F -This is a ″NO CONNECTION TO SERVER″ error. Ensure that the fileserver specified is up and running, and can be accessed by the clientand server workstations.

0x88FF -If this error occurs when trying to connect to the database, and thefunction is NWAttachToFileServer, ensure that the IPX/SPX protocolsupport at the client has been installed correctly, and is started.

0x89EF -This is an ″INVALID NAME″ error. Illegal characters were specified inthe file server or object name. Control characters, the comma,semicolon, slash, backslash, question mark, asterisk, and tilde areinvalid.

0x89F2This is a ″NO OBJECT READ PRIVILEGE″ error. The client does nothave access to read the DB2 server’s object registered at the Netwarefile server.

0x89F4This is a ″NO OBJECT DELETE PRIVILEGE″ error. Ensure that the

532 Message Reference, Volume 2

Page 541: Db2 SQL Errors

userid/password specified during deregister has sufficient authorityto delete an object and its properties, on the file server.

0x89F5This is a ″NO OBJECT CREATE PRIVILEGE″ error. Ensure that theuserid/password specified during register has sufficient authority tocreate an object and its properties, on the file server.

0x89F6This is a ″NO PROPERTY DELETE PRIVILEGE″ error. Ensure that theuserid/password specified during deregister has sufficient authorityto delete an object and its properties, on the file server.

0x89F7This is a ″NO PROPERTY CREATE PRIVILEGE″ error. Ensure that theuserid/password specified during register has sufficient authority tocreate an object and its properties, on the file server.

0x89F8This is a ″NO PROPERTY WRITE PRIVILEGE″ error. Ensure the thatthe userid/password specified during register has sufficient authorityto write object property values, on the file server.

0x89FC -This is an ″UNKNOWN FILE SERVER″ or ″NO SUCH OBJECT″ error.

If this error occurs when running the REGISTER/DEREGISTERcommand, ensure that:v An object name has been specified in the database manager

configuration file, and the name contains valid characters.v A file server name has been specified in the database manager

configuration file, and the name contains valid characters.

If this error occurs when trying to connect to the database, and thefunction is NWScanProperty, ensure that:v The network address of the database manager has been successfully

registered at the NetWare file server. This is done by running theREGISTER command at the server.

v The object name specified in the IPXSPX node directory entry at theclient, matches the object name specified in the database managerconfiguration file at the server.

v The file server name specified in the IPXSPX node directory entryat the client, matches the file server name specified in the databasemanager configuration file at the server.

If this error occurs on function NWAttachToFileServer, ensure that thefiles server name was configured correctly in the database managerconfiguration file.

Appendix A. Communications Errors 533

Page 542: Db2 SQL Errors

If this error occurs on function NWLoginToFileServer, ensure that theuserid specified on the register/deregister is valid for logging into thefile server.

0x89FF -This is a ″NO SUCH OBJECT OR BAD PASSWORD″ error. Ensurethat the password you have specified is defined, and has not expired.

For more information on IPX/SPX file server addressing errors, refer to theNetWare Client API for C documentation.

When using Unix IPX/SPX file server addressing, the following is a list oferror generators that identify what location generated the error.v 0x00 - File serverv 0x10 - APIv 0x20 - API

When using Unix IPX/SPX file server addressing mode, the following is a listof error codes which the user may encounter most frequently. It is NOT acomplete list of errors. On AIX, error codes can be found in the file nwerrors.h.

0x02 - This is a ″TRANSPORT OPEN″ error. Ensure that IPX/SPXcommunications was installed and configured correctly.

0xDE -This is a ″BAD PASSWORD″ error. Ensure that the password specifiedon register/deregister is valid for logging into the file server.

0xEF - This is an ″INVALID NAME″ error. Ensure that the file server andobject name specified in the database manager configuration file isvalid. Check that the name does not contain illegal characters.

0xF2 - This is a ″NO OBJECT READ PRIVILEGE″ error. The client does nothave access to read the DB2 server’s object registered at the Netwarefile server.

0xF4 - This is a ″NO OBJECT DELETE PRIVILEGE″ error. Ensure that theuserid/password specified during deregister has sufficient authorityto delete an object and its properties, on the file server.

0xF5 - This is a ″NO OBJECT CREATE PRIVILEGE″ error. Ensure that theuserid/password specified during register has sufficient authority tocreate an object and its properties, on the file server.

0xF6 - This is a ″NO PROPERTY DELETE PRIVILEGE″ error. Ensure that theuserid/password specified during deregister has sufficient authorityto delete an object and its properties.

534 Message Reference, Volume 2

Page 543: Db2 SQL Errors

0xF7 This is a ″NO PROPERTY CREATE PRIVILEGE″ error. Ensure that theuserid/password specified during register has sufficient authority tocreate an object and its properties.

0xF8 - This is a ″NO PROPERTY WRITE PRIVILEGE″ error. Ensure the thatthe userid/password specified during register has sufficient authorityto write object property values, on the file server.

0xFC - This is a ″UNKNOWN FILE SERVER″ or ″NO SUCH OBJECT″ error.

If this error occurs when running the REGISTER/DEREGISTERcommand, ensure that:v An object name has been specified in the database manager

configuration file, and the name contains valid characters.v A file server name has been specified in the database manager

configuration file, and the name contains valid characters.

If this error occurs when trying to connect to the database, and thefunction is NWScanProperty, ensure that:v The network address of the database manager has been successfully

registered at the NetWare file server. This is done by running theREGISTER command at the server.

v The object name specified in the IPXSPX node directory entry at theclient, matches the object name specified in the database managerconfiguration file at the server.

v The file server name specified in the IPXSPX node directory entryat the client, matches the file server name specified in the databasemanager configuration file at the server.

If this error occurs on function NWAttachToServerPlatform, ensure thatthe files server name was configured correctly in the databasemanager configuration file.

If this error occurs on function NWLoginToServerPlatform, ensure thatthe userid specified on the register/deregister is valid for logging intothe file server.

0xFF - This is a ″NO RESPONSE FROM FILE SERVER″. Ensure that the fileserver is up and running and accessible by the DB2 server and client.

For more information on IPX/SPX file server addressing mode errors, refer tothe NetWare C Interface for UNIX API reference.

Appendix A. Communications Errors 535

Page 544: Db2 SQL Errors

536 Message Reference, Volume 2

Page 545: Db2 SQL Errors

Appendix B. Using the DB2 Library

The DB2 Universal Database library consists of online help, books (PDF andHTML), and sample programs in HTML format. This section describes theinformation that is provided, and how you can access it.

To access product information online, you can use the Information Center. Formore information, see “Accessing Information with the Information Center”on page 551. You can view task information, DB2 books, troubleshootinginformation, sample programs, and DB2 information on the Web.

DB2 PDF Files and Printed Books

DB2 InformationThe following table divides the DB2 books into four categories:

DB2 Guide and Reference InformationThese books contain the common DB2 information for all platforms.

DB2 Installation and Configuration InformationThese books are for DB2 on a specific platform. For example, there areseparate Quick Beginnings books for DB2 on OS/2, Windows, andUNIX-based platforms.

Cross-platform sample programs in HTMLThese samples are the HTML version of the sample programs that areinstalled with the Application Development Client. The samples arefor informational purposes and do not replace the actual programs.

Release notesThese files contain late-breaking information that could not beincluded in the DB2 books.

The installation manuals, release notes, and tutorials are viewable in HTMLdirectly from the product CD-ROM. Most books are available in HTML on theproduct CD-ROM for viewing and in Adobe Acrobat (PDF) format on the DB2publications CD-ROM for viewing and printing. You can also order a printedcopy from IBM; see “Ordering the Printed Books” on page 547. The followingtable lists books that can be ordered.

On OS/2 and Windows platforms, you can install the HTML files under thesqllib\doc\html directory. DB2 information is translated into different

© Copyright IBM Corp. 1993, 2000 537

Page 546: Db2 SQL Errors

languages; however, all the information is not translated into every language.Whenever information is not available in a specific language, the Englishinformation is provided

On UNIX platforms, you can install multiple language versions of the HTMLfiles under the doc/%L/html directories, where %L represents the locale. Formore information, refer to the appropriate Quick Beginnings book.

You can obtain DB2 books and access information in a variety of ways:v “Viewing Information Online” on page 550v “Searching Information Online” on page 554v “Ordering the Printed Books” on page 547v “Printing the PDF Books” on page 546

Table 37. DB2 Information

Name Description Form Number

PDF File Name

HTMLDirectory

DB2 Guide and Reference Information

Administration Guide Administration Guide: Planning providesan overview of database concepts,information about design issues (such aslogical and physical database design),and a discussion of high availability.

Administration Guide: Implementationprovides information on implementationissues such as implementing yourdesign, accessing databases, auditing,backup and recovery.

Administration Guide: Performanceprovides information on databaseenvironment and applicationperformance evaluation and tuning.

You can order the three volumes of theAdministration Guide in the Englishlanguage in North America using theform number SBOF-8934.

SC09-2946db2d1x70

SC09-2944db2d2x70

SC09-2945db2d3x70

db2d0

Administrative APIReference

Describes the DB2 applicationprogramming interfaces (APIs) and datastructures that you can use to manageyour databases. This book also explainshow to call APIs from your applications.

SC09-2947

db2b0x70

db2b0

538 Message Reference, Volume 2

Page 547: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

Application BuildingGuide

Provides environment setup informationand step-by-step instructions about howto compile, link, and run DB2applications on Windows, OS/2, andUNIX-based platforms.

SC09-2948

db2axx70

db2ax

APPC, CPI-C, and SNASense Codes

Provides general information aboutAPPC, CPI-C, and SNA sense codes thatyou may encounter when using DB2Universal Database products.

Available in HTML format only.

No form number

db2apx70

db2ap

Application DevelopmentGuide

Explains how to develop applicationsthat access DB2 databases usingembedded SQL or Java (JDBC andSQLJ). Discussion topics include writingstored procedures, writing user-definedfunctions, creating user-defined types,using triggers, and developingapplications in partitioned environmentsor with federated systems.

SC09-2949

db2a0x70

db2a0

CLI Guide and Reference Explains how to develop applicationsthat access DB2 databases using the DB2Call Level Interface, a callable SQLinterface that is compatible with theMicrosoft ODBC specification.

SC09-2950

db2l0x70

db2l0

Command Reference Explains how to use the Command LineProcessor and describes the DB2commands that you can use to manageyour database.

SC09-2951

db2n0x70

db2n0

Connectivity Supplement Provides setup and reference informationon how to use DB2 for AS/400, DB2 forOS/390, DB2 for MVS, or DB2 for VM asDRDA application requesters with DB2Universal Database servers. This bookalso details how to use DRDAapplication servers with DB2 Connectapplication requesters.

Available in HTML and PDF only.

No form number

db2h1x70

db2h1

Appendix B. Using the DB2 Library 539

Page 548: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

Data Movement UtilitiesGuide and Reference

Explains how to use DB2 utilities, suchas import, export, load, AutoLoader, andDPROP, that facilitate the movement ofdata.

SC09-2955

db2dmx70

db2dm

Data Warehouse CenterAdministration Guide

Provides information on how to buildand maintain a data warehouse usingthe Data Warehouse Center.

SC26-9993

db2ddx70

db2dd

Data Warehouse CenterApplication IntegrationGuide

Provides information to helpprogrammers integrate applications withthe Data Warehouse Center and with theInformation Catalog Manager.

SC26-9994

db2adx70

db2ad

DB2 Connect User’s Guide Provides concepts, programming, andgeneral usage information for the DB2Connect products.

SC09-2954

db2c0x70

db2c0

DB2 Query PatrollerAdministration Guide

Provides an operational overview of theDB2 Query Patroller system, specificoperational and administrativeinformation, and task information for theadministrative graphical user interfaceutilities.

SC09-2958

db2dwx70

db2dw

DB2 Query PatrollerUser’s Guide

Describes how to use the tools andfunctions of the DB2 Query Patroller.

SC09-2960

db2wwx70

db2ww

Glossary Provides definitions for terms used inDB2 and its components.

Available in HTML format and in theSQL Reference.

No form number

db2t0x70

db2t0

Image, Audio, and VideoExtenders Administrationand Programming

Provides general information about DB2extenders, and information on theadministration and configuration of theimage, audio, and video (IAV) extendersand on programming using the IAVextenders. It includes referenceinformation, diagnostic information(with messages), and samples.

SC26-9929

dmbu7x70

dmbu7

Information CatalogManager AdministrationGuide

Provides guidance on managinginformation catalogs.

SC26-9995

db2dix70

db2di

540 Message Reference, Volume 2

Page 549: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

Information CatalogManager ProgrammingGuide and Reference

Provides definitions for the architectedinterfaces for the Information CatalogManager.

SC26-9997

db2bix70

db2bi

Information CatalogManager User’s Guide

Provides information on using theInformation Catalog Manager userinterface.

SC26-9996

db2aix70

db2ai

Installation andConfiguration Supplement

Guides you through the planning,installation, and setup ofplatform-specific DB2 clients. Thissupplement also contains information onbinding, setting up client and servercommunications, DB2 GUI tools, DRDAAS, distributed installation, theconfiguration of distributed requests,and accessing heterogeneous datasources.

GC09-2957

db2iyx70

db2iy

Message Reference Lists messages and codes issued by DB2,the Information Catalog Manager, andthe Data Warehouse Center, anddescribes the actions you should take.

You can order both volumes of theMessage Reference in the Englishlanguage in North America with theform number SBOF-8932.

Volume 1GC09-2978

db2m1x70Volume 2GC09-2979

db2m2x70

db2m0

OLAP Integration ServerAdministration Guide

Explains how to use the AdministrationManager component of the OLAPIntegration Server.

SC27-0787

db2dpx70

n/a

OLAP Integration ServerMetaoutline User’s Guide

Explains how to create and populateOLAP metaoutlines using the standardOLAP Metaoutline interface (not byusing the Metaoutline Assistant).

SC27-0784

db2upx70

n/a

OLAP Integration ServerModel User’s Guide

Explains how to create OLAP modelsusing the standard OLAP ModelInterface (not by using the ModelAssistant).

SC27-0783

db2lpx70

n/a

OLAP Setup and User’sGuide

Provides configuration and setupinformation for the OLAP Starter Kit.

SC27-0702

db2ipx70

db2ip

OLAP Spreadsheet Add-inUser’s Guide for Excel

Describes how to use the Excelspreadsheet program to analyze OLAPdata.

SC27-0786

db2epx70

db2ep

Appendix B. Using the DB2 Library 541

Page 550: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

OLAP Spreadsheet Add-inUser’s Guide for Lotus1-2-3

Describes how to use the Lotus 1-2-3spreadsheet program to analyze OLAPdata.

SC27-0785

db2tpx70

db2tp

Replication Guide andReference

Provides planning, configuration,administration, and usage informationfor the IBM Replication tools suppliedwith DB2.

SC26-9920

db2e0x70

db2e0

Spatial Extender User’sGuide and Reference

Provides information about installing,configuring, administering,programming, and troubleshooting theSpatial Extender. Also providessignificant descriptions of spatial dataconcepts and provides referenceinformation (messages and SQL) specificto the Spatial Extender.

SC27-0701

db2sbx70

db2sb

SQL Getting Started Introduces SQL concepts and providesexamples for many constructs and tasks.

SC09-2973

db2y0x70

db2y0

SQL Reference, Volume 1and Volume 2

Describes SQL syntax, semantics, and therules of the language. This book alsoincludes information aboutrelease-to-release incompatibilities,product limits, and catalog views.

You can order both volumes of the SQLReference in the English language inNorth America with the form numberSBOF-8933.

Volume 1SC09-2974

db2s1x70

Volume 2SC09-2975

db2s2x70

db2s0

System Monitor Guide andReference

Describes how to collect different kindsof information about databases and thedatabase manager. This book explainshow to use the information tounderstand database activity, improveperformance, and determine the cause ofproblems.

SC09-2956

db2f0x70

db2f0

Text ExtenderAdministration andProgramming

Provides general information about DB2extenders and information on theadministration and configuring of thetext extender and on programming usingthe text extenders. It includes referenceinformation, diagnostic information(with messages) and samples.

SC26-9930

desu9x70

desu9

542 Message Reference, Volume 2

Page 551: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

Troubleshooting Guide Helps you determine the source oferrors, recover from problems, and usediagnostic tools in consultation with DB2Customer Service.

GC09-2850

db2p0x70

db2p0

What’s New Describes the new features, functions,and enhancements in DB2 UniversalDatabase, Version 7.

SC09-2976

db2q0x70

db2q0

DB2 Installation and Configuration Information

DB2 Connect EnterpriseEdition for OS/2 andWindows QuickBeginnings

Provides planning, migration,installation, and configurationinformation for DB2 Connect EnterpriseEdition on the OS/2 and Windows 32-bitoperating systems. This book alsocontains installation and setupinformation for many supported clients.

GC09-2953

db2c6x70

db2c6

DB2 Connect EnterpriseEdition for UNIX QuickBeginnings

Provides planning, migration,installation, configuration, and taskinformation for DB2 Connect EnterpriseEdition on UNIX-based platforms. Thisbook also contains installation and setupinformation for many supported clients.

GC09-2952

db2cyx70

db2cy

DB2 Connect PersonalEdition Quick Beginnings

Provides planning, migration,installation, configuration, and taskinformation for DB2 Connect PersonalEdition on the OS/2 and Windows 32-bitoperating systems. This book alsocontains installation and setupinformation for all supported clients.

GC09-2967

db2c1x70

db2c1

DB2 Connect PersonalEdition Quick Beginningsfor Linux

Provides planning, installation,migration, and configuration informationfor DB2 Connect Personal Edition on allsupported Linux distributions.

GC09-2962

db2c4x70

db2c4

DB2 Data Links ManagerQuick Beginnings

Provides planning, installation,configuration, and task information forDB2 Data Links Manager for AIX andWindows 32-bit operating systems.

GC09-2966

db2z6x70

db2z6

Appendix B. Using the DB2 Library 543

Page 552: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

DB2 Enterprise - ExtendedEdition for UNIX QuickBeginnings

Provides planning, installation, andconfiguration information for DB2Enterprise - Extended Edition onUNIX-based platforms. This book alsocontains installation and setupinformation for many supported clients.

GC09-2964

db2v3x70

db2v3

DB2 Enterprise - ExtendedEdition for Windows QuickBeginnings

Provides planning, installation, andconfiguration information for DB2Enterprise - Extended Edition forWindows 32-bit operating systems. Thisbook also contains installation and setupinformation for many supported clients.

GC09-2963

db2v6x70

db2v6

DB2 for OS/2 QuickBeginnings

Provides planning, installation,migration, and configuration informationfor DB2 Universal Database on the OS/2operating system. This book alsocontains installation and setupinformation for many supported clients.

GC09-2968

db2i2x70

db2i2

DB2 for UNIX QuickBeginnings

Provides planning, installation,migration, and configuration informationfor DB2 Universal Database onUNIX-based platforms. This book alsocontains installation and setupinformation for many supported clients.

GC09-2970

db2ixx70

db2ix

DB2 for Windows QuickBeginnings

Provides planning, installation,migration, and configuration informationfor DB2 Universal Database on Windows32-bit operating systems. This book alsocontains installation and setupinformation for many supported clients.

GC09-2971

db2i6x70

db2i6

DB2 Personal EditionQuick Beginnings

Provides planning, installation,migration, and configuration informationfor DB2 Universal Database PersonalEdition on the OS/2 and Windows 32-bitoperating systems.

GC09-2969

db2i1x70

db2i1

DB2 Personal EditionQuick Beginnings forLinux

Provides planning, installation,migration, and configuration informationfor DB2 Universal Database PersonalEdition on all supported Linuxdistributions.

GC09-2972

db2i4x70

db2i4

544 Message Reference, Volume 2

Page 553: Db2 SQL Errors

Table 37. DB2 Information (continued)

Name Description Form Number

PDF File Name

HTMLDirectory

DB2 Query PatrollerInstallation Guide

Provides installation information aboutDB2 Query Patroller.

GC09-2959

db2iwx70

db2iw

DB2 Warehouse ManagerInstallation Guide

Provides installation information forwarehouse agents, warehousetransformers, and the InformationCatalog Manager.

GC26-9998

db2idx70

db2id

Cross-Platform Sample Programs in HTML

Sample programs inHTML

Provides the sample programs in HTMLformat for the programming languageson all platforms supported by DB2. Thesample programs are provided forinformational purposes only. Not allsamples are available in allprogramming languages. The HTMLsamples are only available when the DB2Application Development Client isinstalled.

For more information on the programs,refer to the Application Building Guide.

No form number db2hs

Release Notes

DB2 Connect ReleaseNotes

Provides late-breaking information thatcould not be included in the DB2Connect books.

See note #2. db2cr

DB2 Installation Notes Provides late-breakinginstallation-specific information thatcould not be included in the DB2 books.

Available onproductCD-ROM only.

DB2 Release Notes Provides late-breaking information aboutall DB2 products and features that couldnot be included in the DB2 books.

See note #2. db2ir

Notes:

1. The character x in the sixth position of the file name indicates thelanguage version of a book. For example, the file name db2d0e70 identifiesthe English version of the Administration Guide and the file name db2d0f70identifies the French version of the same book. The following letters areused in the sixth position of the file name to indicate the language version:

Language IdentifierBrazilian Portuguese b

Appendix B. Using the DB2 Library 545

Page 554: Db2 SQL Errors

Bulgarian uCzech xDanish dDutch qEnglish eFinnish yFrench fGerman gGreek aHungarian hItalian iJapanese jKorean kNorwegian nPolish pPortuguese vRussian rSimp. Chinese cSlovenian lSpanish zSwedish sTrad. Chinese tTurkish m

2. Late breaking information that could not be included in the DB2 books isavailable in the Release Notes in HTML format and as an ASCII file. TheHTML version is available from the Information Center and on theproduct CD-ROMs. To view the ASCII file:v On UNIX-based platforms, see the Release.Notes file. This file is located

in the DB2DIR/Readme/%L directory, where %L represents the localename and DB2DIR represents:– /usr/lpp/db2_07_01 on AIX– /opt/IBMdb2/V7.1 on HP-UX, PTX, Solaris, and Silicon Graphics

IRIX– /usr/IBMdb2/V7.1 on Linux.

v On other platforms, see the RELEASE.TXT file. This file is located in thedirectory where the product is installed. On OS/2 platforms, you canalso double-click the IBM DB2 folder and then double-click the ReleaseNotes icon.

Printing the PDF BooksIf you prefer to have printed copies of the books, you can print the PDF filesfound on the DB2 publications CD-ROM. Using the Adobe Acrobat Reader,you can print either the entire book or a specific range of pages. For the filename of each book in the library, see Table 37 on page 538.

546 Message Reference, Volume 2

Page 555: Db2 SQL Errors

You can obtain the latest version of the Adobe Acrobat Reader from theAdobe Web site at http://www.adobe.com.

The PDF files are included on the DB2 publications CD-ROM with a fileextension of PDF. To access the PDF files:1. Insert the DB2 publications CD-ROM. On UNIX-based platforms, mount

the DB2 publications CD-ROM. Refer to your Quick Beginnings book forthe mounting procedures.

2. Start the Acrobat Reader.3. Open the desired PDF file from one of the following locations:

v On OS/2 and Windows platforms:x:\doc\language directory, where x represents the CD-ROM drive andlanguage represent the two-character country code that represents yourlanguage (for example, EN for English).

v On UNIX-based platforms:/cdrom/doc/%L directory on the CD-ROM, where /cdrom represents themount point of the CD-ROM and %L represents the name of the desiredlocale.

You can also copy the PDF files from the CD-ROM to a local or network driveand read them from there.

Ordering the Printed Books

You can order the printed DB2 books either individually or as a set (in NorthAmerica only) by using a sold bill of forms (SBOF) number. To order books,contact your IBM authorized dealer or marketing representative, or phone1-800-879-2755 in the United States or 1-800-IBM-4YOU in Canada. You canalso order the books from the Publications Web page athttp://www.elink.ibmlink.ibm.com/pbl/pbl.

Two sets of books are available. SBOF-8935 provides reference and usageinformation for the DB2 Warehouse Manager. SBOF-8931 provides referenceand usage information for all other DB2 Universal Database products andfeatures. The contents of each SBOF are listed in the following table:

Appendix B. Using the DB2 Library 547

Page 556: Db2 SQL Errors

Table 38. Ordering the printed books

SBOF Number Books Included

SBOF-8931 v Administration Guide: Planning

v Administration Guide: Implementation

v Administration Guide: Performance

v Administrative API Reference

v Application Building Guide

v Application Development Guide

v CLI Guide and Reference

v Command Reference

v Data Movement Utilities Guide andReference

v Data Warehouse Center AdministrationGuide

v Data Warehouse Center ApplicationIntegration Guide

v DB2 Connect User’s Guide

v Installation and ConfigurationSupplement

v Image, Audio, and Video ExtendersAdministration and Programming

v Message Reference, Volumes 1 and 2

v OLAP Integration ServerAdministration Guide

v OLAP Integration Server MetaoutlineUser’s Guide

v OLAP Integration Server Model User’sGuide

v OLAP Integration Server User’s Guide

v OLAP Setup and User’s Guide

v OLAP Spreadsheet Add-in User’sGuide for Excel

v OLAP Spreadsheet Add-in User’sGuide for Lotus 1-2-3

v Replication Guide and Reference

v Spatial Extender Administration andProgramming Guide

v SQL Getting Started

v SQL Reference, Volumes 1 and 2

v System Monitor Guide and Reference

v Text Extender Administration andProgramming

v Troubleshooting Guide

v What’s New

SBOF-8935 v Information Catalog ManagerAdministration Guide

v Information Catalog Manager User’sGuide

v Information Catalog ManagerProgramming Guide and Reference

v Query Patroller Administration Guide

v Query Patroller User’s Guide

DB2 Online Documentation

Accessing Online HelpOnline help is available with all DB2 components. The following tabledescribes the various types of help.

548 Message Reference, Volume 2

Page 557: Db2 SQL Errors

Type of Help Contents How to Access...

Command Help Explains the syntax ofcommands in the commandline processor.

From the command line processor in interactivemode, enter:

? command

where command represents a keyword or the entirecommand.

For example, ? catalog displays help for all theCATALOG commands, while ? catalog databasedisplays help for the CATALOG DATABASEcommand.

Client ConfigurationAssistant Help

Command Center Help

Control Center Help

Data Warehouse CenterHelp

Event Analyzer Help

Information CatalogManager Help

Satellite AdministrationCenter Help

Script Center Help

Explains the tasks you canperform in a window ornotebook. The help includesoverview and prerequisiteinformation you need toknow, and it describes howto use the window ornotebook controls.

From a window or notebook, click the Help pushbutton or press the F1 key.

Message Help Describes the cause of amessage and any action youshould take.

From the command line processor in interactivemode, enter:

? XXXnnnnn

where XXXnnnnn represents a valid messageidentifier.

For example, ? SQL30081 displays help about theSQL30081 message.

To view message help one screen at a time, enter:

? XXXnnnnn | more

To save message help in a file, enter:

? XXXnnnnn > filename.ext

where filename.ext represents the file where youwant to save the message help.

Appendix B. Using the DB2 Library 549

Page 558: Db2 SQL Errors

Type of Help Contents How to Access...

SQL Help Explains the syntax of SQLstatements.

From the command line processor in interactivemode, enter:

help statement

where statement represents an SQL statement.

For example, help SELECT displays help about theSELECT statement.Note: SQL help is not available on UNIX-basedplatforms.

SQLSTATE Help Explains SQL states andclass codes.

From the command line processor in interactivemode, enter:

? sqlstate or ? class code

where sqlstate represents a valid five-digit SQLstate and class code represents the first two digitsof the SQL state.

For example, ? 08003 displays help for the 08003SQL state, while ? 08 displays help for the 08 classcode.

Viewing Information OnlineThe books included with this product are in Hypertext Markup Language(HTML) softcopy format. Softcopy format enables you to search or browse theinformation and provides hypertext links to related information. It also makesit easier to share the library across your site.

You can view the online books or sample programs with any browser thatconforms to HTML Version 3.2 specifications.

To view online books or sample programs:v If you are running DB2 administration tools, use the Information Center.v From a browser, click File —>Open Page. The page you open contains

descriptions of and links to DB2 information:– On UNIX-based platforms, open the following page:

INSTHOME/sqllib/doc/%L/html/index.htm

where %L represents the locale name.– On other platforms, open the following page:

sqllib\doc\html\index.htm

The path is located on the drive where DB2 is installed.

550 Message Reference, Volume 2

Page 559: Db2 SQL Errors

If you have not installed the Information Center, you can open the pageby double-clicking the DB2 Information icon. Depending on the systemyou are using, the icon is in the main product folder or the WindowsStart menu.

Installing the Netscape BrowserIf you do not already have a Web browser installed, you can install Netscapefrom the Netscape CD-ROM found in the product boxes. For detailedinstructions on how to install it, perform the following:1. Insert the Netscape CD-ROM.2. On UNIX-based platforms only, mount the CD-ROM. Refer to your Quick

Beginnings book for the mounting procedures.3. For installation instructions, refer to the CDNAVnn.txt file, where nn

represents your two character language identifier. The file is located at theroot directory of the CD-ROM.

Accessing Information with the Information CenterThe Information Center provides quick access to DB2 product information.The Information Center is available on all platforms on which the DB2administration tools are available.

You can open the Information Center by double-clicking the InformationCenter icon. Depending on the system you are using, the icon is in theInformation folder in the main product folder or the Windows Start menu.

You can also access the Information Center by using the toolbar and the Helpmenu on the DB2 Windows platform.

The Information Center provides six types of information. Click theappropriate tab to look at the topics provided for that type.

Tasks Key tasks you can perform using DB2.

Reference DB2 reference information, such as keywords, commands, andAPIs.

Books DB2 books.

TroubleshootingCategories of error messages and their recovery actions.

Sample ProgramsSample programs that come with the DB2 ApplicationDevelopment Client. If you did not install the DB2Application Development Client, this tab is not displayed.

Web DB2 information on the World Wide Web. To access thisinformation, you must have a connection to the Web fromyour system.

Appendix B. Using the DB2 Library 551

Page 560: Db2 SQL Errors

When you select an item in one of the lists, the Information Center launches aviewer to display the information. The viewer might be the system helpviewer, an editor, or a Web browser, depending on the kind of informationyou select.

The Information Center provides a find feature, so you can look for a specifictopic without browsing the lists.

For a full text search, follow the hypertext link in the Information Center tothe Search DB2 Online Information search form.

The HTML search server is usually started automatically. If a search in theHTML information does not work, you may have to start the search serverusing one of the following methods:

On WindowsClick Start and select Programs —> IBM DB2 —> Information —>Start HTML Search Server.

On OS/2Double-click the DB2 for OS/2 folder, and then double-click the StartHTML Search Server icon.

Refer to the release notes if you experience any other problems whensearching the HTML information.

Note: The Search function is not available in the Linux, PTX, and SiliconGraphics IRIX environments.

Using DB2 WizardsWizards help you complete specific administration tasks by taking youthrough each task one step at a time. Wizards are available through theControl Center and the Client Configuration Assistant. The following tablelists the wizards and describes their purpose.

Note: The Create Database, Create Index, Configure Multisite Update, andPerformance Configuration wizards are available for the partitioneddatabase environment.

Wizard Helps You to... How to Access...

Add Database Catalog a database on a client workstation. From the Client ConfigurationAssistant, click Add.

Backup Database Determine, create, and schedule a backupplan.

From the Control Center, right-clickthe database you want to back upand select Backup —> DatabaseUsing Wizard.

552 Message Reference, Volume 2

Page 561: Db2 SQL Errors

Wizard Helps You to... How to Access...

Configure MultisiteUpdate

Configure a multisite update, a distributedtransaction, or a two-phase commit.

From the Control Center, right-clickthe Databases folder and selectMultisite Update.

Create Database Create a database, and perform some basicconfiguration tasks.

From the Control Center, right-clickthe Databases folder and selectCreate —> Database UsingWizard.

Create Table Select basic data types, and create a primarykey for the table.

From the Control Center, right-clickthe Tables icon and select Create—> Table Using Wizard.

Create Table Space Create a new table space. From the Control Center, right-clickthe Table Spaces icon and selectCreate —> Table Space UsingWizard.

Create Index Advise which indexes to create and drop forall your queries.

From the Control Center, right-clickthe Index icon and select Create—> Index Using Wizard.

PerformanceConfiguration

Tune the performance of a database byupdating configuration parameters to matchyour business requirements.

From the Control Center, right-clickthe database you want to tune andselect Configure PerformanceUsing Wizard.

For the partitioned databaseenvironment, from the DatabasePartitions view, right-click the firstdatabase partition you want totune and select ConfigurePerformance Using Wizard.

Restore Database Recover a database after a failure. It helpsyou understand which backup to use, andwhich logs to replay.

From the Control Center, right-clickthe database you want to restoreand select Restore —> DatabaseUsing Wizard.

Setting Up a Document ServerBy default, the DB2 information is installed on your local system. This meansthat each person who needs access to the DB2 information must install thesame files. To have the DB2 information stored in a single location, performthe following steps:1. Copy all files and subdirectories from \sqllib\doc\html on your local

system to a Web server. Each book has its own subdirectory that containsall the necessary HTML and GIF files that make up the book. Ensure thatthe directory structure remains the same.

Appendix B. Using the DB2 Library 553

Page 562: Db2 SQL Errors

2. Configure the Web server to look for the files in the new location. Forinformation, refer to the NetQuestion Appendix in the Installation andConfiguration Supplement.

3. If you are using the Java version of the Information Center, you canspecify a base URL for all HTML files. You should use the URL for the listof books.

4. When you are able to view the book files, you can bookmark commonlyviewed topics. You will probably want to bookmark the following pages:v List of booksv Tables of contents of frequently used booksv Frequently referenced articles, such as the ALTER TABLE topicv The Search form

For information about how you can serve the DB2 Universal Database onlinedocumentation files from a central machine, refer to the NetQuestionAppendix in the Installation and Configuration Supplement.

Searching Information OnlineTo find information in the HTML files, use one of the following methods:v Click Search in the top frame. Use the search form to find a specific topic.

This function is not available in the Linux, PTX, or Silicon Graphics IRIXenvironments.

v Click Index in the top frame. Use the index to find a specific topic in thebook.

v Display the table of contents or index of the help or the HTML book, andthen use the find function of the Web browser to find a specific topic in thebook.

v Use the bookmark function of the Web browser to quickly return to aspecific topic.

v Use the search function of the Information Center to find specific topics. See“Accessing Information with the Information Center” on page 551 fordetails.

554 Message Reference, Volume 2

Page 563: Db2 SQL Errors

Appendix C. Notices

IBM may not offer the products, services, or features discussed in thisdocument in all countries. Consult your local IBM representative forinformation on the products and services currently available in your area. Anyreference to an IBM product, program, or service is not intended to state orimply that only that IBM product, program, or service may be used. Anyfunctionally equivalent product, program, or service that does not infringeany IBM intellectual property right may be used instead. However, it is theuser’s responsibility to evaluate and verify the operation of any non-IBMproduct, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not giveyou any license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact theIBM Intellectual Property Department in your country or send inquiries, inwriting, to:

IBM World Trade Asia CorporationLicensing2-31 Roppongi 3-chome, Minato-kuTokyo 106, Japan

The following paragraph does not apply to the United Kingdom or anyother country where such provisions are inconsistent with local law:INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITYOR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allowdisclaimer of express or implied warranties in certain transactions, therefore,this statement may not apply to you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes willbe incorporated in new editions of the publication. IBM may make

© Copyright IBM Corp. 1993, 2000 555

Page 564: Db2 SQL Errors

improvements and/or changes in the product(s) and/or the program(s)described in this publication at any time without notice.

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of thoseWeb sites. The materials at those Web sites are not part of the materials forthis IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for thepurpose of enabling: (i) the exchange of information between independentlycreated programs and other programs (including this one) and (ii) the mutualuse of the information which has been exchanged, should contact:

IBM Canada LimitedOffice of the Lab Director1150 Eglinton Ave. EastNorth York, OntarioM3C 1H7CANADA

Such information may be available, subject to appropriate terms andconditions, including in some cases, payment of a fee.

The licensed program described in this information and all licensed materialavailable for it are provided by IBM under terms of the IBM CustomerAgreement, IBM International Program License Agreement, or any equivalentagreement between us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environmentsmay vary significantly. Some measurements may have been made ondevelopment-level systems and there is no guarantee that these measurementswill be the same on generally available systems. Furthermore, somemeasurements may have been estimated through extrapolation. Actual resultsmay vary. Users of this document should verify the applicable data for theirspecific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly availablesources. IBM has not tested those products and cannot confirm the accuracyof performance, compatibility or any other claims related to non-IBMproducts. Questions on the capabilities of non-IBM products should beaddressed to the suppliers of those products.

556 Message Reference, Volume 2

Page 565: Db2 SQL Errors

All statements regarding IBM’s future direction or intent are subject to changeor withdrawal without notice, and represent goals and objectives only.

This information may contain examples of data and reports used in dailybusiness operations. To illustrate them as completely as possible, the examplesinclude the names of individuals, companies, brands, and products. All ofthese names are fictitious and any similarity to the names and addresses usedby an actual business enterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information may contain sample application programs in sourcelanguage, which illustrates programming techniques on various operatingplatforms. You may copy, modify, and distribute these sample programs inany form without payment to IBM, for the purposes of developing, using,marketing or distributing application programs conforming to the applicationprogramming interface for the operating platform for which the sampleprograms are written. These examples have not been thoroughly tested underall conditions. IBM, therefore, cannot guarantee or imply reliability,serviceability, or function of these programs.

Each copy or any portion of these sample programs or any derivative workmust include a copyright notice as follows:

© (your company name) (year). Portions of this code are derived from IBMCorp. Sample Programs. © Copyright IBM Corp. _enter the year or years_. Allrights reserved.

Appendix C. Notices 557

Page 566: Db2 SQL Errors

Trademarks

The following terms, which may be denoted by an asterisk(*), are trademarksof International Business Machines Corporation in the United States, othercountries, or both.

ACF/VTAMAISPOAIXAIX/6000AIXwindowsAnyNetAPPNAS/400BookManagerCICSC Set++C/370DATABASE 2DataHubDataJoinerDataPropagatorDataRefresherDB2DB2 ConnectDB2 ExtendersDB2 OLAP ServerDB2 Universal DatabaseDistributed Relational

Database ArchitectureDRDAeNetworkExtended ServicesFFSTFirst Failure Support Technology

IBMIMSIMS/ESALAN DistanceMVSMVS/ESAMVS/XANet.DataOS/2OS/390OS/400PowerPCQBICQMFRACFRISC System/6000RS/6000S/370SPSQL/DSSQL/400System/370System/390SystemViewVisualAgeVM/ESAVSE/ESAVTAMWebExplorerWIN-OS/2

The following terms are trademarks or registered trademarks of othercompanies:

Microsoft, Windows, and Windows NT are trademarks or registeredtrademarks of Microsoft Corporation.

Java or all Java-based trademarks and logos, and Solaris are trademarks ofSun Microsystems, Inc. in the United States, other countries, or both.

Tivoli and NetView are trademarks of Tivoli Systems Inc. in the United States,other countries, or both.

558 Message Reference, Volume 2

Page 567: Db2 SQL Errors

UNIX is a registered trademark in the United States, other countries or bothand is licensed exclusively through X/Open Company Limited.

Other company, product, or service names, which may be denoted by adouble asterisk(**) may be trademarks or service marks of others.

Appendix C. Notices 559

Page 568: Db2 SQL Errors

560 Message Reference, Volume 2

Page 569: Db2 SQL Errors

Index

Aaccessing help 1add database wizard 552, 553AUD messages 3

Bbackup database wizard 552books 537, 547

Cconfigure multisite update

wizard 552create database wizard 553create table space wizard 553create table wizard 553

DDB2 library

books 537Information Center 551language identifier for

books 545late-breaking information 546online help 548ordering printed books 547printing PDF books 546searching online

information 554setting up document server 553structure of 537viewing online information 550wizards 552

DIA messages 3

GGOV messages 3

HHelp 1HTML

sample programs 545

Iindex wizard 553Information Center 551installing

Netscape browser 551introduction to messages 1

Llanguage identifier

books 545

late-breaking information 546

MMessages 1

AUD 3DIA 3GOV 3SQL 5SQLSTATE 491

messages, introduction 1

NNetscape browser

installing 551

Oonline help 1, 548online information

searching 554viewing 550

other message sources 3

PPDF 546performance configuration

wizard 553printing PDF books 546

Rrelease notes 546restore wizard 553

Ssample programs

cross-platform 545HTML 545

searchingonline information 552, 554

setting up document server 553SmartGuides

wizards 552SQL messages 5SQLSTATE messages 491

Vviewing

online information 550

Wwizards

add database 552, 553

wizards (continued)backup database 552completing tasks 552configure multisite update 552create database 553create table 553create table space 553index 553performance configuration 553restore database 553

© Copyright IBM Corp. 1993, 2000 561

Page 570: Db2 SQL Errors

562 Message Reference, Volume 2

Page 571: Db2 SQL Errors

Contacting IBM

If you have a technical problem, please review and carry out the actionssuggested by the Troubleshooting Guide before contacting DB2 CustomerSupport. This guide suggests information that you can gather to help DB2Customer Support to serve you better.

For information or to order any of the DB2 Universal Database productscontact an IBM representative at a local branch office or contact anyauthorized IBM software remarketer.

If you live in the U.S.A., then you can call one of the following numbers:v 1-800-237-5511 for customer supportv 1-888-426-4343 to learn about available service options

Product Information

If you live in the U.S.A., then you can call one of the following numbers:v 1-800-IBM-CALL (1-800-426-2255) or 1-800-3IBM-OS2 (1-800-342-6672) to

order products or get general information.v 1-800-879-2755 to order publications.

http://www.ibm.com/software/data/The DB2 World Wide Web pages provide current DB2 informationabout news, product descriptions, education schedules, and more.

http://www.ibm.com/software/data/db2/library/The DB2 Product and Service Technical Library provides access tofrequently asked questions, fixes, books, and up-to-date DB2 technicalinformation.

Note: This information may be in English only.

http://www.elink.ibmlink.ibm.com/pbl/pbl/The International Publications ordering Web site provides informationon how to order books.

http://www.ibm.com/education/certify/The Professional Certification Program from the IBM Web siteprovides certification test information for a variety of IBM products,including DB2.

© Copyright IBM Corp. 1993, 2000 563

Page 572: Db2 SQL Errors

ftp.software.ibm.comLog on as anonymous. In the directory /ps/products/db2, you canfind demos, fixes, information, and tools relating to DB2 and manyother products.

comp.databases.ibm-db2, bit.listserv.db2-lThese Internet newsgroups are available for users to discuss theirexperiences with DB2 products.

On Compuserve: GO IBMDB2Enter this command to access the IBM DB2 Family forums. All DB2products are supported through these forums.

For information on how to contact IBM outside of the United States, refer toAppendix A of the IBM Software Support Handbook. To access this document,go to the following Web page: http://www.ibm.com/support/, and thenselect the IBM Software Support Handbook link near the bottom of the page.

Note: In some countries, IBM-authorized dealers should contact their dealersupport structure instead of the IBM Support Center.

564 Message Reference, Volume 2

Page 573: Db2 SQL Errors
Page 574: Db2 SQL Errors

����

Printed in the United States of Americaon recycled paper containing 10%recovered post-consumer fiber.

GC09-2979-00