Chinaunix首页 | 论坛 | 博客
  • 博客访问: 894729
  • 博文数量: 101
  • 博客积分: 2256
  • 博客等级: 大尉
  • 技术积分: 1481
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-19 17:52
文章存档

2017年(1)

2013年(2)

2012年(25)

2011年(73)

分类: Oracle

2012-03-26 20:29:26

1.数据库环境介绍
1.1老的数据库
硬件:HP PROLIANT DL580 G5
CPU:intel xeon E7320 2.13GHz 4核   *  2
内存:8G
硬盘:2 * 146G,做raid1,总容量为146G;(无大容量阵列存储)
操作系统:microsoft windows server 2003 r2 enterprise edition sp2

数据库版本:release 10.2.0.1.0
数据库实例名:baokang
表空间名称:snapall(总大小951600MB,已经使用724098MB)
应用程序数据库用户名:snapall
应用系统介绍:数据库中部署的是BS平台,b_kkqp_wfcl和b_kkqp_wfzj中没有数据,只有b_bk_jgcl中有数据(保存1年);

 

1.2新的数据库
硬件:HP DL580R05 HC CTO Chassis
CPU:intel xeon E7440 2.4GHz 4核  *  2
内存:8G
硬盘:4 * 300G,做raid5,总容量为835G;
大容量阵列存储:
操作系统:microsoft windows server 2008 r2 enterprise endition(64位)
数据库版本:release 10.2.0.4.0
数据库实例名:baokang
默认表空间名称:snapall
应用程序数据库用户名:snapall
应用系统介绍:数据库中部署的是BS平台,b_kkqp_wfcl和b_kkqp_wfzj中没有数据,只有b_bk_jgcl中有数据;

 

2.导出老的数据库
2.1导出用户snapall下除表数据外的所以内容;
在本机命令行登录:
exp file=d:\28bk309.dmp log=d:\309.log rows=n buffer=409600 compress=n owner=snapall

注意:这个compress=n,这样导出的文件才不会很大;


2.2导出用户snapall下除了表b_bk_jgcl外所以的表的数据;

在本机命令行登录,采用交互式的方式导出表数据;
将snapall用户下的所有表的名称获取出来,可以查询视图 user_tables来获取;然后剔除b_bk_jgcl表,用剩下的表做
导出;这一步的类似具体操作视频在群空间共享中有;

2.3导出用户snapall下的b_bk_jgcl表数据;
在本机命令行登录:
exp file=z:\jgcl\jgcl.dmp log=z:\jgcl\jgcl.log  tables=(b_bk_jgcl) rows=y buffer=409600 compress=n  indexes=n

注意:因为只是导出数据,索引没有导出,一个是为了导出导入的速度,另外就是为了重新建立索引;

 


3创建数据库
3.1新的数据库将对表b_bk_jgcl进行分区表;
3.2创建分区表,划分各个时间段;
先是创建各个表空间;
然后创建分区表,具体创建过程如下:

create table B_BK_JGCL
(
  XXXX1   VARCHAR2(32) not null,
  XXXX2   VARCHAR2(16),
  XXXX3   NUMBER(2),
  JGSJ   DATE,
  XXXX4   NUMBER(4),
)
partition by range (JGSJ)
(
partition P201008 values less than  (to_date(20100901,'yyyymmdd')) tablespace "P201008",
partition P201009 values less than  (to_date(20101001,'yyyymmdd')) tablespace "P201009",
partition P201010 values less than  (to_date(20101101,'yyyymmdd')) tablespace "P201010",
partition P201011 values less than  (to_date(20101201,'yyyymmdd')) tablespace "P201011",
partition P201012 values less than  (to_date(20110101,'yyyymmdd')) tablespace "P201012",
partition P201101 values less than  (to_date(20110201,'yyyymmdd')) tablespace "P201101",
partition P201102 values less than  (to_date(20110301,'yyyymmdd')) tablespace "P201102",
partition P201103 values less than  (to_date(20110401,'yyyymmdd')) tablespace "P201103",
partition P201104 values less than  (to_date(20110501,'yyyymmdd')) tablespace "P201104",
partition P201105 values less than  (to_date(20110601,'yyyymmdd')) tablespace "P201105",
partition P201106 values less than  (to_date(20110701,'yyyymmdd')) tablespace "P201106",
partition P201107 values less than  (to_date(20110801,'yyyymmdd')) tablespace "P201107",
partition P201108 values less than  (to_date(20110901,'yyyymmdd')) tablespace "P201108",
partition P201109 values less than  (to_date(20111001,'yyyymmdd')) tablespace "P201109",
partition P201110 values less than  (to_date(20111101,'yyyymmdd')) tablespace "P201110",
partition P201111 values less than  (to_date(20111201,'yyyymmdd')) tablespace "P201111",
partition P201112 values less than  (to_date(20120101,'yyyymmdd')) tablespace "P201112",
partition P201201 values less than  (to_date(20120201,'yyyymmdd')) tablespace "P201201",
partition P201202 values less than  (to_date(20120301,'yyyymmdd')) tablespace "P201202",
partition P201203 values less than  (to_date(20120401,'yyyymmdd')) tablespace "P201203",
partition P201204 values less than  (to_date(20120501,'yyyymmdd')) tablespace "P201204",
partition P201205 values less than  (to_date(20120601,'yyyymmdd')) tablespace "P201205",
partition P201206 values less than  (to_date(20120701,'yyyymmdd')) tablespace "P201206",
partition P201207 values less than  (to_date(20120801,'yyyymmdd')) tablespace "P201207",
partition P201208 values less than  (to_date(20120901,'yyyymmdd')) tablespace "P201208",
partition P201209 values less than  (to_date(20121001,'yyyymmdd')) tablespace "P201209",
partition P201210 values less than  (to_date(20121101,'yyyymmdd')) tablespace "P201210",
partition P201211 values less than  (to_date(20121201,'yyyymmdd')) tablespace "P201211",
partition P201212 values less than  (to_date(20130101,'yyyymmdd')) tablespace "P201212",
partition P201301 values less than  (to_date(20130201,'yyyymmdd')) tablespace "P201301",
partition P201302 values less than  (to_date(20130301,'yyyymmdd')) tablespace "P201302",
partition P201303 values less than  (to_date(20130401,'yyyymmdd')) tablespace "P201303",
partition P201304 values less than  (to_date(20130501,'yyyymmdd')) tablespace "P201304",
partition P201305 values less than  (to_date(20130601,'yyyymmdd')) tablespace "P201305",
partition P201306 values less than  (to_date(20130701,'yyyymmdd')) tablespace "P201306",
partition P201307 values less than  (to_date(20130801,'yyyymmdd')) tablespace "P201307",
partition P201308 values less than  (to_date(20130901,'yyyymmdd')) tablespace "P201308",
partition P201309 values less than  (to_date(20131001,'yyyymmdd')) tablespace "P201309",
partition P201310 values less than  (to_date(20131101,'yyyymmdd')) tablespace "P201310",
partition P201311 values less than  (to_date(20131201,'yyyymmdd')) tablespace "P201311",
partition P201312 values less than  (to_date(20140101,'yyyymmdd')) tablespace "P201312",
partition P201401 values less than  (to_date(20140201,'yyyymmdd')) tablespace "P201401",
partition P201402 values less than  (to_date(20140301,'yyyymmdd')) tablespace "P201402",
partition P201403 values less than  (to_date(20140401,'yyyymmdd')) tablespace "P201403",
partition P201404 values less than  (to_date(20140501,'yyyymmdd')) tablespace "P201404",
partition P201405 values less than  (to_date(20140601,'yyyymmdd')) tablespace "P201405",
partition P201406 values less than  (to_date(20140701,'yyyymmdd')) tablespace "P201406",
partition P201407 values less than  (to_date(20140801,'yyyymmdd')) tablespace "P201407",
partition P201408 values less than  (to_date(20140901,'yyyymmdd')) tablespace "P201408",
partition P201409 values less than  (to_date(20141001,'yyyymmdd')) tablespace "P201409",
partition P201410 values less than  (to_date(20141101,'yyyymmdd')) tablespace "P201410",
partition P201411 values less than  (to_date(20141201,'yyyymmdd')) tablespace "P201411",
partition P201412 values less than  (to_date(20150101,'yyyymmdd')) tablespace "P201412",
partition P201501 values less than  (to_date(20150201,'yyyymmdd')) tablespace "P201501",
partition P201502 values less than  (to_date(20150301,'yyyymmdd')) tablespace "P201502",
partition P201503 values less than  (to_date(20150401,'yyyymmdd')) tablespace "P201503",
partition P201504 values less than  (to_date(20150501,'yyyymmdd')) tablespace "P201504",
partition P201505 values less than  (to_date(20150601,'yyyymmdd')) tablespace "P201505",
partition P201506 values less than  (to_date(20150701,'yyyymmdd')) tablespace "P201506",
partition P201507 values less than  (to_date(20150801,'yyyymmdd')) tablespace "P201507",
partition P201508 values less than  (to_date(20150901,'yyyymmdd')) tablespace "P201508",
partition P201509 values less than  (to_date(20151001,'yyyymmdd')) tablespace "P201509",
partition P201510 values less than  (to_date(20151101,'yyyymmdd')) tablespace "P201510",
partition P201511 values less than  (to_date(20151201,'yyyymmdd')) tablespace "P201511",
partition P201512 values less than  (to_date(20160101,'yyyymmdd')) tablespace "P201512",
partition P201601 values less than  (to_date(20160201,'yyyymmdd')) tablespace "P201601",
partition P201602 values less than  (to_date(20160301,'yyyymmdd')) tablespace "P201602",
partition P201603 values less than  (to_date(20160401,'yyyymmdd')) tablespace "P201603",
partition P201604 values less than  (to_date(20160501,'yyyymmdd')) tablespace "P201604",
partition P201605 values less than  (to_date(20160601,'yyyymmdd')) tablespace "P201605",
partition P201606 values less than  (to_date(20160701,'yyyymmdd')) tablespace "P201606",
partition P201607 values less than  (to_date(20160801,'yyyymmdd')) tablespace "P201607",
partition P201608 values less than  (to_date(20160901,'yyyymmdd')) tablespace "P201608",
partition P201609 values less than  (to_date(20161001,'yyyymmdd')) tablespace "P201609",
partition P201610 values less than  (to_date(20161101,'yyyymmdd')) tablespace "P201610",
partition P201611 values less than  (to_date(20161201,'yyyymmdd')) tablespace "P201611",
partition P201612 values less than  (to_date(20170101,'yyyymmdd')) tablespace "P201612",
partition P201701 values less than  (to_date(20170201,'yyyymmdd')) tablespace "P201701",
partition P201702 values less than  (to_date(20170301,'yyyymmdd')) tablespace "P201702",
partition P201703 values less than  (to_date(20170401,'yyyymmdd')) tablespace "P201703",
partition P201704 values less than  (to_date(20170501,'yyyymmdd')) tablespace "P201704",
partition P201705 values less than  (to_date(20170601,'yyyymmdd')) tablespace "P201705",
partition P201706 values less than  (to_date(20170701,'yyyymmdd')) tablespace "P201706",
partition P201707 values less than  (to_date(20170801,'yyyymmdd')) tablespace "P201707",
partition P201708 values less than  (to_date(20170901,'yyyymmdd')) tablespace "P201708",
partition P201709 values less than  (to_date(20171001,'yyyymmdd')) tablespace "P201709",
partition P201710 values less than  (to_date(20171101,'yyyymmdd')) tablespace "P201710",
partition P201711 values less than  (to_date(20171201,'yyyymmdd')) tablespace "P201711",
partition P201712 values less than  (to_date(20180101,'yyyymmdd')) tablespace "P201712",
partition pmax values less than  (maxvalue)) tablespace "PMAX"

 

 


CREATE TABLESPACE "SNAPALL"  DATAFILE 'E:\b_bk_jgcl\SNAPALL.dbf' SIZE 20G;
CREATE TABLESPACE "P201008"  DATAFILE 'E:\b_bk_jgcl\P201008.dbf' SIZE 8G;
CREATE TABLESPACE "P201009"  DATAFILE 'E:\b_bk_jgcl\P201009.dbf' SIZE 8G;
CREATE TABLESPACE "P201010"  DATAFILE 'E:\b_bk_jgcl\P201010.dbf' SIZE 8G;
CREATE TABLESPACE "P201011"  DATAFILE 'E:\b_bk_jgcl\P201011.dbf' SIZE 8G;
CREATE TABLESPACE "P201012"  DATAFILE 'E:\b_bk_jgcl\P201012.dbf' SIZE 8G;
CREATE TABLESPACE "P201101"  DATAFILE 'E:\b_bk_jgcl\P201101.dbf' SIZE 8G;
CREATE TABLESPACE "P201102"  DATAFILE 'E:\b_bk_jgcl\P201102.dbf' SIZE 8G;
CREATE TABLESPACE "P201103"  DATAFILE 'E:\b_bk_jgcl\P201103.dbf' SIZE 8G;
CREATE TABLESPACE "P201104"  DATAFILE 'E:\b_bk_jgcl\P201104.dbf' SIZE 8G;
CREATE TABLESPACE "P201105"  DATAFILE 'E:\b_bk_jgcl\P201105.dbf' SIZE 8G;
CREATE TABLESPACE "P201106"  DATAFILE 'E:\b_bk_jgcl\P201106.dbf' SIZE 8G;
CREATE TABLESPACE "P201107"  DATAFILE 'E:\b_bk_jgcl\P201107.dbf' SIZE 8G;
CREATE TABLESPACE "P201108"  DATAFILE 'E:\b_bk_jgcl\P201108.dbf' SIZE 8G;
CREATE TABLESPACE "P201109"  DATAFILE 'E:\b_bk_jgcl\P201109.dbf' SIZE 8G;
CREATE TABLESPACE "P201110"  DATAFILE 'E:\b_bk_jgcl\P201110.dbf' SIZE 8G;
CREATE TABLESPACE "P201111"  DATAFILE 'E:\b_bk_jgcl\P201111.dbf' SIZE 8G;
CREATE TABLESPACE "P201112"  DATAFILE 'E:\b_bk_jgcl\P201112.dbf' SIZE 8G;
CREATE TABLESPACE "P201201"  DATAFILE 'E:\b_bk_jgcl\P201201.dbf' SIZE 8G;
CREATE TABLESPACE "P201202"  DATAFILE 'E:\b_bk_jgcl\P201202.dbf' SIZE 8G;
CREATE TABLESPACE "P201203"  DATAFILE 'E:\b_bk_jgcl\P201203.dbf' SIZE 8G;
CREATE TABLESPACE "P201204"  DATAFILE 'E:\b_bk_jgcl\P201204.dbf' SIZE 8G;
CREATE TABLESPACE "P201205"  DATAFILE 'E:\b_bk_jgcl\P201205.dbf' SIZE 8G;
CREATE TABLESPACE "P201206"  DATAFILE 'E:\b_bk_jgcl\P201206.dbf' SIZE 8G;
CREATE TABLESPACE "P201207"  DATAFILE 'E:\b_bk_jgcl\P201207.dbf' SIZE 8G;
CREATE TABLESPACE "P201208"  DATAFILE 'E:\b_bk_jgcl\P201208.dbf' SIZE 8G;
CREATE TABLESPACE "P201209"  DATAFILE 'E:\b_bk_jgcl\P201209.dbf' SIZE 8G;
CREATE TABLESPACE "P201210"  DATAFILE 'E:\b_bk_jgcl\P201210.dbf' SIZE 8G;
CREATE TABLESPACE "P201211"  DATAFILE 'E:\b_bk_jgcl\P201211.dbf' SIZE 8G;
CREATE TABLESPACE "P201212"  DATAFILE 'E:\b_bk_jgcl\P201212.dbf' SIZE 8G;
CREATE TABLESPACE "P201301"  DATAFILE 'E:\b_bk_jgcl\P201301.dbf' SIZE 8G;
CREATE TABLESPACE "P201302"  DATAFILE 'E:\b_bk_jgcl\P201302.dbf' SIZE 8G;
CREATE TABLESPACE "P201303"  DATAFILE 'E:\b_bk_jgcl\P201303.dbf' SIZE 8G;
CREATE TABLESPACE "P201304"  DATAFILE 'E:\b_bk_jgcl\P201304.dbf' SIZE 8G;
CREATE TABLESPACE "P201305"  DATAFILE 'E:\b_bk_jgcl\P201305.dbf' SIZE 8G;
CREATE TABLESPACE "P201306"  DATAFILE 'E:\b_bk_jgcl\P201306.dbf' SIZE 8G;
CREATE TABLESPACE "P201307"  DATAFILE 'E:\b_bk_jgcl\P201307.dbf' SIZE 8G;
CREATE TABLESPACE "P201308"  DATAFILE 'E:\b_bk_jgcl\P201308.dbf' SIZE 8G;
CREATE TABLESPACE "P201309"  DATAFILE 'E:\b_bk_jgcl\P201309.dbf' SIZE 8G;
CREATE TABLESPACE "P201310"  DATAFILE 'E:\b_bk_jgcl\P201310.dbf' SIZE 8G;
CREATE TABLESPACE "P201311"  DATAFILE 'E:\b_bk_jgcl\P201311.dbf' SIZE 8G;
CREATE TABLESPACE "P201312"  DATAFILE 'E:\b_bk_jgcl\P201312.dbf' SIZE 8G;
CREATE TABLESPACE "P201401"  DATAFILE 'E:\b_bk_jgcl\P201401.dbf' SIZE 8G;
CREATE TABLESPACE "P201402"  DATAFILE 'E:\b_bk_jgcl\P201402.dbf' SIZE 8G;
CREATE TABLESPACE "P201403"  DATAFILE 'E:\b_bk_jgcl\P201403.dbf' SIZE 8G;
CREATE TABLESPACE "P201404"  DATAFILE 'E:\b_bk_jgcl\P201404.dbf' SIZE 8G;
CREATE TABLESPACE "P201405"  DATAFILE 'E:\b_bk_jgcl\P201405.dbf' SIZE 8G;
CREATE TABLESPACE "P201406"  DATAFILE 'E:\b_bk_jgcl\P201406.dbf' SIZE 8G;
CREATE TABLESPACE "P201407"  DATAFILE 'E:\b_bk_jgcl\P201407.dbf' SIZE 8G;
CREATE TABLESPACE "P201408"  DATAFILE 'E:\b_bk_jgcl\P201408.dbf' SIZE 8G;
CREATE TABLESPACE "P201409"  DATAFILE 'E:\b_bk_jgcl\P201409.dbf' SIZE 8G;
CREATE TABLESPACE "P201410"  DATAFILE 'E:\b_bk_jgcl\P201410.dbf' SIZE 8G;
CREATE TABLESPACE "P201412"  DATAFILE 'E:\b_bk_jgcl\P201412.dbf' SIZE 8G;
CREATE TABLESPACE "P201501"  DATAFILE 'E:\b_bk_jgcl\P201501.dbf' SIZE 8G;
CREATE TABLESPACE "P201502"  DATAFILE 'E:\b_bk_jgcl\P201502.dbf' SIZE 8G;
CREATE TABLESPACE "P201503"  DATAFILE 'E:\b_bk_jgcl\P201503.dbf' SIZE 8G;
CREATE TABLESPACE "P201504"  DATAFILE 'E:\b_bk_jgcl\P201504.dbf' SIZE 8G;
CREATE TABLESPACE "P201505"  DATAFILE 'E:\b_bk_jgcl\P201505.dbf' SIZE 8G;
CREATE TABLESPACE "P201506"  DATAFILE 'E:\b_bk_jgcl\P201506.dbf' SIZE 8G;
CREATE TABLESPACE "P201507"  DATAFILE 'E:\b_bk_jgcl\P201507.dbf' SIZE 8G;
CREATE TABLESPACE "P201508"  DATAFILE 'E:\b_bk_jgcl\P201508.dbf' SIZE 8G;
CREATE TABLESPACE "P201509"  DATAFILE 'E:\b_bk_jgcl\P201509.dbf' SIZE 8G;
CREATE TABLESPACE "P201510"  DATAFILE 'E:\b_bk_jgcl\P201510.dbf' SIZE 8G;
CREATE TABLESPACE "P201511"  DATAFILE 'E:\b_bk_jgcl\P201511.dbf' SIZE 8G;
CREATE TABLESPACE "P201512"  DATAFILE 'E:\b_bk_jgcl\P201512.dbf' SIZE 8G;
CREATE TABLESPACE "P201601"  DATAFILE 'E:\b_bk_jgcl\P201601.dbf' SIZE 8G;
CREATE TABLESPACE "P201602"  DATAFILE 'E:\b_bk_jgcl\P201602.dbf' SIZE 8G;
CREATE TABLESPACE "P201603"  DATAFILE 'E:\b_bk_jgcl\P201603.dbf' SIZE 8G;
CREATE TABLESPACE "P201604"  DATAFILE 'E:\b_bk_jgcl\P201604.dbf' SIZE 8G;
CREATE TABLESPACE "P201605"  DATAFILE 'E:\b_bk_jgcl\P201605.dbf' SIZE 8G;
CREATE TABLESPACE "P201606"  DATAFILE 'E:\b_bk_jgcl\P201606.dbf' SIZE 8G;
CREATE TABLESPACE "P201607"  DATAFILE 'E:\b_bk_jgcl\P201607.dbf' SIZE 8G;
CREATE TABLESPACE "P201608"  DATAFILE 'E:\b_bk_jgcl\P201608.dbf' SIZE 8G;
CREATE TABLESPACE "P201609"  DATAFILE 'E:\b_bk_jgcl\P201609.dbf' SIZE 8G;
CREATE TABLESPACE "P201610"  DATAFILE 'E:\b_bk_jgcl\P201610.dbf' SIZE 8G;
CREATE TABLESPACE "P201611"  DATAFILE 'E:\b_bk_jgcl\P201611.dbf' SIZE 8G;
CREATE TABLESPACE "P201612"  DATAFILE 'E:\b_bk_jgcl\P201612.dbf' SIZE 8G;
CREATE TABLESPACE "P201701"  DATAFILE 'E:\b_bk_jgcl\P201701.dbf' SIZE 8G;
CREATE TABLESPACE "P201702"  DATAFILE 'E:\b_bk_jgcl\P201702.dbf' SIZE 8G;
CREATE TABLESPACE "P201703"  DATAFILE 'E:\b_bk_jgcl\P201703.dbf' SIZE 8G;
CREATE TABLESPACE "P201704"  DATAFILE 'E:\b_bk_jgcl\P201704.dbf' SIZE 8G;
CREATE TABLESPACE "P201705"  DATAFILE 'E:\b_bk_jgcl\P201705.dbf' SIZE 8G;
CREATE TABLESPACE "P201706"  DATAFILE 'E:\b_bk_jgcl\P201706.dbf' SIZE 8G;
CREATE TABLESPACE "P201707"  DATAFILE 'E:\b_bk_jgcl\P201707.dbf' SIZE 8G;
CREATE TABLESPACE "P201708"  DATAFILE 'E:\b_bk_jgcl\P201708.dbf' SIZE 8G;
CREATE TABLESPACE "P201719"  DATAFILE 'E:\b_bk_jgcl\P201709.dbf' SIZE 8G;
CREATE TABLESPACE "P201710"  DATAFILE 'E:\b_bk_jgcl\P201710.dbf' SIZE 8G;
CREATE TABLESPACE "P201711"  DATAFILE 'E:\b_bk_jgcl\P201711.dbf' SIZE 8G;
CREATE TABLESPACE "P201712"  DATAFILE 'E:\b_bk_jgcl\P201712.dbf' SIZE 8G;
CREATE TABLESPACE "PMAX"  DATAFILE 'E:\b_bk_jgcl\pmax.dbf' SIZE 16G;
CREATE TABLESPACE "BK_INDEX_HPHM_JGSJ"  DATAFILE 'E:\INDEX\bk_index_hphm_jgsj01.dbf' SIZE 4G,'E:\INDEX\bk_index_hphm_jgsj02.dbf' SIZE

4G,'E:\INDEX\bk_index_hphm_jgsj03.dbf' SIZE 4G,'E:\INDEX\bk_index_hphm_jgsj04.dbf' SIZE 4G;
CREATE TABLESPACE "BK_INDEX_BZWZDM_JGSJ"  DATAFILE 'E:\INDEX\bk_index_bzwzdm_jgsj01.dbf' SIZE 4G,'E:\INDEX\bk_index_bzwzdm_jgsj02.dbf' SIZE

4G,'E:\INDEX\bk_index_bzwzdm_jgsj03.dbf' SIZE 4G,'E:\INDEX\bk_index_bzwzdm_jgsj04.dbf' SIZE 4G;
CREATE TABLESPACE "BK_INDEX_JGSJ"  DATAFILE 'E:\INDEX\bk_index_jgsj01.dbf' SIZE 8G,'E:\INDEX\bk_index_jgsj02.dbf' SIZE 8G,'E:\INDEX\bk_index_jgsj03.dbf' SIZE

8G,'E:\INDEX\bk_index_jgsj04.dbf' SIZE 8G;
CREATE TABLESPACE "BK_INDEX_JLBH"  DATAFILE 'E:\INDEX\bk_index_jlbh01.dbf' SIZE 4G,'E:\INDEX\bk_index_jlbh02.dbf' SIZE 4G,'E:\INDEX\bk_index_jlbh03.dbf' SIZE

4G,'E:\INDEX\bk_index_jlbh04.dbf' SIZE 4G,'E:\INDEX\bk_index_jlbh05.dbf' SIZE 4G;
CREATE TABLESPACE "BK_INDEX_BK_INDEX_OTHER"  DATAFILE 'E:\INDEX\BK_INDEX_OTHERINDEX01.dbf' SIZE 8G,'E:\INDEX\BK_INDEX_OTHERINDEX02.dbf' SIZE

8G,'E:\INDEX\BK_INDEX_OTHERINDEX03.dbf' SIZE 8G;

 


ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp02.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp03.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp04.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp05.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp06.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "TEMP" ADD TEMPFILE 'E:\temp\temp07.dbf' SIZE 5000M AUTOEXTEND ON NEXT 256M MAXSIZE 30000M;
ALTER TABLESPACE "UNDOTBS1" ADD DATAFILE 'e:\undo\undotbs02.dbf' SIZE 5120m AUTOEXTEND ON NEXT 512M MAXSIZE 30000M;
ALTER TABLESPACE "UNDOTBS1" ADD DATAFILE 'e:\undo\undotbs03.dbf' SIZE 5120m AUTOEXTEND ON NEXT 512M MAXSIZE 30000M;
ALTER TABLESPACE "UNDOTBS1" ADD DATAFILE 'e:\undo\undotbs04.dbf' SIZE 5120m AUTOEXTEND ON NEXT 512M MAXSIZE 30000M;
ALTER TABLESPACE "UNDOTBS1" ADD DATAFILE 'e:\undo\undotbs05.dbf' SIZE 5120m AUTOEXTEND ON NEXT 512M MAXSIZE 30000M;
ALTER TABLESPACE "UNDOTBS1" ADD DATAFILE 'e:\undo\undotbs06.dbf' SIZE 5120m AUTOEXTEND ON NEXT 512M MAXSIZE 30000M;

 

3.3用IMP导入数据库后创建索引
create index  IND_BK_JGCL_HPHM on b_bk_jgcl(hphm,jgsj)  tablespace "BK_INDEX_HPHM_JGSJ" nologging ;
create index  IND_BK_JGSJ_BZWZDM on b_bk_jgcl(bzwzdm,jgsj) tablespace  "BK_INDEX_BZWZDM_JGSJ" nologging ;
create index  IND_BK_JGCL_JGSJ on b_bk_jgcl(jgsj)  tablespace "BK_INDEX_JGSJ" nologging;
create index IND_BK_JGCL_JLBH on B_BK_JGCL(jlbh) tablespace "BK_INDEX_JLBH" nologging;


CREATE INDEX IND_KKQP_WFCL_HPHM ON B_KKQP_WFCL(HPHM) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_WFCL_BZWZDM ON B_KKQP_WFCL(JGSJ, BZWZDM) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_BK_BJCL_HPHM ON B_BK_BJCL(HPHM) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_BK_BJSJ_BZWZDM ON B_BK_BJCL(JGSJ, BZWZDM) tablespace "BK_INDEX_OTHER";
create index ind_bk_bjcl_tjbj on b_bk_bjcl(tjbj) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_BK_CLTP_JGSJ ON B_BK_CLTP(JGSJ) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_BK_TPCL_HPHM ON B_BK_TPCL(HPHM) tablespace "BK_INDEX_OTHER";
CREATE INDEX IND_BK_TPCL_JGSJ ON B_BK_TPCL(JGSJ1, JGSJ2) tablespace "BK_INDEX_OTHER";
create index ind_bk_jtcs_tjbj on b_bk_jtcs(tjbj) tablespace "BK_INDEX_OTHER";
create index ind_bk_tj_fzll on b_bk_tj_fzll(jgrq,fz,sbbh,cdbh) tablespace "BK_INDEX_OTHER";
create index ind_bk_tj_xsll on b_bk_tj_xsll(jgrq,xs,sbbh,cdbh) tablespace "BK_INDEX_OTHER";
create index ind_bk_tj_rll on b_bk_tj_rll(jgrq,sbbh,cdbh) tablespace "BK_INDEX_OTHER";
create index ind_bk_tj_rbjll on b_bk_tj_rbjll(jgrq,sbbh,cdbh,bjlxdm) tablespace "BK_INDEX_OTHER";

 


 

阅读(3659) | 评论(0) | 转发(1) |
0

上一篇:祝自己情人节快乐

下一篇:20120407之心情

给主人留下些什么吧!~~