USE master
GO
EXEC sp_attach_db @dbname = N'ADV2017', 
    @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL\Data\ADV2017.MDF', 
    @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL\Data\ADV2017.LDF'
GO
