Forum Stats

  • 3,727,533 Users
  • 2,245,406 Discussions
  • 7,852,848 Comments

Discussions

SQLcl and integrated Windows authentication

hwsbry
hwsbry Member Posts: 9 Blue Ribbon
edited December 2018 in SQLcl

Is it possible to configure SQLcl to use integrated Windows authentication?

Ihave some DBs with everything configured properly and I can login with sqlplus with the following

> sqlplus /@<TNS_ENTRY>

with no issues.

SQLcl works fine for standard DB user login to the same server but if I issue

> sql /@<TNS_ENTRY>

I get back the following error string:

USER          =

  URL           = jdbc:oracle:oci8:@<TNS_ENTRY>

  Error Message = no ocijdbc18 in java.library.path

  USER          =

  URL           = jdbc:oracle:thin:@(DESCRIPTION =     (ADDRESS =       (PROTOCOL = TCP)      (HOST = <HOST>)      (PORT = 1521)    )    (CONNECT_DATA =       (SERVICE_NAME = <SERVICE>)    )  )

  Error Message = ORA-01017: invalid username/password; logon denied

Any insight, comments or configuration suggestions would be appreciated. Thanks,

Justin Warwick

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,774 Bronze Crown
    edited November 2018

    Please read these two threads,.

    and

    For example:

    F:\>sql /@jdbc:oracle:oci8:@mydb
  • hwsbry
    hwsbry Member Posts: 9 Blue Ribbon
    edited November 2018

    Thanks, I'll take a look and see if that helps out.

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,774 Bronze Crown
    edited November 2018
    hwsbry wrote:Is it possible to configure SQLcl to use integrated Windows authentication? Ihave some DBs with everything configured properly and I can login with sqlplus with the following

    Re-reading this, it would be very helpful if you supplied answers to the following:

    . What do you actually mean by "integrated Windows authentication"?

    . How have you configured the users? Please show your setup of a user.

    . What Oracle documentation, specificallly, did you follow to get "everything configured properly"?

    . What is your database version, to 4 significant digits ("select * from v$version;")?

    . What is the output of:

    > sql -verbose /@&lt;TNS_ENTRY>

    The error you are getting looks like it is due to sqlcl not being able to find the Oracle OCI libraries required for OS authentication.

    Make sure OCI libraries are accessible from sqlcl.

  • hwsbry
    hwsbry Member Posts: 9 Blue Ribbon
    edited December 2018

    Thanks for trying to help out Gaz. I'll just say that it turned out that the issue lay with my command line of choice and not any of my configurations. I'm currently using MobaXterm for pretty much all of my command line interactions and it turned out that my issue lay in the fact that the session I built for SQLcl did not retain the Windows PATH environment. I will try to answer your questions in case something similar occurs for other users though.

    • To me, integrated Windows authentication, IWA, means that I can pass my Windows login to the Oracle database and be authenticated.
    • User is configured
    • Used the Oracle 12.2 DB security guide. Specifically the section for configuring Kerberos authentication.
    • 12.2.0.1
    • I won't go into the verbose output as everything is working.

    Thanks again for your help and I think your final consensus that the OCI libraries is supported by the fact that I do indeed have a traditional client install with the bin in my PATH and once I configured MobaXterm to pay attention to that everything works as expected.

  • Salim CHERIF
    Salim CHERIF Member Posts: 1 Blue Ribbon

    What you call Windows authentication is called OS Authentication in Oracle. It does work with sqlplus but in SQLcl it is not possible to use OS Authentication.

    Instead you should try to use Wallet authentication with SQLcl. Here is an example:


Sign In or Register to comment.