Run SQL*Plus Script Dialog

This section covers these topics:

Running the Run SQL*Plus Script Dialog

To run Run SQL*Plus Script, do the following:

  1. Select Run SQL*Plus Script from the Visual Studio Tools menu.

    This launches the Run SQL*Plus Script Dialog box.

  2. Enter the full path of the script file in the dialog box or select Browse to launch the file selection dialog box. Then select the script file.

  3. Select a connection from the drop-down list of connections.

    The Oracle Data Provider for .NET connection string is displayed in the Connection Information area.

  4. Select Run in the dialog box.

    Run SQL*Plus Script does the following:

    1. Initializes the script execution environment and updates the status/progress bar at the bottom of the dialog box.

    2. Creates a database connection and updates the status/progress bar at the bottom of the dialog box.

    3. Requests input if the script contains variables.

    4. Executes the script, writes the results to the Oracle Output, and updates the status/progress bar at the bottom of the dialog box.

    5. Closes the database connection and updates the status/progress bar at the bottom of the dialog box.

A dialog box similar to the following appears:

For more information on running Oracle SQL scripts from Visual Studio, see How SQL*Plus Script Execution Works.

Using Run SQL*Plus Script

The controls in Run SQL*Plus Script are as follows:

Control Description

File Information

Displays the file name and full path for the SQL*Plus script file or allows you to enter or edit one.

Browse

Displays the Visual Studio Open File dialog box with the default file name extension set to .sql so you can navigate to the SQL*Plus script file.

Connection Information

Displays a list of database connections.

New Connection

Displays the Add Connection Dialog box so that you can create a new database connection.

Connection String

Displays the Oracle Data Provider for .NET connection string for the connection selected in the Connection Source field.

This is the connection string used to establish a new connection for executing the SQL*Plus script.

User Input Area

Provides an area for input needed by SQL*Plus commands such as a pause or a parameter value.

Every time the script needs input this input area is cleared of all previous entries, and the cursor is positioned on the first row and first column of the input area for new input.

Run

Creates a new database connection using the specified connection information and executes the selected SQL*Plus script in that connection.

Continue

Continues the script execution. Enabled only when you need to be prompted for input. If no input is needed in the script, Continue is disabled until the dialog box closes.

Help

Displays the help for this dialog box.

Status bar

Displays the status bar with the following information: The operation in progress, such as Initializing, Connecting, Executing script, Closing connection.

A progress bar indicates the status of the operation by the amount of segmented blocks.