oracle 创建表空间,用户,和赋权

create temporary tablespace user_temp  
--tempfile '/home/oracle/app/oracle/oradata/orcl/user_temp.dbf' 
tempfile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL'
size 50m  
autoextend on  
next 50m maxsize 2040m  
extent management local;

CREATE TABLESPACE bm01
LOGGING
DATAFILE '/home/oracle/app/oracle/oradata/orcl/bm01.DBF' 
SIZE 32M 
AUTOEXTEND ON 
NEXT 32M MAXSIZE 20480M
EXTENT MANAGEMENT LOCAL;

CREATE USER bm IDENTIFIED BY 123456
DEFAULT TABLESPACE bm01
TEMPORARY TABLESPACE user_temp;

CREATE USER bm1 IDENTIFIED BY 123456
DEFAULT TABLESPACE bm01;

GRANT CREATE SESSION,ALTER SESSION,CREATE TABLE,CREATE VIEW,CREATE TRIGGER,CREATE SEQUENCE,ALTER any table,CREATE PROCEDURE,UPDATE ANY TABLE,DELETE ANY TABLE,INSERT ANY TABLE,RESOURCE TO BM;

GRANT CONNECT,RESOURCE TO STUDENT; 

修改默认表空间
ALTER USER ITSM DEFAULT TABLESPACE TEST;
GRANT UNLIMITED TABLESPACE TO ITSM;


ALTER SESSION --修改会话
CREATE CLUSTER --建立聚簇
CREATE DATABASE LINK --建立数据库链接
CREATE SEQUENCE --建立序列
CREATE SESSION --建立会话
CREATE SYNONYM --建立同义词
CREATE VIEW --建立视图
RESOURCE角色: --是授予开发人员的
CREATE CLUSTER --建立聚簇
CREATE PROCEDURE --建立过程
CREATE SEQUENCE --建立序列
CREATE TABLE --建表
CREATE TRIGGER --建立触发器
CREATE TYPE --建立类型

SELECT GRANTEE,PRIVILEGE FROM DBA_SYS_PRIVS
 WHERE GRANTEE='RESOURCE' ORDER BY PRIVILEGE;

 

你可能感兴趣的:(oracle)