Oracle创建表空间、创建用户以及授权、查看权限【转】
2014-03-13 12:09
761 查看
创建临时表空间
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE TEMPORARY TABLESPACE test_temp
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TEMPFILE 'C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf'
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SIZE 32M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
AUTOEXTEND ON
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
NEXT 32M MAXSIZE 2048M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
EXTENT MANAGEMENT LOCAL;
创建用户表空间
CREATE TABLESPACE test_data
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
LOGGING
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DATAFILE 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01.DBF'
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SIZE 32M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
AUTOEXTEND ON
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
NEXT 32M MAXSIZE 2048M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
EXTENT MANAGEMENT LOCAL;
创建用户并制定表空间
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE USER username IDENTIFIED BY password
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DEFAULT TABLESPACE TEST_DATA
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TEMPORARY TABLESPACE TEST_TEMP;
给用户授予权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
GRANT
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
ALTER ANY TABLE, ALTER ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TO username;
将role这个角色授与username,也就是说,使username这个用户可以管理和使用role所拥有的资源
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
GRANT role TO username;
-----------------------------------------------查看用户权限---------------------------------------------------------
查看所有用户
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_USERS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM ALL_USERS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_USERS;
查看用户系统权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_SYS_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_SYS_PRIVS;
查看用户对象或角色权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_TAB_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM ALL_TAB_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_TAB_PRIVS;
查看所有角色
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_ROLES;
查看用户或角色所拥有的角色
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_ROLE_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_ROLE_PRIVS;
-------遇到no privileges on tablespace 'tablespace '
alter user userquota 10M[unlimited] on tablespace;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE TEMPORARY TABLESPACE test_temp
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TEMPFILE 'C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf'
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SIZE 32M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
AUTOEXTEND ON
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
NEXT 32M MAXSIZE 2048M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
EXTENT MANAGEMENT LOCAL;
创建用户表空间
CREATE TABLESPACE test_data
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
LOGGING
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DATAFILE 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01.DBF'
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SIZE 32M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
AUTOEXTEND ON
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
NEXT 32M MAXSIZE 2048M
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
EXTENT MANAGEMENT LOCAL;
创建用户并制定表空间
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE USER username IDENTIFIED BY password
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DEFAULT TABLESPACE TEST_DATA
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TEMPORARY TABLESPACE TEST_TEMP;
给用户授予权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
GRANT
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
ALTER ANY TABLE, ALTER ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
TO username;
将role这个角色授与username,也就是说,使username这个用户可以管理和使用role所拥有的资源
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
GRANT role TO username;
-----------------------------------------------查看用户权限---------------------------------------------------------
查看所有用户
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_USERS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM ALL_USERS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_USERS;
查看用户系统权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_SYS_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_SYS_PRIVS;
查看用户对象或角色权限
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_TAB_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM ALL_TAB_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_TAB_PRIVS;
查看所有角色
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_ROLES;
查看用户或角色所拥有的角色
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM DBA_ROLE_PRIVS;
![](http://static.oschina.net/uploads/img/201403/13120909_a7NY.gif)
SELECT * FROM USER_ROLE_PRIVS;
-------遇到no privileges on tablespace 'tablespace '
alter user userquota 10M[unlimited] on tablespace;
相关文章推荐
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户、授权、授权对象的访问以及查看权限集合
- Oracle创建表空间、创建用户、授权、授权对象的访问以及查看权限集合
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限常用sql语句
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- ORACLE创建表空间、创建用户、更改用户默认表空间以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- [Oracle拾遗]创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限
- Oracle创建表空间、创建用户以及授权、查看权限 、scott解锁
- ORACLE创建表空间、创建用户、更改用户默认表空间以及授权、查看权限