--建立名为ph_pro的profile,如果已存在不需要再次建立
create profileph_prolimit
sessions_per_user unlimited
cpu_per_session unlimited
cpu_per_call unlimited
connect_time unlimited
idle_time 60
logical_reads_per_session unlimited
logical_reads_per_call unlimited
private_sga unlimited
composite_limit unlimited;
--建立表空间
CREATE tablespacepublichealth_dataDATAFILE 'E:/oracle_table_space/publichealth/publichealth_data.dbs' SIZE 100M
DEFAULT STORAGE(
INITIAL 409600
NEXT 51200
MINEXTENTS 1
MAXEXTENTS unlimited
PCTINCREASE 1
)
ONLINE;
CREATE tablespacepublichealth_dataDATAFILE 'E:/oracle_table_space/publichealth/publichealth_data.dbs' SIZE 100M
DEFAULT STORAGE(
INITIAL 409600
NEXT 51200
MINEXTENTS 1
MAXEXTENTS unlimited
PCTINCREASE 1
)
ONLINE;
--建立临时表空间
CREATE TEMPORARY TABLESPACEpublichealth_data_tmp
TEMPFILE 'E:/oracle_table_space/publichealth/publichealth_data_tmp.dbs' SIZE 50M EXTENT
MANAGEMENT LOCAL UNIFORM SIZE 1M;
MANAGEMENT LOCAL UNIFORM SIZE 1M;
--建立用户
create userpublichealthidentified bypublichealthdefault tablespacepublichealth_data
temporary tablespacepublichealth_data_tmp
quota unlimited onpublichealth_data
quota 10M on system
profileph_pro;
create userpublichealthidentified bypublichealthdefault tablespacepublichealth_data
temporary tablespacepublichealth_data_tmp
quota unlimited onpublichealth_data
quota 10M on system
profileph_pro;
--修改用户角色
alter userpublichealthdefault role all;
--为用户授权
grant connect,resource topublichealth;