O erro “Não é possível executar o script” no SQL Server Management Studio
-
03-07-2019 - |
Pergunta
Frequentemente recebo o seguinte erro ao tentar executar instruções simples em uma instância remota do SQL Server 2005. Clico em Execute, a janela está pendurada por vários segundos e depois recebo o erro. Eu clico ok, clique em Executar novamente e ele funciona bem. Isso acontece com frequência o suficiente para ser muito irritante.
Na semana passada, trabalhei exclusivamente contra uma instância local e não tive esse problema uma vez. Eu também não estava no domínio corporativo a semana toda (viagem de negócios).
Minha máquina é Vista.
O que está causando esse problema? Como faço para resolver?
TITLE: Microsoft SQL Server Management Studio ------------------------------ Cannot execute script. ------------------------------ ADDITIONAL INFORMATION: Access to the path 'C:\Users\[chloraphil]\AppData\Local\Temp\tmp873B.tmp' is denied. (mscorlib) ------------------------------ BUTTONS: OK ------------------------------
Solução
Problem went away when my hard drive died :)
Outras dicas
Try deleting all the files in the temp folder in the error message. Ignore errors on files that are open by other processes. I had over 3 GB of files there.
I double-clicked on the .sql script when it was inside a zip file, it opened in SQL Server Management Studio - but when I tried to execute it - it gave me this error.
Move/Unzip the .sql script outside of the archive and it will run.