Check DBACOCKPIT connection issue from SAP SOLMAN

The symptoms:

- DBACOCKPIT on the SOLMAN couldn't load the information of BACKUP on the Stateline system. Return the code 500 CONECTION TIME OUT.

The cause: 

- The DB2DIAG Log file within the location /db2/CDN/db2dump is too large (larger 500MB).

- The connection of the SOLMAN to the Stateline system affect the performance. 

Check steps:

- Check the db2diag log: du -hsx /db2/CDN/db2dump/* to see the information of the log file.

- Check the top processes PID is handling by the server to find out the unused process (zombie): what kind of the process that the system is handling, has it kept running longer than usual? Then to determine the action would be treated with the process (PID) kill, keep, restart etc.

Bonus: 

du -hsx /var/spool/* | sort -rh | head -n 40 -> check file size in folder

du -hsx /db2/* | sort -rh | head -n 40


Cac lenh co ban DB2


1. Help
su - db2inst2
db2
db2 ==> ? (mọi lệnh của db2)
Db2 ==> ? Get (chi tiết lệnh get)
2. Stop a database
$ db2stop
$ db2stop force

3. Start a database:
$ db2start

4. Update config set archive log path:
$ db2 update db configuration for  <db_name> using logarchmeth1 disk:/u01/db2/archivelog/

5. Update config set time to delete archivelog:
$ db2 update db configuration for  <db_name> using REC_HIS_RETENTN 3

6. List active database:
$ db2 list active databases

7. Get config:
$ db2 get db cfg for <db_name>

8. List all DB:
$ db2 list db directory

9. Deactivate a database:
$ db2 deactivate db <db_name>

10. Activate a database
$ db2 activate db <db_name>

11. Get database manager config:
$ db2 get dbm cfg
-- Lấy alert log của DB2
 $ db2 get dbm cfg |grep DIAGPATH
12. Get profile variable 
$ db2set -all
13. Connect to a database:
$ db2 connect to  <db_name>
14. Execute a SQL command:
$ db2 "select count(*) from dsrdbm01"
15. Disconnect from a database:
$ db2 terminate
16. Access db2 command line:
$ Db2
Db2> connect to <schema_nam>;
Db2> select schemaname from syscat.schemata
Db2> LIST TABLES FOR SCHEMA <schema_name>;
17. List backup history
$  db2 list history backup all for  <db_name>
18. Get db size
CALL GET_DBSIZE_INFO(?, ?, ?, -1)
19. Create alias for existing database:
db2 catalog database DSRDBM01 as ldapdb2b 
20. List active applications:
db2 list applications for database <db_name>
db2 list applications for database  <db_name> show detail
21. List indexes of a table:
DESCRIBE INDEXES FOR TABLE  <db_name>.ldap_entry SHOW DETAIL
22. Check tải
$ db2top
23. Kill app gây lock, app bị treo
$db2 force application (app_id)


Comments

Popular Posts