SQL Storage Compress - 6.1
Working with HyperUtil.exe - SQL Storage Compress
HyperUtil.exe is a free command line utility included with SQL Storage Compress.
You can use HyperUtil.exe with SQL Storage Compress compressed database files (*.mdfx, *.ndfx and *.ldfx) or encrypted database files (*.mdfe, *.ndfe and *.ldfe) to:
- view information about a file
- verify the integrity of a file's contents
- convert a compressed or encrypted file to native SQL Server format
- defragment a compressed or encrypted file
You can also use HyperUtil.exe to convert SQL HyperBac files to native SQL Server backup format. This can be useful when restoring a SQL Storage Compress database from a SQL HyperBac backup that was encrypted on a different server. See Working with key files for encrypted data for more information.
You do not need a SQL Storage Compress license to use HyperUtil.exe.
HyperUtil.exe syntax
Argument |
Description |
/S[ource]"filepath" |
Specify the location and name of the file you want to use. Required for all operations. |
/O[utput]"filepath" |
Specify the location and name for the native SQL Server file that HyperUtil.exe will generate. Required for Extract (/E). |
/K[ey]"filepath" |
Specify the location and name of the key file used to encrypt the source file. Required if the source file is encrypted. See Working with key files for encrypted data for more information about how SQL Storage Compress uses key files. |
/Q[uery] |
Display information about the source file. |
/T[est] |
Verify the integrity of the source file's contents. |
/E[xtract] |
Create a native SQL Server version of the source file with the location and name specified by /O. |
/D[efrag] |
Defragment the source file (specified by /S). Drefragmentation can reduce the size of the source file by recovering free space. Use /F to control the amount of free space left in the file after defragmentation. |
/F[ill factor]fill factor percentage |
Specify the fill factor of the source file when using /D. Fill factor determines how much space is allocated to data and ranges from 60 to 100 percent. The default setting is 90 percent. Note: Using 100 percent is not recommended, as no free space is left in the file, which may cause it to become fragmented more quickly. |
/I[gnore] |
Ignore errors during defragmentation. |
/V[erbose_output] |
Display detailed information about the operation. |
/Y[do_not_prompt_for_overwrite] |
Silently overwrite an existing output file. |
/? or --help |
Display help information. |
Using HyperUtil.exe
- Identify the database that the file belongs to and take it offline. To do this, either:
- Right-click the 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 the database:
ALTER DATABASE <database name> SET OFFLINE
You 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). 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 when the HyperBac Compression Engine Components are installed.
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 required command, and press RETURN to execute it. See the examples below for more information.
Examples
Display information about a SQL Storage Compress database file
The following command lists information about the SQL Storage Compress compressed data file, AdventureWorks_Data_SSC.mdfx:
HyperUtil.exe /S"C:\Data\AdventureWorks_Data_SSC.mdfx" /Q
Verify a SQL Storage Compress database file
The following command verifies the contents of the SQL Storage Compress compressed data file, AdventureWorks_Data_SSC.mdfx:
HyperUtil.exe /S"C:\Data\AdventureWorks_Data_SSC.mdfx" /T
Convert a SQL Storage Compress compressed database file to native SQL Server format
The following command converts the SQL Storage Compress compressed data file AdventureWorks_Data_SSC.mdfx to an uncompressed, native SQL Server file AdventureWorks_Data_uncompressed.mdf:
HyperUtil.exe /S"C:\Data\AdventureWorks_Data_SSC.mdfx" /O"C:\Data\AdventureWorks_Data_uncompressed.mdf" /E
For more information about converting a compressed database to native SQL Server format, see Converting SQL Storage Compress databases to native format.
Convert a SQL Storage Compress encrypted database file to native SQL Server format
The following command converts the SQL Storage Compress encrypted and compressed data file AdventureWorks_Data_SSC.mdfe to an unencrypted, uncompressed, native SQL Server file AdventureWorks_Data_unencrypted.mdf:
HyperUtil.exe /S"C:\Data\AdventureWorks_Data_SSE.mdfe" /O"C:\Data\AdventureWorks_Data_unencrypted.mdf" /K"C:\Program Files\Red Gate\HyperBac\keys\AES_256.key" /E
For more information about converting an encrypted database to native SQL Server format, see Converting SQL Storage Compress databases to native format.
Defragment a SQL Storage Compress database file
The following command defragments the SQL Storage Compress compressed data file AdventureWorks_Data_SSC.mdfx using a fill factor of 75 percent.
HyperUtil.exe /S"C:\Data\AdventureWorks_Data_SSC.mdfx" /D /F75
Convert an encrypted SQL HyperBac backup to native SQL Server format
The following command converts the SQL HyperBac encrypted backup AdventureWorks.hbe to an unencrypted, native SQL Server backup AdventureWorks.bak:
HyperUtil.exe /S"C:\Backups\AdventureWorks.hbe" /O"C:\Backups\AdventureWorks.bak" /K"C:\Program Files\Red Gate\HyperBac\keys\AES_256.key" /E
Note: These operations do not delete or overwrite the source file.
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