I got around 98 instances in a single AIX server. I need to list all the tablespaces, their path and usage. Is there a way I can do that without getting into each instance, connecting into the database etc?
I don't have anywhere to test this at the moment, but either of these might work.
If you have
suprivileges to all instance owner users:
db2ilist | while read inst; do su - $inst db2pd -alldbs -tablespaces; done
If you have sufficient privileges on all instances yourself:
db2ilist | while read inst; do env DB2INSTANCE=$inst db2pd -alldbs -tablespaces; done