5 Replies Latest reply on Jun 22, 2018 2:36 AM by Gaz in Oz

    Meeting some issues when using SQLcl 18.1.1

    Quanwen Zhao

      Hello, experts

       

      Recently I use SQLcl 18.1.1 to easily and conveniently generate CSV data, so I feel I gradually love this developer tool.

       

      Till now, I meet some issues when using it. The following are total 4 key points,

       

      (1) directly input "sql" command and enter, according to its prompt message then input Username and Password (on the part of Password it also needs to be entered TNS NAME or EZ Connect String), afterwards you'll find that the cursor key is always flashing on here - "Username? (RETRYING) ('test/*********'?)", at the very start I don't think that it could connect successfully until I continue to press Enter key. BTW there are still several boring error messages (IO Error) on it.

       

      • via TNS NAME

       

      [sqlcl@test ~]$ sql
      
      
      SQLcl: Release 18.1.1 Production on Thu Jun 14 08:38:36 2018
      
      
      Copyright (c) 1982, 2018, Oracle.  All rights reserved.
      
      
      Username? (''?) test
      Password? (**********?) *****************
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/orcl
        Error Message = IO Error: The Network Adapter could not establish the connection
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/xe
        Error Message = IO Error: The Network Adapter could not establish the connection
      Username? (RETRYING) ('test/*********'?) <<==
      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
      With the Partitioning, Oracle Label Security, OLAP, Data Mining,
      Oracle Database Vault and Real Application Testing options
      
      
      
      
      SQL> show user
      USER is "TEST"
      SQL> 
      

       

      • via EZ Connect String

       

      [sqlcl@test ~]$ sql
      
      
      SQLcl: Release 18.1.1 Production on Tue Jun 14 08:41:11 2018
      
      
      Copyright (c) 1982, 2018, Oracle.  All rights reserved.
      
      
      Username? (''?) test
      Password? (**********?) ************************************
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/orcl
        Error Message = IO Error: The Network Adapter could not establish the connection
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/xe
        Error Message = IO Error: The Network Adapter could not establish the connection
      Username? (RETRYING) ('test/*********'?) <<==
      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
      With the Partitioning, Oracle Label Security, OLAP, Data Mining,
      Oracle Database Vault and Real Application Testing options
      
      
      
      
      SQL> show user
      USER is "TEST"
      SQL> 
      

       

      (2) this time input "sql/nolog" and then appear the prompt words "SQL> ", next use "conn Username" command to connect oracle db server and press Enter key and password has been inputted.

       

      Unfortunately this format hasn't been connected to db, as you can see the following code.

       

      [sqlcl@test ~]$ sql /nolog
      
      
      SQLcl: Release 18.1.1 Production on Thu Jun 14 08:43:26 2018
      
      
      Copyright (c) 1982, 2018, Oracle.  All rights reserved.
      
      
      
      
      SQL> conn test
      Password? (**********?) *****************
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/orcl
        Error Message = IO Error: The Network Adapter could not establish the connection
        USER          = test
        URL           = jdbc:oracle:thin:@localhost:1521/xe
        Error Message = IO Error: The Network Adapter could not establish the connection
      
      
      SQL> show user
      USER is ""
      SQL> 
      

       

      (3) "history" command hasn't remembered that this command like this, "set linesize/pagesize and etc.", is the reason that "SET ..." is only belong to "SQL*Plus"?

       

      SQL> set linesize 150
      SQL> set pagesize 150
      SQL> 
      SQL> history
      History: 
        1  tnsping 
      ...
        6  desc user 
        7  desc user_tables;
        8  desc user_segments 
        9  select sum(bytes)/1024/1024 sizd_mb from user_segments where segment_name='TEST';
       10  select sum(bytes)/1024/1024 sizd_mb from user_segments where segment_name='TEST1';
       11  @spool_test.sql 
       12  @spool_test1.sql 
      ...
       67  col random_string for a20 
       68  desc test 
       69  desc test1 
       70  net 
       71  alias 
      ...
       75  select * from test where rownum <= 1000000 minus select * from test where rownum <= 999970;
      SQL> 
      

       

      (4) if SQLcl 18.1.1 supports Oracle Wallet, it'll be more perfect.

       

      Very appreciate you if any help.

       

      Best Regards

      Quanwen Zhao