User Tools

Site Tools


tsm:tsm_select

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tsm:tsm_select [2022/12/19 17:10]
manu [Advanced select]
tsm:tsm_select [2023/11/13 09:14] (current)
manu
Line 2: Line 2:
  
 https://​github.com/​thobiast/​tsm_sql https://​github.com/​thobiast/​tsm_sql
 +
 +https://​thobias.org/​tsm/​sql/​
  
 http://​www.lascon.co.uk/​tsm-sql-queries.php http://​www.lascon.co.uk/​tsm-sql-queries.php
Line 15: Line 17:
 ===== Advanced select ===== ===== Advanced select =====
  
-I use the following select command to anonymize data from TSM+I use the following select command to **anonymize** data from TSM
   * node_name is replaced by first 3 letters + node_id   * node_name is replaced by first 3 letters + node_id
   * IP, and other vital info are replaced by **0**   * IP, and other vital info are replaced by **0**
Line 556: Line 558:
 APP-SRV01 ​                            ​DEFAULT ​                                           0.0 APP-SRV01 ​                            ​DEFAULT ​                                           0.0
 APP-SRV01 ​                            ​MC_ARCHIVES_10Y ​                                 429.6 APP-SRV01 ​                            ​MC_ARCHIVES_10Y ​                                 429.6
 +</​cli>​
 +
 +===== Mgmt Class =====
 +
 +<cli prompt='>'>​
 +########################################################################################################​
 +# Is a specific MGMT_CLASS used
 +########################################################################################################​
 +Protect: TSM1> SELECT b.node_name,​ b.filespace_name,​ b.class_name,​ CAST(FLOAT(SUM(bk.bfsize))/​1024/​1024/​1024 as DEC(14,1)) as size_gb, -
 +cont> count( bk.bfsize ) as number_of_objects FROM  backups b, backup_objects bk WHERE b.object_id=bk.objid and b.class_name='​MC_ORA'​ GROUP BY b.node_name,​ b.filespace_name,​ b.class_name
 +
 +NODE_NAME ​     FILESPACE_NAME ​    ​CLASS_NAME ​         SIZE_GB ​            ​NUMBER_OF_OBJECTS
 +------------- ​ -------------- ​    ​----------------- ​  ​----------------- ​  ​-------------------
 +APP-ORA01 ​     /​tsmorc ​           MC_ORA ​             158.1               12600
 +APP-ORA02 ​     /​tsmorc ​           MC_ORA ​             208.1               12800
 </​cli>​ </​cli>​
tsm/tsm_select.1671466244.txt.gz · Last modified: 2022/12/19 17:10 by manu