[Mapping Rules]

This section is used to determine which agent shall handle the incoming request. The mapping rules are checked once all the alias mappings have been performed. Each mapping rule is tried from top to bottom until a match with the current parameters has been found. There is no regular expression or glob handling in the mapping rules. The seven colon-delimited mapping parameters must each match up exactly. There is a special mapping rule of '*' that denotes a "don't care" parameter. Do not confuse this special '*' with the regular expression '*' or the glob '*'. It is not possible to use the '*' with any other text such as 'demo*'.

On the right side of the '=' is either an accept statement, or a reject statement. The accept statement has the word 'accept' followed by the section name that identifies the agent. A reject statement has the word 'reject' followed by a text string that is the error message reported to the client.

This is an example mapping section.

[Mapping Rules]
;*:*:blank:*:*:*:rw     = reject You should specify a username and password
*:*:Admin:msdos:*:jet:* = reject Admin user account is not registered
sql2000:*:*:*:*:*:*     = accept generic_sql2000
ora81:*:*:*:*:jet:*     = reject The Oracle 8 Database Agent is not configured for jet
*:*:*:java:*:*:*        = accept jodbc_client


Here is a snippet of the debug output showing how a request is shown to be matched.

request: domain=Oracle 8.1 database=db serveropts=
   connectopts= user=scott opsys=win32 readonly=0
   application=ODBCAD32 processid=520
solve mapping: ora8sv:db:scott:win32:MASTERSRVR:ODBCAD32:rw
using mapping: ora8sv:*:*:*:*:*:*