zoukankan      html  css  js  c++  java
  • Linux环境下oracle创建和删除表空间及用户

    #su - oracle
    $ sqlplus /nolog
    SQL> connect / as sysdba
    --//创建临时表空间
    create temporary tablespace test_temp
    tempfile '/data/oracle/oradata/test/test_temp01.dbf' --//Linux下的文件系统
    size 64m
    autoextend on
    next 64m maxsize 2048m
    extent management local;
    --//创建数据表空间
    create tablespace test_data
    logging
    datafile '/data/oracle/oradata/test/test_data01.dbf' --//Linux下的文件系统
    size 64m
    autoextend on
    next 65m maxsize 2048m
    extent management local;
    --//创建用户并指定表空间 用户名和密码均为"test"
    create user test identified by test
    default tablespace test_data
    temporary tablespace test_temp;
    --//给用户授予权限
    grant connect,resource to test;
    --//删除表空间
    drop tablespace test_temp including CONTENTS and datafiles;
    --//修改用户密码
    alter user test identified by new_password;
    --//删除用户
    drop user 用户名 cascade; --//执行该语句请小心,会级联删除该用户下所有对象。
    --//给用户分配权限
    SQL> grant connect to test_user;
    SQL> grant resource to test_user;
    SQL> grant create view to test_user;
    SQL> GRANT DEBUG CONNECT SESSION TO test_user;
    SQL> GRANT DEBUG ANY PROCEDURE TO test_user;

  • 相关阅读:
    hdu 1535 Invitation Cards(spfa)
    hdu 1317 XYZZY
    hdu 1245 Saving James Bond
    hdu 1546 Idiomatic Phrases Game
    hdu 1217 Arbitrage(佛洛依德)
    hdu 1599 find the mincost route(无向图的最小环)
    poj1579
    poj1905
    poj1384
    poj3624
  • 原文地址:https://www.cnblogs.com/heidsoft/p/3521703.html
Copyright © 2011-2022 走看看