Wednesday, October 26, 2011

Cannot drop database "ASPState" because it is currently in use

I got this error Cannot drop database "ASPState" because it is currently in use. while trying to uninstall ASPState database by using the UninstallPersistSqlState.sql script. Actually after install InstallPersistSqlState.sql, you can not directly uninstall the ASPState DB, so you need to run this commond (net stop w3svc) before uninstalling.
For this go to Start -> Run -> cmd and then in the command prompt type net stop w3svc as shown in the below figure. After that try to uninstall using UninstallPersistSqlState.sql.
net stop w3svc

No comments:

Post a Comment