T-SQL筆記19_透過指令方式對backup db做匯入_There is insufficient free space on disk volume 'C:\' to create the database.
由於近期在還原資料庫過程遇到預設位置在C槽慘狀
There is insufficient free space on disk volume 'C:\' to create the database. The database requires 155512930304 additional free bytes, while only 15410909184 bytes are available.
C槽硬碟空間早已用的差不多了
因此勢必要找另一種還原backup方式
SQL語句
1 2 | RESTORE DATABASE {DB名稱} FROM DISK = 'D:\TestDB_Full.bak' WITH MOVE '{DB名稱}' TO |
當然如果不喜歡下指令然後是圖形化介面派
也可以切至Files去調整預設設在C槽的mdf跟ldf位置
這裡注意要有跳出成功才算完成restore喔!!
Ref:
Restore SQL Server database from bak file command line
https://sqlservergeeks.com/restore-sql-server-database-from-bak-file-command-line/
MS SQL Server - Restoring Databases
https://www.tutorialspoint.com/ms_sql_server/ms_sql_server_restoring_databases.htm
留言
張貼留言