Take the 2-minute tour ×

I have a plain sql file with some SQL INSERT statements.

Is it possible to import it in my local SQL Server Express instance?

share|improve this question
What exactly do you mean by "import"? –  John Saunders Jun 30 '11 at 13:45
add comment

5 Answers

up vote 9 down vote accepted

You can use Management Studio Express edition. You can download the latest version here - which will work against SQL Express 2005, 2008 and 2008 R2.

If you don't want to install SSMSE then you can use sqlcmd at a command prompt, e.g. something like this (assuming Windows auth and an instance called "SQLEXPRESS"):

sqlcmd -S .\SQLEXPRESS -E -i "C:\path\file.sql"
share|improve this answer
runs really slow, but at least it runs - thanks –  Neville Aug 2 '12 at 4:23
add comment

The easiest way would be simply open the file in the Sql Management Studio and run it. Since the target table is already created, of course.

share|improve this answer
my file size is 1.3GB, the interface hangs... do you have any other GUI based method to import data –  AurA Aug 29 '12 at 4:44
add comment

You can open it via Query analyser and run

share|improve this answer
That was sooooooo last century - in SQL Server 2005 and up, it's Management Studio now ... –  marc_s Jun 30 '11 at 13:48
add comment

Here is the tool Sql_Server_Script_Executor

enter image description here

You can add single/multiple file/folder and your files will comes up in the list. Click the execute button and done

It contains three transaction modes.
1. Execute scripts within one transaction
2. Execute scripts on separate transaction
3. No transaction
share|improve this answer
add comment

All you have to do is open Microsoft SQL Server 2008 Management Studio. Then use File -> Open.

Open the file from the proper location and you'll get all the SQL statements there. After that you can execute them.

Hope this helps.

share|improve this answer
add comment

Your Answer


