SQL Server 2019 SSMS 18.8 Getting error running builtin Standard report

Meunier, Alex 101 Reputation points
2021-01-18T20:03:48.293+00:00

This is a newly install SQL engine with SSMS 18.8.

When I try to run any of the Standard reports like Disk Usage and same thing when running the integration standard report I get the following error....

TITLE: Microsoft SQL Server Management Studio


An error occurred during local report processing. (Microsoft.ReportViewer.WinForms)


ADDITIONAL INFORMATION:

The definition of the report '' is invalid. (Microsoft.ReportViewer.Common)


An unexpected error occurred in Report Processing. (Microsoft.ReportViewer.Common)


The process cannot access the file 'C:\Users*******\AppData\Local\Temp\expression_host_6ae6778716daa4c0abe594cb552c80899.dll' because it is being used by another process. (mscorlib)

The DB engine is up to date
SSMS is up to date
Server was rebooted
That temp file is not used by anything else even if that message says so, I have check with ProcessExplorer

What am I missing???

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,116 questions
0 comments No comments
{count} votes

Accepted answer
  1. Meunier, Alex 101 Reputation points
    2021-02-08T16:58:54.137+00:00

    Found the issue.

    SQL Server created the temp file in local "C:\Users***\AppData\Local\Temp..."
    In a split second the antivirus software took a lock on to scan it at the same time SQL Server was about to read it or execute.
    The antivirus software did not find any issues with it but by the time it release it it was too late.

    Resolution: tune antivirus software.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Meunier, Alex 101 Reputation points
    2021-01-28T14:06:09.97+00:00

    I'm still having the issue, I can't find what is missing with the user account which are part of the same admin group.
    For the file access would not be an issue since it's gets created by the account in the session that trying to read it.
    I am able to access the file with my account without issues.

    1 person found this answer helpful.
    0 comments No comments

  2. CathyJi-MSFT 22,321 Reputation points Microsoft Vendor
    2021-01-19T05:47:00.083+00:00

    Hi @Meunier, Alex ,

    > That temp file is not used by anything else even if that message says so, I have check with ProcessExplorer

    Could you use Process Explorer to check again no process using this file? Or you can using other method to find out which process is locking a file or folder in Windows.

    Method one;

    Download Process Explorer and run the program.

    • Click the Find menu, and choose Find Handle or DLL...
    • Type the file name (name of the file which is locked by some process.)
    • After typing the search phrase, click the Search button
    Once you know what process has file locked you need to close that process (by closing that program) AND/OR by using KILL in the process explorer terminating that process.

    Method two;

    You can use the Resource Monitor for this which comes built-in with Windows 7, 8, and 10.

    1.Open Resource Monitor, which can be found
    •By searching for Resource Monitor or resmon.exe in the start menu, or
    •As a button on the Performance tab in your Task Manager
    2.Go to the CPU tab
    3.Use the search field in the Associated Handles section
    •See blue arrow in screen shot below
    57867-screenshot-2021-01-19-135856.jpg

    When you've found the handle, you can identify the process by looking at the Image and/or PID column.
    You can then try to close the application as you normally would, or, if that's not possible, just right-click the handle and kill the process directly from there.

    Please refer to the thread Find out which process is locking a file or folder in Windows to get more information.

    Did any antivirus software enabled on your server? You can try to disable it , then re-enable it after running the report. Did you meet the same issue when you using SSMS 17.9.1? SSMS 17.9.1 and SSMS 18.8 can be installed side by side.

    Best regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Meunier, Alex 101 Reputation points
    2021-01-19T11:59:38.933+00:00

    Hi @CathyJi-MSFT ,

    I tried process explorer and resource monitor without any luck.  
    Those .dll files get creates when a SSMS standard report is executed and usually is delete after but when it fails it stays behind.  
    I get the same issue with SSMS 17.9.1 and 18.8  
    BUT I was able to go a step further  
    I started SSMS with a service account and that worked, I was able to run the Standard report disk Usage and the execution report from Integration Service Catalogs.  
    The service account is in the same group that my account  is in and that group is part of the administrator group,,so I'm still confused...  
    

    Only difference I see in the configs at this time is that this server are new windows 2019.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.