疯子姓张

一定要站在巨人的肩膀上去学习。

导航

创建用户、创建表空间、授权、建表 oracle

 

这一过程需要 sysdba的身份登录oracle 我的密码是123456

--1表空间

CREATE TABLESPACE xxcs
DATAFILE 'D:\tablespace\db\xxcs' size 800M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

--2 索引表空间

CREATE TABLESPACE xxcs_Index
DATAFILE 'D:\tablespace\db\xxcs_index' size 512M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

--2.建用户

create user xxcs identified by xxcs
default tablespace xxcs;

--3.赋权

grant connect,resource to xxcs;
grant create any sequence to xxcs;
grant create any table to xxcs;
grant delete any table to xxcs;
grant insert any table to xxcs;
grant select any table to xxcs;
grant unlimited tablespace to xxcs;
grant execute any procedure to xxcs;
grant update any table to xxcs;
grant create any view to xxcs;

--4 建表

create table student (

stu_id int;

stu_name varchar2(30),

stu_date date

)

 

posted on 2017-11-02 07:32  菠萝奶油饭  阅读(71)  评论(0)    收藏  举报