本文将介绍的是通过创建一张表,进而实现Oracle创建用户权限的过程。以下这些代码主要也就是为实现Oracle创建用户权限而编写,希望能对大家有所帮助。
注意:每条语语分开执行,结尾必须用分号;
//创建空间
create tablespacetest
datafile 'c:/oracle/oradata/orcl9/test.dbf' size 50M
default storage(initial500K Next 500K
minextents1
maxextentsunlimited
pctincrease0);
//Oracle创建用户权限
//创建用户
create user macro identified by macropwd default tablespacetest;
//授权
grant resource, connect ,dba to test;
//删除表空间
drop tablespace "空间名" includingcontents and datafiles
//删除用户
drop user "macro" cascade
//增加表空间
alter tablespacechinawater add datafile 'c:/oracle/oradata/orcl9/ADDCHINAWATER.dbf' size 200M
创建用户
create user userNameidentified by password ;
创建用户 userName,密码为 password
给用户授权
grant dba to macro; --授予DBA权限
grant unlimitedtablespace to macro; --授予不限制的表空间
grant select any table to macro; --授予查询任何表
grant select any dictionary to macro; --授予查询任何字典
grant dba to macro;
grant unlimitedtablespace to macro;
grant select any table to macro;
grant select any dictionary to macro;
版权声明:本文为博主原创文章,未经博主允许不得转载。