1、登录Oracle12c查询表空间存储目录
select FILE_NAME,FILE_ID,TABLESPACE_NAME from dba_data_files;

2、CDB下创建表空间
create tablespace syz datafile '/opt/oracle/oradata/ORCL/syz.dbf' size 1G autoextend on next 100M maxsize unlimited;

3、切入pdb创建表空间
alter session set container=orclpdb1; -- 切入到PDB 数据库
create tablespace syz datafile '/opt/oracle/oradata/ORCL/ORCLPDB1/syz.dbf' size 1G autoextend on next 100M maxsize unlimited;--创建表空间

4、创建PDB用户
指定表空间
create user SYZ identified by SYZ default tablespace syz;

5、pdb用户授权
grant create session,resource to SYZ;
grant select any table to SYZ;
grant select_catalog_role to SYZ;
grant create any directory to SYZ;
grant flashback any table to SYZ;
grant alter any table to SYZ;
ALTER USER SYZ QUOTA UNLIMITED ON SYZ;

6、连接数据库、创建表

2万+

被折叠的 条评论
为什么被折叠?



