Compartir a través de


How to: Set Up Database Diagram Designer

To use Database Diagram Designer it must first be set up by a member of the db_owner role (a role of Microsoft SQL Server databases) to control access to diagrams. For more information on how diagram ownership works see Understanding Database Diagram Ownership.

In addition, you can use the Database Diagram Designer to update databases in SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2. However, SQL Server 2012 doesn't support this feature.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Customizing Development Settings in Visual Studio.

To set up database diagramming

  1. Create a database connection in Server Explorer using a member of the db_owner role to log in. For steps see How to: Connect to a Database from Server Explorer.

  2. Expand the Database Diagrams node under the database connection.

  3. Select Yes when prompted if you want to set up database diagramming.

    Note

    This will create the database diagram table and the stored procedures on the SQL Server database.

  4. Visual Studio 2005 will create the following objects on the SQL Server:

    1. Sysdiagrams table

    2. sp_alterdiagam stored procedure

    3. sp_creatediagram stored procedure

    4. sp_dropdiagram stored procedure

    5. sp_renamediagram stored procedure

    6. fn_diagramobjects function

    7. sp_helpdiagrams stored procedure

    8. sp_helpdiagramsdefinition stored procedure

    9. sp_upgraddiagrams stored procedure

See Also

Tasks

How to: Upgrade Database Diagrams from Previous Editions

Concepts

Understanding Database Diagram Ownership