Problem:
This indicates that the Oracle client does not know what instance to connect to, or which TNS alias to use.
Resolution:
On Windows, using an Oracle connection without the instance name requires the LOCAL environment variable to be set to an instance defined to the system. The example below requires LOCAL to be set because the instance is not specified.
EXEC SQL
CONNECT :USERNAME IDENTIFIED BY :PASSWD
END-EXEC.
The following example defines the instance, and will therefore override the value set in LOCAL if it has been set.
EXEC SQL
CONNECT :USERID
IDENTIFIED BY :PASSWD
USING :INSTANCE
END-EXEC.