How to Check DB2 Character Set

There are two ways to view the character set in DB2.

  1. To view the character set using the command line: You can check the character set information in the database by entering the following command in the command line window.
db2 connect to <database_name>
db2 get db cfg | grep -i codeset

The is the database name to be viewed. The above command will return the current character set information of the database.

  1. View character set using GUI: You can use graphical tools such as DB2 Control Center or IBM Data Studio to view character set information in the database. Simply locate the database connection configuration option in the respective tool to see the database character set settings.
bannerAds