zoukankan      html  css  js  c++  java
  • oracle 表空间操作

    具体操作如下:
    1)、运行->sqlplus /nolog
    2)、输入conn / as sysdba 管理员账户登录
    3)、如果用户被锁定先解锁:alter user system account unlock;
    4)、修改密码:alter user system identified by qiushun;

    确保路径存在,比如【D:\oracle\oradata\Oracle9i\】也就是你要保存文件的路径存在

    /*第1步:创建临时表空间 */

    create temporary tablespace user_temp

    tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf'

    size 50m

    autoextend on

    next 50m maxsize 20480m

    extent management local;

    /*第2步:创建数据表空间 */

    create tablespace user_data

    logging

    datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf'

    size 50m

    autoextend on

    next 50m maxsize 20480m

    extent management local;

    /*第3步:创建用户并指定表空间 */

    create user username identified by password

    default tablespace user_data

    temporary tablespace user_temp;

    /*第4步:给用户授予权限 */

    grant connect,resource,dba to username;

    /*第5步:删除用户 */

    drop user username cascade;

    /*第6步:删除表空间 */
    drop tablespace user_data(or  user_temp

    including contents and datafiles cascade constraints;

    // including contents 删除表空间内容,否则非空表空间删不掉

    // cascade constraints 删除表空间的外键参照

  • 相关阅读:
    周总结
    周总结
    周总结
    读后感
    周总结
    周总结
    周总结
    第一周总结
    大学生失物招领平台使用体验
    快速乘法+快速幂
  • 原文地址:https://www.cnblogs.com/dorothychai/p/2542338.html
Copyright © 2011-2022 走看看