--创建表SOFA空间:
CREATE SMALLFILE TABLESPACE "SOFA" DATAFILE 'G:\oracle\product\10.2.0\ORADATA\ORCL\SOFA' SIZE 100M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
--创建SOFA用户:
CREATE USER "SOFA" PROFILE "DEFAULT" IDENTIFIED BY "SOFA" DEFAULT TABLESPACE "SOFA" ACCOUNT UNLOCK;
GRANT COMMENT ANY TABLE TO "SOFA";
GRANT SYSDBA TO "SOFA";
GRANT "CONNECT" TO "SOFA";
GRANT "DBA" TO "SOFA";
GRANT "RESOURCE" TO "SOFA";
PS:以下SQL在表空间不足的情况下使用
--查看SOFA表空间数据文件所在路径
select file_name from dba_data_files where tablespace_name = 'SOFA'
--修改SOFA表空间大小,增加数据文件
ALTER TABLESPACE SOFA ADD DATAFILE 'G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SOFA2' SIZE 5000M;