SQL Storage Compress - 6.1
Converting SQL Storage Compress databases to native format
You can convert compressed or encrypted database files to native SQL Server format using HyperBac WinExtractor (a Windows program) or HyperUtil.exe (a command line program). You do not need a SQL Storage Compress license to use these utilities. This is useful if you have been evaluating SQL Storage Compress and your trial has expired, and you need to access databases that you created during the trial period.
Before you start, make sure you know where the compressed database files are located and that HyperBac WinExtractor or HyperUtil.exe is available on the SQL Server.
- HyperBac WinExtractor is copied to %ProgramFiles%\Red Gate\HyperBac\gui on 32-bit machines and %ProgramFiles(x86)%\Red Gate\HyperBac\gui on 64-bit machines by default.
- HyperUtil.exe is copied to %ProgramFiles%\Red Gate\HyperBac\bin on 32-bit machines and %ProgramFiles(x86)%\Red Gate\HyperBac\bin on 64-bit machines by default.
Using HyperBac WinExtractor
- Take the compressed database offline. Either:
- Right-click each database in SQL Server Management Studio (SSMS), and select Tasks > Take Offline. You may need to run this task twice before SSMS reports the database as being offline.
or,
- Ensure you are connected to the master database, then run the following T-SQL statement for each database:
ALTER DATABASE <database name> SET OFFLINEYou may need to run this statement twice before SQL Server reports the database as being offline.
- Open HyperBac WinExtractor.
- Click the browse button next to Source File (HyperBac Archive) and choose the database file you want to convert. Compressed database files use the extensions .mdfx, .ndfx and .ldfx. Encrypted and compressed database files use the extensions .mdfe, .ndfe and .ldfe.
- Click the browse button next to Destination File and specify a name and location for the converted database file.
- If the database file is encrypted (i.e. if it uses the extensions .mdfe, .ndfe or .ldfe), click the browse button next to Encryption Key File and specify the key file that was used to encrypt the file. See Working with key files for encrypted data for more information.
- Click Extract to create an uncompressed, native SQL Server version of the compressed database file.

- Repeat steps 3-6 for each of the compressed database files.
- You can use the converted database files to create a standard SQL Server database. For example:
CREATE DATABASE [AdventureWorks_Uncompressed]ON PRIMARY( NAME = N'AdventureWorks_Uncompressed', FILENAME = N'D:\Backups\AdventureWorks_Data_Uncompressed.mdf' )LOG ON( NAME = N'AdventureWorks_Log_Uncompressed', FILENAME = N'D:\Backups\AdventureWorks_Log_Uncompressed.ldf' )FOR ATTACH
The original compressed database files are not automatically deleted. Once you have verified that the new database and converted files are working as expected, you can drop the compressed database and delete the compressed database files, if required.
Using HyperUtil.exe
- Take the compressed database offline. Either:
- Right-click each database in SQL Server Management Studio (SSMS), and select Tasks > Take Offline. You may need to run this task twice before SSMS reports the database as being offline.
or,
- Ensure you are connected to the master database, then run the following T-SQL statement for each database:
ALTER DATABASE <database name> SET OFFLINEYou may need to run this statement twice before SQL Server reports the database as being offline.
- Open a Command Prompt window in the HyperBac bin folder (hold SHIFT, right-click and select Open command window here). Alternatively, open a Command Prompt window anywhere and change directory to the HyperBac bin folder (for example,
cd C:\Program Files\Red Gate\HyperBac\bin). - Type the following command and press ENTER:
HyperUtil /S"<compressed_database_file>" /O"<destination_file>" /Ewhere <compressed_database_file> is the full path of the database file you want to convert, and <destination_file> is the full path of the converted database file you will create. For example:
HyperUtil /S"C:\Program Files\MSSQL\DATA\AdventureWorks_SSC_AdventureWorks_Data.mdfx" /O"C:\Program Files\MSSQL\DATA\AdventureWorks_Data.mdf" /EIf you have encrypted the database file, you will also need to include the
/Kargument and specify the full path for the key file that was used to encrypt it. For example/K"C:\Program Files\Red Gate\HyperBac\keys\AES_256.key". See Working with key files for encrypted data for more information.HyperUtil.exe prints metadata about the compressed file to the Console Window then creates an uncompressed, native SQL Server version of the compressed database file in the specified location.
- Repeat step 3 for each of the compressed files.
- You can use the converted database files to create a standard SQL Server database. For example:
CREATE DATABASE [AdventureWorks_Uncompressed]ON PRIMARY( NAME = N'AdventureWorks_Uncompressed', FILENAME = N'D:\Backups\AdventureWorks_Data_Uncompressed.mdf' )LOG ON( NAME = N'AdventureWorks_Log_Uncompressed', FILENAME = N'D:\Backups\AdventureWorks_Log_Uncompressed.ldf' )FOR ATTACH
The original compressed database files are not automatically deleted. Once you have verified that the new database and converted files are working as expected, you can drop the compressed database and delete the compressed database files, if required.
Was this article helpful?
SQL Storage Compress
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Storage Compress
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Installing or upgrading SQL Storage Compress