Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run SQL script inside Visual Studio

I have a scripted database SQL file that I need to execute inside Visual Studio to create a new database. I am so far unable to locate any function that allows me to do this.

like image 722
burntsugar Avatar asked Apr 28 '10 01:04

burntsugar


2 Answers

Go to server explorer in VS, right click on server and select run query.

Do you mind telling us why it has to be run inside VS?

In addition, the database projects offers a lot of features that are worth looking at:

http://www.informit.com/articles/article.aspx?p=31764 //old article but still worth reading.

http://www.ssw.com.au/ssw/standards/BetterSoftwareSuggestions/Images/VisualStudio_DataDude_SchemaCompare.gif

http://www.emadibrahim.com/2008/07/10/database-schema-compare-upgrade/

like image 154
Raj Kaimal Avatar answered Sep 28 '22 17:09

Raj Kaimal


There is a green arrow of play on the upper left corner of the window query. And down the tabs of the names of open files in VS. Just click to play and ready.

like image 34
DaviddO Hige Avatar answered Sep 28 '22 17:09

DaviddO Hige