>See the image in the PDF file. I get an error message that SQL Server can't lock the file in order to rename it. It shows the entire file location with the database name. So, when I try to write a stored procedure, it does not recognize Contacts.mdf at all when I write "USE Contacts".
>
>How do I get around this problem?
Are you trying to do so from SSMS or from WE? Did you try it from database / properties or using ALTER DATABASE with MOVE option (check ALTER DATABASE command in BOL).
If it's not broken, fix it until it is.
My Blog