Skip to content

Instantly share code, notes, and snippets.

@ronnysuero
Created October 2, 2019 20:13
Show Gist options
  • Save ronnysuero/8fad5ae98b3b01e3c213ba23fd594750 to your computer and use it in GitHub Desktop.
Save ronnysuero/8fad5ae98b3b01e3c213ba23fd594750 to your computer and use it in GitHub Desktop.
Restore Db
EXEC sp_attach_db @dbname = N'AdventureWorks2012',
@filename1 =
N'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data\AdventureWorks2012_Data.mdf',
@filename2 =
N'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Data\AdventureWorks2012_log.ldf';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment