首页 > 代码库 > 创建表空间、创建用户并赋予权限
创建表空间、创建用户并赋予权限
分开执行如下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;
创建表空间、创建用户并赋予权限
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。