Hi, all experts here,
Thank you very much for your kind attention.
I am trying to modify the files path (primary file, log file) of databases, but it looks like I am not able to mofidy their files path directly from the database property dialogue? Would please any experts here give me some ideas on what else can I try to figure it out? Thanks a lot in advance and I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
I don't think it's possible to modify file paths when the database is active (read only)
I'd suggest DETACH, RE-ATTACH with different file path
should take < 1 minute
|||You can not just change the path. You have to either detach and attach the database or backup and restore the database. Detach and attach will be faster and easier with less chance of data loss.
Both options are offline procedures.
|||Hi, all,
Thanks a lot for your kind advices.
With best regards,
Yours sincerely,
|||Hi Helen,You cant change the filepath when the database is in online. When sqlserver starts it will check for the path of database (from sysaltfiles tables) and it will start accessing the files. Once the database is online it will lock the file (you cant even copy the physical file through OS).
You can detach the db and move the physical file to the path you needed and the attach the db. It will work fine.
The above description is only for user dbs.|||
Hi, Sagar,
Thanks a lot for your very kind advices and help.
With best regards,
Yours sincerely,
No comments:
Post a Comment