Enumerate Oracle servers via LDAP

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
miwi
Posts: 17
Joined: Thu 27 Jul 2006 10:42

Enumerate Oracle servers via LDAP

Post by miwi » Mon 14 Feb 2011 11:23

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

Shalex
Site Admin
Posts: 8239
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 15 Feb 2011 11:44

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.

miwi
Posts: 17
Joined: Thu 27 Jul 2006 10:42

Post by miwi » Tue 15 Feb 2011 15:16

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

Shalex
Site Admin
Posts: 8239
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 16 Feb 2011 15:36

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.

miwi
Posts: 17
Joined: Thu 27 Jul 2006 10:42

Post by miwi » Thu 17 Feb 2011 10:57

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

Post Reply