(1)创建数据库
sqlplus "sys/allview@allview as sysdba"
create tablespace realstar
datafile 'c:/oracle/oradata/allview/realstar.ora'
size 5m
reuse
autoextend on
next 512k
maxsize unlimited;
create tablespace ewfimg
datafile 'c:/oracle/oradata/allview/ewfimg.ora'
size 5m
reuse
autoextend on
next 512k
maxsize unlimited;
create tablespace ycch
datafile 'c:/oracle/oradata/allview/ycch.ora'
size 5m
reuse
autoextend on
next 512k
maxsize unlimited;
create tablespace da
datafile 'c:/oracle/oradata/allview/da.ora'
size 5m
reuse
autoextend on
next 512k
maxsize unlimited;
create user realstar
identified by realstar
default tablespace realstar
temporary tablespace temp
quota unlimited on realstar;
create user realimg
identified by realimg
default tablespace ewfimg
temporary tablespace temp
quota unlimited on ewfimg;
create user ycch
identified by ycch
default tablespace ycch
temporary tablespace temp
quota unlimited on ycch;
create user da
identified by da
default tablespace da
temporary tablespace temp
quota unlimited on da;
grant connect,resource,dba to realstar;
grant connect,resource,dba to da;
grant connect,resource,dba to ycch;
grant connect,resource,dba to realimg;
(2)自动导入
imp da/da@yzfc file=F:/da%date:~4,10%.dmp full=y
imp realimg/realimg@yzfc file=F:/realimg%date:~4,10%.dmp full=y
imp ycch/ycch@yzfc file=F:/ycch%date:~4,10%.dmp full=y
imp realstar/realstar@yzfc file=F:/realstar%date:~4,10%.dmp full=y
(3)自动导出
exp da/da@yzfc file=F:/da%date:~4,10%.dmp
exp realimg/realimg@yzfc file=F:/realimg%date:~4,10%.dmp
exp ycch/ycch@yzfc file=F:/ycch%date:~4,10%.dmp
exp realstar/realstar@yzfc file=F:/realstar%date:~4,10%.dmp
exp sde/sde@yzgis file=F:/sde%date:~4,10%.dmp