<转载>
原文地址: http://skyuck.iteye.com/blog/847859
1.首先我们可以用scott用户以sysdba的身份登录oracle.
- conn scott/tiger as sysdba
- create user zzg identified by zzg123;
- alter user zzg identified by unis;
我们可以通过下面的sql语句来查看一下所有用户所在的表空间.
- select username,default_tablespace from dba_users;
- create tablespace ts_zzg datafile 'f:\ts_zzg\zzg_data.dbf' size 200M;
6.创建好表空间,还需要将表空间分配给用户.
- alter user zzg default tablespace ts_zzg;
8.给用户分配了表空间,用户还不能登陆(没有登录权限),因此还需要为用户分配权限
- grant create session,create table,create view,create sequence,unlimited tablespace to zzg;
- conn zzg/unis;
- select *from session_privs;
- drop user zzg cascade;