Take the 2-minute tour ×

My questions seem to be unrelated BUT Windows Explorer might be causing the problem I see when I use SQL Management Studio (Windows 7 64-bit).

a. Recently, since 2 weeks or so ago, my Windows Explorer became less responsive: I can do a copy and paste of a folder for example and do not see the change in W. E. right away. I have to do a manual refresh of the folder to see the change.

b. Now when I rename a database in the MS SQL Management Studio, the underlying database name is NOT changed, even though the name in the Object Explorer is! Before the name of the mdf file was changed by the M.S. When I try to rename the file manually, I get the msg saying "The action can't be completed because the file is open in SQL Server (MSSQLSERVER).

So my question is How do I shut down the SQL Server? I actually shutdown the PC and restarted then try to rename the database file but the same error msg shows up: file is open in SQL Server!

Thanks for any pointer.

share|improve this question

migrated from stackoverflow.com Jul 6 '11 at 9:43

This question came from our site for professional and enthusiast programmers.

SQL Server Configuration manager allows you to shut down SQL Server completely. You can find it in your start menu under Microsoft SQL Server XXX entry. –  Lieven Keersmaekers Jul 6 '11 at 7:43
add comment

1 Answer

Renaming a database only changes a label. Not the physical file names.

You shut down SQL Server from the Services snap-in. If you did rename the files, then SQL Server won't find then on start up and you'd get a "suspect" error.

MS even wrote a KB article

share|improve this answer
add comment

Your Answer

