Forum Stats

  • 3,750,259 Users
  • 2,250,141 Discussions


SQLcl resolving Windows system variables

DaveH Member Posts: 1
edited Feb 2, 2018 6:56PM in SQLcl

I'm curious if I'm doing something wrong related to SQLcl or it's a problem with the product itself, but it doesn't seem to properly resolve Windows system variables.  For example:

SQL> host echo %SQLPATH%


SQL> store set %SQLPATH%\x.sql replace %SQLPATH%\x.sql (The system cannot find the path specified)

        at Method)


        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(

Error: %SQLPATH%\x.sql (The system cannot find the path specified)

Wrote file %SQLPATH%\x.sql

SQL> host dir %SQLPATH%\x.sql

Volume in drive C is OSDisk

Volume Serial Number is 30C1-3448

Directory of C:\Oracle\sql

File Not Found

The same steps work fine using sqlplus from the Oracle client.  I'm on Windows10 and running SQLcl



  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    edited Feb 2, 2018 6:56PM

    This is a bug with the STORE command.  It seems that SQLcl's HOST command handles %<env_var>% strings, but STORE does not.

    Strangely enough, the situation in SQL*Plus is exactly the opposite...


    SQL*Plus handles such environment variables in the STORE command, but not in HOST (the STORE case not shown above, but it worked fine.)

    Please report bugs by opening a Service Request with My Oracle Support.