Page 1 of 1

Enumerate Oracle servers via LDAP

Posted: Mon 14 Feb 2011 11:23
by miwi
Hi all,

does anyone here have an idea how to obtain a list of Oracle Database descriptors from LDAP, just like TOAD does in the New Connection dialog?

miwi

Posted: Tue 15 Feb 2011 11:44
by Shalex
Please try the following:
Server Explorer > Connect to Database > Oracle Database (dotConnect for Oracle) --> there are database descriptors in the Server combobox on the Add Connection form.

Design-time features (DDEX), including component editors and property editors, are not available in Express Edition: http://www.devart.com/dotconnect/oracle/editions.html.

Posted: Tue 15 Feb 2011 15:16
by miwi
Shalex wrote:Please try the following:
Server Explorer > Connect to Database > Oracle Database (dotConnect for Oracle) --> there are database descriptors in the Server combobox on the Add Connection form.
Uhm, sorry for the inaccuracy, but what I meant was how to get such a list at runtime.

In my product here, the customer is able to select a database connection to read (import) data from. This works for connections in tnsnames.ora, but we want to support LDAP, too.

miwi

Posted: Wed 16 Feb 2011 15:36
by Shalex
1. You can obtain a list of Oracle Database descriptors from all tnsnames.ora files in runtime using the OracleConnection.Homes property and the OracleDataSourceEnumerator.GetDataSources() method:

Code: Select all

            OracleHomeCollection homes = OracleConnection.Homes;
            foreach (OracleHome h in homes) {
                Console.WriteLine("=== Home={0} ===", h.Name);
                OracleDataSourceEnumerator en = new OracleDataSourceEnumerator();
                DataTable tbl = en.GetDataSources(h.Name);
                foreach (DataRow row in tbl.Rows) {
                    Console.WriteLine(row["InstanceName"]);
                }
            }
2. dotConnect for Oracle does not support LDAP. We will investigate the possibility of implementing this feature and post here the results. But we can not provide any timeframe at the moment.

Posted: Thu 17 Feb 2011 10:57
by miwi
Shalex wrote:dotConnect for Oracle does not support LDAP. We will investigate the possibility of implementing this feature and post here the results. But we can not provide any timeframe at the moment.
Thanks for this information. So I'll try myself. ;-)

miwi