Highlighted

How can I get SQL databse name in backup details?

I am taking SQL server database backup using script and intelligent policies. I want to generate a report with the dabase name So that I can identify and be insure that my all databases has been backedup. Is there any possibility to generate the report from OpsCenter analytics, CLI or script? Please suggest.


Thanks
Puneet Dixit
1 Solution

Accepted Solutions
Accepted Solution!

Re: How can I get SQL databse name in backup details?

You can also try bplist as per this example in NBU for SQL manual: 

The following example shows how to obtain the list of SQL Server backups that were backed up from client juneberry to server Cole:
C:\Program Files\NetBackup\bin\bplist -C juneberry -t 15 -S cole -R \

You can add -s and -e to specify Start and End dates.

Output is in this format: 

clientname.MSSQL#.clientname\instancename.db.dbname.~.7.001of001.dateandtime..C:\

View solution in original post

2 Replies

Re: How can I get SQL databse name in backup details?

Hallo,

I OpsCenter , try this (this example is excluding trx log backups, client name is INTOOLS):

select substr(a.fileinfo,1,locate(a.fileinfo,'~',1)-2) "DB",max(UTCBigInttoNomTime(b.endtime)) "LAST BACKUP"
from nb_jobfiles a,domain_jobarchive b
where
a.jobid = b.id
and b.byteswritten>0
and b.statuscode in (0,1)
and b.policytype = 15
and upper(a.fileinfo) not like '%TRX%'
and upper(a.fileinfo) like '%INTOOLS%'
group by substr(a.fileinfo,1,locate(a.fileinfo,'~',1)-2)
order by 2 asc

regards

m.

Accepted Solution!

Re: How can I get SQL databse name in backup details?

You can also try bplist as per this example in NBU for SQL manual: 

The following example shows how to obtain the list of SQL Server backups that were backed up from client juneberry to server Cole:
C:\Program Files\NetBackup\bin\bplist -C juneberry -t 15 -S cole -R \

You can add -s and -e to specify Start and End dates.

Output is in this format: 

clientname.MSSQL#.clientname\instancename.db.dbname.~.7.001of001.dateandtime..C:\

View solution in original post