当前位置:Gxlcms > 数据库问题 > 如何创建oracle数据库

如何创建oracle数据库

时间:2021-07-01 10:21:17 帮助过:25人阅读

--可以使用默认的orcl数据库

--或者使用配置和移植工具里面的Database Configuration Assistant帮助创建数据库。

--2创建表空间
--临时表空间
CREATE temporary TABLESPACE sdt_temp
tempfile ‘D:\app\Administrator\virtual\oradata\orcl\ly_temp.dbf‘ size 128m
autoextend on next 32m maxsize 512m;
--表空间
CREATE TABLESPACE sdt_data
DATAFILE ‘D:\app\Administrator\virtual\oradata\orcl\ly_data.dbf‘ size 256M
autoextend on next 32m maxsize 1024m;

--DROP TABLESPACE sdt_temp INCLUDING CONTENTS AND DATAFILES;

--3.创建用户
--Oracle 12C建用户要以c##开头 ,详情见Oracle 12C引入CDB与PDB的新特性,允许一个数据库容器(CDB)承载多个可插拔数据库(PDB)
--建立用户前要重启oracle server服务。不然无法创建用户。
create user c##feiyu identified by feiyu
default tablespace sdt_data
temporary tablespace sdt_temp;


--4.给用户赋权
grant connect,resource to c##feiyu;
grant create any sequence to c##feiyu;
grant create any table to c##feiyu;
grant delete any table to c##feiyu;
grant insert any table to c##feiyu;
grant select any table to c##feiyu;
grant unlimited tablespace to c##feiyu;
grant execute any procedure to c##feiyu;
grant update any table to c##feiyu;
grant create any view to c##feiyu;

如何创建oracle数据库

标签:ace   next   默认   toe   rtu   cdb   创建数据库   ora   cut   

人气教程排行