创建表空间创建用户并赋予权限

Posted 我是冰霜

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建表空间创建用户并赋予权限相关的知识,希望对你有一定的参考价值。

分开执行如下sql语句
--创建临时表空间 CREATE SMALLFILE TEMPORARY TABLESPACE "TEMP11" TEMPFILE ‘E:\app\MD\oradata\oanet\TEMP11.ora‘ SIZE 200M (“E:\app\MD\oradata\oanet”是数据库实例oanet的实际路径) EXTENT MANAGEMENT LOCAL UNIFORM SIZE 5M; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE "TEMP11" --创建表空间1 CREATE SMALLFILE TABLESPACE "WORKFLOW01" LOGGING DATAFILE ‘E:\app\MD\oradata\oanet\WORKFLOW01.ora‘ SIZE 2048M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO --创建表空间2 CREATE SMALLFILE TABLESPACE "WORKFLOW02" LOGGING DATAFILE ‘E:\app\MD\oradata\oanet\WORKFLOW02.ora‘ SIZE 1024M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO --自动扩展表空间大小 ALTER DATABASE DATAFILE ‘E:\app\MD\oradata\oanet\WORKFLOW01.ora‘ AUTOEXTEND ON NEXT 200M MAXSIZE 20180M; ALTER DATABASE DATAFILE ‘E:\app\MD\oradata\oanet\WORKFLOW02.ora‘ AUTOEXTEND ON NEXT 200M MAXSIZE 2048M;

创建用户

--创建用户
-- Create the user 
create user yx_base
  identified by "11"
  default tablespace WORKFLOW01
  temporary tablespace TEMP11
  profile DEFAULT;


-- Grant/Revoke role privileges 授予用户connect 和 dba权限
grant connect to yx_base with admin option;
grant dba to yx_base with admin option;
-- Grant/Revoke system privileges 授予用户增删改查等权限
grant alter any table to yx_base with admin option;
grant create any table to yx_base with admin option;
grant delete any table to yx_base with admin option;
grant drop any table to yx_base with admin option;
grant insert any table to yx_base with admin option;
grant select any table to yx_base with admin option;
grant update any table to yx_base with admin option;
grant unlimited tablespace to yx_base with admin option;

 

以上是关于创建表空间创建用户并赋予权限的主要内容,如果未能解决你的问题,请参考以下文章

Linux oracle数据库创建表空间用户并赋予权限

oracle如何新建一个用户,并赋予权限啊??

Oracle创建用户并赋予权限

oracle 临时表空间数据表空间创建用户名与密码赋予用户权限

plsql怎么给用户创建用户权限

Oracle 创建普通用户,并赋予权限