Hi @CSE Teacher ,
Primary file contains startup information for the database and points to the other files in the database. Every database has one primary data file. The recommended file name extension for primary data files is .mdf.
So, although the interface you see is like this, you can see your secondary data file in the box below.
I did a test. I deleted the secondary data file, and then I added the main data file, you can see:
Therefore, as long as you are in the normal attach process and do not see any wrong information, the attach is successful.
For more information, please see:
Database Detach and Attach (SQL Server)
Attach a Database
AND Different methods to attach SQL Server MDF files.
The last link contains some screenshots, which are helpful for understanding, so I also posted it.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.