This table describes shares of your Windows Servers.
Field name |
Data type |
Description |
id_snapshot |
number |
Identifier of the network snapshot. |
unc |
string |
UNC path of this share. |
server_name |
string |
Name of the server sharing the resource. |
share_name |
string |
Name of the share |
comments |
string |
Comments of the share. |
max_uses |
number |
Maximal number of users allowed to accessing the resource at the same time (if it equals -1, it means that there is no limit). |
current_uses |
number |
Current number of users connected to the resource. |
path |
string |
Local path of the resource. |
permissions |
number |
Bit mask specifying the global permissions (resource level) of the share (see Appendix 1). |
type |
number |
Specifies the type of the share (see Appendix 2). |
id_share |
number |
Internal ID of the share used to link to tables "printers" or "realfolders" (id_share field) |
Following are the values used to encode the permissions bit mask:
Symbolic constant |
Value |
Meaning |
ACCESS_READ |
0x01 |
Permission to read data from a resource and, by default, to execute the resource. |
ACCESS_WRITE |
0x02 |
Permission to write data to the resource. |
ACCESS_CREATE |
0x04 |
Permission to create an instance of the resource (such as a file); data can be written to the resource as the resource is created. |
ACCESS_EXEC |
0x08 |
Permission to execute the resource. |
ACCESS_DELETE |
0x10 |
Permission to delete the resource. |
ACCESS_ATRIB |
0x20 |
Permission to modify the resource's attributes (such as the date and time when a file was last modified). |
ACCESS_PERM |
0x40 |
Permission to modify the permissions (read, write, create, execute, and delete) assigned to a resource for a user or application. |
ACCESS_ALL |
0x7F |
Permission to read, write, create, execute, and delete resources, and to modify their attributes and permissions. |
Following are the possible values for the "type" data field:
Symbolic constant |
Value |
Meaning |
STYPE_DISKTREE |
0x01 |
Permission to read data from a resource and, by default, to execute the resource. |
STYPE_PRINTQ |
0x02 |
Permission to write data to the resource. |
STYPE_DEVICE |
0x04 |
Permission to create an instance of the resource (such as a file); data can be written to the resource as the resource is created. |
STYPE_IPC |
0x08 |
Permission to execute the resource. |
For example, to retrieve all the disk shares on server MYSERVER, use the following SQL query:
SELECT unc , comments
FROM shares
WHERE type = 0