A little something about everything

internet marketing and website development made simple..

Attach Database Microsoft SQL Server 2017 MDF & LDF

Since 2017 no longer attaches the corresponding ldf using the SQL management studio you can instead use a script to do the attach.

Here is the example:

USE [master]
GO
CREATE DATABASE [SomeDatabase] ON 
( FILENAME = N'Z:\Data\SomeDatabase.mdf' ),
( FILENAME = N'Z:\Logs\SomeDatabase.ldf' ),
 FOR ATTACH
GO