Forum Stats

  • 3,740,564 Users
  • 2,248,273 Discussions
  • 7,861,327 Comments

Discussions

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

Serg C
Serg C Member Posts: 3 Red Ribbon
edited Jan 15, 2020 8:44PM in SQLcl

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

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,777 Bronze Crown
    edited Jan 15, 2020 8:44PM

    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,XENIX2,XE3,XEWIN4,IBM105,ora12c6,ora12cr2SQL>

    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.

Sign In or Register to comment.