Troubleshooting
Problem
SQL0204N "tablespace_name" is an undefined name error during the Drop Tablespace command is executed.
Symptom
SQL0204N error will be received during the drop tablespace command if the case sensitivity of the object name is preserved. Here is the test case:
1) Create the tablespace where the case sensitivity of the tablespace is preserved with quotes in the create tablespace command.
db2 "create tablespace \"TEST_TEMP_16K_junk\" managed by database using (file '/home/db2v91/tbsp' 2000)"
DB20000I The SQL command completed successfully.
2) Snippet of the List tablespaces output:
Tablespace ID = 3
Name = TEST_TEMP_16K_junk
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
3) Dropping the tablespace with out quotes will return the SQL0204N error because DB2 is looking for TEST_TEMP_16K_JUNK and not for the TEST_TEMP_16K_junk tablespace.
db2 drop tablespace TEST_TEMP_16K_junk
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "TEST_TEMP_16K_JUNK" is an undefined name. SQLSTATE=42704
Note: The case sensitivity of the tablespace name is preserved when the following format is used \"tablespace_name\".
To view more of this document
Was this topic helpful?
Document Information
More support for:
Db2 for Linux, UNIX and Windows
Software version:
9.7, 9.5, 9.1
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows
Document number:
163715
Modified date:
30 April 2025
UID
swg21504917