Pages

Mar 16, 2018

SQL Server: Backup file extensions are really important

Yes file extensions are really important because SQL server will not give any error message when you choose .bak extension for t-log backup. It still takes the full backup and you will end up without log backup of production databases.




BACKUP DATABASE AdventureWorks
TO DISK = 'C:\AdventureWorks.BAK'
WITH STATS
GO

BACKUP LOG AdventureWorks
TO DISK = 'C:\AdventureWorks.BAK' --this still works
GO

To configure backup using maintenance plan refer https://sqlserverrandoms.blogspot.com/2018/03/database-backups-and-purge-history.html


No comments: