Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To setup a read-only database user use the following steps.

NOTE:  This example is using 'pentaro' as the username. You can make it what you want.  It is also assuming your database schema name is 'penta'.

  1. Create the user

    Code Block
    titleDone by the sysdba
    create user pentaro identified by <somepassword> default tablespace users temporary tablespace temp;
    grant create session to pentaro;
    grant create synonym to pentaro;
  2. Grant select on table or view in the PENTA schema to the user you created.

    Code Block
    titleDone by the penta schema user
    grant select on <sometable> to pentaro;
  3. The read-only user then creates synonyms for each table or view they want to query.

    Code Block
    titleDone by the read only user you created.
    create synonym <sometable> for penta.<sometable>;