SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid

后端 未结 11 1669
[愿得一人]
[愿得一人] 2020-12-28 12:22

Our database server had run out of disk space, after freeing up some disk space any query run in sql server management studio, with the results sent to grid view, resulted i

相关标签:
11条回答
  • 2020-12-28 12:58

    Received the message:

    SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid

    When trying to execute a query in Management Studio after deleting temp files from c:\documents and settings\administrator\local settings\temp

    Resolved when logging out of server session and back in again.

    This resolution fixes this error on the following environments:

    • Windows Server 2003
    • Windows Server 2008
    • Windows Server 2012
    • Sql Server 2005
    • Sql Server 2008
    • Sql Server 2008 R2
    • Sql Server 2012
    • Sql Server 2014
    • Sql Server 2016
    0 讨论(0)
  • 2020-12-28 13:02

    I had this same issue on my Windows 7 machine. I actually encountered the error both in SQL Server Management Studio and Visual Studio 2012. I checked my temp directory and found over 66,000 files. Significantly, there were a large number of files called tmpXXXX.tmp where XXXX was a hex number. The problem was that the files went all the way up to tmpFFFF.tmp. So whatever was creating the temp files was not cleaning them up properly and eventually just ran out of files. The solution was to delete all the files in that folder. Not surprisingly, this also greatly improved performance.

    The temp folder can be found at: %TEMP% which will be correct for both XP and Win7.

    0 讨论(0)
  • 2020-12-28 13:05

    I had this issue on my webserver (windows server r2 running SQL Server 2012)

    The directory name is invalid.
    (mscore lib)
    

    Logging out (killing my remote session) and logging back in fixed the issue for me.

    0 讨论(0)
  • 2020-12-28 13:09

    I faced the same problem if DB was created in SQL Server 2008 and it was opened by SQL Server 2005. Just reopen it in 2008.

    0 讨论(0)
  • 2020-12-28 13:15

    Yesterday i faced the same error "The directory name is invalid" when i tried to open New Query Window in SQL Management Studio 2014. It happened after cleaning (deleting) %temp% folder files.

    I Restarted SQL services but no luck! My problem was solved after restarting the server.

    0 讨论(0)
提交回复
热议问题