cancel
Showing results for 
Search instead for 
Did you mean: 

SQLREMOTE environment variable vs. SET REMOTE FILE OPTION directory

VolkerBarth
Contributor
0 Kudos
1,899

A SQL Remote question:

If I have set the remote FILE filelink directory within the database via, say

set remote file option public.directory = 'D:\\\\DATA\\\\FILELINK';

and also have set the SQLREMOTE environment variable to a different directory, am I right that the database option has higher precedence? (My tests with v12.0.1.4403 seems to imply that.)

I had expected the environment variable would have higher precedence, much like the SQLCONNECT connection parameters having higher precedence than those in a ODBC DSN...)


As to the background: We do set the directory fitting for the remotes. However, right after a re-extract we are doing an initial replication internally (to make sure it all works), and internally, the FILELINK uses a different directory structure. So I thought I could overwrite the database setting via the SQLREMOTE environment variable but that failed (i.e. it seems to be ignored). Therefore I guess I have to modify the remote option temporarily... and re-set it to the desired value after the internal tests have been passed.

Accepted Solutions (1)

Accepted Solutions (1)

regdomaratzki
Product and Topic Expert
Product and Topic Expert

You are correct that the environment variable is over-riden by the database setting. The order of precedence, from lowest to highest is :

Registry Setting Environment Variable Database Setting

Reg

VolkerBarth
Contributor
0 Kudos

That might be a worthwhile addition to the docs, which just state that those entries are alternatives, without telling the order of precedence...

The SQL Remote environment variable stores a path that can be used as an alternative to one of the control parameters for the FILE messaging system.

Answers (0)