RESTORE DATABASE Umbraco6
FROM DISK = 'C:\Temp\initial_db.bak'
WITH MOVE 'Umbraco6' TO @db_physical_path + '\test_data.mdf',
MOVE 'Umbraco6_log' TO @db_physical_path + '\test_data.ldf',
REPLACE
在上面的SQL脚本中我收到错误:
'''附近的语法错误不正确。
有什么想法吗?
答案 0 :(得分:5)
declare @db_physical_path_data nvarchar(200)
declare @db_physical_path_log nvarchar(200)
set @db_physical_path_data = @db_physical_path + '\test_data.mdf'
set @db_physical_path_log = @db_physical_path +'\test_data.ldf'
RESTORE DATABASE Umbraco6
FROM DISK = N'C:\Temp\initial_db.bak'
WITH MOVE N'Umbraco6' TO @db_physical_path_data,
MOVE N'Umbraco6_log' TO @db_physical_path_log, REPLACE