Reputation: 358
I'm trying to run an alter table query to add columns to an existing table:
ALTER TABLE dbo.Names
Add solCorporate bit null
When I execute it just sticks in the executing query cycle, I've left it for 20 mins and nothing.
Any ideas? I'm presuming if there was a code error it would flag before running.
Thanks.
Upvotes: 2
Views: 4683
Reputation: 363
This happened to me while I was using the view in SSIS. Once I closed the SSIS project in Visual Studio, the execution finished immediately.
It is possible another program is hogging access to the view.
Upvotes: 0
Reputation: 1092
I ran into the same problem today. I tried to stop the database connection by right-clicking it and choosing Stop (in the Object Explorer in MS SQL Server Management Studio).
When that didn't help I launched Sql Server Configuration Manager and restarted the SQL Server from the SQL Server Services tab. After that, Alter table ran in a second.
Upvotes: 2