NOTICE: Our Community is moving. Get more information.
I have installed Oracle 11g Express and Pro*COBOL precompiler to test this COBOL program with embedded SQL that uses the SCOTT schema:
EXEC SQL INCLUDE SQLCA END-EXEC
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 USERNAME PIC X(10).
01 PASSWD PIC X(10).
EXEC SQL END DECLARE SECTION END-EXEC.
MOVE "SCOTT" TO USERNAME
MOVE "TIGER" TO PASSWD
:USERNAME IDENTIFIED BY :PASSWD
However when I run my program I receive an error ORA-01017: invalid username/password; logon denied, what is wrong?
The SCOTT schema contains a number of tables that can be used for testing purposes, and needs to be installed.
The follow these steps to install the schema:
Having successfully logged on, the SCOTT.SQL script needs to be run as follows:
Now check the tables exist by running the following query:
SELECT TABLE_NAME FROM DBA_TABLES WHERE OWNER=’SCOTT’
Now run the program again - successfully: