Skip to content

How to Attach a Database with No Log File

The below script will attach a single MDF file and automatically create a corresponding log file;

EXEC sp_attach_single_file_db @dbname = '<DatabaseName>',
@physname = '<DatabaseLocation>'

SHARE THIS POST: