Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export database project as SQL script

I have been sent a web app by someone to see if I can give them a hand with re-hosting it. I haven't worked with database projects in Visual Studio and it looks as if this app uses a database project in Visual Studio, I am looking at how to export it as SQL script so I can add create it in SQL server management studio. I have read that I can do this by going to the properties for the database project and clicking the 'deploy' tab however I don't appear to have a deploy tab! I'm guessing its down to the version of Visual Studio. I'm using 2010. How do I export the project as a SQL script file?

enter image description here

like image 879
user1238321 Avatar asked Jan 02 '13 14:01

user1238321


1 Answers

The following steps could be helpful:

You can try the settings tab. The environment depends on the database project type. In one of my projects I have a tab called Project Setting where it gives me the option to create a SQL script (see image below)enter image description here

Or in other editions of Visual Studios
1. Open the project / solution and right-click the project and select Properties or double-click on the Properties folder
2. A new window appears in your environment, showing all project properties. Now Click the Deploy tab
3. Under Deploy Action select "Create a deployment script (.sql)" from the drop-down list
4. Hit the save button and close this window
5. From the Build menu select Build Solution and then select "Deploy [solution name]"
6. Once your script is deployed it should be available under the SQL-debug folder,
for example: [path to my project]\sql\debug\script.sql

like image 132
Casual Pundit Avatar answered Sep 25 '22 15:09

Casual Pundit