-----------------------------------------12C start-------------------------------------------
-- 创建表空间 create tablespace oncefee_data datafile '/tbs_sth_data01.dbf' size 50M autoextend on next 50m maxsize 2048m extent management local; --创建临时表空间 create temporary tablespace oncefee_data_temp tempfile '/tbs_sth_data_temp01.dbf' size 32m autoextend on next 32m maxsize 1024m extent management local; --创建用户 create user na_oncefee identified by _pwd default tablespace oncefee_data temporary tablespace oncefee_data_temp; --创建角色 create role oncefee_roles container = CURRENT; grant dba to oncefee_roles container = CURRENT; --授权 grant oncefee_roles to na_oncefee container = CURRENT; grant connect,resource to oncefee_roles; grant restricted session to oncefee_roles; alter user na_oncefee account unlock identified by _pwd; ALTER USER na_oncefee QUOTA UNLIMITED ON oncefee_data;
----------------------------12C end---------------------------------------------------
------------------------------11G start---------------------------------------------------
CREATE USER "NA_ANNUAL_ADJ" IDENTIFIED BY "_PWD" ACCOUNT UNLOCK DEFAULT TABLESPACE "ANNUALADJ_DATA" TEMPORARY TABLESPACE "TEMP" PROFILE "DEFAULT";
GRANT "CONNECT" TO "NA_ANNUAL_ADJ";
GRANT "RESOURCE" TO "NA_ANNUAL_ADJ";
ALTER USER "NA_ANNUAL_ADJ" DEFAULT ROLE "CONNECT", "RESOURCE";
ALTER USER "NA_ANNUAL_ADJ" QUOTA UNLIMITED ON "ANNUALADJ_DATA" QUOTA UNLIMITED ON "USERS";
GRANT CREATE SESSION TO "NA_ANNUAL_ADJ";
GRANT CREATE TABLE TO "NA_ANNUAL_ADJ";
GRANT UNLIMITED TABLESPACE TO "NA_ANNUAL_ADJ";