Administration
Octo uses an M routine to manage the users of the database and other administrative tasks, called %ydboctoAdmin.
Currently Octo user administration consists of user creation and deletion, and setting of user database permissions.
User database permissions are set at user-creation time, i.e. via %ydboctoAdmin add user. If no options are passed to this command, the user is created with read-only permissions. To grant additional permissions, use --readwrite or --allowschemachanges, described below.
ydboctoAdmin
%ydboctoAdmin allows the user to add, delete and view a list of users with show.
Usage pattern:
yottadb -r %ydboctoAdmin <action> <subAction> <arguments>
<action> is either add, delete or show.
<subAction> refers to
userorusers.<arguments> would be the specific arguments passed to the command.
Add
The following is an example of adding users to the database:
yottadb -r %ydboctoAdmin add user OctoUserThis adds OctoUser as a user of the database, after verifying the password for the user. Unless otherwise specified, new users are created with read-only database permissions.
To grant a user read-write permissions (
INSERT,UPDATE, andDELETE) use the-w/--readwriteflag:yottadb -r %ydboctoAdmin add user OctoUser --readwrite yottadb -r %ydboctoAdmin add user OctoUser -wTo grant a user read-write permissions and permission to modify schemas (
CREATEandDROP), use the-a/--allowschemachangesflag:yottadb -r %ydboctoAdmin add user OctoUser --allowschemachanges yottadb -r %ydboctoAdmin add user OctoUser -a
Delete
The following is an example of deleting users from the database:
yottadb -r %ydboctoAdmin delete user OctoUserThis deletes OctoUser from the list of users in the database.
Show
The following is an example of the database showing a list of users:
yottadb -r %ydboctoAdmin show usersThis shows a list of the users of the database.