Advantage Database Server: The Official Guide

There is more to Advantage than just ADS and ALS. You will also use several support tools to configure your database server, as well as to create your actual databases. Among these are the Advantage Configuration Utility, the Advantage Data Architect, and the Advantage ANSI Collation Utility. Each of these tools is described in the following sections.

The Advantage Configuration Utility

When ADS is installed on your server on Windows NT/2000/2003, the Advantage Configuration Utility is also installed. This utility provides you with several important capabilities. It permits you to view statistics about your server’s operation, and it also permits you to manually set many of the server’s configurable properties. Because the Windows NT/2000/2003 server is the most popular server version, the Advantage Configuration Utility is described in this section.

Windows 98/ME, Linux, and Novell NetWare installations of ADS do not include the Advantage Configuration Utility. Windows 98/ME installations are configured from the server application itself, and Linux and NetWare installations are configured from command-line parameters and/or configuration files. For these installations, refer to the documentation for information on configuring ADS.

ON THE CD

The ADS documentation is located on this book’s CD-ROM. The ADS documentation can also be downloaded in PDF format from http://devzone.AdvantageDatabase.com.

All OS (operating system) versions of ADS have an Advantage Database Server Management Utility available from within the Advantage Data Architect. (A stand-alone version of this utility is also available with ADS 7.0 and later.) The Management Utility contains information similar to the Advantage Configuration Utility described in this section. See the ADS documentation for additional information on the Advantage Database Server Management Utility.

Note

The purpose of the following descriptions is to show you where you can get information about the server. This section is not designed to provide a detailed description of how these settings are used. For that information, please refer to the ADS documentation.

To use the Advantage Configuration Utility in Windows NT/2000/2003, select the Start button, and then select Programs | Advantage Database Server | ADS Configuration Utility. The Advantage Configuration Utility shown in Figure 1-1 is displayed. There are three main tabs: Database Info, Installation Info, and Configuration Utility. These pages are described in the following sections.

Figure 1-1: Use the Advantage Configuration Utility to view statistics for and to configure your ADS server.

Database Info Page

The Database Info page, shown in Figure 1-1, contains basic statistics about attached users, connections, work areas, as well as open tables and indexes. The Current column on the Database Info page displays current usage statistics, while the Max Used column shows the highest value for each statistic since the server was started.

This information can help you determine whether you need to make adjustments to any of the configurable parameters of the server. For example, if you find that the maximum number of configured connections were used, and that some connections were rejected, you can use the Configuration Utility pages to increase the number of available connections. The Configuration Utility pages are described later in this section.

The Installation Info Page

The Installation Info page, shown in Figure 1-2, contains information about the installed server, including the licensed number of users, your serial number, and the server version you are running.

Figure 1-2: The Installation Info page of the Advantage Configuration Utility

The values on the Installation Info page are not configurable. If you need to change these values, you can either reinstall your server, or use a special utility that ships with ADS. This utility, called adsstamp.exe, permits you to install a new license key and to change your character sets and a few other settings. For information on using adsstamp.exe, refer to the ADS help.

On the CD

Many of the settings that you can control from the Advantage Configuration Utility can also be adjusted using command-line parameters and/or configuration files. For information about these options, see the Advantage Database Server documentation on this book’s CD-ROM.

The remaining pages of the Advantage Configuration Utility are used to set the parameters used by the server. You display these additional pages by clicking on the Configuration Utility tab of the Advantage Configuration Utility.

In most cases, once you have adjusted the settings of the Advantage Database Server, you will not need to make further changes. However, after the server has been running for a while, you should inspect the Database Info page of the Advantage Configuration Utility to ensure that your initial settings are sufficient. If you find that you have to make adjustments to one or more of the settings found on the Configuration pages of the Advantage Configuration Utility, you will need to stop and then restart your server before your changes take effect.

The Database Settings Page

Use the Database Settings page, shown in Figure 1-3, to adjust the maximum permitted connections, work areas, and simultaneously opened tables and indexes. Note that the maximum number of connections is not the same as the maximum number of users. Each machine that is currently accessing the server counts as a user. Each user can have multiple connections. You should set Number of Connections to the maximum user count times the average number of connections each user requires.

Figure 1-3: The Database Settings page of the Advantage Configuration Utility

The File Locations Page

Use the File Locations page, shown in Figure 1-4, to change the location of the error and transaction log files, as well as the semaphore connection file path.

Figure 1-4: The File Locations page of the Advantage Configuration Utility

The error file, ads_err.dbf, is updated when ADS encounters a problem at runtime. This log file is a simple DBF file that you can open as a free table using the Advantage Data Architect, or using any other utility capable of viewing DBF files.

Transaction log files are files that the ADS TPS (transaction processing system) creates while updates to a database are being performed within the context of a transaction. These important files permit ADS to either commit or roll back changes if there is a failure somewhere in the system before the transaction is complete. These files, which have the .tps extension, are deleted by ADS when the associated transaction is complete.

Unlike the ads_err.dbf files, TPS files are intended for the internal use of ADS. You should not manually delete or attempt to view these files.

The Communications Page

If you want to permit applications to connect to your server over the Internet, use the Communications page to define how this communication will be permitted. The Communications page of the Advantage Configuration Utility is shown in Figure 1-5.

Figure 1-5: The Communications page of the Advantage Configuration Utility

IP Port permits you to set the UDP and TCP ports on which the server will listen for client connections. (“IP,” “UDP,” and “TCP” stand for Internet protocol, universal datagram protocol, and transmission control protocol, respectively.) If IP Port is set to the default 0, it will try to use UDP and TCP port 6262. If you want to specify the UDP/TCP IP Port, set IP Port to a port that is available for both UDP and TCP.

If you want to connect to ADS over the Internet, you set Internet Port to the UDP port that applications (Windows and Linux clients) will use to connect to your server, or to the TCP/IP (transmission control protocol/Internet protocol) port that Java applications will use to connect to your server. This port (TCP/IP for Java clients or UDP/IP for Windows and Linux clients) must also be opened in any firewalls separating the server and the applications that need to access it. Leaving Internet Port set to the default of 0 disables Internet access.

Note

There are plans to include full TCP/IP support with Windows and Linux clients in an ADS release sometime after 7.0.

You also use this page to configure whether to use a semaphore file, the client connection timeout, and level of data compression.

Note

To enable Internet access to the Advantage Database Server, you must also configure the data dictionary used to access the data to accept Internet connections. Depending on the data access mechanism or the specifics of your connection, each client machine may also require an ADS configuration file that contains additional information about the connection. For information on setting up client applications to connect over the Internet, see the topic “Advantage Internet Server” in the ADS documentation.

The Misc. Settings Page

Use the final page of the Advantage Configuration Utility, Misc. Settings, shown in Figure 1-6, to set the maximum number of worker threads, as well as the maximum size of the error log.

Figure 1-6: The Misc. Settings page of the Advantage Configuration Utility

Advantage Data Architect

The Advantage Data Architect, whose main screen is shown in Figure 1-7, is a graphical tool that simplifies the creation and configuration of your tables and databases. The Advantage Data Architect is also referred to as ARC. The Advantage Data Architect also includes a wide variety of support features, including the ability to import and export data, execute ad hoc queries, perform checks on your development environment, and much, much more. As a developer, you are likely to use the Advantage Data Architect more than any other tool that ships with ADS.

Figure 1-7: The main screen of the Advantage Data Architect

While the Advantage Data Architect makes it easy to design your tables and data dictionaries, there are alternatives. Specifically, all of the database-related configuration capabilities provided by Advantage Data Architect can also be performed using Advantage SQL, as well as by programming directly to the ADS API using ACE (the Advantage Client Engine).

The Advantage Data Architect provides another benefit, albeit one that is not immediately obvious. It can provide you with insight on how to create and manage your tables and data dictionaries programmatically. The Advantage Data Architect was written in the Delphi language, and the source code for this Delphi project is available on the CD-ROM that accompanies this book. The Delphi language is easy to read, so even if you are not a Delphi developer, you can probably figure out how specific operations were performed.

Because the Advantage Data Architect is such a valuable tool for working with tables and data dictionaries, a large portion of this book discusses its use. In other words, there is no chapter that specifically discusses the Advantage Data Architect. Instead, almost all examples in this book where tables and data dictionaries are manipulated use the Advantage Data Architect.

Advantage ANSI Collation Utility

ADS ships with the Advantage ANSI Collation Utility, shown in Figure 1-8, a tool that permits you to create custom ANSI collations. The ANSI (American National Standards Institute) character set is a standard mapping of characters to numeric values. These characters include printable characters and special control characters, such as tabs and carriage returns. An ANSI collation sequence defines the order, or precedence, of characters for the purpose of making string comparisons.

Figure 1-8: The ANSI Collation Utility

Few developers will ever need to use the Advantage ANSI Collation Utility. For most applications that use the English language, you will install one of the provided English collation sequences. Similarly, for most non-English applications, Extended Systems provides localized character sets that ensure proper string comparisons.

For those non–English speaking developers for whom there is no localized character set, the Advantage ANSI Collation Utility is an essential tool for defining character precedence.

When installing ADS or ALS, you will choose either a localized character set or an ANSI collation sequence. Which options you have depends on the version of the Advantage Database Server that you are installing. For example, if you are installing the domestic version of ADS, you will be able to select only between an American English collation, a Canadian English collation, and a French Canadian collation.

Regardless of which character set or collation sequence you install, keep one very important issue in mind. The server, and all client applications that use it, must use the same character set or collation sequence. Doing so ensures that both clients and server agree on how strings are compared.

Because both client and server must use the same character set or ANSI collation sequence, it is particularly important for non-English applications to use the ANSI character set provided by Extended Systems, instead of choosing “default on machine.” This is especially important for Advantage Local Server users. Each version of Windows (95, 98, NT, 2000, and so on) has different “default on machine” ANSI collation sequences, even when the same language is configured. Consequently, if one ALS client is using Windows 98 and another is using Windows 2000, collation mismatch errors will result.

Caution

If you change the character set or collation sequence being used by your clients and server, you must rebuild all indexes before you access any of your tables.

Категории