创建用户、创建表空间、授权、建表 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
)
浙公网安备 33010602011771号