you can do it by stopping SQL service from SERVICES AND APPLICATIONS.
first create the database with same name, than after stopping sql service, just simply copy paste the MDF and LDF files from your backup.
This won't always work, as the sizes will be different from the sizes of the files that are listed in the master database. Not to mention why would you stop the instance to do something which you don't have to take an outage to complete?
You can restore the database by using the .mdf files as EXEC sp_attach_single_file_db @dbname = 'database name', @physname = 'C:\MSSQL\Data\database name.mdf'
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 4  Replies
EXEC sp_attach_single_file_db @dbname = 'database name',
@physname = 'C:\MSSQL\Data\database name.mdf'