Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Restrict access to tables

637711
Member Posts: 73
Hello,
I would like to know, if i can restrict users to access or view certain tables in a schema. I want to give access to other users (read only access) of some tables and restrict viewing of other tables..Other users should not be able to view the data of tables...Is it possible to do so in Oracle..If it is possible then how can i do it..
Any help?
I would like to know, if i can restrict users to access or view certain tables in a schema. I want to give access to other users (read only access) of some tables and restrict viewing of other tables..Other users should not be able to view the data of tables...Is it possible to do so in Oracle..If it is possible then how can i do it..
Any help?
Answers
-
If I understand your question correctly, then read more about GRANT statement here.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#i2155015 -
Once you create a user, he initially has no access to any objects. If you want to revoke existing permissions, then you would: revoke select on <table_name> to from <user_name>;
Now if you want to add priviliges, then you would: grant select on table <table_name> to <user_name>; -
Yes in oracle fine grained access control is possible. You can restrict to user to see data only. Even you can allow to see only limited column data only by creating the view on few of the table columns and granting the permission on that view to other.
You can give update permission to other. you can give table alter permission.
This can be done through grant commands in oracle.
eg. user A and user B
user A contains table emp
desc emp
emp_nm varchar2(10),
emp_id number(4),
dept_no number(2),
add varchar2(50)
If you don't give any grant on this table emp to B user he will not be able to do any access this table.
By command "Grant select on emp to B' the user b will be able to see the emp table data only.
You can give update,alter table permission to B user as given bellow
Grant update on emp to B
Grant alter on emp to B
Even you can ristict B to see only few columns of emp table creating view
create view test_view as select emp_nm,emp_id from emp;
Then grant select on test_view to B; -
You can also use Database Vault, if you want to create domains. That way, you make sure that not even the DBAs are allowed to access your data.
However, the easiest way is to create another user and grant select to that schema's objects.
Regards
This discussion has been closed.