1、oracle创建新用户

站着说话不腰疼 / 2023-08-23 / 原文

目录
  • oracle创建新用户
    • 1、创建表空间
    • 2、创建临时表空间
    • 3、创建用户
    • 4、授权

oracle创建新用户

1、创建表空间

CREATE TABLESPACE "USER_SPACE" LOGGING
     DATAFILE '/u01/app/oracle/oradata/UAT/USER_SPACE.DBF'
     SIZE 32M REUSE AUTOEXTEND ON NEXT  200M MAXSIZE UNLIMITED
     EXTENT MANAGEMENT LOCAL;

2、创建临时表空间

CREATE TEMPORARY TABLESPACE "USER_TMPE"    
TEMPFILE '/u01/app/oracle/oradata/UAT/USER_TMPE.DBF'    
SIZE 50M     
AUTOEXTEND ON     
NEXT 50M MAXSIZE UNLIMITED  
EXTENT MANAGEMENT LOCAL;     

3、创建用户

CREATE USER "new_user" IDENTIFIED BY "new_pwd" DEFAULT TABLESPACE "USER_SPACE" TEMPORARY TABLESPACE "USER_TMPE";

4、授权

alter user  new_user  account unlock;
grant connect to new_user;
grant create synonym to new_user;
grant create view to new_user;
grant create job to new_user;
grant create table to new_user;
grant create session to new_user;
grant resource to new_user;
grant read,write on directory dmps to new_user;
grant select any table to new_user;