创建新用户分配表空间

conn / as sysdba 

//创建临时表空间  

create temporary tablespace jbpm_temp
tempfile 'd:\oracle\product\10.1.0\oradata\orcl\jbpm\jpbm_temp.dbf'
size 50 m
autoextend on next 50m maxsize 20480m
extent management local 



//创建数据表空间  

 create tablespace jbpm_data  
 logging
 datafile 'd:\oracle\product\10.1.0\oradata\orcl\jbpm\jbpm_data.dbf' 
 size 50m
 autoextend on 
 next 50m maxsize 20480m
 extent management local;
//========删除创建的表空间的方法==========
drop tablespace jpbm_temp
 including contents and datafiles cascade constraints;
//========删除创建的表空间的方法==========

//创建用户并指定表空间  

create user jbpm identified by jbpm  
default tablespace jbpm_data 
temporary tablespace jbpm_temp;  


//给用户授予权限  

grant connect,resource to jbpm;  

//撤权: revoke   权限...   from 用户名; 

//删除用户命令 
 
drop user user_name cascade;

在远程数据库uptest上建立用户test,表空间test,临时表空间testtemp,并授权

一、创建建表脚本(test.sql),内容如下

建表空间“test”

create tablespace test datafile '/oracle/u02/uptest/uptest/test.dbf'  size 5M;

建临时表空间“testtemp”

create TEMPORARY tablespace testtemp tempfile '/oracle/u02/uptest/uptest/testtemp.dbf' size 5M;

建用户“test”,密码为“oracle”,指定表空间“test”,临时表空间“testtemp”

create user test identified by oracle default tablespace test temporary tablespace testtemp;

为用户“test”授权" connect,resource,dba,create any table,select any dictionary "

grant  connect,resource,dba,create any table,select any dictionary to test;




 

你可能感兴趣的:(oracle,jbpm)