GRANT statement

Syntax for GRANT statement

 

GRANT SELECT ON all_objects to <Schema_name>;

GRANT EXECUTE ANY PROCEDURE to <Schema_name>;

GRANT CONNECT TO <Schema_name>;

GRANT RESOURCE TO <Schema_name>;

ALTER USER <Schema_name> DEFAULT ROLE ALL;

GRANT SELECT ANY TABLE TO <Schema_name>;

GRANT CREATE SESSION TO <Schema_name>;

GRANT CREATE TRIGGER TO <Schema_name>;

GRANT CREATE ANY VIEW TO <Schema_name>;

ALTER USER <Schema_name> QUOTA UNLIMITED ON <Schema_name>;

grant create any procedure to <Schema_name>;

grant create table to <Schema_name>;

grant create view, create procedure, create sequence to <Schema_name>;

GRANT DROP ANY TABLE to <Schema_name>;

GRANT DELETE ANY TABLE to <Schema_name>;

GRANT INSERT ANY TABLE to <Schema_name>;

GRANT UPDATE ANY TABLE to <Schema_name>;

GRANT EXECUTE ANY PROCEDURE to <Schema_name>;

GRANT CREATE ANY SEQUENCE to <Schema_name>;

GRANT CREATE SYNONYM to <Schema_name>;

grant create any index to <Schema_name>;

GRANT READ ANY TABLE TO <Schema_name>;

GRANT SELECT ANY DICTIONARY TO <Schema_name>;

GRANT CREATE TRIGGER TO <Schema_name>;

GRANT SELECT ANY TABLE TO <Schema_name>;

GRANT CREATE ANY VIEW TO <Schema_name>;


For example, if we want our books_admin user to have the ability to perform 

SELECT, UPDATE, INSERT, and DELETE capabilities on the books table, 

we might execute the following GRANT statement:

GRANT SELECT,INSERT,UPDATE ON <Schema_name>.Table_name TO <Schema_name>;


ORA-02020: too many database links in use


Cause:  The current session has exceeded the INIT.ORA open_links maximum.


Solution :-

SQL> show parameter open_links;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_links                           integer              0

open_links_per_instance              integer     4


[oracle@ora ~]$ sqlplus sys/****@PDB as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Oct 15 14:37:19 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Fri Oct 15 2021 14:37:01 -04:00

Connected to:

Oracle Database 12c EE High Perf Release 12.2.0.1.0 - 64bit Production


SQL> shut immediate

Pluggable Database closed.

SQL> startup

Pluggable Database opened.

SQL> show parameter open_links;


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_links                           integer              4

open_links_per_instance              integer     4

SQL>


ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf...