Management Studio cannot execute a query....

  • Suddenly, I started receiving the following message when running queries--

    The message i receive is:

    [font="Courier New"]------------------------------

    Cannot execute script.

    ------------------------------

    ADDITIONAL INFORMATION:

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

    ------------------------------[/font]

    What happens is:

    I write a query in management studio. I click execute, query runs fine, I run it a second time -- i get the error above. I run it again--works just fine. Then again--same error, this time with a different file name (bolded above). I suspect there is some other service that is using that same tmp file name--if i run the query again , immediately after the first one--it works. There seems to be a time period between when SSMS writes the temp file and whatever else starts using it locks out SSMS. I installed multiple software packages the last couple of days (filezilla, R studio).

    Here are some facts and things I've tried:

    I have SQL server 2012 and 2016 on my machine. I've turned off all of the services for both and am using SSMS to query a remote server--the "Cannot execute script" still happens

    It happens in both versions of management studio (to be clear, I dont have them running at the same time).

    2016 SSMS is 13.0.15700.28. It is up to date, according to "Check for updates"

    I've restarted my machine (multiple times)

    I've cleared out the \Temp\ directory

    I've tried multiple searches in google and I haven't found a solution.

    Thank you for any help

  • This sounds a lot like an Anti-Virus problem.

    It's unlikely that two processes would use the same temp file name - and especially to keep doing it.

    I suppose it's also possible that you have an Add-in or extension in SSMS that is somehow locking the file - try making sure you have removed any and test again.

    Another thing to try is open Resource Monitor, go to the CPU tab, then search the Associated Handles section for .tmp to see if you can spot it.

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • "this sounds like an anti-virus problem"

    Mr Magoo wins the prize. I installed FileZilla FTP yesterday.. and some antivirus software got installed along with it. I uninstalled that... no more problem

    Thank you

  • Viewing 3 posts - 1 through 2 (of 2 total)

    You must be logged in to reply to this topic. Login to reply