---- Backup Database :
BEGIN
backup database to disk = 'c:\.bak'
END
---- Restore Database :
BEGIN
RESTORE DATABASE Salary
FROM DISK = N'C:\DBBackUp 2009-12-23.bak'
WITH FILE = 1,
MOVE N'Salary' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DB.mdf',
MOVE N'Salary_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL \Data\DB_Log.ldf',
NOUNLOAD, STATS = 10
END
No comments:
Post a Comment