----------------
--根据oracle安装路径的不同，对应替换
----------------
--创建gk_basic表空间和gk_basic_temp临时表空间
create temporary tablespace gk_basic_temp  
tempfile 'D:\oracle\oradata\Oracle9i\gk_basic_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

create tablespace gk_basic
logging  
datafile 'D:\oracle\oradata\Oracle9i\gk_basic.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

--创建gk_operation表空间和gk_operation临时表空间
create temporary tablespace gk_operation_temp  
tempfile 'D:\oracle\oradata\Oracle9i\gk_operation_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

create tablespace gk_operation
logging  
datafile 'D:\oracle\oradata\Oracle9i\gk_operation.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  


--创建gk_share表空间和gk_share_temp临时表空间
create temporary tablespace gk_share_temp  
tempfile 'D:\oracle\oradata\Oracle9i\gk_share_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

create tablespace gk_share
logging  
datafile 'D:\oracle\oradata\Oracle9i\gk_share.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

--创建gk_subject表空间和gk_subject_temp临时表空间
create temporary tablespace gk_subject_temp  
tempfile 'D:\oracle\oradata\Oracle9i\gk_subject_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  

create tablespace gk_subject
logging  
datafile 'D:\oracle\oradata\Oracle9i\gk_subject.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  




--创建用户并指定表空间  
create user gk identified by gk  
default tablespace gk_basic  
temporary tablespace gk_basic_temp;  


 
--给用户授予权限  
grant connect,resource,dba to gk;