After upgrade from 11.4.5.12 to 12.3.0.15, report jobs using class “Job History” fail when run from the CLI with error “Failed to get raw report data from NetVault”
Running from the CMD as administrator the following CLI job failures can be seen.
>nvreport.exe -templatefile D:\NetVault\reports\templates\jobhistoryclidefault
Report generation failed. The returned error was...
Failed when producing report: Failed to get raw report data from NetVault
>nvreport.exe -templatename "Executed Job History - cli default template"
Report generation failed. The returned error was...
Failed when producing report: Failed to get raw report data from NetVault
D:\NetVault\util>nvreport.exe -templatefile D:\NetVault\reports\templates\jobhistory
Report generation failed. The returned error was...
Failed when producing report: Failed to get raw report data from NetVault
BUG NVBU-19428
Workaround:
Template file “jobhistoryfromdbclidefault” is attached to the article download and put the template file in “…\NetVault\reports\templates” directory. To use this template use one of the following commands.
1/ this will run the report and put the file txt file in the /tmp directory but any directory can be specified.
nvreport -class "Job History From DB" >/tmp/Job_history_report.txt
2/ this command will output the data to …\NetVault\reports\output\test13\output.txt. The outputdir option create the directory specified and puts the output.txt file in the directory specified.
nvreport.exe -class "Job History From DB" -outputdir test13
If a custom temple has been created for CSV output and it is required I have attached “CustomerReportMofified” with nicename “Reporting_test” to the solution. Put the file in the \NetVault\reports\templates\ folder and use the following command.
nvreport -templatefile (path to ustomerReportMofified template file) > (pathe to output .csv file)
Example:
nvreport -templatefile D:\NetVault\reports\templates\CustomerReportMofified > c:\temp\CustomerReportModified4.csv
Not all fields in CLASS "Job History" are available for CLASS "Job History From DB" so there are 2 differences to the output you will see.
1/ BackupType which gives Backup type: 'Backup or 'Archive' (applicable when JobType = 'Backup') is not available.
We do have jobtype in the report which gives Job Type: 'Backup' 'Restore' or 'Report'
2/ runningstatus which gives Status of running job is not available
But we have field “message” instead which gives us Running or exit status of the job which seems to cover 2 fields runningstatus and exitstatus.
Note: if you want a list of fields available for class "Job History From DB" issue following command
nvreport -help fields "Job History From DB"