I've been using SQL Server 2012 for as long as I can remember. When I do a backup it's always saved as .bak file format. However, there's this other server that has SQL Server 2012 and when I do a backup, it's not saved as .bak but just a generic 'file' file format. When I try to restore this file it works just fine. I'd just like to know why it didn't save as .bak file. In other servers that I've worked on it's always .bak. Thank you so much.
2 Answers
Take a look at the command that is generating the backups (it could be a job, a maintenance plan, 3rd party tool, etc.).
You can give the file any extension you like, including no extension. Windows Explorer might not know what on earth it is, but SQL Server will still be able to restore it just fine.
I'd just like to know why it didn't save as .bak file. In other servers that I've worked on it's always .bak
This might have happened:
Declare @BackupPath varchar (256),
@DBName varchar (256),
@DateTime varchar (25)
--- With Extension (Other Server)
set @BackupPath = '\\SharedLocation\' + @DBName + '_Full_' + @Datetime + '.bak';
--- Without Extension
set @BackupPath = '\\SharedLocation\' + @DBName + '_Full_' + @Datetime;
or you might have missed to type .bak
if the backup was created manually via SSMS.
However, as mentioned by @AaronBertrand there would no issue during restore with the backup that created without extension.