I have a .sql file and I am trying to import it into SQL Server 2008. What is the proper way to do this?
Share
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.
If you are talking about an actual database (an mdf file) you would
Attachit.sqlfiles are typically run using SQL Server Management Studio. They are basically saved SQL statements, so could be anything. You don’t “import” them. More precisely, you “execute” them. Even though the script may indeed insert data.Also, to expand on Jamie F’s answer, don’t run a SQL file against your database unless you know what it is doing. SQL scripts can be as dangerous as unchecked exe’s