一、授权
1、赋予create session的权限
grant create session to user_name;
2、分配创建表,视图,触发器,序列,过程 权限
grant create table,create view,create trigger, create sequence,create procedure to user_name;
3、授权使用表空间
grant unlimited tablespace to user_name;
4、grant select,insert, update, delete on table_name to user_name;
5、函数授权
grant execute on function_name to user_name;
二、查找数据文件位置
select tablespace_name, file_id,file_name,
round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name;
三、建立用户
create user user_name identified by user_name default tablespace users
grant connect,resource to user_name;
revoke unlimited tablespace from user_name
select * from role_sys_privs where role='RESOURCE'
alter user user_name quota unlimited on users
grant create view to user_name
四、查询用户所有表名
select ''''||table_name||''',' from dba_all_tables where owner = 'SMMU' ;(SMMU是uset_name)
oracle 操作记录
猜你喜欢
转载自lyl-zsu.iteye.com/blog/1756596
今日推荐
周排行