What's strange is that a SQL script someone wrote (which apparently was running fine for months) seemed to return an
ORA-00933: SQL command not properly ended error when executed through the Linux command line, as shown below:
oracle@dbhost:/home/oracle> /u01/sqlplus/instantclient_12_2/sqlplus ahmed/welcome1@//dbhost:1521/orcl @/home/oracle/script.sql SQL*Plus: Release 22.214.171.124.0 Production on Sun Sep 19 12:31:27 2021 Copyright (c) 1982, 2016, Oracle. All rights reserved. Last Successful login time: Sun Sep 19 2021 12:30:50 -04:00 Connected to: Oracle Database 12c Enterprise Edition Release 126.96.36.199.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options ) B * ERROR at line 2: ORA-00933: SQL command not properly ended Disconnected from Oracle Database 12c Enterprise Edition Release 188.8.131.52.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
What's odd is that when I pasted the same exact SQL statement to Oracle SQL Developer as is, it executed and ran just fine:
sqlplus wasn't happy with this blank line in the script. I removed it and everything was fine:
Like I said, this previously worked fine, but since the database had already gone through a few quarterly CPU patching cycles, I honestly can't point to what triggered this not to work anymore.