27 thoughts on “SQLCL – The New SQL*Plus

  1. Great write-up!

    >>The TIME option shows the execution time for the first execution of a command.
    That should actually be showing the total execution time for that statement – just like the SQL History in SQL Developer.

    • Jeff,
      thanks for pointing that out. I’ve now corrected this in the post.
      I’ve also linked to your post about using DBMS_METADATA.SET_TRANSFORM_PARAM because it’s better than the one I came up with !

      Thanks again,


  2. OK. I’m finally convinced that SQLCL is a good thing. The best since sliced bread, so to say.
    …. unfortunately … my work machine has only Java 1.5 and sqlcl tries to download a new version of java. Need to find a better organisation that will give me a job.

    • Hemant,
      assuming your work machine isn’t locked down and you are able to download the JRE yourself, I think it’s possible to run multiple JRE versions concurrently.
      Of course, you’d probably need to ensure that the 1.7 JRE wasn’t included in your path, but you could explicitly point SQLCL at it.
      Jeff has a post on Installation of SQLCL which may be helpful.



    • Mick,

      I haven’t found one. I also had a look at SQLDeveloper itself and couldn’t see anything along those lines.
      It’s probably worth asking on the SQLDeveloper forum as there may be a way to do this. If not, you could always ask them if they can add it as a feature.



    • Stephen,

      yes, you can :

      SQLcl: Release 4.1.0 Beta on Sat Sep 05 10:11:41 2015
      Copyright (c) 1982, 2015, Oracle.  All rights reserved.
      Username? (''?) sys as sysdba
      Password? (**********?) ********
      Database? (''?) XE
      Connected to:
      Oracle Database 11g Express Edition Release - 64bit Production 
      SQL> show user
      USER is "SYS"



  3. Pingback: SQLcl: The new challenger for the SQL Plus crown – All Things Oracle

  4. Pingback: SQLCL – The New SQL*Plus | Christoph's 2 Oracle Cents

  5. Loving SqlCL with one exception. How do I terminate a long running statement? Example:
    select * from user_objects;
    This will spit out thousands of rows. How can I terminate the output?
    Loving the tool!

  6. I’m frustrated trying to configure sqlcl correctly so I can point it to the right Java Home and using tnsnames.ora to connect to defined services.

    • Sun,
      could you be a bit more specific ?
      What OS and version are you using ( Windows 7, Windows 10, OSX, Linux ) ?
      What Java homes do you have on your machine ?
      What version of SQLCL have you got ?
      Most importantly, what error(s) are you getting when you try to run SQLCL ?


      • I have the latest SQLC (sqlcl- from Oracle website. Using Windows 7 64-bit. I can point to Java 7 or Java 8. I’m okay with configuring files, but there’s no real documentation explaining how I go about it. There is a sql.bat but was not successful in confiruing. I’d prefer to use tnsnames.ora but using JDBC url string with a thin client would be okay too.
        SQLcl: Release 4.2.0 Production on Tue May 23 08:22:16 2017

        Copyright (c) 1982, 2017, Oracle. All rights reserved.

        Username? (”?) user
        Password? (**********?) **
        USER = user
        URL = jdbc:oracle:oci8:@
        Error Message = Incompatible version of libocijdbc[Jdbc:122010, Jdbc-OCI:121020
        USER = user
        URL = jdbc:oracle:thin:@localhost:1521/orcl
        Error Message = IO Error: The Network Adapter could not establish the connection
        Username? (RETRYING) (‘user/*********’?)

      • Sun,

        looking at the error message…

        Error Message = Incompatible version of libocijdbc[Jdbc:122010, Jdbc-OCI:121020

        …it looks like you’re right about configuration being the issue.
        I’d infer from this that SQLCL is most likely picking up your Java 7 installation rather than Java 8.
        Whatever the issue, I don’t think it’s reaching your Oracle Client (tnsnames.ora etc) so I’d suggest trying to fix the Java issue first.

        I don’t have a Win 7 client available to me at the moment, and you may well have thought of the following. However, for what it’s worth…

        The sql.bat file seems to provide the option to set the JAVA_PATH environment variable to point to the correct JRE so I’d suggest you check if this is set by oppening a command window and running :

        echo %JAVA_PATH%

        If it comes back blank, then I’d suggest you try setting it in the Control Panel.

        Whilst you’re in the command window, you could verify which Java installation is being used by default on your system by running :

        java -version

        If it does come back with the correct value then I’d suggest having a look to see if your Java 7 installation is in your PATH environment variable.
        If it is then you might try removing it so that it’s only Java 8 that’s in the path. I’d also make sure that the Java 8 JRE is in the PATH.



  7. Some strangeness occurred, but I had to change my:

    REM SET JAVA_HOME=”C:\work\sqldeveloper\jdk\jre”
    SET JAVA_HOME=”C:\Progra~2\Java\jre1.8.0_77″

    Then I had to use the JDBC url used sql.bat
    sql.bat user@jdbc:oracle:thin:@localhost:1521:demodb

    Using sql.bat user@demodb still gave me that incompatible error I posted earlier. I got it somewhat working and I appreciate your willingness to troubleshoot with me.

  8. Pingback: Oracle 12c – using new command line interface SQLCL on example of data spool to text file (in CSV or other format). – Data Management, Oracle, UNX and BRM – Adam's pro BLOG.

  9. Thanks.
    I am sharing One issue I met.
    I tested version of sqlcl
    There is a bug on LOAD.
    Data’s header row have to upper case.
    I used lower case and met error
    –Column in header row lowercase is not defined for table.

  10. Pingback: First Steps With Oracle SQLcl On Windows – Panoply Technology

  11. Pingback: Premiers pas avec Oracle SQLcl sur Windows – Panoply Technology

  12. “To borrow a well-known saying, One-Day International Cricket is a game played by two sides for 100 overs…and then the Aussies win the World Cup.”

    Yeah that hasn’t aged well 🙂

  13. Pingback: SQLcl, a nicer SQL*PLUS alternative – Project42

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.