Run On Dialog Box
Use this dialog box to choose a connection or reference on which to run an SQL script.
To access this dialog box, right-click a script in a database project in Solution Explorer, then choose Run On from the shortcut menu.
Note
The Run On shortcut menu is only available for SQL scripts within a database project.
The dialog box lists the current database references for the project and the associated connections available in Server Explorer. Each line describes one database reference or one connection. To choose a database on which to run the script, highlight the database and click OK. Optionally, you can execute a script directly in Solution Explorer by dragging it to the database reference.
If you choose the list item called "<temporary reference>," you can establish a database connection just for the duration of the script. After the script completes, this connection does not appear in the project's list of database references or in Server Explorer's list of database connections.
If you choose Add Reference, the Connection Properties dialog box appears.
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.
- Add Reference Button
Creates a new database reference and runs the script on the new database connection.
See Also
Tasks
How to: Run a Script on a Database Other than the Current Default