Allow SELECT to a user in all schema tables, Oracle_APEX,jaber_it,Interactive_Report,Database_19c,Oracle_Database, jaberitltd, oracle apex
Allow SELECT to a user in all schema tables
Allow Select To A User In All Schema Tables. Allow Select To A User In All Schema Tables. Sometimes, you want to grant SELECT to all tables that have a schema or user associated with another user. Unfortunately, Oracle does not directly support using a single SQL statement. To work around this, you can select all the table names of a user (or a schema) and assign the privilege of the SELECT object in each table to a donor.
The following stored method explains the concept: Creating A User In Oracle Database CREATE USER TEST_USER IDENTIFIED BY TEST_123
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK; The Following Stored Method Explains The Concept CREATE PROCEDURE grant_select (username VARCHAR2, grantee VARCHAR2)
AS
BEGIN
FOR r IN (SELECT owner, table_name
FROM all_tables
WHERE owner = username)
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON '
|| r.owner
…