BACKUP DATABASE [ItaiTest]
TO DISK = N'C:\TempItai\ItaiTest.bak'
WITH NOFORMAT, NOINIT, NAME = N'ItaiTest-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
CREATE DATABASE [ItaiTestNew]
GO
RESTORE DATABASE [ItaiTestNew]
FROM DISK = N'C:\TempItai\ItaiTest.bak'
WITH FILE = 1,
MOVE N'ItaiTest' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ItaiTestNew.mdf',
MOVE N'ItaiTest_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ItaiTestNew_log.ldf',
NOUNLOAD, REPLACE, STATS = 10
GO
No comments:
Post a Comment