一、测试环境
CREATE TABLESPACE "PROJECT_DATA_DF" DATAFILE
'D:/app/PROJECT_DATA_DF_01.dbf' SIZE 100 M REUSE autoextend on next 100 M maxsize 1000 M,
'D:/app/PROJECT_DATA_DF_02.dbf' SIZE 100 M REUSE autoextend on next 100 M maxsize 1000 M
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
extent management local autoallocate segment space management auto;
CREATE TEMPORARY TABLESPACE "PROJECT_TEMP_DF" TEMPFILE
'D:/app/PROJECT_TEMP_DF.dbf' SIZE 100 M REUSE autoextend on next 100 M maxsize 100 M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10 M ;
CREATE USER "PROJECT" IDENTIFIED BY "project" DEFAULT TABLESPACE "PROJECT_DATA_DF" TEMPORARY TABLESPACE "PROJECT_TEMP_DF" ;
GRANT "CONNECT" , "DBA" , "RESOURCE" TO "PROJECT" ;
ALTER USER "PROJECT" DEFAULT ROLE "CONNECT" , "DBA" , "RESOURCE" ;
GRANT UNLIMITED TABLESPACE TO "PROJECT" ;
CREATE USER "PROJECT_SYS" IDENTIFIED BY "project_sys" DEFAULT TABLESPACE "PROJECT_DATA_DF" TEMPORARY TABLESPACE "PROJECT_TEMP_DF" ;
GRANT "CONNECT" , "DBA" , "RESOURCE" TO "PROJECT_SYS" ;
ALTER USER "PROJECT_SYS" DEFAULT ROLE "CONNECT" , "DBA" , "RESOURCE" ;
GRANT UNLIMITED TABLESPACE TO "PROJECT_SYS" ;
二、生产环境
CREATE TABLESPACE "PROJECT_DATA_DF" DATAFILE
'/home/oracle/PROJECT_DATA_DF_01.dbf' SIZE 1024 M REUSE autoextend on next 100 M maxsize 10000 M,
'/home/oracle/PROJECT_DATA_DF_02.dbf' SIZE 1024 M REUSE autoextend on next 100 M maxsize 10000 M
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
extent management local autoallocate segment space management auto;
CREATE TEMPORARY TABLESPACE "PROJECT_TEMP_DF" TEMPFILE
'/home/oracle/PROJECT_TEMP_DF.dbf' SIZE 1024 M REUSE autoextend on next 100 M maxsize 10000 M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10 M ;
CREATE USER "PROJECT" IDENTIFIED BY "project" DEFAULT TABLESPACE "PROJECT_DATA_DF" TEMPORARY TABLESPACE "PROJECT_TEMP_DF" ;
GRANT "CONNECT" , "DBA" , "RESOURCE" TO "PROJECT" ;
ALTER USER "PROJECT" DEFAULT ROLE "CONNECT" , "DBA" , "RESOURCE" ;
GRANT UNLIMITED TABLESPACE TO "PROJECT" ;
CREATE USER "PROJECT_SYS" IDENTIFIED BY "project_sys" DEFAULT TABLESPACE "PROJECT_DATA_DF" TEMPORARY TABLESPACE "PROJECT_TEMP_DF" ;
GRANT "CONNECT" , "DBA" , "RESOURCE" TO "PROJECT_SYS" ;
ALTER USER "PROJECT_SYS" DEFAULT ROLE "CONNECT" , "DBA" , "RESOURCE" ;
GRANT UNLIMITED TABLESPACE TO "PROJECT_SYS" ;