--1:创建临时表空间
create temporary tablespace spa_authsys_temp
tempfile 'F:\soft64\ora11g\oradata\orcl\my\authsys_temp.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--2:创建数据表空间
create tablespace spa_authsys_data
logging
datafile 'F:\soft64\ora11g\oradata\orcl\my\authsys_data.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--第3步:创建用户并指定表空间
create user authsys identified by authsys
default tablespace spa_authsys_data
temporary tablespace spa_authsys_temp;
--第4步:给用户授予权限
grant connect,resource to authsys;
grant create any sequence to authsys;
grant create any table to authsys;
grant delete any table to authsys;
grant insert any table to authsys;
grant select any table to authsys;
grant unlimited tablespace to authsys;
grant execute any procedure to authsys;
grant update any table to authsys;
grant create any view to authsys;
create temporary tablespace spa_authsys_temp
tempfile 'F:\soft64\ora11g\oradata\orcl\my\authsys_temp.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--2:创建数据表空间
create tablespace spa_authsys_data
logging
datafile 'F:\soft64\ora11g\oradata\orcl\my\authsys_data.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--第3步:创建用户并指定表空间
create user authsys identified by authsys
default tablespace spa_authsys_data
temporary tablespace spa_authsys_temp;
--第4步:给用户授予权限
grant connect,resource to authsys;
grant create any sequence to authsys;
grant create any table to authsys;
grant delete any table to authsys;
grant insert any table to authsys;
grant select any table to authsys;
grant unlimited tablespace to authsys;
grant execute any procedure to authsys;
grant update any table to authsys;
grant create any view to authsys;
本文介绍如何在Oracle数据库中创建临时表空间和数据表空间,并通过具体SQL语句演示了创建用户及其指定表空间的过程,最后展示了授予用户各种数据库权限的方法。
1193

被折叠的 条评论
为什么被折叠?



