I am trying to restore a database from the backup (.bak
) file which is [saved] inside a ZIP
file, but not been successful so far. However, I am able to restore it after extracting from the ZIP
file.
This MS page says every edition of SQL Server 2008 and later can restore a compressed backup with the following restrictions.
Restrictions: The following restrictions apply to compressed backups:
- Compressed and uncompressed backups cannot co-exist in a media set.
- Previous versions of SQL Server cannot read compressed backups.
- NTbackups cannot share a tape with compressed SQL Server backups.
I do not clearly understand the first restriction. Could someone please clarify/elaborate this?
I have done the following steps:
Taken a backup on a staging SQL Server [MyTestDB.bak
]; Compressed it (by Right Click > Send To - Compressed(zipped) folder); Now, named it as MyTestDB.ZIP
FTP'd the ZIP
file to local development SQL Server and trying to restore it from the ZIP
file. But the database name is not available to backup.
Both SQL Server versions are exactly same.
SQL Servers Version: Microsoft SQL Server 2012 - 11.0.5058.0 (X64)-Standard Edition (64-bit)
Would the usage of term 'compressed backup' for the backup files saved inside ZIP files is correct or Is this need to be backed up in a different way so it can be called as a compressed backup?
.bak
file after extracting it from the ZIP
file it all works fine.I am not sure where I am going wrong? I can simply extract the backup and restore it without any problem, but would like to know the cause why it is not working, as it would have been a much better solution to just back up it from the ZIP
itself.
Import compressed file data into SQL Server. We want to load data from ZIP file into SQL Server table, therefore, add a Data Flow Task and connect it with the File Unzip Task. Rename Data Flow Task to Import Excel into SQL Server. Double click on the Import Excel into SQL Server.
Every edition of SQL Server 2008 and later can restore a compressed backup.
Nope. SQL Server 2012 doesn't support compressed backups in Web Edition (for example).
Backup compression is something different.
You specify this when you configure or start the backup and you then get a backup file that contains compressed data, as opposed to it containing uncompressed data if you don't enable compression.
SQL Server is not able to use a zip file, while the backup file is certainly compressed, it is not a "compressed backup" that this refers to.
So yes, you need to extract the backup file before restoring from it.
If you want to learn how to make compressed backups correctly, check out this page full of links to related material:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With