GRANT READ ON SHARE
For restricted shares, use the GRANT
command to explicitly give users access to the share. After a user has been GRANT
-ed access they will still need to run an ATTACH
command to be able to run queries against the shared database. Only the owner of the share can use the GRANT
command to give access to others.
Syntax
GRANT READ ON SHARE <share name> TO <username> [, <username2>, <username3>];
Example usage
GRANT READ ON SHARE birds TO duck; # gives the user with username 'duck' access to the share 'birds'
GRANT READ ON SHARE taxis TO usr1, usr2; # gives the users with usernames 'usr1' and 'usr2' access to the share 'taxis'