Object Names with '.'

Limited Support for DataGate® Objects with '.''

Object Names with '.' and SQL Server 'Schema'

Specify '.' Mapping and Syntax with dgserver.exe

Specify the Desired Syntax using the Registry

Unsupported '.' Access

Object Names with '.'

Although SQL Server permits object names that contain '.', two significant problems arise when using such names in DataGate® for SQL Server (DSS). First, SQL Server uses '.' as a separator character when an object's owner, database, and/or server are explicitly part of the object name, e.g., "", or "me.myobject". This release resolves this problem as detailed below (see Object Names with '.' and SQL Server 'Schema'). The second problem arises from a bug in the SQL Server access API used by DSS, OLEDB. OLEDB does not support using names with '.' in its rowset update API. Thus, DataGate® cannot generally support them either. However, this release includes support for a workaround that may suffice in some application scenarios.

Limited Support for DataGate® Object Names with '.'

DataGate® can be configured to use an alternate character for specifying DataGate® object names containing '.' to SQL Server. For example, a DataGate® file may be named "my.file". When using the configuration to replace '.' with, say, '_', the underlying SQL Server table would be named "my_file". In this configuration, all DSS interface calls to SQL Server will specify my_file instead of my.file. To a DataGate® user, it appears that object names may contain '.'.

There are limits the user must be aware of when using this support: 1) All object names containing the replacement characters will be exposed to DataGate® users as objects names containing '.' instead. For example, a DataGate® Studio user might find a file named "new.file" in a DSS library, and subsequently try to create a new file named "new_file" in the same library. In this case, DSS will return a "duplicate object" error, because SQL Server already has an object named "new_file" (mapped to DataGate® as "new.file"). Similarly, rename and delete operations can be problematic. 2) This support is not the default DSS behavior; all new DSS deployments will need to be configured to use the support. 3) When using SQL Server "schema" as part of a DataGate® object name, a particular path name syntax is required (as outlined in the next section) when using this support.

Object Names with '.' and SQL Server 'Schema'

In previous releases, DSS reserved '.' as a separator when specifying the "schema" (owner name) of an object (physical file, logical file, index), e.g.,


Since this conflicts with the use of '.' in DataGate® object names, the syntax is now deprecated, and only available when DSS is started with a special registry value, as mentioned below. The new syntax allows an object to use '.' in an object name, and specify the schema as a prefix with brackets, e.g.,


The new syntax is used by default when installing and starting DSS. Since existing applications may be dependent on the old syntax, DSS will modally support either syntax. DSS chooses which syntax to use once, at the time the DataGate® Service is started, and will use the indicated syntax for all client/server database connections until the service is stopped. The syntax to use is indicated by a registry key value as detailed below. If no value is found in the registry, the new syntax is used by default. Note that DSS cannot simultaneously support both the old syntax and '.' in object names.

Specify '.' Mapping and Syntax with dgserver.exe

dgserver.exe is the command-line installer for the DataGate® Service, which handles DSS server requests from clients. dgserver.exe is usually invoked by the DataGate® Server installer, but may also be used by a command-line user. dgserver.exe accepts several optional parameters (invoke 'dgserver.exe -?' to see a list), but requires either '-i' or '-u' to install or uninstall, respectively, the DataGate® Service.

You may specify the '-s' parameter with '-i', indicating that DSS will use the deprecated syntax. Likewise, omitting '-s' when '-i' is specified indicates that DSS will use the new syntax.

To have dgserver.exe to configure a '.' mapping character as part of the installation, you may specify the '-k' parameter. '-k' is used to specify arbitrary named values to be added to the installation, and so it is expected to be immediately followed by two other command line parameters: the name, and the value. In this case, the name is "DSS Object Name Dot Substitution", and the value should be a valid SQL Server object name character other than '.', for example "_". In this case the entire command could be given as

dgServer.exe -i -k "DSS Object Name Dot Substitution" "_"

Note that the use of quotes to specify the name "DSS Object Name Dot Substitution" is critical; otherwise the Windows command line shell will interpret the space-delimited words as separate parameters. Also note that DSS gives this specification more weight than the '-s' parameter. If '-s' were added to the above command, DSS would ignore the '-s' and use the new syntax with the specified object name mapping.

Specify the Desired Syntax Using the Registry

When the dgserver.exe command-line tool mentioned previously is invoked, the installer simply creates the proper Windows Registry key value(s) to specify the desired configuration. The key values are then referenced by DSS when the service starts. The key values may also be edited with the Windows Registry Editor (regedit.exe). The key and values are:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DataGate® Server]
"Use Old Schema Syntax"=dword:0
"DSS Object Name Dot Substitution"="_"

The DWORD value of "Use Old Schema Syntax", if present, may be either '1' or '0'. If the value is '0', not present, or "DSS Object Name Dot Substitution" has a value other than ".", DSS will use the new syntax when started. If the value is '1' and "DSS Object Name Dot Substitution" is not present or set to ".", DSS will use the old syntax.

Unsupported '.' Access

Since this release uses the new schema syntax by default, many DataGate® functions involving objects with '.' in the name may "just work" against a DSS deployment so configured, even without the "DSS Object Name Dot Substitution" key. Such functions include read-only record access, and many others. However, there are certain operations, such as a record update, that will produce errors and/or undefined behavior unless the mapping workaround is configured. Therefore, ASNA can only provide official support for '.' in object names against DSS configured to use the mapping configuration option.