Dela via


How to: Create Empty Database and Server Projects

When you create a database project or server project, you usually use the New Project Wizard not only to create the project but also to import objects and settings into it. However, you can just create an empty project if, for example, you will build your objects or settings in the project, instead of importing them. You might also create an empty project if you plan to import objects and settings later or you do not have permission to import them. For information about how to use the New Project Wizard, see How to: Create Database and Server Projects.

To create a project and a solution at the same time

  1. On the File menu, point to New, and click Project.

    The New Project dialog box appears.

  2. Under Installed Templates, expand the Database node, expand the SQL Server node, and click Advanced.

  3. In the list of templates, click the icon that corresponds to the type of project (database or server) and the version of SQL Server that you want to target. 

    Note

    You can also change the target database version later. For more information, see How to: Change the Target Database Version.

  4. In Name, type a name for this project.

  5. In Location, type the location where the project will reside on the local computer, or click Browse to search for the location.

  6. In Solution Name, type a name for the solution that will contain this project.

  7. Select the Add to Source Control check box if you want to add the initial solution and project to version control.

    Note

    You can add the project to version control later. For more information, see Add Files to Version Control.

  8. Click OK to create the solution and project.

    The newly created solution and the project appear in Solution Explorer. You can import objects and settings from an existing database, import objects from a database script, or define objects. For more information, see How to: Import Database Objects and Settings, How to: Import Database Objects from a Script, or Creating and Modify Database and Server Objects.

To create a project in an existing solution

  1. On the File menu, point to Add, and click New Project.

    The Add Project dialog box appears.

  2. Under Installed Templates, expand the Database node, expand the SQL Server node, and click Advanced.

  3. In the list of templates, click the icon that corresponds to the type of project (database or server) and the version of SQL Server that you want to target.

    Note

    You can also change the target database version later. For more information, see How to: Change the Target Database Version.

  4. In Name, type a name for this project.

  5. In Location, type the location where the project will reside on the local computer, or click Browse to search for the location.

  6. Click OK to create the project.

    The newly created solution and the project appear in Solution Explorer. You can import objects and settings from an existing database, import objects from a database script, or define objects. For more information, see How to: Import Database Objects and Settings, How to: Import Database Objects from a Script, or Creating and Modify Database and Server Objects.

See Also

Tasks

How to: Create Database and Server Projects

Walkthrough: Create and Deploy a New Version-Controlled Database

Concepts

Writing and Changing Database Code

Starting Team Database Development