Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLcl takes almost 2 minutes to connect to remote database

MassimoBAug 16 2017 — edited Mar 14 2018

I just installed SQLcl on a Linux server and when I try to connect to remote databases in our network, it takes about 2 minutes.

After that, SQLcl's response times are OK.

Here are the details of my environment:

Client machine:

OS: Cent0s

Java: 1.8.0.144_b1

Oracle Instant Client 11g

NOTE: I installed SQLcl in my home directory, since I do not have root privileges.

Remote databases:

Both 11.2.0.4 and 12.0.1.2

The issue happens with all connections methods (EZConnect, TNS_ADMIN, TWO_TASK, conn command).

BTW, I could not test the net alias command, since, when I tried, I got

          SQL> net alias host:1521/database;

          NET-001: Net command not found

Here is the verbose output of the TNS_ADMIN test:

[user@host/bin]$ ./sql -verbose schema/******@database

SQLcl: Release 17.2.0 Production on Wed Aug 16 17:25:00 2017

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

Aug 16, 2017 5:25:00 PM oracle.dbtools.versions.CheckForUpdates getBanner

INFO: /home/user/.sqlcl/banner.ser (No such file or directory) at java.io.FileInputStream.open0(Native Method)

java.io.FileNotFoundException: /home/user/.sqlcl/banner.ser (No such file or directory)

        at java.io.FileInputStream.open0(Native Method)

        at java.io.FileInputStream.open(FileInputStream.java:195)

        at java.io.FileInputStream.<init>(FileInputStream.java:138)

        at java.io.FileInputStream.<init>(FileInputStream.java:93)

        at oracle.dbtools.versions.CheckForUpdates.getBanner(CheckForUpdates.java:429)

        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleUpdates(SqlCli.java:509)

        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:465)

Aug 16, 2017 5:25:00 PM oracle.dbtools.raptor.utils.TNSHelper checkForTns

INFO: Checking for tnsnames.* in :/home/user

Aug 16, 2017 5:25:00 PM oracle.dbtools.raptor.utils.TNSHelper checkForTns

INFO: Checking for tnsnames.* in :/etc

Aug 16, 2017 5:25:00 PM oracle.dbtools.raptor.utils.TNSHelper checkForTns

INFO: Checking for tnsnames.* in :/usr/lib/oracle/11.2/client64/network/admin

Aug 16, 2017 5:25:00 PM oracle.dbtools.raptor.utils.TNSHelper getTNSEntries

INFO: Using TNS info from :/usr/lib/oracle/11.2/client64/network/admin

Aug 16, 2017 5:25:01 PM oracle.dbtools.raptor.newscriptrunner.SQLPLUS logConnectionURL

INFO: Attempting to connect using URL= "jdbc:oracle:thin:@(DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))    )    (CONNECT_DATA =      (SID = database)    )  )"

Aug 16, 2017 5:25:01 PM oracle.dbtools.jdbc.util.LogUtil log

INFO: oracle.dbtools.jdbc.orest.Driver:<clinit>:27:No Message

Aug 16, 2017 5:25:01 PM oracle.dbtools.jdbc.util.LogUtil log

INFO: oracle.dbtools.jdbc.orest.Driver:<clinit>:34::ORest driver loaded

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Aug 16, 2017 5:27:19 PM oracle.dbtools.raptor.scriptrunner.commands.NLSLANGListener runOnConnect

INFO: NLS_LANG is set: AMERICAN_AMERICA.AL32UTF8

Aug 16, 2017 5:27:19 PM oracle.dbtools.raptor.scriptrunner.commands.NLSLANGListener runOnConnect

INFO: LANG is set: AMERICAN

Aug 16, 2017 5:27:19 PM oracle.dbtools.raptor.scriptrunner.commands.NLSLANGListener runOnConnect

INFO: TERR is set: AMERICA true

Aug 16, 2017 5:27:19 PM oracle.dbtools.raptor.scriptrunner.commands.NLSLANGListener runOnConnect

INFO: ENCO is set: AL32UTF8

SQL>

As you can see from it loaded the ORest driver at 5:25:01 PM, then it hang  until about 5:27:19 PM when i finally got the SQL prompt.

I do not have any problem in sqlplus.

Could you think of any reason for this delay?

Does SQLcl require Instant client 12c?

Should SQLcl be installed by root?

Thanks,

Massimo

PS: BTW, backspace and delete do not seem to work (they actually delete the characters, but I do not see the changes... anyone else with this other issue?

Comments

muvvas
try to run devfsadm -v

and check volfs is running or not

svcs -l volfs
user9368043
Thanks for your answer.

Running

su
devfsadm -v

gives an empty response.

Running

svcs -l volfs

gives the following output:

Pattern 'volfs' does not match any instances.

Furthure help would be appreciated.

Thanks,
Dusan R.
muvvas
Hi,

have u added the usb controller to the solaris vm

if not vm--->setting--->hardware--->add usbcontroller

next add removable usb device to soalris vm

vm--->removeable devices--->usb connect

on soalris 11 vm check the services

root@solaris11:~# svcs hotplug rmvolmgr
STATE STIME FMRI
online 5:03:49 svc:/system/hotplug:default
online 5:30:10 svc:/system/filesystem/rmvolmgr:default

try to restart the service ,then you can see the dmesg like this

Sep 28 05:39:16 solaris11 usba: [ID 349649 kern.info] JMicron USB to ATA/ATAPI bridge 100323B40017
Sep 28 05:39:16 solaris11 genunix: [ID 936769 kern.info] scsa2usb0 is /pci@0,0/pci15ad,790@11/pci15ad,770@3/storage@1
Sep 28 05:39:16 solaris11 genunix: [ID 408114 kern.info] /pci@0,0/pci15ad,790@11/pci15ad,770@3/storage@1 (scsa2usb0) online
Sep 28 05:39:17 solaris11 pcplusmp: [ID 805372 kern.info] pcplusmp: ide (ata) instance 0 irq 0xe vector 0x44 ioapic 0x2 intin 0xe is bound to cpu 1
Sep 28 05:39:18 solaris11 scsi: [ID 583861 kern.info] sd2 at scsa2usb0: target 0 lun 0
Sep 28 05:39:18 solaris11 genunix: [ID 936769 kern.info] sd2 is /pci@0,0/pci15ad,790@11/pci15ad,770@3/storage@1/disk@0,0
Sep 28 05:39:20 solaris11 genunix: [ID 408114 kern.info] /pci@0,0/pci15ad,790@11/pci15ad,770@3/storage@1/disk@0,0 (sd2) online

even you can confirm from

if its FAT file system no need of additional drives if its ntfs you need to install packages

FSWpart.tar.gz FSWfsmisc.tar.gz

run volcheck command ,
rmmount -l
then is will appear under /media/
if it not mount manually
check the disk in

echo|format

mount -F pcfs /dev/dsk/cxtxdxp0:c /mnt

refer:::
https://blogs.oracle.com/mandalika/entry/mounting_windows_ntfs_on_open
http://docs.oracle.com/cd/E19963-01/html/821-1459/devusbtasks-12.html
1 - 3

Post Details

Added on Aug 16 2017
5 comments
2,660 views