4 Replies Latest reply on Dec 17, 2018 10:35 PM by hwsbry

    SQLcl and integrated Windows authentication

    hwsbry

      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,

        • 1. Re: SQLcl and integrated Windows authentication
          Gaz in Oz

          Please read these two threads,.

          What is the purpose of the "SET WALLET" parameter?

          and

          Re: sqlcl mkstore and tns question

          For example:

          F:\>sql /@jdbc:oracle:oci8:@mydb
          • 2. Re: SQLcl and integrated Windows authentication
            hwsbry

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

            • 3. Re: SQLcl and integrated Windows authentication
              Gaz in Oz

              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 /@<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.

              • 4. Re: SQLcl and integrated Windows authentication
                hwsbry

                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.