Start of change

-601   THE NAME (VERSION OR VOLUME SERIAL NUMBER) OF THE OBJECT TO BE DEFINED OR THE TARGET OF A RENAME STATEMENT IS IDENTICAL TO THE EXISTING NAME (VERSION OR VOLUME SERIAL NUMBER) object-name OF THE OBJECT TYPE object-type

Explanation

An attempt to name an object failed because the name is already in use for an object of the same type.

object-name
The name of the object.
object-type
The type of object.

This message can be issued for different situations, including the following examples, among others:

ALTER statements
An ALTER statement attempted to alter an object.
object-type=TABLE
An ALTER statement attempted to add a clone table, but an object of the same type with the same name already exists in the catalog table SYSIBM.SYSPENDINGOBJECTS.
object-type=VERSION
An ALTER statement attempted to define a new version of a routine and specified a version identifier that already exists for the specified routine.
object-type=VOLUME
An ALTER statement attempted to add a volume name to a storage group, but a volume with volume serial number already exists for the storage group.
CREATE statements
A CREATE statement attempted to create an object object-name of type object-type, but an object of that type with the same name is already defined in the DB2® subsystem.

A CREATE statement failed because an object of the same type with the same name already exists in the catalog table SYSIBM.SYSPENDINGOBJECTS.

object-type=CONSTRAINT
The object name was specified in the FOREIGN KEY clause, CHECK clause, PRIMARY KEY clause, or UNIQUE clause of either a CREATE or ALTER TABLE statement. All referential integrity, check constraint, primary key, and unique key constraint names defined on a table must be unique.
object-type=DISTINCT TYPE
If a CREATE DISTINCT TYPE statement failed, a user-defined type already exists with the same name as the distinct type name specified in the CREATE DISTINCT TYPE statement.
object-type=FUNCTION
If a CREATE FUNCTION statement failed, a routine already exists with the same name as the name specified in the CREATE FUNCTION statement. If a CREATE DISTINCT TYPE statement failed, a user-defined function already exists with the same name as the distinct type that is specified in the CREATE DISTINCT TYPE statement.
object-type=INDEX
If a CREATE INDEX statement failed, an index already exists with the same name as the name specified in the CREATE INDEX statement.
object-type=JAR
If an invocation of procedure SQLJ.INSTALL_JAR failed, a JAR already exists with the same name as the name specified on the invocation of procedure SQLJ.INSTALL_JAR.
object-type=MASK
If a CREATE MASK statement failed, the column mask name identifies a column mask that already exists at the current server.
object-type=PERMISSION
If a CREATE PERMISSION statement failed, the row permission name identifies a row permission that already exists at the current server.
object-type=PROCEDURE
If a CREATE PROCEDURE statement failed, a routine already exists with the same name as the name specified in the CREATE PROCEDURE statement. If the CREATE PROCEDURE statement for an SQL procedure failed, then an SQL procedure might already with the same name as the external name that was implicitly or explicitly specified.
If the error was encountered for a particular version of a native SQL procedure, the object-name token might return the name and version of the procedure, in the following format:
procedure-name VERSION version-id
.
object-type=ROLE
If a CREATE ROLE statement failed, a role already exists with the same name as the name specified in the CREATE ROLE statement.
object-type=SEQUENCE
If a CREATE SEQUENCE statement failed, a sequence already exists with the same name as the sequence name that was specified in the CREATE SEQUENCE statement.
object-type=TABLE
If a CREATE ALIAS statement failed, the alias name specified in the CREATE ALIAS statement is identical to the table name or view name specified. The table might not exist in the DB2 subsystem.
object-type=TRUSTED CONTEXT
If a CREATE TRUSTED CONTEXT statement failed, a trusted context already exists with the same name as the name specified in the CREATE TRUSTED CONTEXT statement.
object-type=VIEW
If a CREATE ALIAS statement failed, the alias name specified in the CREATE ALIAS statement is identical to the table name or view name specified. The view might not exist in the DB2 subsystem.
object-type=XSR SCHEMA
If an invocation of procedure SYSPROC.XSR_REGISTER failed, an XSR XML schema already exists with the same name as the name specified on the invocation of procedure SYSPROC.XSR_REGISTER.
RENAME statements
An object with the same name as the target name already exists in the catalog table SYSIBM.SYSPENDINGOBJECTS.

System action

The statement cannot be processed.

Programmer response

Either drop or remove the existing object or choose another name.

If the object-type is a data set, consider one of the following actions:

  • Verify that the correct integrated catalog facility catalog is specified in the storage group definition. The ICF catalog is identified in the VCATNAME column of SYSIBM.SYSSTOGROUP catalog table.
  • Issue an IDCAMS DELETE of the data set before retrying the CREATE statement.

SQLSTATE

42710

46002

End of change