——================================
——Oracle 用户,对象权限,系统权限
——================================
- <李>
建立表空间和用户的步骤:
李> <李>用户
李>,建立:,,用户名,identified ,,
,授权:,,session ,用户名:
,,,,,用户名:
, tablespace 用户名;
用户名;
grant resource to
grant connect,resource,dba to 用户;
select * from user_sys_privs;查询当前用户权限
grant connect,resource,dba to 用户;给dba权限
grant connect,resource to 用户;
grant unlimited tablespace to 用户;
grant create database link to 用户;
grant select any sequence,create materialized view to 用户;
grant unlimited tablespace to 用户;//授予不限制的表空间
grant select any table to 用户;//授予查询任何表
grant是关键字,select any table是权限,to后面是用户账号
[sql] view plain
表空间
建立表空间(一般建N个存数据的表空间和一个索引空间):
tablespace 表空间名
datafile *M
tempfile *M
autoextend
storage(
initial 100K,
100k,
);
[sql] view plain
例子:创建表空间
tablespace DEMOSPACE
datafile
1500M
autoextend 5M maxsize 3000M;
删除表空间
tablespace DEMOSPACE including contents datafiles
[sql] view plain
用户权限
授予用户使用表空间的权限:
用户名 quota unlimited 表空间;
或 用户名 quota *M 表空间;
完整例子:
[sql] view plain
TABLESPACE sdt
DATAFILE 800M
EXTENT MANAGEMENT SEGMENT MANAGEMENT AUTO;
TABLESPACE sdt_Index
DATAFILE 512M
EXTENT MANAGEMENT SEGMENT MANAGEMENT AUTO;
demo identified demo
tablespace demo;
,resource demo;
demo;
demo;
demo;
demo;
demo;
unlimited tablespace demo;
demo;
demo;
demo;
[sql] view plain
ip导出方式: exp demo/demo@127.0.0.1:1521/orcl file=f:/f.dmp =y
exp demo/demo@orcl file=f:/f.dmp =y
imp demo/demo@orcl file=f:/f.dmp =y =y
大脸猫运维博客更多姿势www.itlinux.cn