ycherkes / MountSqlBackup

Allows directly attach backup files to SQL Server without backup restore operation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MountSqlBackup

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)

Installation

Usage

  • 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)

Features

  • Supported backup formats:
  • 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.

Bug Report

See the Issues Report section of website.

About

Allows directly attach backup files to SQL Server without backup restore operation

License:MIT License


Languages

Language:C# 100.0%