oracle 创建表空间,用户并授权

1. 查看所有表空间及存储路径

select file_name, tablespace_name from dba_data_files;

2. 创建表空间

CREATE TABLESPACE xstream_tbs DATAFILE
'/opt/oracle/app/oradata/orcl/xstream_tbs.dbf' SIZE 25M
REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

3. 创建用户并指定表空间

CREATE USER xstrmadmin IDENTIFIED BY admin
DEFAULT TABLESPACE xstream_tbs
QUOTA UNLIMITED ON xstream_tbs;

4. 授权

grant create session to xstrmadmin;
grant select any table to xstrmadmin;
grant unlimited tablespace to xstrmadmin;
grant create any table to xstrmadmin;
grant drop any table to xstrmadmin;
grant insert any table to xstrmadmin;
grant update any table to xstrmadmin;
grant connect,resource,dba to xstrmadmin;

各权限顾名思义,在此不做详细说明

上一篇:oracle创建表空间、用户、权限


下一篇:SYN攻击防护措施