您的位置:首页 > 博客中心 > 数据库 >

oracle 表空间 用户

时间:2022-03-10 18:05

 创建临时表空间

gxlsystem.com,布布扣 gxlsystem.com,布布扣CREATE TEMPORARY TABLESPACE test_temp gxlsystem.com,布布扣TEMPFILE ‘C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf‘ gxlsystem.com,布布扣SIZE 32M gxlsystem.com,布布扣AUTOEXTEND ON gxlsystem.com,布布扣NEXT 32M MAXSIZE 2048M gxlsystem.com,布布扣EXTENT MANAGEMENT LOCAL;

创建用户表空间

gxlsystem.com,布布扣 gxlsystem.com,布布扣CREATE TABLESPACE test_data gxlsystem.com,布布扣LOGGING gxlsystem.com,布布扣DATAFILE ‘C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01.DBF‘  gxlsystem.com,布布扣SIZE 32M  gxlsystem.com,布布扣AUTOEXTEND ON  gxlsystem.com,布布扣NEXT 32M MAXSIZE 2048M gxlsystem.com,布布扣EXTENT MANAGEMENT LOCAL;

创建用户并制定表空间

gxlsystem.com,布布扣 gxlsystem.com,布布扣CREATE USER username IDENTIFIED BY password gxlsystem.com,布布扣DEFAULT TABLESPACE TEST_DATA gxlsystem.com,布布扣TEMPORARY TABLESPACE TEST_TEMP;

给用户授予权限

gxlsystem.com,布布扣 gxlsystem.com,布布扣GRANT  gxlsystem.com,布布扣  CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE, gxlsystem.com,布布扣  ALTER ANY TABLE, ALTER ANY PROCEDURE, gxlsystem.com,布布扣  DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE, gxlsystem.com,布布扣  SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE gxlsystem.com,布布扣  TO username;

将role这个角色授与username,也就是说,使username这个用户可以管理和使用role所拥有的资源

gxlsystem.com,布布扣GRANT role TO username;

-----------------------------------------------查看用户权限---------------------------------------------------------
查看所有用户

gxlsystem.com,布布扣 gxlsystem.com,布布扣SELECT * FROM DBA_USERS; gxlsystem.com,布布扣SELECT * FROM ALL_USERS; gxlsystem.com,布布扣SELECT * FROM USER_USERS;

查看用户系统权限

gxlsystem.com,布布扣 gxlsystem.com,布布扣SELECT * FROM DBA_SYS_PRIVS; gxlsystem.com,布布扣SELECT * FROM USER_SYS_PRIVS;

查看用户对象或角色权限

gxlsystem.com,布布扣 gxlsystem.com,布布扣SELECT * FROM DBA_TAB_PRIVS; gxlsystem.com,布布扣SELECT * FROM ALL_TAB_PRIVS; gxlsystem.com,布布扣SELECT * FROM USER_TAB_PRIVS;

查看所有角色

gxlsystem.com,布布扣 gxlsystem.com,布布扣SELECT * FROM DBA_ROLES;

查看用户或角色所拥有的角色

gxlsystem.com,布布扣 gxlsystem.com,布布扣SELECT * FROM DBA_ROLE_PRIVS; gxlsystem.com,布布扣SELECT * FROM USER_ROLE_PRIVS;

 

-------遇到no privileges on tablespace ‘tablespace ‘

 

alter user userquota 10M[unlimited] on tablespace;

 

oracle 表空间 用户,布布扣,bubuko.com

热门排行

今日推荐

热门手游