cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get SQL databse name in backup details?

puneet102
Level 4

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 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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 2

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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:\