How to check the numbers of databases online on DB2
db2 get snapshot for dbm | grep -i "Active Local"
Perform the command below to check the numbers of databases online
db2 get snapshot for dbm | grep -i "Active Local"
Output:
Active local databases = 10
Other option is:
db2 list active databases | grep -c "Database name"
Output:
Active local databases = 10