oracle创建/删除表空间与用户

  • 创建表空间

CREATE SMALLFILE TABLESPACE “space_name” DATAFILE ‘/u01/app/oracle/oradata/orcl/SPACE_NAME.DBF’ SIZE 10M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE 32767M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

  • 删除表空间:

 

  • 创建用户:
    create user username identified by password default tablespace space_name
    temporary tablespace TEMP profile DEFAULT;
    授权:
    grant select on SYS.DBA_CONS_COLUMNS to username ;
    grant execute on SYS.DBMS_RLS to username ;
    grant connect to username ;
    grant dba to username ;
    grant resource to username ;
    grant unlimited tablespace to username ;
  • 删除用户

drop user username cascade;

  • 删除表空间

DROP TABLESPACE space_name INCLUDING CONTENTS AND DATAFILES;

发表评论

电子邮件地址不会被公开。 必填项已用*标注