# User Administration for Oracle Database

It is recommended that each user be assigned a personal database account with only the required privileges. The pdfkeeper database account should only be used for pdfkeeper schema administration, not for general use. For more information on Managing Users, please refer to the Oracle Database Documentation.

Note, due to changes with permissions starting with Oracle Database Free, this topic only provides instructions for performing user administration on the same computer as Oracle Database.

Perform the following steps for any user that will need access to the pdfkeeper schema. Substitute the username and password for user_name and password. These steps are to be performed on the same computer as Oracle Database while logged in as the same user that installed Oracle Database:

1. Open a Command Prompt.

2. Enter sqlplus / as sysdba

3. For Oracle Database Free, enter alter session set container=freepdb1;

4. For Oracle Database Express Edition, enter alter session set container=xepdb1;

5. For Oracle Database Enterprise or Standard Edition, enter alter session set container=orclpdb;

- If you wish to use a different pluggable database name, replace orclpdb with that name.

6. For a new user, enter create user user_name default tablespace users identified by "password";

7. Enter grant create session to user_name;

8. Enter quit

9. For Oracle Database Free, enter sqlplus pdfkeeper@localhost/freepdb1

10. For Oracle Database Express Edition, enter sqlplus pdfkeeper@localhost/xepdb1

11. For Oracle Database Enterprise or Standard Edition, enter sqlplus pdfkeeper@localhost/orclpdb

- If you wish to use a different pluggable database name, replace orclpdb with that name.

12. For a new account, enter the following statement to grant the user select/query access: grant select on docs to user_name;

13. To give the user the ability to upload documents, enter the following statements: grant insert on docs to user_name; and grant select on docs_seq to user_name;

14. To give the user the ability to update documents, enter the following statement: grant update on docs to user_name;

15. To give the user the ability to delete documents, enter the following statement: grant delete on docs to user_name;

16. To prevent the user from uploading documents, enter the following statements: revoke insert on docs from user_name; and revoke select on docs_seq from user_name;

17. To prevent the user from updating documents, enter the following statement: revoke update on docs from user_name;

18. To prevent the user from deleting documents, enter the following statement: revoke delete on docs from user_name;

Additional Information:

- If localhost doesn’t resolve try 127.0.0.1 or the computer name.