#!/bin/bash
cd /home/view
. .bash_profile+%Y%m%d %H:%M:%S'`
echo $start_time starting $0....
sqlplus yonghuming/mima<<!>>/home/view/jiaoben.log
set timing on;
whenever sqlerror exit sql.sqlcode;
create table biaoming2
tablespace kongjianming
partition by range(ziduanming)
(
partition P201602 values less than ('20160301000000000000'),
partition P201603 values less than ('20160401000000000000'),
...
partition P20160201 values less than (maxvalue)
) parallel 8 nologging as
select /*+parallel(8)*/* from biaoming;
exit
!
end_time=`date '+%Y%m%d %H:%M:%S'`
echo $end_time end $0---