21 The Salesforce Driver : Configuring the SQL Engine Server

Configuring the SQL Engine Server
Some applications may experience problems loading the JVM required for the SQL engine because the process exceeds the available heap space. If your application experiences problems loading the JVM, you can configure the Salesforce driver to operate in server mode.
By default, the Salesforce driver operates in direct mode, with the SQL engine and JVM running in a single 32-bit process within the same JVM. In server mode, the driver's SQL engine runs in a separate 32-bit process with its own JVM instead of trying to load the SQL engine and JVM in the same process used by the driver.
NOTE: You must be an administrator to start or stop the service, or to configure any settings for the service.
Configuring Server Mode
1
Set the SQL Engine Mode connection property to a value of 1 - Server. All fields on the SQL Engine tab become readonly, and the Edit Server Settings button appears.
2
Click Edit Server Setting to display the ODBC Salesforce SQL Engine Service Setup dialog box. Use this dialog box to define settings for Server Mode and to start and stop the Progress DataDirect Salesforce SQL Engine service.
The SQL Engine Service Setup dialog box appears.
The SQL Engine Service dialog of the ODBC Salesforce Driver Setup dialog box
JVM Arguments: A string that contains the arguments that are passed to the JVM that the driver is starting. The location of the JVM must be specified on your PATH. See JVM Arguments.
JVM Class Path: Specifies the CLASSPATH for the JVM used by the driver. See JVM Classpath.
Proxy Host: Specifies the Hostname and possibly the Domain of the Proxy Server. See Proxy Host.
Proxy Port: Specifies the port needed to connect to the Proxy Server. See Proxy Port.
Proxy User: Specifies the user name needed to connect to the Proxy Server. See Proxy User.
Proxy Password: Specifies the password needed to connect to the Proxy Server. See Proxy Password.
Server Port Number: Specifies a valid port on which the SQL engine listens for requests from the driver. By default, the server listens on port 19928. See Server Port Number for more information.
Java Path: Specifies fully qualified path to the J2SE 5 or higher JVM executable that you want to use to run the SQL Engine Server. The path must not contain double quotation marks.
Server DB Directory: Specifies the path of the working directory for the SQL engine service to use to store the newly created database files or locate the existing database files. If the Database connection option contains a file name prefix, the user’s local database is created at the path specified by Server DB Directory. However, if the Database connection option contains a fully qualified path, the user’s local database is created using that path; the path specified by Server DB Directory is ignored.
Services: Shows the Salesforce ODBC SQL engine service that runs as a separate process instead of being loaded within the process of an ODBC application.
Start (Stop): Starts or stops the Salesforce service. A message window is displayed, confirming that the Salesforce service was started or stopped.
Apply: Applies the changes.
3
4
Click OK to save the changes and return to the SQL Engine tab or click Cancel.
Starting the SQL Engine Server
In server mode, you must start the SQL engine server before using the driver. Before starting the SQL engine server, choose a directory to store the local database files. Make sure that you have the correct permissions to write to this directory.
By default, the JVM Classpath is set to the sforce.jar file in the installation directory.
To start the SQL engine server:
1
2
User DSN: If you are configuring an existing user data source, select the data source name and click Configure to display the driver Setup dialog box.
If you are configuring a new user data source, click Add to display a list of installed drivers. Select the driver and click Finish to display the driver Setup dialog box.
System DSN: If you are configuring an existing system data source, select the data source name and click Configure to display the driver Setup dialog box.
If you are configuring a new system data source, click Add to display a list of installed drivers. Select the driver and click Finish to display the driver Setup dialog box.
File DSN: If you are configuring an existing file data source, select the data source file and click Configure to display the driver Setup dialog box.
If you are configuring a new file data source, click Add to display a list of installed drivers; then, select a driver. Click Advanced if you want to specify attributes; otherwise, click Next to proceed. Specify a name for the data source and click Next. Verify the data source information; then, click Finish to display the driver Setup dialog box.
3
On the ODBC Salesforce Driver Setup dialog box, select the SQL Engine tab; then, select 1- Server from the SQL Engine Mode drop-down list.
4
Click Edit Server Settings.
5
6
Verify that Progress DataDirect Salesforce SQL Engine is selected in the Services drop-down list, and then, click Start to start the service. A message window appears to confirm that the service is running. Click OK.
7
Click OK to close the ODBC Salesforce SQL Engine Service Setup dialog box.
NOTE: If you made changes after starting the service, a message window is displayed:
Exit without restarting message window for the SQL Engine Service dialog
If you want the service to run with the new settings, click No. Then, click Stop to stop the service, and then click Start to restart the service. Then, click OK to close the ODBC Salesforce SQL Engine Service Setup dialog box.
Stopping the SQL Engine Server
1
2
Select 1- Server from the SQL Engine Mode drop-down list. Then, click Edit Server Settings.
3
Click Stop to stop the service. A message window appears to confirm that the service is stopped. Click OK.
4
Click OK to close the ODBC Salesforce SQL Engine Service Setup dialog box.
Configuring Java Logging for the SQL Engine Server
Java logging can be configured by placing a logging configuration file named ddlogging.properties in the Server DB directory (see “Configuring Server Mode” for information on configuring Server DB Directory). The simple way to create one of these is to make a copy of the ddlogging.properties file, which is located in your driver installation directory, in the install_dir/Sample/Example subdirectory. For more information on logging in Salesforce, refer to “Logging (Salesforce Driver)” in Chapter 1 of the in the DataDirect Connect Series for ODBC Troubleshooting Guide.