IBM Support

SQL1051N, SQL2036N, or SQL1174N errors when using partition expressions in commands on DPF

Troubleshooting


Problem

SQL1051N error can be thrown when using partitions expressions in commands to create storage or tablespaces container paths on multi-partition (DPF) environments. SQL2036N or SQL1174N errors can be thrown when using partition expressions in DB2 commands such as "BACKUP DATABASE" in DPF environments.

Symptom

Example 1: SQL1051N

When using partition expressions to create storage or automatic tablespace container paths, for example, suppose separate storage paths in DPF environment with four physical partitions is to be created as follows:


/home/db2inst1/db2db/db2inst1/TestDB/node0000/database name/T#######/C#######.EXT
/home/db2inst1/db2db/db2inst1/TestDB/node0001/database name/T#######/C#######.EXT
/home/db2inst1/db2db/db2inst1/TestDB/node0002/database name/T#######/C#######.EXT
/home/db2inst1/db2db/db2inst1/TestDB/node0003/database name/T#######/C#######.EXT

The following command is executed:


$ db2 "CREATE STOGROUP BOB ON '/home/db2inst1/db2db/db2inst1/TestDB/node000 $N'"

SQL1051N The path "/home/db2inst1/db2db/db2inst1/TestDB/node000" does not exist or is not valid. SQLSTATE=57019


Example 2: SQL2036N

When using partition expressions with general DB2 commands, for example, to take a backup in DPF environment to four separate nodes:

/db2fs/db2inst1/node0000/backups
/db2fs/db2inst1/node0001/backups
/db2fs/db2inst1/node0002/backups
/db2fs/db2inst1/node0003/backups

The following command is executed:

db2 "backup db TestDB on all dbpartitionnums to '/db2fs/db2inst1/node $4N/backups' without prompting"

SQL2036N The path for the file, named pipe, or device "/db2fs/db2inst1/node N/backups" is not valid.


Example 3: SQL1174N

A slight modification to the command in Example 2 by adding an escape character before partition expression. It still fails:

db2 "backup database testdb to '/db2fs/db2inst1/node \$4N/backups' without prompting"

SQL1174N Invalid or incorrect use of database partition expression in path "". Reason code = "". SQLSTATE=5U012

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Routines (SP \u0026 UDF) - SQL","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.7;10.1;10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
30 April 2025

UID

swg21665588