- //创建临时表空间
-
- create temporary tablespace user_temp
- tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf'
- size 50m
- autoextend on
- next 50m maxsize 20480m
- extent management local;
-
- //创建数据表空间
- create tablespace test_data
- logging
- datafile 'D:\oracle\oradata\Oracle9i\user_data.dbf'
- size 50m
- autoextend on
- next 50m maxsize 20480m
- extent management local;
-
- //创建用户并指定表空间
- create user username identified by password
- default tablespace user_data
- temporary tablespace user_temp;
-
- //给用户授予权限
-
- grant connect,resource to username;
-
- //以后以该用户登录,创建的任何数据库对象都属于user_temp 和user_data表空间,这就不用在每创建一个对象给其指定表空间了
- 该文章转载于:http://lpcjrflsa.javaeye.com/blog/309811
|