如何建立oracle数据库

--1建立数据库数据库

--可使用默认的orcl数据库c#

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

--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; app

--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;ide


--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; 工具

相关文章
相关标签/搜索