oracle创建表空间以及用户角色Demo
2016-07-17 18:34
645 查看
drop tablespace myspace including contents and datafiles;
drop tablespace mytemp including contents and datafiles;
drop role rootrole;
drop user root cascade;
create tablespace myspace
datafile 'E:\app\Administrator\oradata\orcl\myspace.dbf'
size 100m
autoextend on;
create temporary tablespace mytemp
tempfile 'E:\app\Administrator\oradata\orcl\mytemp.dbf'
size 10m
autoextend on;
create role rootrole;
grant create session to rootrole;
grant create table to rootrole;
create user root
identified by root
default tablespace myspace
temporary tablespace mytemp
quota 5M on myspace;
grant rootrole to root;
grant unlimited tablespace to root;
drop table tb_user;
create table tb_user(
stu_num int primary key,
stu_name varchar2(20) not null,
stu_sex char(4) default('男')check(stu_sex in('男','女')),
stu_birthday date
);
insert into tb_user(stu_num,stu_name)values('1001','test');
select * from tb_user;
drop tablespace mytemp including contents and datafiles;
drop role rootrole;
drop user root cascade;
create tablespace myspace
datafile 'E:\app\Administrator\oradata\orcl\myspace.dbf'
size 100m
autoextend on;
create temporary tablespace mytemp
tempfile 'E:\app\Administrator\oradata\orcl\mytemp.dbf'
size 10m
autoextend on;
create role rootrole;
grant create session to rootrole;
grant create table to rootrole;
create user root
identified by root
default tablespace myspace
temporary tablespace mytemp
quota 5M on myspace;
grant rootrole to root;
grant unlimited tablespace to root;
drop table tb_user;
create table tb_user(
stu_num int primary key,
stu_name varchar2(20) not null,
stu_sex char(4) default('男')check(stu_sex in('男','女')),
stu_birthday date
);
insert into tb_user(stu_num,stu_name)values('1001','test');
select * from tb_user;
相关文章推荐
- oracle学习笔记 SQL语句执行过程剖析讲课
- oracle 9i/10g/11g(11.2.0.3)安装包和PATCH下载地址汇总
- 用python读取oracle函数返回值
- Maven 引入oracle jdbc jar包
- OCA笔记04------完整性约束
- ORACLE知识点整理之一
- 安装和使用Oracle VM VirtualBox中的要点,注意事项和遇到的问题
- OCA笔记03------用户、角色和权限
- 在Oracle VM VirtualBox中如何安装64位虚拟机系统
- Oracle——分区表
- oracle 行转列应用
- Oracle RMAN异机恢复归档RMAN-07518(供日志挖掘使用)及修改dbid步骤
- ORACLE删除某用户下所有对象
- 一种高效的 vector 四则运算处理方法
- Oracle的使用经验
- Oracle内存学习笔记
- Oracle的rollup、cube、grouping sets函数
- oracle 中GROUP BY的用法
- Oracle函数及操作符
- 数据库(学习整理)----7--Oracle多表查询,三种join连接