How to import .sql file into SQL Server Express

有些话、适合烂在心里 提交于 2019-11-30 05:41:43

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"

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.

You can open it via Query analyser and run

Here is the tool Sql_Server_Script_Executor

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
Vinayak Kanagi

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!