本文介紹了如何重命名物理數據庫文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我已經使用 tsql 來分離這樣的數據庫:
I have used tsql to detach a database like this:
EXEC sp_detach_db @dbname = 'my_db'
然后我使用 PHP 來重命名物理文件.我能夠重命名 mdf 文件,但不能重命名 ldf 文件!我什至嘗試了一個 dos 命令 REN
但這對 ldf 文件也不起作用!
I then made use of PHP to rename the physical files. I was able to rename the mdf file but not the ldf file! I even tried a dos command REN
but that didn't work for the ldf file either!
我想問一下,物理日志文件有什么特別的地方不允許重命名嗎?
I wanted to ask, is there something special about the physical log files that allow it not to be renamed?
有沒有更好的方法來做到這一點?
Is there a better way of doing this?
謝謝大家
推薦答案
分離數據庫,重命名文件,重新附加.
Detach the Database, Rename the files, Attach it again.
這篇關于如何重命名物理數據庫文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!