Oracle建立表空間、使用者
---建立表空間SQL:
create tablespace nhip_portal
datafile '/server/db-pt/oradata/ORCL/datafile/nhip_portal.dbf' size 3G reuse
autoextend on next 40M maxsize unlimited
default storage(initial 128k next 128k minextents 2 maxextents unlimited);
---建立臨時表空間SQL:
create temporary tablespace nhip_portal_temp
tempfile '/server/db-pt/oradata/ORCL/datafile/nhip_portal_temp.dbf ' size 1G reuse
autoextend on next 20m maxsize unlimited;
---建立使用者、新增許可權
create user nhip_portal
identified by nhip_portal
default tablespace nhip_portal
temporary tablespace nhip_portal_temp
profile DEFAULT;
grant connect to nhip_portal;
grant resource to nhip_portal;
grant create any context to nhip_portal;
grant create sequence to nhip_portal;
grant create view to nhip_portal;
grant unlimited tablespace to nhip_portal
---設定口令期限為永久
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED
---匯入表結構
imp nhip_empi/[email protected]:1521/orcl file=e:/empi.dmp full=y