CREATE TEMPORARY TABLESPACE test_temp
TEMPFILE ‘C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf‘
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
一般从第二步开始就可以
2、创建用户表空间
CREATE TABLESPACE gzjssapce
LOGGING
DATAFILE ‘E:\oracle\product\10.2.0\oradata\orcl\gzjs.DBF‘
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
3、创建用户并制定表空间
CREATE USER gzjs IDENTIFIED BY password
DEFAULT TABLESPACE gzjssapce
4、给用户授权
GRANT CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,
ALTER ANY TABLE, ALTER ANY PROCEDURE,
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,
SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE
TO gzjs ;
5、防止当前用户过度占用表空间
alter user gzjs quota unlimited on users;
6、授予DBA权限
grant connect,resource,dba to gzjs;
7、注意事项:导入DBA权限导出的数据库文件时,一定要赋予新用户DBA权限才可以成功导入