Oracle PL/SQL/User Previliege/SESSION privileges — различия между версиями

Материал из SQL эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 13:45, 26 мая 2010

grant a system privilege to PUBLIC

 
GRANT CREATE SESSION TO public;

--



Grant CREATE SESSION privilege to a user, hr, allowing hr to log on to an Oracle database

 
GRANT CREATE SESSION TO hr;
--



GRANT CREATE SESSION TO newUserName in order to log in

 
SQL>
SQL> CREATE USER newUserName IDENTIFIED BY password;
User created.
SQL>
SQL> SELECT default_tablespace, temporary_tablespace
  2  FROM dba_users
  3  WHERE username="NEWUSERNAME";
DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE
------------------------------ ------------------------------
SYSTEM                         TEMP
SQL>
-- sqlplus newUserName/password
SQL> GRANT CREATE SESSION TO newUserName;
Grant succeeded.
SQL>
SQL> DROP USER newUserName;
User dropped.
SQL>