Oracle PL/SQL/User Previliege/Create User

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

Create a user and drop it

 
create user sqle identified by password;
grant create session, dba to sqle;
connect sqle/password;
--DROP USER sqle;



Create user and assign password

    
SQL> create user user1 identified by VALUES "1A2DD3CCEE354DFA";
SQL>
SQL>
SQL> drop user user1;



Create user: default tablespace, temporary tablespace, quota

 
SQL>
SQL> create user aNewUser
  2      identified by doomed
  3      default tablespace users
  4      temporary tablespace temp
  5      quota unlimited on users;
User created.
SQL>
SQL>
SQL> grant create session, create table to aNewUser;
Grant succeeded.
SQL>
SQL> connect aNewUser/doomed;
Connected.
SQL>
SQL> create table employees_backup (
  2        employee_id number,
  3        last_name   varchar2(30),
  4        email       varchar2(100)
  5      );
Table created.
SQL>
SQL> drop table employees_backup;
Table dropped.
SQL>



Create User demo

 
SQL>
SQL> CREATE USER Bob IDENTIFIED BY mypass;
User created.