Hi,
I'm having a problem running sqlcl batch statement from the command line. I believe it is a problem with path expansion . . .
I’ve:
- Uninstalled both 32 and 64 bit versions of JRE and JDK,
- Reinstalled 32 bit JRE version 1.8.0_111
- Uninstalled and then reinstalled SQLcl version 4.2.0 to C:\Oracle\bin\sqlcl on Windows 10 machine
- Checked that C:\Oracle\sqlcl\bin is in my path, and then tried:
- Open cmd.exe
- cd to E:\work_CANA\EGEM\aws_svn_repos\trunk\sandbox\bill\MDR_Extracts\mdr_export_scripts
Which is where all the scripts are:
E:\work_CANA\EGEM\aws_svn_repos\trunk\sandbox\bill\MDR_Extracts\mdr_export_scripts>dir
Directory of E:\work_CANA\EGEM\aws_svn_repos\trunk\sandbox\bill\MDR_Extracts\mdr_export_scripts
01/05/2017 10:39 AM <DIR> .
01/05/2017 10:39 AM <DIR> ..
01/05/2017 08:55 AM 1,801 AAC_VLDT_OST.sql
...
37 File(s) 114,895 bytes
2 Dir(s) 183,147,270,144 bytes free
- Attempted to execute:
sql vinyardb/psswd@aws_egem @aac_vldt_ost.sql
which returns SP2-O310: unable to open file "aac_vldt_ost.sql"
- CNTRL+D to exit SQLcl as neither QUIT; nor EXIT; nor CNTRL+C appear to work after the SP2 error message
- back at the cmd.exe prompt attempt to execute:
sql vinyardb/psswd@aws_egem @e:\work_CANA\EGEM\aws_svn_repos\trunk\sandbox\bill\MDR_Extracts\mdr_export_scripts\aac_vldt_ost.sql
which works just fine, but requires that I use the full path rather than just the relative path
- Starting back at cmd.exe command prompt and executing
sqlplus vinyardb/psswd@aws_egem @aac_vldt_ost.sql
works just fine
So, it seems there is some issue with path expansion in the sqlcl utility that is specific to my computer/environment
Environment:
SQL> show all
_prelim OFF
appinfo is OFF and set to "SQLcl"
arraysize 15
autocommit OFF
autoprint OFF
autotrace OFF
BTitle OFF
SQL*Plus mode: OFF
Clear Screen mode: top
oracle.net.tns_admin=null
javax.net.ssl.trustStore=null
javax.net.ssl.trustStorePassword=null
javax.net.ssl.keyStore=null
javax.net.ssl.keyStorePassword=null
oracle.net.ssl_server_dn_match=null
oracle.net.ssl_version=null
colinvisible OFF
colsep " "
concat "." (hex 2e)
copycommit 0
define "&" (hex 26)
show desc is obsolete.
echo OFF
editfile "afiedt.buf"
embedded OFF
Encoding:windows-1252
escape OFF
exitcommit ON
FEEDBACK ON for 6 or more rows
heading ON
headsep "|" (hex 7c)
HISTORY
enabled
blacklist: show,history,connect,set
Do not show failed statements
linesize 80
long 80
longchunksize 80
newpage 1
null /*notset*/
numformat ""
numwidth 10
pagesize 14
PAUSE is OFF
release 1201000200
scan ON
serveroutput OFF
showmode OFF
space " "
spool OFF
sqlcode 0
sqlprompt "SQL> "
suffix "sql"
termout ON
time OFF
timing OFF
TNS Lookup locations
--------------------
1. USER Home dir
C:\Users\wcvin
2. TNS_ADMIN
C:\Oracle\bit_64\product\12.1.0\client\network\admin
Location used:
-------------
C:\Oracle\bit_64\product\12.1.0\client\network\admin
Available TNS Entries
---------------------
AWS_EGEM
EGEMD
MERB11G.RAC
MERT11G
trimout OFF
trimspool OFF
ttitle OFF and is the first few characters of the next SELECT statementUSER is "VINYARDB"
verify ON
Oracle SQLDeveloper Command-Line (SQLcl) version: 4.2.0.16.355.0402
No Wallet location defined