Prerequisites
This walkthrough assumes the following environment:
- The IIS Database Manager is installed on your Web Server.
- A database server (that could reside on the same physical machine as your web server)
Add a Connection String to Your Web Application
To add a new connection using a connection string:
- Open Internet Information Services (IIS) Manager.
- In the Connections view, select the Site, Application or Virtual Directory to which you would like to add a Connection String.

- In the Features View, double-click on the Connection Strings icon.
- In the Actions pane, click on Add…
- Type a name for your Connection String.

- Specify the Server that hosts your database.
- Specify the database name to which you would like to connect.
- If your database uses Windows Authentication, you can choose to "Use Windows Integrated Security". Otherwise, specify the credentials that will be used to connect to the database.
Note: If you would like to specify advanced settings for your connection string, you can alternatively click on "Custom" and then type in the connection string.
Add Connection… Button
You can add new connections without using connection strings. This allows you to connect to databases other than the ones used by your application or to the same database but with a different user identity.
To add a new connection using the IIS Database Manager:
- Click the "Add Connection…" button on the Database Manager toolbar.

- Type a connection name.
- Select the provider that you would like to use to connect to the database. For example, to connect to a SQL Server database, you should select the "System.Data.Client" that ships with the Database Manager.
- You will now be presented with a set of new fields that you need to fill out. In the case of the SQL Server Provider, you will need to provide:
- The server on which your database resides.
- The name of your database
- The user name to connect to the database
- The password associated with the user name
- When you are done entering the required information, press OK and the connection will be created.
Note: The connection information is stored on the machine from where IIS Manager is being used. Hence, this information won't be accessible from instances of IIS Manager on a different machine.
Database Connections
The IIS Database Manager is hosted within the IIS Manager. To launch the IIS Database Manager:
- In Internet Information Services (IIS) Manager, select the site, application or virtual directory where your connection string is stored (for more information about creating a connection string, see Add a Connection String to Your Web Application). You can alternatively create a new connection in the Database Manager using the 'Add Connection…' button on the Database Manager toolbar (for more information, see Add Connection… Button).
- In the Features View, double-click on the IIS Database Manager icon.

- If you have existing connection strings in your site, application or virtual directory, you will see a node in the Database Manager representing each of these connection strings.

- Expand a connection node in the Database Manager view. You will be presented with more information:
- If you further expand any of the nodes, you will be presented with a list of all tables, views and stored procedures that your database contains.
Custom Queries
The Database Manager also allows you to run custom queries against your database. This gives you greater control over the tasks that you can achieve with the Database Manager. For example, you can add an existing login as a user of your database using the following steps:
- In the Database Manager, select the database node for which you want to add a user.
- On the toolbar, press the 'New Query' button. A query editor will open up.

- In the editor, type the following SQL script:
CREATE USER username FOR LOGIN serverlogin

Note: If your user account doesn't have privileges to add a new user to the database, the above command will fail.
Related Content
Comments