简体   繁体   中英

System and database leveled users in Oracle Database

I'm using the Oracle Database EX 11.2.0.2.0 and I hava a quite simple database created there. Now the issue is i would like to have multiple users with different privileges set up. I have found that topic: How to create a user in Oracle 11g and grant permissions but I cannot find anywhere the basic thing about users accounts: what are the difference between creating system-leveled and particular database-leveled user? I've logged in sqlplus as SYSTEM and executed the following commands:

CREATE USER TEST IDENTIFIED BY password;
GRANT CONNECT TO TEST;

and now the problem is that my databse is actually called let's say BASE with one table called PAYMENTS and to give any privileges to a newly created user I cannot execute:

GRANT SELECT ON PAYMENTS TO TEST;

but I have to type in:

GRANT SELECT ON BASE.PAYMENTS TO TEST;

so I suppose I missed something. Is it any way of connecting the created user to a particular database? So that the newly created user will be visible as a database user in Oracle APEX?

Users and schemas are synonymous in Oracle - basically. A schema is the collection of objects owned by a user.

To get what you want, you would need to create users lacking the privs to create anything and only have the ability to select from the objects of others.

When referencing objects in other schemas, you must provide the schema name. An other user might have a table with the same name. Currently you are logged in with the system user, which is not advisable. When creating objects in the BASE schema (another name for user in de Oracle DB), why not give the user some extra rights (like granting privileges)? The core of your problem is that you want to grant privileges to user A on object owned by B, logged in as user C. You have to be very specific in that case to Oracle what privileges are granted to whom ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM