oracle 数据库表空间、用户、权限的创建与删除

时间:2022-12-30 08:43:14

创建表空间HB 到X盘oracle安装目录下:

CREATE TABLESPACE HB DATAFILE
  'X:\ORADATA\ORCLXM\HB' SIZE 1024M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;

创建用户 business 到表空间HB:

create user business
  identified by "business"
  default tablespace HB
  temporary tablespace TEMP
  profile DEFAULT;

 

赋予此用户相应的权限:

grant connect to business;
grant dba to business;
grant resource to business;

grant unlimited tablespace to business;

 

删除用户 business

drop user business cascade