Some Useful DB2 Commands

If you are a beginner DB2 admin like me, you may find DB2 has different way compared with Oracle DB. Here are some useful commands for DB2 and don’t forget to execute these commands using DB2 instance user (db2instX):

db2 list active databases # list databases
db2 activate database [dbname] # activate database
db2 list db directory # list database directories
db2 connect to [dbname] # connect to database
db2 list applications # list applications connected
db2 terminate # terminate application connection
db2 deactivate database [dbname] # deactivate database
db2stop # stop db2 process
db2start # start db2 process
db2 get db cfg for [dbname] # show database configuration
update db cfg for [dbname] using logarchmeth1 DISK:[completePath] #set archive log

Ref: https://www.youtube.com/watch?v=9dTWU6Iu-BE

Some Useful DB2 Commands

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s