Table of Contents
Attach MDF file Without LDF File by using SSMS:
- There are two ways to attach an MDF file without an LDF file.
- By using SQL Server Management Studio.
- By using T-SQL Query.
STEP-01:
- Attach MDF file w/o LDF file by using SQL Server Management Studio.
- Open Microsoft SQL Server.
STEP-02:
- In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.
- Right-click on DATABASE and select the option “Attach”
STEP-03:
- Attach Window will open.
- Press “ADD” button.
STEP-04:
- Choose the path & select the MDF file.
STEP-05:
- After the above step, the system will add MDF and LDF file.
- Select LDF file and Press “Remove” button.
- Press “Ok” and the system will attach MDF file with new LDF file.