Skip to content

Instantly share code, notes, and snippets.

@yanisurbis
Created August 20, 2015 08:30
Show Gist options
  • Save yanisurbis/c1b6fe0bb81eacbb762c to your computer and use it in GitHub Desktop.
Save yanisurbis/c1b6fe0bb81eacbb762c to your computer and use it in GitHub Desktop.
USE [master]
RESTORE DATABASE AdventureWorks2014
FROM disk= 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Backup\AdventureWorks2014.bak'
WITH MOVE 'AdventureWorks2014_data'
TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\AdventureWorks2014.mdf',
MOVE 'AdventureWorks2014_Log'
TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\AdventureWorks2014.ldf'
,REPLACE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment