Skip to content

Instantly share code, notes, and snippets.

@arekgotfryd
Created February 19, 2018 12:49
Show Gist options
  • Save arekgotfryd/9cc860e5e0864fb8d03bb4305f231b73 to your computer and use it in GitHub Desktop.
Save arekgotfryd/9cc860e5e0864fb8d03bb4305f231b73 to your computer and use it in GitHub Desktop.
Create db under different name for MSSQL (here we create new database which previously was calles GDPR I only changed files names)
USE [master]
GO
CREATE DATABASE [GDPRBCK] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL13.GDPR\MSSQL\DATA\GDPRBCK.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL13.GDPR\MSSQL\DATA\GDPRBCK_log.ldf' )
FOR ATTACH
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment