Click here to Skip to main content
15,899,005 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
I have attached a few databases to my sql server instance. I wonder about the different behavious, while DBs have been attached the same way.

When I try to copy the folder that contains the files, some files do not copy and give error that file is in use, while some other, attached to the same instance and in the same folder, copy without any problem.
Please advise what is the difference?

Thanks
Posted
Comments
[no name] 22-Apr-14 8:19am    
The difference is, some are in use and others are not.
Furqan Sehgal 22-Apr-14 9:00am    
all are in use!!!!!!!!
Herman<T>.Instance 22-Apr-14 10:03am    
true

1 solution

If you want to copy files like mdf & ldf, you may need to stop SQL Server services before copying it.

Else take backup of the database and copy it!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900