How to: Import Server Objects and Settings

You can manage changes to objects and settings on a database server by creating a server project, importing the objects and settings into it, and putting it under version control. If you use the New Project Wizard, you can specify a server from which to import objects and settings when you create the project. For more information, see How to: Create Database and Server Projects. As an alternative, you can create an empty server project and import objects and settings later.

Required Permissions

You must have permissions to access the server from which you want to import objects and settings. In many development environments, the person in the role of the database administrator creates the server project and imports the objects and settings. That person then hands the project off to the team for development work.

To import server objects and settings

  1. Either create a server project or open an existing one that does not already contain objects. For more information, see How to: Create Empty Database and Server Projects or How to: Open a Database or Server Project.

    Solution Explorer displays the solution that contains the server project.

  2. In Schema View, click the server project into which you want to import objects and settings.

    If Schema View does not appear, open the View menu, and click Database Schema View.

  3. On the Project menu, click Import Objects and Settings.

    The Import Database Wizard appears.

  4. In Source database connection, click the connection through which you want to import objects and settings. If no connection appears, click New Connection to create a connection.

    You can create a connection in Server Explorer or other places in Visual Studio Team System Database Edition. For more information, see How to: Create a Database Connection.

  5. In Import options, select the Override configuration with imported schema settings check box if you want to update the project settings to match those on the source server.

  6. Click Start to import the objects and settings.

    Important noteImportant Note:

    If you import objects and settings from a database other than 'master', the following warning appears: "If you import database objects into this server project and then deploy this project, you will also deploy those objects to the 'master' database. Are you sure that you want to import database objects into this server project?"

    The Error List window displays any errors that relate to the objects that you import. The status bar in Visual Studio indicates when all the objects and settings have been imported. Other errors appear on the wizard summary page and are also written to a log file in the project folder.

  7. You must configure your project settings before you can build and deploy your project. For more information, Build and Deploy Databases to an Isolated Development Environment.

See Also

Tasks

How to: Import Database Objects from a Script

How to: Create Database and Server Projects

Concepts

Terminology Overview of Database Edition