Setting Up a Gateway Configuration
As explained in Gateway Configuration, you should use this set up only when you have data files on a computer where no database engine is installed.
If you have database engines installed on all machines, you should use one of the other configurations.
*Note: You may inadvertently fall into a Gateway configuration if the database engine on a machine where data is located is not started when the computer is started. If another Workgroup engine attempts to access the data and the local database engine is not running, the other database engine may establish itself as the Gateway for those data files.

You can resolve this situation by specifying a permanent Gateway as described in this section, or by shutting down the computer where the data is located, and starting it up again, while ensuring that no other computers request data before the local Workgroup engine is restarted. You may need to remove the file ~PVSW~.LOC from the data directory to ensure the Gateway is not re-established.

The best way to ensure that only the Gateway services the file is to set a static gateway locator file using the
Gateway Locator Utility.
Floating or Fixed Gateway
You can set up two different Gateway configurations. The default behavior is a floating Gateway configuration. In this configuration, the first engine to open the remote data files becomes the Gateway engine for that directory until all files in the directory are closed. Then the next engine to open the data files becomes the new Gateway. This configuration is the most flexible, but also can entail delays upon initial connection to the database, as the engine tries the different network protocols and checks for an existing Gateway engine.
*Note: Using a floating Gateway in a peer-to-peer configuration with multiple shared data sources is not recommended. This configuration is supported and it operates as designed, however, with multiple engines shuffling ownership among multiple data locations, connection delays may be significant. It is also possible to create a situation where a Workgroup engine on a remote machine serves as the Gateway for data located on your local hard drive. Obviously there is no reason to endure this delay when your local Workgroup engine can serve this data with higher performance.

You can avoid this situation by ensuring that the Workgroup engine on every computer is started when the computer is started. You must also ensure that someone logs on to each computer, because normally the Workgroup engine doesn’t start until a user logs on.

You can also avoid this situation by permanently assigning each machine as the Gateway for the data files located on it. See
To Set up a Fixed Gateway for information on how to perform this task.
The second configuration is called a fixed or permanent Gateway configuration. In this configuration, a specific engine is permanently assigned as the Gateway engine for a specific directory. If that engine is not running when another engine attempts to access the data, an error code results and the data is not available.
1
The Gateway assignment now floats dynamically as different Workgroup engines access the remote data.
To specify a permanent Gateway engine for a given directory, you need only change the attributes of the ~PVSW~.LOC file to read-only, once it contains the name of the desired engine. There are several ways to perform this task.
Use the Gateway Locator Utility
1
Access Gateway Locator from the operating system Start menu or Apps screen.
2
In the Target Directory area, type in or browse for the directory containing the data files for which you wish to set up a permanent Gateway.
3
In the Directory Status area, click Change. In the dialog box that appears, click Assign a Gateway, then type in or browse for the network name of the computer that you want to be the Gateway. Click OK.
4
Back in the main Gateway Locator window, check Permanent assignment. Click Exit.
Use the DOS Command Line
1
For example, if your current directory is the directory where the file is located, you can type the following command:
ATTRIB +R ~PVSW~.LOC
Use the Windows Explorer
1
2
In the Properties window, on the General tab, click Read-only in the section labeled Attributes. Click OK.
Working with the Gateway Locator Utility
The Gateway Locator Utility provides control of and insight into any Gateway configuration you have on your network. This section explains how to use the utility for a variety of purposes.
This utility enables users to determine or change the Workgroup Engine which is being used as the gateway for the data files in a particular directory. The Gateway Locator utility is used only with PSQL v12 Workgroup Engine.
The Gateway Locator operates by reading and manipulating the locator file, ~PVSW~.LOC, which resides in any directory which is assigned a Gateway engine. If this file is locked (in use), the Gateway Locator can only locate, not change, the Workgroup engine being used as a Gateway for that particular directory.
1
Access Gateway Locator from the operating system Start menu or Apps screen.
Figure 3 Gateway Locator Main Dialog Box
 
*Note: The Gateway Locator can be used to set the gateway for any data directory. Data directory locations are not stored with the tool. Consequently, you must always set the directory path before you click Change.
2
In Target Directory, enter or browse for the directory path which contains the data files for which you wish to locate or change the Gateway engine.
3
Figure 4 Gateway Locator Browse Dialog Box
Once the target directory is selected, clicking the Refresh button causes the name of the Gateway engine for that directory (if such exists) to appear in the Gateway Assigned To box. If no Gateway exists for a particular directory, the box reads “unassigned.”
Once the target directory is selected, click Change to choose the Workgroup engine which you wish to serve as Gateway for a particular directory (this button is disabled if the locator file for that directory is locked.) The following dialog box appears:
Figure 5 Gateway Assignment Dialog Box
Enter or browse for the machine name you wish to serve as gateway.
Figure 6 Browse for Computer Dialog Box