飞艳小屋

程序--人生--哲学___________________欢迎艳儿的加入

BlogJava 首页 新随笔 联系 聚合 管理
  52 Posts :: 175 Stories :: 107 Comments :: 0 Trackbacks

创建表空间案例

 

       本文通过一个例子说明如何创建表空间 tstest ,并且创建一个用户 sam ,可以对该表空间的具备操作权限。

sys 用户以 dba 身份登录 sql*plus worksheet

 

-- 注释: Create tablespace

--revoke "DBA" from sam

--drop tablespace tstest including contents and datafiles;

--drop user sam CASCADE;

 

CREATE TABLESPACE "tstest"

    LOGGING

    DATAFILE 'D:/oracle/oradata/OAERP/TSTEST.ORA' SIZE 100M

    REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

   

CREATE USER "SAM" PROFILE "DEFAULT"

    IDENTIFIED BY "1qa2ws3ed" DEFAULT TABLESPACE "TSTEST"

    TEMPORARY TABLESPACE "TEMP"

    ACCOUNT UNLOCK;

 

 

grant connect to "SAM" with admin option;

ALTER USER "SAM" DEFAULT ROLE ALL;

 

grant create procedure to SAM;

grant create sequence to SAM;

grant create table to SAM;

grant create view to SAM;

 

grant drop any procedure to SAM;

grant drop any sequence to SAM;

grant drop any table to SAM;

grant drop any view to SAM;

 

alter user SAM quota unlimited on TSTEST;

 

create tablespace songxianfei
datafile 'd:/oracle/sxf.def' size 500M
autoextend on next 10M maxsize unlimited logging
extent management local autoallocate
segment space management auto;

最好用下面这一个,上面哪一个在oracle10G上不行

1.删除所有临时文件:purge recyclebin
posted on 2007-04-25 13:32 天外飞仙 阅读(1065) 评论(0)  编辑  收藏 所属分类: Oracle

只有注册用户登录后才能发表评论。


网站导航: