日期:2014-05-16  浏览次数:20596 次

oracle 创建表空间
-- 创建表空间
create tablespace jiangyang
datafile 'E:\oradata\dlsdb\jiangyang.dbf' size 10M
default storage(initial 500k
next 500k
minextents 1
maxextents
unlimited pctincrease 0) ;

-- 创建用户 create user userName identified by password
create user jiangyang identified by jiangyang default tablespace jiangyang ;

--授权用户
grant resource connect ,dba to jiangyang ;

-- 授权 DBA权限
grant dba to jiangyang ;

--授权 不限制表空间
grant unlimited tablespace to jiangyang ;

-- 授权 查询  任何表 任何字典
grant select any table to jiangyang ;
grant select any dictionary to jiangyang ;

-- 删除表空间
drop tablespace jiangyang including contents and datafiles ;

-- 删除用户
drop user jiangyang cascade ;

-- 锁定用户
alter user jiangyang account lock ;

-- 解除 用户锁定
alter user jiangyang account unlock ;