When I run the Database Consistency History report using MSSM I get an error message:

unable to retrieve data for this section of the report. Following error occured Msg 19050, Level 16, State 5 Trace file name '/var/opt/mmsql/log/log_86866.trc\log.trc' is invalid

I re ran DBBCC CHECKDB but it did not help.

When I run

SELECT tracefilename = path FROM sys.traces 
WHERE is_default = 1;

I get the tracefilename returned as


And if I re-run the Database Consistency History the tracefilename is now

'/var/opt/mmsql/log/log_87148.trc\log.trc' is invalid
  • 1
    What is returned when you run this SELECT tracefilename = path FROM sys.traces WHERE is_default = 1;? Or you could try running the query that ssms executes manually. See here – Randi Vertongen Oct 11 '19 at 7:05
  • @RandiVertongen Thank you, I updated the question. – kirsten g Oct 11 '19 at 22:35
  • It's as if the report is looking for the wrong name – kirsten g Oct 11 '19 at 22:37

This is a limitation in SSMS. This report does not properly support Linux, as the script is performing path manipulation using '\', which is the Windows path seperator.

This is a snippet of code run for that report:

select @curr_tracefilename = path from sys.traces where is_default = 1 ; 
set @curr_tracefilename = reverse(@curr_tracefilename); 
select @indx  = PATINDEX(''%\%'', @curr_tracefilename) ;  
set @curr_tracefilename = reverse(@curr_tracefilename); 
set @base_tracefilename = left( @curr_tracefilename,len(@curr_tracefilename) - @indx) + ''\log.trc'' ; 

You can post product feedback here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.