DEV Community

Sreemayee
Sreemayee

Posted on

Error 45 initializing SQL*Plus Internal Error while running an SQL using SQLPlus

I am trying to execute a shell script that has below code, on Linux server with Oracle 19c installed. I am getting error “Error 45 initializing SQL*Plus Internal Error”.


sqlplus uname/''@db <<EOF

SELECT 'Refreshed successfully' STATUS FROM DUAL;

exit

EOF

exit 0


It establishes the connection and connects to oracle database with credentials, but the next SELECT statement is throwing the error. The error screenshot is attached.

But, When I try to execute in command line the SQL plus statement to connect to the database and run the same SELECT statement manually (Not via Shell Script), It runs without any issues.

Image description

Please suggest what has to be checked/modified to resolve this issue.

Need this issue fixed as soon as possible. Any suggestions are welcome.

Top comments (0)