1 Reply Latest reply on Jan 16, 2020 1:44 AM by Gaz in Oz

    SQLcl: how to list all database services configured in OID context?

    Serg C

      In SQL Developer when configuring LDAP type connection there is a button "Load" available to load database services configured in OID.

      Once loaded a Service name can be chosen from a drop-down list.

      Question, how to get the same list in SQLcl?

      Thank you

        • 1. Re: SQLcl: how to list all database services configured in OID context?
          Gaz in Oz

          If your sqlnet connectivity has been setup for LDAP in the sqlneet.ora file, then it should be as simple as:

          SQL> show tns

          ...

          Available TNS Entries

          ---------------------

          1,XENIX

          2,XE

          3,XEWIN

          4,IBM10

          5,ora12c

          6,ora12cr2

          SQL>

          to get sqlcl to query the ldap server, like it does for tnsnames.ora files when TNSNAMES connectivity is in use. I haven't tried this myself with LDAP connectivity though.

          If that doesn't do it then you could try using "ldapsearch" tool to query the repository. Something like:

          $ ldapsearch -h ldaphost -p 389 -D "cn=orcladmin" -w password -b "cn=OracleContext,dc=company,dc=com" -s base "objectclass=*" orclnetdescstring

          perhaps, using the values from your sqlnet.ora for the connection details, host and port.