Saturday , December 9 2023

With Grant Option

In today’s article I will be explaining how we can Authorize the User with ‘WITH GRANT OPTION’.

When Grant is given with Grant Option, the person to whom Grant is given can also authorize the objects they want.

If the user who gave the authorization with the Grant Option gets the authorization, the authorization given by the user to the other user is also taken.

For example:

Let’s create users named SYS and AHMET, EMRAH and ONUR and let AHMET authorize to create tables under his own schema.

Let the AHMET user create a table under his own schema and grant EMRAH the right to select the table he created with ‘WITH GRANT OPTION’.

Let the EMRAH user also authorize the ONUR user to select this table.

The ONUR user queries the table and sees that the data has arrived.

Let AHMET user get all permissions related to the table created from EMRAH user.

EMRAH and ONUR users get the following error when they try to query the AHMET_TEST table.



Leave a Reply

Your email address will not be published. Required fields are marked *