I have installed the Oracle client WINDOWS.X64_213000_client.zip
and I want to use the bundled sql.exe
to run SQL scripts in my project directory.
The sql.exe
is located in the following directory which I have added to my Path env var:
E:\Oracle_21c\app\client\product\21.0.0\client_1\sqldeveloper\sqldeveloper\bin
The jar files are in
E:\Oracle_21c\app\client\product\21.0.0\client_1\sqldeveloper\sqldeveloper\lib
The following works:
cd E:\Oracle_21c\app\client\product\21.0.0\client_1\sqldeveloper
\sqldeveloper\bin\sql -LOGON user/password@tns_db_alias
select 'a' as a from dual;
But I can only run it from that directory, if I try to run sql.exe
from the path directory by not qualifying it as bin\sql
then an exception is thrown.
>sql -LOGON user/password@tns_db_alias
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ParseException
What can I do to make sql.exe
runnable and accessible via the path?
So that I can be in any arbitrary directory e.g. \projects\myproj\
and run scripts using sql.exe
cd \projects\myproj\
sql -LOGON user/password@tns_db_alias my_db_script.sql