Hi, all experts here,
Thank you for your kind attention.
I am having a question on detach/attach database. As when we detach/attach database, we have to copy both of .mdf and .ldf files to the targeted filepaths, in this case, when the database is large, then it takes a pretty while to copy the physical files though. In this case, I dont really see the point to detach/attach the database? Instead, backup/restore may be faster? (also, as detach the database, the files has to be taken offline)
Just confused about the way we trasfer database files with detach/attach. I am looking forward to hearing from you shortly for any advices for that.
With best regards,
Yours sincerely,
When you detach/attach a database, you are physically moving the target database. So, you are taking the database "offline" and moving it to a new location. You are not going to get away from the time it takes to move/create files...you are going to incur that overhead in attaching or restoring. When you backup/restore the database, you incur the time it takes to create the backup file, move it if you need to, and restore it. The database stays online, which may be what you need, but you will likely find that it takes much, much more time to backup and restore a db than it takes to detach/attach.Tim|||
Hi, thanks a lot for your kind advices.
In my case, I just found that detach/attach did not really save much time for me compared to backup/restore. That's the reason why I asked this question. Maybe we will see the effect for very large database with a certain degree of size? Thanks.
With best regards,
Yours sincerely,
No comments:
Post a Comment