• No results found

Server configuration

Specifies a database name on the server. This name must be unique on the network. The server listens on the network for client requests to access this database and when a client attempts to connect to the database, the server helps establish the connection. Make sure that for each dbname entry, there exists a corresponding database. Otherwise, the network does not recognize the database.

The following SQL commands and SQL/API functions update the dbname setting:

This keyword is recommended. Configure this keyword in any multi-user server section of SQL.INI.

Default value The value of this keyword defaults to ISLAND. Example To identify the test database, specify:

dbname=TEST

Remember that there must be a TEST.DBS file in the TEST subdirectory of the home database directory or in the path defined by the database home directory dbdir.

SQL Command SQL/API Function

CREATE DATABASE sqlcre

DROP DATABASE sqldel

INSTALL DATABASE sqlind

You can optionally specify one or more communication library names after the database name. For example, SQLBase Server for Windows NT (4.0 and later), 2000, XP, and Server 2003 supports anonymous pipes, and TCP/IP. The following

configuration entry directs the server to listen on the network for connection requests to the database using all of those communication libraries:

dbname=TEST,sqlapipe,sqlws32

Conversely, the following configuration entry directs the server to listen on the network using only the TCP/IP communication library:

dbname=TEST,sqlws32

Only those client requests to access the test database that are sent via TCP/IP will be successful.

Remember that any communication libraries that you specify for the dbname configuration entry, must also be specified for the comdll configuration entry.

dbwin

Determines the status of the Databases subwindow.

The syntax for this window keywords is identical to that for the mainwin keyword, with the addition of a closed status. This indicates that the given subwindow was closed when you last used the Save option of the File menu.

This keyword is optional. This keyword is configured automatically in the server’s GUI section (for example, [dbntsrv.gui]) when you use the Save Settings option in the server’s File menu. Do not set a value for this keyword manually.

Example The syntax is:

dbwin=status,x,y,cx,cy

The following values are valid for these settings:

Status

Indicates the status of the window when you last used the File, Save option. Valid settings are: NORM for normal window status, MAX if the window is maximized, MIN if the window is minimized, or CLOSED if the window is closed.

x, y

These values represent the position of the window. For Windows NT (4.0 and later), 2000, XP, and Server 2003, this is the window’s top-left corner.

Keyword descriptions

3-23

These values represent the size of the window. For Windows NT (4.0 and later), 2000, XP, and Server 2003, these are the coordinates of the window’s lower-right corner. These values are system-dependent; do not manually modify or copy them from one system to another.

defaultdatabase

Specifies the default database name, overriding the default of ISLAND.

This keyword is optional. Configure this keyword in the Windows default-specific section [dbdfault], or in a Windows client's [win32client] section.

Default value This keyword has no default value.

Example To set the default database name to 'TEST', specify: defaultdatabase=TEST

defaultpassword

Specifies the default password, overriding the default of SYSADM.

This keyword is optional. Configure this keyword in the Windows default-specific section [dbdfault] or in a Windows client's [win32client] section.

Default value

Default value This keyword has no default value.

Example To set the default password to 'secret', specify: defaultpassword=secret

defaultuser

Specifies the default user name, overriding the default of SYSADM.

This keyword is optional. Configure this keyword in the Windows default-specific section [dbdfault] or in a Windows client's [win32client] section.

Default value This keyword has no default value.

Example To set the default user name to 'admin', specify: defaultuser=admin

defaultwrite

Controls whether changes to the values of the defaultdatabase, defaultpassword, or defaultuser keywords are written to SQL.INI.

This keyword is optional, Configure this keyword in the Windows default-specific section [dbdfault] or in a Windows client's [win32client] section.

Default value Valid values are 0 (off) and 1 (on). The default is 1. Example To set defaultwrite off, specify:

defaultwrite=0

This specifies that changes to the defaultdatabase, defaultpassword, and defaultuser keywords are in effect for the current session only and are not written to SQL.INI. When defaultwrite is on, changes to the default keywords are remembered by SQLBase for the current and all future sessions. As well, the specified changes are written to SQL.INI.

disablelogspacecheck

Disables SQLBase from checking log file space availability before a new log file is opened. SQLBase opens a new log file when the current one has reached its specified maximum size. If the log file space is inadequate to ensure database integrity should a system failure occur, SQLBase selectively rolls back any transaction that is causing excessive logging. SQLBase issues an error message that informs you the transaction has been rolled back, asks you to check for free disk space, and warns of imminent system shut down if the roll back does not recover log disk space.

By default, LOBACKUP is off, so that SQLBase deletes log files without backups as soon as they are not needed to perform transaction rollback or crash recovery. This prevents log files from accumulating and filling up the disk. When

disablelogspacecheck is enabled, be sure to set LOGBACKUP to off; otherwise, SQLBase is unable to attempt recovery of log disk space. To set LOGBACKUP, use the SQLTalk SET LOGBACKUP command or the sqlset API function.

This keyword is optional. Configure this keyword in the server section of SQL.INI. This keyword is not applicable to Windows 3.x and on any partitioned database.

Keyword descriptions

3-25

Example The syntax is:

disablelogspacecheck=n

Default value When this keyword is not declared, the default behavior is to perform checking for available log file space. Otherwise, to specify the default behavior, the value is 0. To disable checking, the value is 1.

Example The syntax is:

disablelogspacecheck=n

To disable checking for available log file space, specify: disablelogspacecheck=1

displevel

Specifies the level of information (0-4) displayed on the Process Activity window. Set the display level with either the Level menu on the GUI server, the SQLTalk SET PRINTLEVEL command, or the sqlset SQL/API call in conjunction with the SQLPPLV parameter.

This keyword is optional. This keyword is configured automatically in the server’s GUI section (for example, [dbntsrv.gui]) when you use the Save Settings option in the server’s File menu. Do not set a value for this keyword manually.

Example The syntax is:

displevel=n

errorfile

Specifies a file that contains entries to translate standard SQLBase return codes into user-defined return codes.

This keyword is optional. Configure this keyword in the Windows default-specific section [dbdfault], or in a Windows client's [win32client] section.

Default value This keyword does not have a default value.

Example The syntax is:

errorfile=filename

where filename includes the full path.

The maximum length of the errorfile value is 260 characters. The maximum number of characters allowed in an errorfile directory path (excluding the filename which has a limit of eight characters and a three-character extension) is 246. This includes the drive letter, colon, leading backslash, and terminating null character.

Semicolons and commas cannot be part of the pathname. A directory name enclosed in single quotes can contain an embedded single quote which is indicated by TWO single quotes (for example: D:\'''test'''\).

Note: Characters reserved in the Windows environment cannot be used in directory or file names; for example: <> : “ / \ |. Words reserved in the Windows environment cannot be used as file names; for example, con or aux.

The file contains entries for error code translation in the form: sbrcd,udrcd

where sbrcd is a SQLBase return code found in error.sql, and udrcd is a user-defined return code. The sbrcd value must be a positive integer; the udrcd can be a positive or negative integer. There can be no white space between the values or after the comma. The client application converts the sbrcd value to the udrcd value using the sqltec API function. For example, SQLBase returns a value of '1' to indicate an end-of-fetch condition, while DB2 returns a value of '100'. If you want an application to convert all SQLBase return codes of '1' to '100', the entry in the errorfile would look like this:

1,100

When your application calls the sqltec function, if the SQLBase return code doesn't exist, SQLBase returns a non-zero return code that means that the translation did not occur.

To force translation to occur, you can create a global translation entry using the asterisk (*) character and a generic return code (like '999'). For example, assume we created an errorfile of SQLBase return codes and corresponding DB2 return codes. For those SQLBase return codes that have no corresponding DB2 return code, you can force the application to return the generic return code '999' with the following entry:

*,999

extdll

Specifies the pre-loading of DLLs at server startup time. Because of the enormous overhead involved in making calls to the Microsoft API function load library, (especially in the case of large DLLs or DLLs that cause more DLLs to be loaded), pre-loading DLLs saves overhead and guarantees that the DLL is loaded as long as the server is running.

Keyword descriptions

3-27

If you want to pre-load more than one DLL, you can specify the parameter multiple times within the server section. Each DLL entry must be on a separate line.

This keyword is optional. Add this keyword to a Windows server section of SQL.INI. Default value By default, SQLBase loads the DLL at function call time by calling the Microsoft

API function load library.

Example The syntax is:

EXTDLL=dllname

where dllname is a full path or the operating system uses the path environment variable to locate dllname. If the DLL name is not qualified, the operating system uses the path environment variable to locate the DLL.

The maximum length of the extdll value is 260 characters. The maximum number of characters allowed in the extdll directory path (excluding the filename which has a limit of eight characters and a three-character extension) is 246. This includes the drive letter, colon, leading backslash, and terminating null character.

Semicolons and commas cannot be part of any pathname. Semicolons are used as path delimiters, while commas are used as special characters to separate each parameter of a keyword in SQL.INI. A directory name enclosed in single quotes can contain an embedded single quote which is indicated by TWO single quotes (for example: D:\'''test'''\.

Note: Characters reserved in the Windows environment cannot be used in directory or file names; for example: <> : “ / \ |. Words reserved in the Windows environment cannot be used as file names; for example, con or aux.

fileaccess

Allows or disallows a user ability to access and modify files on a remote server machine. Use the this keyword to prevent access to any type of remote file.

Setting this keyword to zero (0) prevents a client SQL/API application from calling these functions:

• sqlfgt • sqlfpt

• sqlmop

• sqlmdl

Default value The default for this keyword is 1 which allows remote access to server files via the SQL/API.

Example The syntax is:

fileaccess=0

Setting fileaccess=0 disallows a client application from reading or writing to a remote server file.

groupcommit

Specifies the maximum number of COMMITs that SQLBase groups together before physically writing them to disk. Commits are performed when:

The number of grouped commits exceeds the value of groupcommit, orThe number of ticks that have elapsed since the last commit is greater than the

value of groupcommitdelay. Read the groupcommitdelay description in the next section for more information on the groupcommitdelay keyword. SQLBase tries to economize resources and increase transaction rates by grouping COMMITs from several transactions into one transaction log entry, and performing them all in one physical write. It does this by pausing for a fraction of a moment in anticipation of other incoming COMMIT requests. SQLBase does not defer COMMITs; it always writes a COMMIT to disk before returning control to the user. This keyword is optional. Configure this keyword in the server section of SQL.INI. Default value The default value is 1.

Example To set the maximum to 5, specify: groupcommit=5

groupcommitdelay

Specifies the maximum number of system ticks that SQLBase waits before performing commits. The duration of a system tick is platform-dependent, but is approximately 1/20 of a second.

Commits are performed when:

The number of grouped commits exceeds the value of groupcommit, orThe number of ticks that have elapsed since the last commit is greater than the

value of groupcommitdelay.

Keyword descriptions

3-29

This keyword is optional. Configure this keyword in the single-user or multi-user server section of SQL.INI.

Default value The default value is 1 tick.

Example To set the groupcommitdelay to 20, specify: groupcommitdelay=20

listenport

Identifies the port number on which a server listens for connections. On a given machine, a SQLBase server obtains exclusive use of the identified port. You must ensure that the port chosen does not conflict with other applications on the same machine.

It is possible to run multiple SQLBase servers on a single machine, but they must each be configured with a different, unique port number.

If you specify this keyword, client applications connecting to this server must use the same port number with the serverpath keyword in their corresponding client section. If you specify listenport in a client section, you will receive an error.

Contact your network administrator if you do not know what port value to use for this keyword.

This keyword is optional. Configure this keyword in a server’s TCP/IP section of SQL.INI. For Windows 98, ME, NT, 2000, Server 2003, and XP platforms, this is [servername.ws32], for example, [dbntsrv.ws32]. For the Linux platform, this is [servername.tcpip], for example, [dblxsrv.tcpip].

Default value The default port number is 2155. The syntax of this keyword is:

listenport=n

where n is a positive integer not greater than 32767. Example To set the port number to 3000, enter the following line:

listenport=3000

listenretry

Specifies the number of times a server should retry a listen when an attempt to listen on the network fails.

This keyword is optional. Configure this keyword in a multi-user server’s communications section (for example, [dbntsrv.ntnbi]) of SQL.INI. Default value The default value of this keyword is 3.

Example To set the number of retries to 5, specify: listenretry=5

locks

Specifies the maximum number of lock entries to allocate. SQLBase allocates lock entries dynamically (in groups of 100) on an as-needed basis.

Specify this keyword only when you are trying to protect against a run-away application that is accessing too much data in one transaction.

This keyword is optional. Configure this keyword in the server section of SQL.INI. Default value The default value of this keyword is 0, which means that there is no limit on the

number of locks allocated; as many lock entries can be allocated as memory permits. Example To limit lock entry allocation to 500, specify:

locks=500

locktimeout

Specifies how long to wait when acquiring a lock. If an application cannot acquire a lock within the specified period of time, SQLBase returns a timeout error.

This keyword is optional. Configure this keyword in the server section of SQL.INI. Default value The default value of this keyword is 300 seconds for all servers but SQLBase single-

user for Windows. The default for SQLBase single-user for Windows is 2 seconds. Example To set the timeout period to 2 minutes, specify:

locktimeout=120

log

Writes all the messages that appear on the server's Process Activity display to a specified file.

This keyword is equivalent to using SQLTalk's SET ACTIVITYLOG command. These messages are helpful when debugging, but they are not meant to be logged in a production environment. Logging incurs overhead, and the log file can become large very quickly if your site is an active one.

This keyword is optional. Configure this keyword in the server section of SQL.INI. Default value This keyword does not have a default value.

Keyword descriptions

3-31

The maximum length of the log value is 260 characters. The maximum number of characters allowed in an log directory path (excluding the filename which has a limit of eight characters and a three-character extension) is 246. This includes the drive letter, colon, leading backslash, and terminating null character.

Semicolons and commas cannot be part of the pathname. A directory name enclosed in single quotes can contain an embedded single quote which is indicated by TWO single quotes (for example: D:\'''test'''\).

Note: Characters reserved in the Windows environment cannot be used in directory or file names; for example: <> : “ / \ |. Words reserved in the Windows environment cannot be used as file names; for example, con or aux.

logdir

Redirects the transaction logs to the specified drive and directory.

When SQLBase creates log files, it appends the database name to the specified path name to ensure that log files for different databases not placed in the same directory. If the directory specified in logdir does not exist, SQLBase first creates the directory, then redirects the log files to that directory.

This keyword is recommended. Configure this keyword in the server section of SQL.INI.

Default value By default, SQLBase creates transaction log files in the home database directory. Redirecting the transaction log files has two benefits:

• If the database and its logs are on separate disk drives, higher transaction throughput is possible because of less disk arm movement and the ability to do parallel disk accesses.

• If the database and log files are on different disk drives, a media failure does not destroy both the logs and the database.

Example To redirect log files to the d:\test directory, specify: logdir=d:\test

The maximum length of the logdir value is 260 characters. The maximum number of characters allowed in an logdir directory path (excluding the filename which has a limit of eight characters and a three-character extension) is 246. This includes the drive letter, colon, leading backslash, and terminating null character.

Semicolons and commas cannot be part of the pathname. A directory name enclosed in single quotes can contain an embedded single quote which is indicated by TWO single quotes (for example: D:\'''test'''\).

Note: Characters reserved in the Windows environment cannot be used in directory or file names; for example: <> : “ / \ |. Words reserved in the Windows environment cannot be used as file names; for example, con or aux.

logfileprealloc

Enables and disables transaction log file preallocation.

This keyword is optional. Configure this keyword in the server section of SQL.INI. Default value By default, logfileprealloc is off (0) and the current log file grows in increments of 10

percent of its current size. This uses space conservatively, but can lead to a fragmented log file which can affect performance.

Setting logfileprealloc on (1) means that SQLBase creates log files full size

Related documents