oracle创建表空间并对用户赋权

时间:2022-06-08 08:38:38
 1 1:创建临时表空间
 2 create temporary tablespace user_temp  
 3 tempfile 'Q:\oracle\product\10.2.0\oradata\Test\xyrj_temp.dbf' 
 4 size 50m  
 5 autoextend on  
 6 next 50m maxsize 20480m  
 7 extent management local;  
 8  
 9 2:创建数据表空间
10 create tablespace user_data  
11 logging  
12 datafile 'Q:\oracle\product\10.2.0\oradata\Test\xyrj_data.dbf' 
13 size 50m  
14 autoextend on  
15 next 50m maxsize 20480m  
16 extent management local;  
17  
18 第3步:创建用户并指定表空间
19 create user username identified by password  
20 default tablespace user_data  
21 temporary tablespace user_temp;  
22  
23 第4步:给用户授予权限
24 grant connect,resource,dba to username;