Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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?

asked 26 May '14, 06:08

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

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

(26 May '14, 06:11) Volker Barth

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

permanent link

answered 26 May '14, 12:10

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

edited 26 May '14, 13:37

Thanks for checking ....

(27 May '14, 02:31) Martin
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×7

question asked: 26 May '14, 06:08

question was seen: 1,377 times

last updated: 27 May '14, 02:31