How to manage local sql server database files?

How to manage local sql server database files?

奈何桥上唱咆哮 发布于 2021-11-30 字数 319 浏览 873 回复 3 原文

My system is for development, and I run a local copy of sql server 2005. I want to move all the database files out of program files, and put in a better location on another partition. To do this would you simply detach all the databases in SSMS, move the .mdf and .ldf files with windows explorer, then reattach?

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。



需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。


丢了幸福的猪 2022-06-07 3 楼

Probably this is what you are looking for. I would want to write my answer here but I am too lazy to do that, but I am sending you to my blog post regarding Moving Data File in SQL Server;

安稳善良 2022-06-07 2 楼

Yes, detach and re-attach them. If you are going to move the system databases also, that will take some special effort. Instructions for that can be found on MSDN.