Partager via


Database Manager Page

Applies To: Windows Server 2008, Windows Server 2008 R2

Use the Database Manager page to add database connections, create queries to retrieve specific information, specify table definitions, execute stored procedures, and create views.

This topic contains help content for the following sections:

  • Databases

  • Tables

  • Stored Procedures

  • Views

Databases

This section discusses the actions and UI elements at the database level. At the database level, you can add connections and create new queries.

UI Elements

Element Name Description

Add Connection

Opens the Add Connection dialog box for you to add a new connection string for use in an application that connects to a database. For more information, see Add Connection Dialog Box.

New Query

Displays the New Query pane for you to create and execute a new query. If you have multiple queries opened in the right pane, each query will appear as a tab.

Important
The New Query button is always available and does not depend on a database, table, view, or stored procedure being selected.

New Query pane

Type a SQL script in the right pane to run a custom query against your database, and then click Execute.

Refresh

Refreshes the information displayed on the Database Manager page.

Tables

This section discusses the actions and UI elements at the table level. At the table level, you can create new tables in addition to the database-level actions.

Buttons

Element Name Description

New Table

Displays the New Table pane for you to add new columns and specify definitions for your table. If you have multiple tables opened in the right pane, each table definition will appear as a tab.

Open Table Definition

In the right pane, displays the definition for the table that has been selected under the Tables node. The table definition enables you to modify the columns and column properties of the selected table.

Show Table Data

In the right pane, displays the data for the table that has been selected under the Tables node. You can refresh the information that is displayed and add, edit, or delete table rows.

Delete

Permanently deletes the selected table definition from the database.

New Column

Adds a new column to your table definition. You can specify values for the name, data type, and other properties in the Column Properties pane.

Delete Column

Removes the selected column from your table definition.

Indexes/Keys

Opens the Indexes/Keys dialog box for you to specify a primary key or index for your table definition. For more information, see Indexes/Keys Dialog Box.

Relationships

Opens the Foreign Key Relationships dialog box for you to specify relationships between the primary key and foreign key for your table definition. For more information, see Foreign Key Relationships Dialog Box.

Save Table

Opens the Save Table dialog box for you to save the new table that you have created. You must specify a name for the table and choose whether to use the default schema or a user-specified schema. For more information, see Save Table Dialog Box.

Table Pane

Element Name Description

Column Name

Displays the name of the column.

Data Type

Displays the data type for the column.

Allow Nulls

Displays the value for the allow nulls property. True if null values are allowed in the column; otherwise, false.

Column Properties Pane

Element Name Description

Data Type

Select a value for the data type from the drop-down list. When you add a new column, this property is given a default value of bigint.

Important
The column properties that appear depend on the data type that you choose.

Name

Specify a name for the column in the Column Properties pane.

Allow Nulls

Select True from the drop-down list if null values are allowed in the column; otherwise, select False. The default value is True. If the column will be the primary key for the table, you must set this property to False. This property is not available for the timestamp data type.

Default Value

Optionally specify a default value for the column. When a new row is created, this value will automatically appear in the column for the new row.

IsIdentity

Select True from the drop-down list if the column enforces uniqueness on its values; otherwise, select False. When you add a new column, this property is given a default value of False. The IsIdentity property applies only to the bigint, decimal, int, ntext, numeric, smallint, and tinyint data types.

Length

Specify the number of characters allowed for character-based data types. This property is only available for the binary, char, nchar, nvarchar, varbinary, and varchar data types. The default is 50.

Precision

Specify the maximum number of digits for values in this column. This property is only available for the decimal and numeric data types. The default is 3.

Scale

Specify the maximum number of digits that can appear to the right of the decimal point for values of this column. This property is only available for the decimal and numeric data types. The default is 3.

Stored Procedures

This section discusses the actions and UI elements at the stored procedure level. At the stored procedure level, you can create and execute stored procedures, modify existing stored procedures, and delete stored procedures, in addition to the database-level actions.

UI Elements

Element Name Description

New Stored Procedure

Displays the New Stored Procedure pane for you to create and execute a new stored procedure using an existing template. If you have multiple procedures opened in the right pane, each procedure will appear as a tab. You must specify a unique name for the stored procedure because you cannot recreate an existing stored procedure.

New Stored Procedure pane

Type a Transact SQL (T-SQL) script in the right pane to run the procedure against your database, and then click Execute.

Execute Stored Procedure

Executes the selected stored procedure and displays the results in the results pane. The EXEC statement that was generated appears in the query editor. For more information, see Execute Procedure Dialog Box.

Script as ALTER

Displays the selected stored procedure in the right pane for you to modify. The stored procedure will contain an ALTER stored procedure statement at the beginning of the script for you to modify the existing stored procedure. When you click Execute, the query updates the stored procedure with your changes.

Script as CREATE

Displays the selected stored procedure in the right pane for you to use as a template for a new stored procedure. The stored procedure will contain a CREATE stored procedure statement at the beginning of the script.

Delete

Permanently deletes the selected stored procedure from the database.

Views

This section discusses the actions and UI elements at the view level. At the view level, you can create new views, display their contents, modify existing views, and delete views, in addition to the database-level actions.

UI Elements

Element Name Description

New View

Displays the New View pane for you to create and execute a new view. If you have multiple views opened in the right pane, each view will appear as a tab.

New View pane

Type a SQL command in the right pane to run a custom view against your database, and then click Execute. You can save the view to your database by clicking Save and Close.

Open/Edit View

Displays the selected view in the right pane for you to modify and execute the contents of the view.

Delete

Permanently deletes the selected view from the database.

See Also

Other Resources

Basics of the IIS Database Manager (IIS.NET)
Working with Tables (IIS.NET)
Working with Views (IIS.NET)
Working with Stored Procedures (IIS.NET)