Chloraphil
Chloraphil

Reputation: 2849

"cannot execute script" error in SQL Server Management Studio

I frequently get the following error when attempting to execute simple statements against a remote instance of SQL Server 2005. I click execute, the window hangs for several seconds, then I get the error. I click OK, click Execute again, and it runs fine. This happens frequently enough to be very annoying.

Last week I worked exclusively against a local instance and didn't have this problem once. I was also not on the corporate domain all week (business trip).

My machine is Vista.

What's causing this issue? How do I resolve?

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
------------------------------

Upvotes: 2

Views: 5766

Answers (3)

bendecko
bendecko

Reputation: 2793

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.

Upvotes: 0

Ken McCreery
Ken McCreery

Reputation: 21

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.

Upvotes: 2

Chloraphil
Chloraphil

Reputation: 2849

Problem went away when my hard drive died :)

Upvotes: 3

Related Questions