04-04-2022 05:58 AM
Dear Community,
I would like to every monday NBU sends me a report about full media.
How l can write query for this ?
Beforehand Thanks.
04-04-2022 06:09 AM
Can l write this query?
Select TOP 100 start at 1 domain_Media.barcode as “MediaBarcode” Where MediaBarcode.Media_Status = Full?
04-04-2022 08:14 AM
i use this commands to get the of full tapes from the robot
#find the list of tapes from TLD
nbemmcmd -listmedia -brief -robotnumber 1|awk '{print $1}' > /repository/scripts/tapesinlib_ENCR_OffsiteVP.txt
#identify the FULL tapes from above list
for i in `cat /repository/scripts/tapesinlib_ENCR_OffsiteVP.txt`; do j=`nbemmcmd -listmedia -mediaid $i |egrep "Media Status:"|awk '{print $3}'`; if [[ "$j" = "FULL" ]]; then bpmedialist -mlist -l -m $i |awk '{print $1}'| >> /repository/scripts/Full_tapes.txt
#send mail
echo "`cat /repository/scripts/Full_tapes.txt`" | mail -s "LIST OF FULL TAPES TO EJECT" abc@xyz.com
04-11-2022 06:28 AM
You may explore OpsCenter queries if you are interested to run such queries
You cannot query NetBackup standalone database directly. Running command is the best option.