Database BackUp:
BACKUP DATABASE ApressFinancial
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
ApressFinancial.bak'
WITH NAME = 'ApressFinancial-Full Database Backup',
SKIP,
NOUNLOAD,
STATS = 10
BackUp Transaction Logs:
BACKUP LOG ApressFinancial
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
ApressFinancial.bak'
WITH NAME = 'ApressFinancial-Transaction Log Backup',
SKIP,
NOUNLOAD,
STATS = 10
Restore Database:
USE Master
GO
RESTORE DATABASE [ApressFinancial]
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
ApressFinancial.bak' WITH FILE = 3,
NORECOVERY, NOUNLOAD, REPLACE, STATS = 10
GO
Restore Logs:
RESTORE LOG [ApressFinancial]
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
ApressFinancial.bak' WITH FILE = 5,
NOUNLOAD, STATS = 10
No comments:
Post a Comment