Executing SQL*Plus Commands

  • SQL*Plus commands provide useful functionality such as connecting and disconnecting, enabling and disabling autocommit, running other SQL*Plus scripts , describing database object metadata, defining and using substitution variables, defining and using bind variables, controlling output display size, saving script output to a file, and more. To execute SQL*Plus commands do the following:

    1. Type a SQL*Plus command into the .SQL or .PLSQL file.

      While typing, autocompletion suggestions will appear as you type

    2. Select (highlight) one or more SQL*Plus commands and SQL or PL/SQL statements.

    3. Right click and select Execute SQL from the menu.

    4. Select Execute All if you wish to execute all SQL*Plus commands, SQL, and PL/SQL in the current file.

      If one more more SQL*Plus commands are not supported, you will receive a warning message

      The SQL*Plus CONNECT command will associate the file with the connection specified in the command. After executing this command, intellisense/autocomplete will use the new connection and schema.

  • For more information, including a reference guide of supported SQL*Plus commands, visit Using SQL*Plus Commands with Oracle Developer Tools for VS Code