top of page
  • Kyra Brown

How to Create a SQL Server Database Project in Visual Studio 2013


To create a SQL Server Database Project in Visual Studio 2013, follow these steps:

1) In Visual Studio, select File > New > Project

2) In the “New Project” window, expand Installed, then expand Templates

3) In the list of templates to the right, select SQL Server Database Project

4) In the “Name” field, enter a <name> for the database project

5) In the “Location” field, click Browse, and browse to your project working directory folder

6) In the “Solution Name” field, enter a <name> for the solution. You can only provide a name for the solution if you enable Create directory for solution option. This is optional.

7) Right-click the SQL Server Database Project in the Solution Explorer pane, and select Properties

8) In the “SQL Server Database Project” Properties tab, select Project Settings

9) Under “Target Platform”, select the appropriate SQL Server platform version from the drop down list for this database project

10) Under “General”, enable Include schema name in file name

11) Click on Database Settings…

12) In the “Database Settings” window, select the Common tab, review the default settings, and change any setting as appropriate for your project

13) Select the Operational tab, review the default settings, and change any setting as appropriate for your project.

  • Confirm Auto close is disabled

  • Confirm Auto create statistics is enabled

  • Confirm Auto shrink is disabled

  • Confirm Auto update statistics is enabled

  • Confirm Recovery model is appropriate for your project

  • Enable Change tracking

  • Change Retention period from 2 days to 5 days

14) Select the Miscellaneous tab, review the default settings, and change any settings as appropriate for your project

  • Confirm Compatibility level is correct for your database project

15) Click OK to save your “Database Settings” changes.

16) In the “SQL Server Database Project” Properties tab, select Debug

17) Under Target Connection String, confirm that the connection string is correct for your environment.

18) Under Deployment Options, confirm that the appropriate options are enabled for your database project.

  • Confirm Deploy database properties is enabled

  • Enable Always re-create database

  • Confirm Block incremental deployment if data loss might occur is enabled

19) Click on Advanced…

20) In the “Advanced Deployment Settings” window, select the General tab, under Deployment Behavior, enable Back up database before deployment, then review the default settings, and change any settings as appropriate for your project.

21) Click OK to save your “Advanced Deployment Settings” changes.

22) Close out of the “SQL Server Database Project” Properties tab.

23) In Visual Studio, click on the “Save” icon to save changes to your project.

 

121 views0 comments
Featured Posts

© Wicked Wizards 2021

bottom of page