Grant Required Privileges to Users
This section is about granting required privileges to user before loading the shard data from the backup to a secure data store.
Any user who wants to restore records into a secure data store needs to have the required privileges. Before restoring data using the load command, run the following commands to grant the user with the required privileges. For more details on roles and privileges, see Managing Roles, Privileges and Users.
Login to the SQL shell. When prompted for user and password, provide the same user and password that you created in the store you backed up. For more details, see Starting the SQL shell. In the command below,
kvroot2/security
is the security directory. The security directory contains all the security related files that were automatically generated by the securityconfig tool while creating the secure store using the makebootconfig
command. For more details, see Configuring security in a data store.java -Xmx64m -Xms64m -jar lib/sql.jar -helper-hosts phoenix581601:5000 -store mystore -security kvroot2/security/client.security
Login as:root
root's password:<password>
The SQL prompt appears
sql->
Grant
readwrite
and writesystable
roles to the user.GRANT readwrite TO USER root
Output:
Statement completed successfully
GRANT writesystable TO USER root
Output:
Statement completed successfully
exit