Database Solutions - Hints & Tips

Tip 26:
Multiple Databases on Solid

The Problem

The Solid Database is a low footprint SQL compliant database, that works well with UNIFACE and is ideal for storing the UNIFACE repository and any data. However, if you use the default options, when you try to run multiple databases, you receive an error (See Figure 1 & 2). So what would you do if you had several UNIFACE development environments, each with their own database and you wanted to compare them? 

tip26img01.gif (1742 bytes)
Figure 1: Solid Server Error

Eventually followed by:

tip26img02.gif (2471 bytes)
Figure 2: Final Solid Server Error

The Solution

When UNIFACE communicates with the solid database, it uses the shared memory protocol, i.e. the database (the solid server) and the client application (UNIFACE) are running on the same physical machine. This shared memory protocol is referenced using shm or shmem. Obviously you will need shortcuts or icons for each of the solid databases (See Figure 3). These icons will have a start-in directory which relates to where the solid.db file is located. This subdirectory is also the location of the solid.ini file.

tip26img03.gif (5385 bytes)
Figure 3: Icon Properties

[COM] Section

This section specifies the name under which UNIFACE will listen for requests. By default this name is SOLID. If you try to start two databases each trying to listen under the same name, then you will get a conflict and this is why you must change the name in the ini file. E.g.

[Com]

;Solid server is listening for calls to 'shm DEV_DB' to connect

Listen=shm DEV_DB

[RCON] Section

This section determines the defaults to be used by the Solid Remote Control application. When you start the remote control application it will provide a list of database connections. These database connections are stored in the ini file.

[RCON]

ServerDef_1=shm DEV_DB,DEFAULT

[sql editor]

Similarly, this section provides information for the SQL editor. DSN stands for default server name, so by providing a connection here you save having to select connect from the menu and retype the same details every time.

[sql editor]

dsn=shm DEV_DB

autoconnect=no

Note that if you have multiple databases running you can use the -n ‘Database Name’ option from the command line of the start up of the solid database. This name will then be displayed in the Windows 95 task bar, (see Figure 4) so that you can differentiate between the various servers you have running. You can also right click and select Info to display the name of the connection under which it is listening.

tip26img04.gif (2390 bytes)
Figure 4: Windows 95 Task Bar

tip26img05.gif (4030 bytes)
Figure 5: Solid Server Info display

The ini file has many configuration settings. A full list is available from the Administrator’s Guide aguide.hlp file provided with Solid. Under the topic ‘About Configuration Parameters’.

compuware_01.gif (3977 bytes)


Copyright ©2000 OCS Consulting plc

dbs_block_logo.gif (2150 bytes)
Refresh Frames