Open .mdf and .ldf files in Microsoft SQL Server without attach I want to open .mdf and .ldf files in Microsoft SQL Server without attach.

Are the following steps correct?


Add new database with MYDBNAME name.
Copy the files MYDBNAME.mdf / MYDBNAME_log.ldf to this path C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA (make sure to stop SQL services (SQL Server &amp; SQL Server Agent))
Start SQL services again.


I tried these steps put after creating a new database, MYDBNAME.mdf and MYDBNAME_log.ldf created in DATA folder automatically. (I want to copy these file to DATA folder manually)

How can I add new database MYDBNAME without creating MYDBNAME.mdf and MYDBNAME_log.ldf files in DATA folder?
You can't add a database that way, you will need to attach the database using the files you have as follows:


Copy the files to the correct location.
Attached the database with EXEC sp_attach_db '&lt;name&gt;', '&lt;name.mdf&gt;', '&lt;name.ldf&gt;' or using the relevant GUI command in SSMS (if the files are not in the SQL instance's default directories you will need to provide a full path rather than just the filename).


In the question you say "without attach" which might mean you don't want to use this method (or that you can't use the attach command in SSMS for some reason, or &lt;other reason&gt; - could you explain that part?