Skip to content
Tuesday, February 07, 2023
Database Learners
Menu
  • About Database
  • Oracle
    • ASM
    • Data Pump
    • Backup and Recovery
    • Patching and Upgradation
    • Performance Tuning
    • Data Guard
    • Real Application Cluster
    • Golden Gate
    • PL/SQL
  • MySQL
  • PostgreSQL
  • MongoDB
  • MS SQL Server
  • SQL
  • Linux
  • About Me
  • Contact Us
  • Home
  • 2020
  • August
  • Grant Select on all Tables Owned By Specific User

Grant Select on all Tables Owned By Specific User

DB Scripts
1 September 20201 September 2020 Administrator
BEGIN
   FOR R IN (SELECT owner, table_name FROM all_tables WHERE owner='TheOwner') LOOP
      EXECUTE IMMEDIATE 'grant select on '||R.owner||'.'||R.table_name||' to TheUser';
   END LOOP;
END; 

Share this post: on Twitter on Facebook on Google+

Post Views: 497

Post navigation

How to tune Oracle Standard Edition without Option Packs
How to Create a Scheduler Job in Oracle 12c
Administrator

http://www.databaselearners.com

Related Posts

Drop all tables in Oracle DB (Schema)

2 September 20204 September 2020 Administrator

Database health checks in Oracle

14 August 202014 August 2020 Administrator

Formatting oracle output in sqlplus

31 October 20145 August 2020 Administrator

Recent Posts

  • How to Optimize MySQL Tables and Defragment to Recover Space
  • ORA-01031: Insufficient Privileges When Connect As Sysdba
  • Oracle RAC log files locations
  • Drop all tables in Oracle DB (Schema)
  • How to Determine If the Oracle Redo Log File Size Is a Problem

Categories

  • ASM (40)
  • Backup and Recovery (52)
  • Data Guard (36)
  • Data Pump (28)
  • DB Scripts (26)
  • General (1)
  • Golden Gate (7)
  • Interview Questions (24)
  • Linux (86)
  • MS SQL Server (8)
  • MySQL (120)
  • ORA-Errors (45)
  • Oracle (301)
  • Oracle 10g (19)
  • Oracle 11g (24)
  • Oracle 12c (9)
  • Oracle RAC (101)
  • Oracle XE (7)
  • Patching and Upgradation (19)
  • Performance Tuning (61)
  • PL/SQL (26)
  • RMAN (85)
  • SQL (32)

Visitors

  • 0
  • 35
  • 49,283

Reference Links:

  • https://docs.oracle.com/en/database/index.html
  • https://dev.mysql.com/doc/
  • https://docs.mongodb.com/manual/
  • https://docs.microsoft.com/en-us/sql/sql-server/?view=sqlallproducts-allversions
  • https://www.postgresql.org/docs/current/
@2021 databaselearners.com | Theme: BlogMagazine by Dinesh Ghimire.