db2 query only if backup_end (yesterday)

pzzl321

ADSM.ORG Member
Joined
Jul 18, 2018
Messages
13
Reaction score
0
Points
0
hi@all,

is it possible to run this db2 query, only to get failed filespaces (date-1)?
select node_name, filespace_name, backup_start, backup_end from filespaces where node_name='SSS_DC' OR node_name='CCC_DC' ORDER BY backup_end ASC

And how can i group up some datamover-filespaces like contact field in nodesview?

regards
 
..nobody has an idea, or did i not express myself correctly?
 
My colleagues would like to get an email from me only if their backup did not work. currently you get the notification every day which leads to the fact that you do not check it correctly.

select node_name, filespace_name FROM nodesview where CONTACT = 'XX'

.. works only with normal FileBA, since CONTACT on filespace is not settable. where could one deposit information to the operator and then search for it?
 
Sorry could you elaborate a bit more?
Are you trying to get information out of VM Backups?
Or information from a say a Windows machine with C:\ D:\ E:\ F:\ where E:\ belongs to person Y while everything else is for person X?
Or want a simple report that says NodeA, NodeB, NodeZ missed/failed?
 
Okay i ll try. there are two things they i wantet:
- trigger report mail only if a daily schedule backup failed (e.g. BACKUP_END = yesterday)
- group the filespacename from VMs easy to a contact

I use TDP4VE to Backup VMs. Every VM got a uniqe filespacename under the datacenter Node like:
select node_name, filespace_name, backup_start, backup_end from filespaces where node_name='AAA_DC'
output:
NODE_NAME: AAA_DC
FILESPACE_NAME: \VMFULL-vm.virtual-machine.de
BACKUP_START: 2019-03-21 00:56:49.000000
BACKUP_END: 2019-03-21 00:58:39.000000

I hope I expressed myself this time clear, sorry >.<

edit: the way i group today is with massive OR ENTITYNAME='XX' conditions
 
Ok, this is a quick, dirty and likely not a 'best' way to go about but what I've come up with 10 seconds of thinking.
Spin up multiple datamovers, each datamover processes vm's related to a customer.
datamover_custA for example has these 10 VM's.
Then you could do something like:
Code:
select SUB_ENTITY,ACTIVITY_TYPE,SUCCESSFUL,BYTES from SUMMARY_EXTENDED where END_TIME>current_timestamp - 24 -
 hours and ENTITY like 'DATAMOVER_CUSTA' and SUB_ENTITY IS NOT NULL and SUCCESSFUL='NO'
Results:
SUB_ENTITY: spctest
ACTIVITY_TYPE: Incremental Forever - Incremental
SUCCESSFUL: NO
BYTES: 0

Run that though an external script and mail from there. Could drop in variables like $1 and $2 for datamover name and hours to make calling it easier.


For everything else, I have a KSH script that issues
"q event * * begindate=today-1 enddate=today begintime=`date +%H:%M` endtime=`date +%H:%M` exceptionsonly=yes"
then pipe that to AIX's mail to send to a list of people.

Quick, dirty but functional.
 
thanks for the quick reply.
cant use event cause it only show node values and i dont want configure for each customer datamover-nodes .
SUMMARY_EXTENDED is a nice table and there is a CONTACT field in it!

How can i update this?
 
Back
Top