Walter (Customer Support Representative) November 09, 2010 19:05

Auto-discovery of network databases in DataGlass

DataGlass is able to automatically discover instances of database servers on the local network and show their information as a connection template in the "New Connection" screen. For Sybase ASE and Microsoft SQL Server, this discovery uses their built-in network advertising features and is automatic. Other databases, however, do not provide any network auto-discovery mechanism, which means that user has know and enter the correct hostname (as well as username and password). This can be tedious and error-prone, especially on the software keyboard of a small iOS device.

Fortunately, DataGlass is also able to query network "zeroconf" (known in Apple parlance as "Bonjour") services for information about databases, which it will use to populate the "New Connection" list. DataGlass will check for the local "_dataglass-DATABASENAME._tcp." name for this information. For example, using the "dns-sd" program (included by default on OS X, but requiring you to install Bonjour on Windows from, you can register a local PostgreSQL server using the following command line in (Mac) or cmd.exe (Windows):

dns-sd -R "My PostgreSQL Server" _dataglass-postgresql._tcp. local 5432 Host= Name=dellstore2

The anatomy of the command is as follows:

  1. "My PostgreSQL Server": the title you want to appear next to the database. This will be pre-filled as the database's description

  2. _dataglass-postgresql._tcp.: the service name of the database that DataGlass will search for from the iOS device

  3. 5432: the port number the database is running on. This is optional if your database is running on the default port.

  4. Host= the host name or IP address the database server is running on. If omitted, the host where the mDNS service advertisement is running from will be assumed to be the database host.

  5. Name=dellstore2: the name to pre-fill into the database name of the connection. Some databases (like PostgreSQL) require this. For Oracle, this will be the database's SID.

  6. Username=xxx: the name to pre-fill into the username for the database. This is useful if many people will be sharing the same username (e.g., for report designers).

The equivalent command when using the "avahi" Zeroconf implementation:

avahi-publish-service -s "My PostgreSQL Server 2" _dataglass-postgresql._tcp. 5432 Host= Name=dellstore2

1 person likes
this idea