- 1 year ago
Cant able to run sqlplus in windows batch script || ORA-28040: No matching authentication protocol exception
The "ORA-28040: No matching authentication protocol" error typically occurs when trying to connect to an Oracle database using an outdated authentication protocol. To resolve this issue and successfully run sqlplus
in your Windows batch script, you can try the following steps:
Download and Install the Oracle Instant Client: Visit the Oracle website and download the appropriate version of the Oracle Instant Client for your system (32-bit or 64-bit). Make sure to download the version that matches the Oracle database you are connecting to.
Extract the Instant Client Files: Extract the downloaded Oracle Instant Client files to a directory on your machine, such as
C:\oracle\instantclient
.Set Environment Variables: Set the necessary environment variables to locate the Oracle Instant Client files. Open a command prompt and run the following commands:
arduinoset PATH=C:\oracle\instantclient;%PATH%
set ORACLE_HOME=C:\oracle\instantclient
Update the SQL*Plus Executable: Replace the existing
sqlplus.exe
executable with the version from the Oracle Instant Client. Copy thesqlplus.exe
file from the extracted Instant Client directory (C:\oracle\instantclient
) and overwrite the existingsqlplus.exe
file in the Oracle installation directory (C:\Oracle\product\...
).Run
sqlplus
in the Batch Script: Now you should be able to run thesqlplus
command in your Windows batch script without encountering the "ORA-28040: No matching authentication protocol" error.
By following these steps and updating the SQL*Plus executable with the version from the Oracle Instant Client, you can resolve the authentication protocol issue and successfully run sqlplus
in your Windows batch script.