cancel
Showing results for 
Search instead for 
Did you mean: 

Which share mode uses the directory access server?

MCMartin
Participant
1,643

Which file share mode is used by a directory access server, when reading the contents of files? And is the Read Only clause in the create statement influencing the used mode?

VolkerBarth
Contributor
0 Kudos

Another important missing detail for that older question: Where is the real documentation on directory access servers?...

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant

I've scanned the low-level Directory Access Server code and here is what I see:

  • Directories are opened with plain-ol' "opendir" function call.
  • When file contents are being read, the file is opened with open( ..., O_RDONLY | O_BINARY, O_RDONLY )
  • When a file is being created or contents written, the file is opened with variations of open( ..., O_WRONLY | O_BINARY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ). O_CREAT is added when the file is being created and O_TRUNC is also added if the existing file contents need to be removed.
  • Directories are created with mkdir( ..., S_IRWXU | S_IRWXG | S_IRWXO )

The exact behaviour may vary depending on how the platform handles the open flags.

Note that the READ ONLY state of the proxy table only influences the high-level code within the database server: if a table is marked as read only then the server denies any attempt to write/update contents to the table. It does not affect the open flags that are used.

Disclaimer: The above is what SQLA 16 does currently (as of today when I looked at the code). Other versions may be slightly different (although I doubt it), and future versions may also differ.

HTH

MCMartin
Participant
0 Kudos

Thanks for checking ....

Answers (0)