MountSqlBackup is an open-source command line tool which allows to attach an SQL Server Database backup to the SQL Server directly without backup-restore operation.
It uses a demo version of YCherkes.SqlBackupReader (it's free for non-commercial purposes)
- Install Dokany: DokanSetup_redist.exe
- Build the MountSqlBackup sources or download the release
- Run mountbck.exe as described below:
- mountbck.exe DriveLetter BackupPath
- both parameters are mandatory
- example:
mountbck.exe S C:\Temp\AdventureWorks2014.bak
- Go to mounted drive (in example it's a drive S:)
- Double click on S:\AttachDb.sql - Sql Server Managemant Studio will open this file
- Press F5, or click Execute button
- Before you close (Ctrl+C) the mountbck.exe, don't forget to detach a database:
- Uncomment "Detaching Db..." block of AttachDb.sql (Select it and press Ctrl + K + U)
- Press F5, or click Execute button (only "Detaching Db..." block must be selected)
- Supported backup formats:
- Uncompressed SQL Server Full Db backups (more informations please read here: YCherkes.SqlBackupReader)
- Limitations:
- Databases with Memory-Optimized Tables are not supported (because SQL Server doesn't allow to rebuild the log for this kind of Db)
- This tool uses only data (mdf/ndf) files, so be careful - you can read inconstistent data, because log file was rebuilt.
See the Issues Report section of website.