CHANGE DATABASE COMMENT command
The CHANGE DATABASE COMMENT command changes a database comment in the system database directory or the local database directory. New comment text can be substituted for text currently associated with a comment.
Scope
This command only affects the database partition on which it is executed.
Authorization
- SYSADM
- SYSCTRL
Required connection
None
Command syntax
Command parameters
- DATABASE database-alias
- Specifies the alias of the database whose comment is to be changed. To change the comment in the system database directory, specify the alias for the database. To change the comment in the local database directory, specify the path where the database resides (with the path parameter), and enter the name (not the alias) of the database.
- ON path | drive
- Specifies the path on which the database resides, and changes the comment in the local database directory. If a path is not specified, the database comment for the entry in the system database directory is changed. On Windows operating systems, may instead specify the letter of the drive on which the database resides (if it was created on a drive, not on a specific path).
- WITH "comment-string"
- Describes the entry in the system database directory or the local database directory. Any comment that helps to describe the cataloged database can be entered. The maximum length of a comment string is 30 characters. A carriage return or a line feed character is not permitted. The comment text must be enclosed by double quotation marks.
Examples
db2 change database sample comment
with " 'Test 2 - Add employee inf rows' "Usage notes
New comment text replaces existing text. To append information, enter the old comment text, followed by the new text.
Only the comment for an entry associated with the database alias is modified. Other entries with the same database name, but with different aliases, are not affected.
If the path is specified, the database alias must be cataloged in the local database directory. If the path is not specified, the database alias must be cataloged in the system database directory.
