## RemoteDB Gateway Version 2.1 ### Overview RemoteDB Gateway is a SHAREWARE program that lets Java and native Windows(TM) applications access ODBC data sources configured on a remote computer. The package consists of a JDBC driver and 16-bit and 32-bit ODBC drivers that communicate with a 32-bit server process running under Windows NT or 95. The server process provides access to the full array of ODBC data sources that have been configured on the server machine. This architecture simplifies the administration of ODBC data sources by limiting administration to the server machine. The architecture is depicted by the following diagram. The RemoteDB Gateway JDBC driver is written using "pure" Java allowing it to run on virtually any platform. Java applications or applets that utilize JDBC for database access can now exploit the capabilities of RemoteDB Gateway to access remote ODBC data sources. In addition, Windows applications that have been designed to work with a particular data source can now access that same data source from a remote computer. It is as simple as configuring a data source on the remote computer to use either the REMOTE16 or REMOTE32 ODBC driver. Only three configuration options are required: 1) a local data source name, 2) the remote host name or IP address of the machine where the RemoteDB Gateway server process is running, and 3) the remote data source name. RemoteDB Gateway Version 2.1 represents a significant improvement over previous versions of the product. In particular, overall performance has increased by a factor of 5 to 10 times based on various intelligent caching techniques employed by both the driver and server. In addition, robustness has improved dramatically over prior versions. Many thanks to our beta test participants in helping to shape the product in its current form. ### RemoteDB Gateway Features 32-bit multithreaded server capable of running on Windows NT/95. JDBC driver fully compliant with JavaSoft JDBC 1.20 specification. 16-bit and 32-bit ODBC drivers capable of running on Windows 3.x/NT/95. Server can optionally be run as a service on Windows NT. Support for ODBC 1.0, 2.x, and 3.x drivers. Various licensing options. ### RemoteDB Gateway Usage Scenarios Consider accessing a single-tier data source (e.g., Microsoft Access, dBase IV, Btrieve, Excel, Text, etc.) across a slow link such as a 14.4 kbps Remote Access Service (RAS) connection. Certain database operations can chew up unecessary bandwidth by performing multiple seeks and reads of the underlying database files. Why pay these enormous performance penalties when you can use RemoteDB Gateway to perform lengthy searches remotely and limit the amount of traffic on the underlying network link? Consider accessing a two-tier data source (e.g., Oracle, Informix, Sybase, Microsoft SQL Server, etc.). Accessing these data sources requires the licensing, installation and configuration of client-side software which provides access to the target data source. Examples include licensing an ODBC driver from a vendor such as Intersolv, installing and configuring SQL*Net to access an Oracle database, installing and configuring Open Client to access a Sybase database, and installing and configuring I-Net to access an Informix database. Why be faced with the daunting challenge of administering each of these components on every client machine when you can use RemoteDB Gateway and limit administration to the server machine? ### Installation RemoteDB Gateway is distributed in a single ZIP file. This archive contains the following files:
| REMOTEDB.HTM | - This file - general information.
| REGISTER.HTM | - Information on registering RemoteDB Gateway.
| DRIVER16\ | - Directory containing setup for 16-bit ODBC driver.
| DRIVER32\ | - Directory containing setup for 32-bit ODBC driver.
| SERVER\ | - Directory containing setup for RemoteDB Gateway server.
3. - The RemoteDB 16-bit ODBC driver can be installed on Windows 3.x, 95, or NT. To install the driver, run the SETUP.EXE program in the DRIVER16\ directory. The RemoteDB 32-bit ODBC driver can be installed on Windows 95 or NT. To install the driver, run the SETUP.EXE program in the DRIVER32\ directory. The RemoteDB Gateway server can be installed on Windows 95 or NT. To install the server, run the SETUP.EXE program in the SERVER\ directory. The setup program copies files onto your hard disk and creates a group icon that allows you to run the server software. Clicking on the icon will bring up a graphical user interface that allows you to monitor current activity on the RemoteDB Gateway server. When the RemoteDB Gateway server is installed for the first time, a license key will automatically be generated that grants the user a 30-day evaluation license to use the software for a single client. To enable additional concurrent clients, the software must be registered and a license must be purchased from the author. Please see the section entitled "Registering RemoteDB Gateway" for further details. When installing the server software on Windows NT, the setup program will provide you with the option of installing the server as an NT service. The default startup type for the service is set to Manual. To make the NT service automatically start when the system boots, you will need to select the Services option in the Control Panel and set the startup type for the RemoteDB Gateway Server service to Automatic. ### Using the RemoteDB Gateway Server The RemoteDB Gateway server will run on Windows NT or 95. The server includes a graphical user interface that allows you to configure the server and view the status of current connections. The graphical user interface can be launched by clicking on the RemoteDB Gateway icon that is created during installation. To configure the RemoteDB Gateway Server, select the "File|Options..." menu item. This brings up a dialog that contains the available program options. These include: Port Number - The TCP port number that the server will listen on for incoming client connections. The default is 1800. License Key - The license key that controls the total number of concurrent client connections. See the file REGISTER.TXT for licensing options. Log Server Activity - A check box that controls logging activity by the server. Check this box to diagnose log any problems that might be occurring at the server. Log Filename - The name of the file to be used for logging. Refresh Delay - The delay (in seconds) between successive status window refreshes. The graphical user interface also permits viewing the status of current connections to the server. The connections are displayed in a list view containing the following columns. Data Source Name - The data source name that is currently being utilized by this client on the server. Remote Host - The IP address of the client's machine. Elapsed Time - The total time that has elapsed during the client's connection to the server. Bytes Rcvd - The total number of bytes received from the client. Bytes Sent - The total number of bytes sent to the client. A specific connection can be terminated by highlighting the connection in the list and selecting the "Disconnect..." menu item from either the "User" menu or the context menu that appears when the right mouse button is held down. ### Using the RemoteDB Gateway ODBC Drivers To have a Windows application remotely connect to an ODBC data source via the RemoteDB Gateway server, two separate ODBC data sources must be configured. First, the appropriate RemoteDB Gateway ODBC driver (16-bit or 32-bit) must be installed and configured on the client machine (i.e., the same computer on which the application is to be run). Second, an ODBC data source must be installed and configured on the server machine (i.e., the computer on which the RemoteDB Gateway server is running). The server's ODBC data source typically uses a third-party ODBC driver provided by a database vendor. To configure the RemoteDB Gateway ODBC driver on the client machine, run the Control Panel application and select the ODBC icon. Follow these steps to configure a new data source. Choose the button labelled "Add..." to bring up a dialog box that allows you to create a new data source. Select the RemoteDB Gateway Driver from the list of available ODBC drivers. This should bring up the RemoteDB Gateway Setup dialog that allows you to configure the driver parameters. Enter the following parameters and click "OK" to complete. Data Source Name - The name of the data source to be used by the Windows application. Description - Arbitrary text that describes the data source. Remote Host Name - A string of the form "host:port" which contains 1) the host name of the computer that is running the RemoteDB Gateway server and 2) an optional port number that specifies the TCP port on which the server is listening for client connections. The port number defaults to 1800 if not specified. If the server is running on the same machine as the client application, specify "localhost" for the host name. Otherwise, specify the host name or the IP address (e.g., 198.98.0.62) of the server machine. Examples of valid entries for this field include the following:
     localhost | - connects to local host port 1800
     localhost:2417 | - connects to local host port 2417
     wizard | - connects to host "wizard" port 1800
     wizard:3712 | - connects to host "wizard" port 3712
     198.98.0.62 | - connects to 198.98.0.62 port 1800
     198.98.0.62:1317 | - connects to 198.98.0.62 port 1317
Remote Data Source - The data source name on the server that will ultimately be used. To configure an ODBC data source on the server machine, run the Control Panel application and select the ODBC icon. Follow these steps to configure a new data source. Choose the button labelled "Add..." to bring up a dialog box that allows you to create a new data source. Select a driver from the list of available ODBC drivers. This should bring up a setup dialog for the selected driver that allows you to configure the driver parameters. Enter the driver parameters and click "OK" to complete. See your ODBC driver vendor's documentation for more information. ### Using the RemoteDB Gateway JDBC Driver The JDBC driver classes are installed as part of the RemoteDB Gateway Server installation. The classes that make up the JDBC driver are part of a Java package named "remotedb". To use the JDBC driver, all of the class files must be physically copied from their installation directory, typically "C:\Program Files\Nogginware\RemoteDB Gateway\java\remotedb", to a directory pointed to by the CLASSPATH environment variable. The main driver class which implements the java.sql.Driver interface is found in the "remotedb.Driver" class. Your Java program must explicitly load this class by executing the following Java statement.
| Class.forName("remotedb.Driver");
This statement will cause the JDBC driver to be registered with the JDBC DriverManager. Once the driver has been loaded, connections can be made to the database by invoking the DriverManager.getConnection() method. The URL that is passed to DriverManager.getConnection() must conform to the following syntax.
| jdbc:remotedb://host[:port]/dsn[/parameter-settings]
Items in square brackets ([]) are optional. In its simplest form, the URL "jdbc:remotedb://marvin/test" instructs the JDBC driver to connect to the RemoteDB Gateway server running on the host "marvin" and use the ODBC data source name "test" that has been configured on that server. If a port is not specified, it is assumed to be port 1800. In the more complex form, it is possible to set various parameters that are associated with the target ODBC data source. For example, the URL "jdbc:remotedb://wizard:2371/accounting/TIMEOUT=30" will instruct the JDBC driver to connect to the host "wizard" at port 2371, use the ODBC data source name "accounting", and pass the parameter "TIMEOUT=30" to the specified data source. An abbreviated example of the statements needed to connect to a database is presented below.
| String url = "jdbc:remotedb://localhost/test";
| String username = "my-username";
| String password = "my-password";
| Class.forName("remotedb.Driver");
| Connection c = DriverManager.getConnection(url, username, password);
The "C:\Program Files\Nogginware\RemoteDB Gateway\java\samples" directory contains sample code for the following two Java applications.
| ConnectTest | - Attempts a connection to a specified URL.
| SimpleTest | - Connects to a database and issues simple statements.
These samples demonstrate the use of JDBC and, more importantly, how connections to the RemoteDB Gateway server are made. They can also be used to test whether or not the software has been properly installed. ### Distribution RemoteDB Gateway may be freely distributed with the following conditions: All files in the ZIP file should be included in distributions The software must be identified as SHAREWARE in any distribution ### Registering RemoteDB Gateway Please complete the form found in the file REGISTER.HTM and mail the completed form along with payment directly to Nogginware Corporation at the address listed in the following paragraph. ### Contacting Nogginware Address questions, problems, or praise to:
E-mail: |  | nogginware@aol.com
U.S. mail: |  | Nogginware Corporation 2506 Branding Iron Ct. Herndon, VA 20171
(c) 1998 Nogginware Corporation. All rights reserved.