Is it Possible to Use the 'Connect' Command in a PL/SQL Block? (Doc ID 1325473.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 10.2.0.4 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Goal

For example:

BEGIN
  execute immediate 'connect scott/tiger@DB102X';
END;
/

Results in:

BEGIN
*
ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at line 2


Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms