zoukankan      html  css  js  c++  java
  • oracle 创建表空间用户

    注意:

    先以管理员用户登陆(sys/SYSDBA),然后创建表空间和用户。

    1、创建普通表空间和用户

    //创建临时表空间
    create temporary tablespace oa_temp
    tempfile 'D:appAdministratororadataorcldjoa_temp.dbf'
    size 32m
    autoextend on
    next 32m maxsize 20480m
    extent management local;

    //创建数据表空间
    create tablespace oa
    logging
    datafile 'D:appAdministratororadataorcldjoa.dbf'
    size 32m
    autoextend on
    next 32m maxsize 20480m
    extent management local;

    //创建用户
    create user oa identified by oa
    default tablespace oa
    temporary tablespace oa_temp;

    //给用户添加权限
    GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
    DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
    DBA,CONNECT,RESOURCE,CREATE SESSION TO oa

    drop user oa cascade;
    drop tablespace oa including contents and datafiles;
    drop tablespace oa_temp including contents and datafiles;

    2、创建大表空间和用户


    //创建临时表空间
    create bigfile temporary tablespace sxybyj_temp
    tempfile 'E:appAdministratororadataorclsxybyj_temp.dbf'
    size 128m
    autoextend on
    extent management local
    uniform size 128k

    //创建数据表空间
    create bigfile tablespace sxybyj
    datafile 'E:appAdministratororadataorclsxybyj.dbf'
    size 128m
    autoextend on
    extent management local
    uniform size 128k

    //创建用户
    create user sxybyj identified by sxybyj
    default tablespace sxybyj
    temporary tablespace sxybyj_temp;

    //给用户添加权限
    GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
    DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
    DBA,CONNECT,RESOURCE,CREATE SESSION TO sxybyj

    drop user sxybyj cascade;
    drop user test1 cascade;
    drop tablespace sxybyj including contents and datafiles;
    drop tablespace sxybyj_temp including contents and datafiles;

  • 相关阅读:
    HDU-ACM课堂作业 Degree Sequence of Graph G & Frogs' Neibroghood
    HDU-ACM课堂作业 Least Common Multiple
    HDUOJ 悼念512汶川大地震遇难同胞——老人是真饿了
    HDUOJ 1236 排名
    HDUOJ Quicksum
    HDUOJ 2560 The Seven Percent Solution
    1255 迷宫问题
    1253 抓住那头牛
    1254 走出迷宫
    1252:走迷宫
  • 原文地址:https://www.cnblogs.com/tiandi/p/5004705.html
Copyright © 2011-2022 走看看