Showing posts with label Sql server. Show all posts
Showing posts with label Sql server. Show all posts

Thursday, 13 June 2019

How to publish a SQL Server database project using Visual Studio 2017?

Hi Readers,

In this article, you are going to learn how to publish a sql server database project using visual studio 2017?

To know how to create a SQL Server database project using visual studio 2017 then first see this article and then come back.

Step 1: Right click on your database project and select Publish
Click on Publish 
Step 2: Opens a publish window,
Publish databse window

Step 3: For this example, I am going to publish this database into my local, First click on EDIT button and it opens a new window, Switch to Browse tab and then click on LOCAL and here it shows our either many or single server instance name. Select your working instance,


Configure to our database server instance

Note: You can select Authentication, but for this example i am using windows authentication. To test the connection, Click on Test Connection and if it shows Test Conncetion succeeded then proceed to click OK or else check your server and other details.

Note: SSMS should install in your system before publishing the database.

Step 4: Customize your database name
Given custom name instead of using same database name

Step 5: Click on Publish

Note: You can see the status inside "Data Tools Operation" and if showing  you "Publish completed successfully" then open your SSMS and connect to your selected server instance and see whether newly published database added or not like below,

Completion of database publish


AppDatabases in SSMS

If any error while publishing then click on View Results  and see the actual error which can see inside "Data Tools Operations".

Hope you like this article, Thanks,

Happy Coding:)



How to create a database project using visual studio 2017?

Hi Readers,

In this article, You are going to learn how to create a database project using visual studio 2017

Most of us know creating a database using SSMS (SQL SERVER MANAGEMENT STUDIO) but there is an another option which provided in visual studio IDE.

As in this article, I am using Visual Studio 2017 to create a SQL SERVER database project.

Step 1: Open your Visual Studio 2017

Step 2: Select New -> Project -> Choose Sql Server under Installed templates
SQL SERVER Template in Visual Studio 2017
Step 3: Give a Name for your database and choose the file location where to save and finally click OK.

Step 4: Now, Our database project created successfully.

Created a Sql Server Database using Visual Studio IDE


Step 5: Its time to create a new table, Kindly follow the same steps
Create a new table
Step 6: Click on Table and it opens a window, Give a name for your table, It opens the SQL Editor window,
SQL Editor for creating a new table 
Note: Either use designer or T-SQL to write queries and the changes updates simultaneously. Once your changes/inputs done just save it.

Hoping this article helps you. Thanks

Happy Coding :)