Question

We've been using Advantage Database Server 9.1 (Netware) with DBF/CDX index files successfully for several years, via the Delphi TDataSet descendant components. (This is legacy data required for statistics/reporting purposes.)

A couple of weeks ago, we switched from Netware to Win2K8 as our network operating system, and moved to ADS 9.1. This broke the functionality of queries from the local client that perform SELECT queries against server databases.

For instance, the below query worked fine with the Netware version of ADS 9.1 in ARC32's SQL window, running with a local connection to free tables in C:\Data:

INSERT INTO MyLocalDB 
  SELECT TOP 10 * FROM [\\MyServer\Data\MyRemoteDB.dbf] WHERE somecondition

The same query worked using a mapped drive to the server's directory instead:

INSERT INTO MyLocalDB 
  SELECT TOP 10 * FROM [S:\Data\MyRemoteDB.dbf] WHERE somecondition

Note that it's a free table - it's not part of a data dictionary. It's a free table in a location that has read/write access to the folder on the server where it's stored. The local client connection's folder is fully accessible (it's used for testing applications on a daily basis, using a local connection to the data). A normal application can run on the client against either the local connection data or the remote connection data without any issue. It's only the query from a local connection to retrieve server data that's a problem, and it was working correctly before. The only difference was the switch from Netware to Win2k8 for both the OS and ADS, and according to the documenation (see quoted help file content below) it should still work.

After the switch to the Windows version of ADS 9.1, both of the above queries fail with

Error 7008: The specified table, memo file, or index file was unable to be opened. Table name \MyServer\Data\MyRemoteDB.dbf (or S:\Data\MyRemoteData.dbf).

We upgraded to ADS 10.10 on our system this week (and to the ADS 10.10 TDataSet 10.10 components as well), but the above queries still fail.

Is this simply not supported under the Windows version of ADS? The documentation makes it seem like the first one should work:

Drive letters in paths of table names can only be used with Advantage Local Server. When using Advantage Database Server for NT or NetWare, fully qualified paths must use UNC (e.g., "\server\volume\path\table"), because the SQL statement is parsed at the server where client-side drive letters are not meaningful. Note that tables referenced like this must be enclosed in double quotes or [] (brackets) because they contain non-standard characters.

The UNC path is properly surrounded with [] brackets, and there are no spaces anywhere in the path or table name. I've tried with and without appending the .dbf extension; the error message remains the same.

Was it helpful?

Solution

I suspect that you are encountering a change with the proprietary locking. A change was made to Advantage Database Server to make the default behavior to completely deny access to other applications when proprietary locking is in use. You can disable that with the somewhat confusingly named NONEXCLUSIVE PROPRIETARY LOCKING configuration setting. I think that if you set that configuration value to 1, then it will work as you are wanting.

After changing that configuration setting to 1 and restarting ADS, local server connections should be able to get read-only access to the DBF tables that the server has open.

OTHER TIPS

Assuming you are using a remote ADS server (not ALS) you have to use server side aliases to get this functionality:

http://devzone.advantagedatabase.com/dz/webhelp/advantage9.0/extprocs/server_side_aliases.htm

Put this in an C:\adsserver.ini file on MyServer (or wherever your ADS logs are located):

[ServerAliases]
Data=X:\Data

Where X:\Data is the location of the MyRemoteDB.dbf table file.

However this will only work correctly if there is also a share or you have set the IgnoreRights setting:

Server-side aliases must always be used in conjunction with the "Ignore Rights" setting of your Advantage client. See the Database Security topic for details. Failure to do so will result in file existence checks, which will use the server-side alias from the client and fail, resulting in AE_FILE_NOT_FOUND (5004) errors.

For ALS you can just use the normal Windows file sharing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top