What I tried so far is to go to server explorer:
- connect to a database
- choose server name
and tried to attach a database file but it asks for an .mdf file and I don’t know what is this and how to create it. My database is a .sql file
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A .sql file, is a file that contains statements that can be executed. They can contain statements that create database and tables (and other stuff) or that manipulate the data in an existing database (like inserting records).
If you want to execute the .sql file, you can open it in Visual Studio and then run it. It will ask you for a connection to a Sql Server instance and then the statements will be executed.
Here is the MSDN documentation that explains this.