A
Anatoliy4
declare @physical_backup_device_name_var nvarchar(100)
select @physical_backup_device_name_var=N'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\test\'+
max(backup_date) from temp_table
ALTER DATABASE test
SET single_user
WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE test
FROM
DISK = @physical_backup_device_name_var
WITH
FILE = 1, NOUNLOAD, REPLACE, STATS = 10
go
как сделать БД не используемой перед восстановлением?
select @physical_backup_device_name_var=N'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\test\'+
max(backup_date) from temp_table
ALTER DATABASE test
SET single_user
WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE test
FROM
DISK = @physical_backup_device_name_var
WITH
FILE = 1, NOUNLOAD, REPLACE, STATS = 10
go
как сделать БД не используемой перед восстановлением?