SDSQL was our first name for SQLcl. This Early Adopter preview release went to to become production ready, and used by customers for 6 years and counting! Go here to catch up on what we’ve done with SQLcl since 2014.

Instead of talking about or teasing some of the cool new features of SDSQL…

Wait, what is SDSQL?

…I thought I would start with the basics. Like:

  • How to install it (on Windows)
  • How to connect to Oracle Database

If you want to see about the ‘cool new features’, then please go read up at Kris and Barry’s blogs.

Installing SDSQL

First of all, this is an early, early EA1 ‘release.’ We’re not even formally accepting bug reports on the forums, yet. But we wanted to get it out there.

We have quite the list of bugs we’re working through now, and we’re still adding new features every day. The only place you’ll hear about it are on blogs like this and maybe Twitter. But, if you wanna go play with it RIGHT NOW, then read on!

You can find it on the SQL Developer 4.1 Early Adopter Download page.

Just a zip...
Just a zip…

So open the archive and extract it somewhere.

I've seen issues with directory names with spaces in them, so avoid...for now
I’ve seen issues with directory names with spaces in them, so avoid…for now

It’s installed!

But wait, what are the requirements to run this?

You need a Java 7 JRE. And that’s about it. We’ll look for Java on the machine’s PATH. If we’re not finding it, you can edit the .BAT file to explicitly tell us where it is.

No JDK, because there’s no debugger. If you want a debugger, then you’re back in IDE/GUI land (SQL Developer.)

No Oracle Client, unless you need it for OCI-required authentication schemes. To force the thick client, launch sdsql with a -oci flag.

We haven’t built out the full support for ldap, kerberos, etc…YET.

Connect!

We support EZCONNECT syntax.

I'm not including the password on the connect string, you'll see why in a second
I’m not including the password on the connect string, you’ll see why in a second

And, I’m in!

Read to rock 'n' roll!
Read to rock ‘n’ roll!

But in, where?

command: show jdbc
command: show jdbc

But I want to use TNS!
Ok.

If we can find the TNSNAMES.ORA file, we'll use it.
If we can find the TNSNAMES.ORA file, we’ll use it.

Can’t find it?

You can see where we’re looking. Just run with this flag, ‘-optl (OPTional Logging)

Running again with the flag, after putting in the database ‘name,’ I can see where we’re looking for it.

[text]
Username? (”?) sqldevdemo
Password? (**********?) ******
Database? (”?) DevDay12PDB
Dec 17, 2014 11:50:25 AM oracle.dbtools.raptor.utils.TNSHelper checkForTns
INFO: Checking for tnsnames.* in :C:\Users\jdsmith
Dec 17, 2014 11:50:25 AM oracle.dbtools.raptor.utils.TNSHelper getTNSEntries
INFO: Using TNS info from :C:\Users\jdsmith
Dec 17, 2014 11:50:25 AM oracle.dbtools.raptor.newscriptrunner.SQLPLUS logConnectionURL
INFO: Attempting to connect using URL= “jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = PDB1) ))”
Dec 17, 2014 11:50:26 AM oracle.dbtools.raptor.utils.TNSHelper checkForTns
INFO: Checking for tnsnames.* in :C:\Users\jdsmith
Dec 17, 2014 11:50:26 AM oracle.dbtools.raptor.newscriptrunner.SQLPLUS logConnectionURL
INFO: Attempting to connect using URL= “jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = PDB1) ))”
Connected to:
[/text]

I have my TNSNAMES.ORA file in my $HOME directory, so I was ready to go right away.

But I’m Lazy!

I’ve got a shell script to kick off sdsql for me. And I have a login.sql to make me a nicer prompt. Just be sure to drop them into the same directory. I put mine in the root install folder.

My startup script:
bin\sdsql sqldevdemo@//localhost:1521/pdb1

My login.sql:
set sqlprompt “_user ‘@’ _connect_identifier >”

And running now:

Prompt set by my login.sql script
Prompt set by my login.sql script

What to play with?

There are some new commands…

The new commands are highlighted...
The new commands are highlighted…

And don’t forget to setup an RSS feed on Kris and Barry’s blogs 🙂

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

42 Comments

  1. Hello !

    SQLCL is exactly what I need, but I’ve a big difficulty on one little thing :

    I want to make a script (batch file) with Auto connection and just after an EXPORT CSV.

    So I’ve used the pipe method :

    SPOOL C:\temp\oracle\export.csv SET SQLFORMAT CSV SELECT SYSDATE FROM DUAL; SPOOL OFF; | C:\Work\Soft\sqlcl\bin\sql.exe login/[email protected]:1521/DB.SCH

    But it’s not working :

    ” is not recognized as an internal or external command.

    Impossible to execute my SQL command just after an auto logon connection with batch file.

    Do you know why ?

    • UPDATE THE ERROR :

      Batch file SCRIPT :
      echo SPOOL export.csv < echo SELECT COUNT(*) FROM ARTICLE; < echo SPOOL OFF | C:\Work\Soft\sqlcl\bin\sql.exe login/[email protected]:1521/DB.SCH

      With this error :

      SP2-0768: Illegal SPOOL command Usage: SPOOL { | OFF | OUT } where is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]

  2. Jeff,
    Would you show example for connection with Kerberos authentication (OID):

    sqlplus /@myorcl

    SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 9 13:33:45 2017

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

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
    With the Partitioning, Real Application Clusters and Automatic Storage Managemen
    t options

    SQL> show user
    USER is “OVD_GLOBAL_USER”
    SQL>
    +++++++++++++++++++
    I was trying this syntax with the latest SQLcl and it does NOT work for me.

    • This is the answer on Jeff’s question: what happens when I try to use SQLcl with Kerberos authentication:
      +++++++++++++++++
      C:\Windows\system32>cd C:\temp\sqlcl\bin

      C:\temp\sqlcl\bin>sql /@ddsi

      SQLcl: Release 4.2.0 Production on Thu Jul 13 08:16:14 2017

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

      USER =
      URL = jdbc:oracle:oci8:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP
      )(HOST = scanddsic2.wellsfargo.com)(PORT = 1522)) (CONNECT_DATA = (SERVE
      R = DEDICATED) (SERVICE_NAME = DDSI) ) )
      Error Message = no ocijdbc12 in java.library.path
      USER =
      URL = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP
      )(HOST = scanddsic2.wellsfargo.com)(PORT = 1522)) (CONNECT_DATA = (SERVE
      R = DEDICATED) (SERVICE_NAME = DDSI) ) )
      Error Message = ORA-01017: invalid username/password; logon denied
      Username? (RETRYING) (‘/@ddsi’?)
      +++++++++++++++++++++++++++++++
      +++++++++++++++++++++++++++++++
      And here is exactly the same connection with old-fashion SQL*Plus:

      C:\temp\sqlcl\bin>
      C:\temp\sqlcl\bin>sqlplus /@ddsi

      SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 13 08:19:13 2017

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

      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
      With the Partitioning, Real Application Clusters and Automatic Storage Managemen
      t options

      SQL> show user
      USER is “OVD_GLOBAL_USER”
      SQL>

    • the very first thing is telling you we can’t load up a thick driver (your oracle client, so we have to back down to a thin connection). That’s why SQL*Plus is working and SQLcl is not.

      One of our developers wrote this up that might help.

    • Thank you, Jeff.
      I’ve read the web post by Turloch O’Tierney which you recommended.
      My comment would be non-technical.
      From the standpoint of getting more and more people using SQLcl instead of old-fashion SQL*Plus, it would be very helpful to have your team show us “ready-to-go” solution.
      Having people change life-long habits is a challenge on its own. But if we have to deal with additional troubleshooting steps, then very few people would be willing to even consider switching to SQLcl.
      … just one dba opinion.
      Kerberos authentication is becoming commonly used corporate approach.

    • It should be ‘good to go’ now. Something is wrong, SQLcl can’t load the Oracle client – what version of SQL*Plus/Oracle Client do you have on your machine? Is it an instant client or full client? 32 or 64 bit?

    • This is my answer on Jeff’s question about my version of Oracle Client (this is part of discussion why SQLcl returns error message in case of Kerberos authentication):
      – >sqlplus /nolog

      SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 14 11:05:40 2017

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

      +++++++++++++++++++++
      I think my Oracle Client is 32 bit because I only have LIB directory and i do not see LIB32 and LIB64.
      But I am still checking if this is 32 bit client for sure. The problem is that under corporate rules, none of us individually install any oracle software b/c we do not have local admin rights. We send a request for oracle client installation and it is being installed remotely by another group. So we do not know for sure what was approved for current installation (32 bit or 64 bit). In terms of OS we are all running 64-bit Win7 Enterprise.

    • yeah you can’t load a 32 bit client driver to a 64 bit JVM, so if sqlcl is running with java 8 64 bit jdk, the client libraries won’t be available

      also you’ll want to make sure you have a 11203/11204 client as sqlcl ships with a 12cR2 jdbc driver and needs at least that

    • Jeff, sorry, i have to post a correction: I am running 64-bit Oracle Client.
      This has become clear after verification of the process in Windows Task Manager: i am running process “sqlplus.exe” which indicates that this is 64 bit client.
      *** In case of 32-bit client, i would have “sqlplus32.exe”.

    • Ok so next would be to get a newer client and get sqlplus kerberos going on that and then have sqlcl use THAT client – and you should be good to go

  3. I am having an issue using SQLCL version 4.2. When I login to a database where the password expiry warning started to alert that password will expire in days, I get below exception:

    Username? (”?) zaheerf@intlegypt
    Password? (**********?) **********
    ERROR:
    ORA-28002: the password will expire within 7 days

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    Nov 23, 2016 8:39:25 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run
    SEVERE: oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1387)
    java.lang.ArithmeticException: / by zero
    at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1387)
    at oracle.jdbc.driver.T2CPreparedStatement.(T2CPreparedStatement.java:109)
    at oracle.jdbc.driver.T2CDriverExtension.allocatePreparedStatement(T2CDriverExtension.java:81)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatementInternal(PhysicalConnection.java:2013)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:1960)
    at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:57)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:1866)
    at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:57)
    at oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery(SQL.java:486)
    at oracle.dbtools.raptor.newscriptrunner.SQL.run(SQL.java:62)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL(ScriptRunner.java:364)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:218)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runLoginSQLFile(SQLPLUS.java:2772)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runGLoginSQL(SQLPLUS.java:2699)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runConnect(SQLPLUS.java:2512)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:205)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQLPLUS(ScriptRunner.java:380)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:244)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:771)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:414)

    Nov 23, 2016 8:39:25 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run
    SEVERE: oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1387)
    java.lang.ArithmeticException: / by zero
    at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1387)
    at oracle.jdbc.driver.T2CPreparedStatement.(T2CPreparedStatement.java:109)
    at oracle.jdbc.driver.T2CDriverExtension.allocatePreparedStatement(T2CDriverExtension.java:81)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatementInternal(PhysicalConnection.java:2013)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:1960)
    at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:57)
    at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:1866)
    at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:57)
    at oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery(SQL.java:486)
    at oracle.dbtools.raptor.newscriptrunner.SQL.run(SQL.java:62)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL(ScriptRunner.java:364)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:218)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runLoginSQLFile(SQLPLUS.java:2772)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runGLoginSQL(SQLPLUS.java:2699)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runConnect(SQLPLUS.java:2512)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:205)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQLPLUS(ScriptRunner.java:380)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:244)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:331)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:221)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:771)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:414)

    While same works fine in SQL* Plus, is there a work around for this?

  4. Hi Jeff,

    Thank you for putting together a command line tool. The spool tool has been very valuable in SQL *Plus, and it’s great to see that we have that option in the new SQL tool.

    Which forum (url?) should we use for bug reporting?

    Thank you, and please keep up the great work!

    -Ted

  5. Hi Jeff,

    In sqlplus, I can simply do:

    sqlplus user@ldap_service_nm

    Enter password:

    Any thoughts on bringing this simplistic approach to SDSQL?

    Thanks.

  6. Hi,
    is there any tutorial/manual for sqlcl? couse I’cant find any and provided blogs cover only a small part of app’s functionality and configuration

    • there’s the HELP command – we’re working on the official docs and they will be published when the tool is released

    • could you tell some approximate date of this release? is it matter of days, weeks, months?

    • Corp policy dictates that we don’t publish release dates. I can tell you that there won’t be another EA update, that we’re in bug fixing mode, and that the official release is coming soon.

  7. Hi,
    is there any tutorial/manual for sqlcl? couse I’cant find any and provided blogs cover only a small part of app’s functionality and configuration

  8. SYSTEM @ TESTPDB >select * from v$instance;

    Mar 12, 2015 2:50:41 PM oracle.dbtools.raptor.newscriptrunner.ScriptExecutor run
    SEVERE: java.util.Formatter$FormatSpecifier.checkGeneral(Formatter.java:2906)
    java.util.MissingFormatWidthException: -01$s
    at java.util.Formatter$FormatSpecifier.checkGeneral(Formatter.java:2906)
    at java.util.Formatter$FormatSpecifier.(Formatter.java:2680)
    at java.util.Formatter.parse(Formatter.java:2528)
    at java.util.Formatter.format(Formatter.java:2469)
    at java.util.Formatter.format(Formatter.java:2423)
    at java.lang.String.format(String.java:2790)
    at oracle.dbtools.db.SQLPLUSCmdFormatter.justify_left(SQLPLUSCmdFormatter.java:1944)
    at oracle.dbtools.db.SQLPLUSCmdFormatter.font_width_adjustment(SQLPLUSCmdFormatter.java:1939)
    at oracle.dbtools.db.SQLPLUSCmdFormatter.rset2sqlplus(SQLPLUSCmdFormatter.java:965)
    at oracle.dbtools.db.ResultSetFormatter.rset2sqlplus(ResultSetFormatter.java:241)
    at oracle.dbtools.db.ResultSetFormatter.rset2sqlplus(ResultSetFormatter.java:215)
    at oracle.dbtools.db.ResultSetFormatter.formatResults(ResultSetFormatter.java:120)
    at oracle.dbtools.db.ResultSetFormatter.formatResults(ResultSetFormatter.java:61)
    at oracle.dbtools.raptor.newscriptrunner.SQL.processResultSet(SQL.java:497)
    at oracle.dbtools.raptor.newscriptrunner.SQL.executeQuery(SQL.java:421)
    at oracle.dbtools.raptor.newscriptrunner.SQL.run(SQL.java:56)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.runSQL(ScriptRunner.java:280)
    at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:200)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:267)
    at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:180)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:193)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:239)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:661)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:280)

    • Did you set a sqlformat?

      This is working for me.

      I would report any bugs you find to our forums for the best response and resolutions.

    • I just logged in and ran the query. I believe it has something to do with the ‘$’. I’m running on RedHat 6 oracle 12.1.0.2. What forum should I reply to? Can you log in as sysdba or sysasm?

  9. Hi Jeff,
    What should I do if I wan’t to get connected directly without having to enter the password and have it too entered as a part of my batch script.

    Thanks

  10. It was just a simple command of SQL > @{path}{file}, that I was looking for as I’m very new to Oracle.
    This new feature has really been helpful and thanks for sharing all the needed info

  11. This is really great. I was just looking how to automate the execution of an Oracle script which is needed before I run a set of tests and without having to install the SQL Plus. I can now connect to my DB but how can I run my Script.sql (which has all the commands consolidated) using this same command line.

  12. Hi Jeff,
    I’ve been havng a play around and noticed the ‘bridge’ feature which sounds like it might be very useful – however i can’t seem to get it to work.

    I connect up to oracle no problem and I’ve downloaded the jtds jar (1.3.1), set my CLASSPATH to include this jar and then tried to execute the command – i get the following

    sdsql: Release 4.1.0 Beta on Mon Jan 26 16:41:36 2015

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

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

    SQL> BRIDGE table_sqlserver as “jdbc:jtds:sqlserver://myserver:1435/mydb;user=myuser;password=mypassword” (select top 10 id from sysobjects);
    net.sourceforge.jtds.jdbc.Driver
    Jan 26, 2015 4:41:43 PM oracle.dbtools.raptor.newscriptrunner.commands.BridgeTableDef execute
    SEVERE: Issue running BRIDGE command

    ANd that’s it – not much to go on – is there some way to get some more debug/output – i tried the -debug switch but that just seems to output one line and not even connect to oracle.

    Is the bridge code actually working yet? it looks to be very useful.

    Cheers,
    Rich

  13. I get to the SQL> prompt

    and then for select count(*) from ;

    Error starting at line : 1 in command
    user
    Error report –
    Unknown Command

    • When did you try this? Or better, when did you download it? We posted an update before the Christmas Break that should have fixed this issue…

  14. I installed sdsql 4.1.0 Beta on a German Win64. It works fine in general but all characters that need the usage of the AltGR-button on a German keyboard (like @ or \) are not directly available. I have to input ‘Alt 64’ or ‘Alt 92’ to get those symbols.

    • Thanks for the feedback ulrich! I’ll log that, and have already alerted it to the developer.

  15. Roy Niemann Reply

    Works fine on Windows 8 (classic). Will continue experimenting with it.

  16. Jeff,
    When trying to execute sdsql I’m getting a java.lang.NullPointerException. Any thoughts on why?
    Thanks,
    Todd

    Here is what I see.

    c:\sdsql\bin>sdsql -optl myuser/mypwd@mydb

    sdsql: Release 4.1.0 Beta on Wed Dec 17 15:56:25 2014

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

    Dec 17, 2014 3:56:25 PM oracle.dbtools.raptor.utils.TNSHelper checkForTns
    INFO: Checking for tnsnames.* in :C:\Users\tarave
    Dec 17, 2014 3:56:25 PM oracle.dbtools.raptor.utils.TNSHelper getTNSFileContent
    INFO: Checking Registry for ORACLE_HOME
    Dec 17, 2014 3:56:25 PM oracle.dbtools.raptor.utils.TNSHelper getTNSFileContent
    WARNING: oracle.dbtools.raptor.utils.TNSHelper.getTNSFileContent(TNSHelper.java:130)
    java.lang.NullPointerException
    at oracle.dbtools.raptor.utils.TNSHelper.getTNSFileContent(TNSHelper.java:130)
    at oracle.dbtools.raptor.utils.TNSHelper.getTNSEntries(TNSHelper.java:364)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.getConnection(SQLPLUS.java:3367)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runConnect(SQLPLUS.java:1664)
    at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:142)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:536)
    at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:295)

    Dec 17, 2014 3:56:25 PM oracle.dbtools.raptor.newscriptrunner.SQLPLUS logConnectionURL
    INFO: Attempting to connect using URL= “jdbc:oracle:thin:@oaxdev”

    Error starting at line : 0 in command –
    connect myuser/mypwd@mydb
    Error report –
    Connection Failed

    c:\sdsql\bin>

    • Jeff,
      When I added host:port in the connect string I was able to login. I still see the java.lang.NullPointerException error but it does not prevent me from getting in.
      Regards, Todd

      c:\sdsql\bin>sdsql -optl myuser/mypwd@//myhost:1521/mydb

      sdsql: Release 4.1.0 Beta on Wed Dec 17 16:07:22 2014

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

      Dec 17, 2014 4:07:22 PM oracle.dbtools.raptor.utils.TNSHelper checkForTns
      INFO: Checking for tnsnames.* in :C:\Users\tarave
      Dec 17, 2014 4:07:22 PM oracle.dbtools.raptor.utils.TNSHelper getTNSFileContent
      INFO: Checking Registry for ORACLE_HOME
      Dec 17, 2014 4:07:22 PM oracle.dbtools.raptor.utils.TNSHelper getTNSFileContent
      WARNING: oracle.dbtools.raptor.utils.TNSHelper.getTNSFileContent(TNSHelper.java:130)
      java.lang.NullPointerException
      at oracle.dbtools.raptor.utils.TNSHelper.getTNSFileContent(TNSHelper.java:130)
      at oracle.dbtools.raptor.utils.TNSHelper.getTNSEntries(TNSHelper.java:364)
      at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.getConnection(SQLPLUS.java:3367)
      at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.runConnect(SQLPLUS.java:1664)
      at oracle.dbtools.raptor.newscriptrunner.SQLPLUS.run(SQLPLUS.java:142)
      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:536)
      at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:295)

      Dec 17, 2014 4:07:22 PM oracle.dbtools.raptor.newscriptrunner.SQLPLUS logConnectionURL
      INFO: Attempting to connect using URL= “jdbc:oracle:thin:@//myhost:1521/mydb”
      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production

      SQL> select * from sys.dual;
      DUMMY
      —–
      X

      SQL>

    • It looks like there’s something in your tnsnames file that it doesn’t like…I see that you’re in now, but we may want to circle back to this to make sure there’s not a bug.

  17. Hello,
    sdsql works fine on Mac OS X 10.10.1 with Java SE 1.8.0_25.

    –Andy

    • The only thing I had to do there (OS X) was chmod 755 the binary…FWIW, we’ll have a proper ‘install’ package for Mac when this is formally released.

Write A Comment