What is the command to view table spaces in db2?
You can use the following command in the DB2 database to view tablespace information:
SELECT TBSPACEID, NAME, TOTAL_PAGES, USED_PAGES, FREE_PAGESFROM SYSCAT.TABLESPACES;
This command will return a result set containing detailed information about all table spaces, such as table space ID (`TBSPACEID`), name (`NAME`), total pages (`TOTAL_PAGES`), used pages (`USED_PAGES`), and free pages (`FREE_PAGES`).
Please note that you need to execute this command with a user identity that has sufficient permissions.