oracle ebsdemo用户,[转载]EBS R12 Demo版

EBS R12 Demo版安装后有236G(linux显示这么大,那么在windows下需要创建约260G

左右的虚拟硬盘),尝试进行瘦身操作,稍微压缩掉一些空间占用。

a4c26d1e5885305701be709a3d33442f.png

一 、Demo版中有很多历史数据

2.2 利用 Joanne S. Davis

对EBS数据清理方面的总结,对历史数据进行清理:

2.2.1 FA模块的清理

FA 模块有两类归档和清理程序:

1)批量添加(Mass Additions)

2)折旧和调整事务处理记录(Depreciation and Adjustment Transaction records

)

批量添加:

Delete Mass Additions 程序把成批添加信息归档到一个归档表,然后就可以被清除。

标准:Delete Mass Additions 程序会删除”已经删除或已过帐队列“中的成批传输信息,归档到审计跟踪表。

操作指导:

1. (B)

Archive

2. Export the

archive tables

3. Requery

the archive

4. (B)

Purge

5. Drop

temporary archive tables

a4c26d1e5885305701be709a3d33442f.png

a4c26d1e5885305701be709a3d33442f.png

2.2.n) 总帐模块的数据清理

Consolidation Audit Data:当您在审核模式运行巩固Consolidation,总帐模块将维护一个总帐的综合审计报告,未映射的子账户报告,以及失效的父帐户报告的审计线索。在运行这些报告后,您可以清除GL_CONSOLIDATION_AUDIT表中的支持源数据。

a4c26d1e5885305701be709a3d33442f.png

2.2.n) OM模块清除订单和报价单

先运行Order Purge Selection ,选择要清楚的订单,比如这里选择条件是2007-12-31

前订单,产生一个订单集。然后再运行purge Set清除这个订单集。

a4c26d1e5885305701be709a3d33442f.png

2.2.n) OM模块清除导入的信贷风险记录

a4c26d1e5885305701be709a3d33442f.png

2.2.n) OM模块清除订单处理过程中的历史消息

a4c26d1e5885305701be709a3d33442f.png

2.2.n) Shipping模块清除例外日志信息

a4c26d1e5885305701be709a3d33442f.png

2.2.n) INV模块清除 Transaction(逐个切换一次库存组织运行一次)

a4c26d1e5885305701be709a3d33442f.png

2.2.n) INV模块清楚标准成本历史记录

a4c26d1e5885305701be709a3d33442f.png

2.2.n) INV模块清除成本信息

a4c26d1e5885305701be709a3d33442f.png

比较麻烦,几十个库存组织,每个组织都有几十种成本类型,全部清除得提交几百次请求,太麻烦了,搞了一个库存组织后就买有再继续搞。

sql>select count(1) from

CST_ITEM_COST_DETAILS

sql>158230

2.2.n) 系统管理员:删除工作流运行时历史记录:

a4c26d1e5885305701be709a3d33442f.png

2.2.n)系统管理员:清除并发程序和并发管理器的日志

a4c26d1e5885305701be709a3d33442f.png

二、Demo版安装后有些表空间的利用率很低,先查处利用率小于80%的数据文件,进行Resize,

Resize后的大小为:已使用大小+ 原大小×10%;

1.1 使用此语句查询后发现,大约有15G的空间可以释放掉。

select sum(大小M),sum(Resizeto) from

(

select 物理文件名,大小M,已使用M, 已使用M/大小M 利用率,已使用M + 大小M*0.1 Resizeto from

(

select

b.file_name 物理文件名,

b.tablespace_name 表空间,

b.bytes/1024/1024 大小M,

(b.bytes-sum(nvl(a.bytes,0)))/1024/1024 已使用M

from dba_free_space a,dba_data_files b

where

a.file_id=b.file_id group by b.tablespace_name,b.file_name,b.bytes

)

where 已使用M/大小M <0.8

)

--生成批量resize的脚本:

select 'alter database datafile ''' || 物理文件名 ||''' resize ' || ceil(RESIZEto) || 'M;' from

(

select 物理文件名,大小M,已使用M, 已使用M/大小M 利用率,已使用M + 大小M*0.1

Resizeto from

(

select

b.file_name 物理文件名,

b.tablespace_name 表空间,

b.bytes/1024/1024 大小M,

(b.bytes-sum(nvl(a.bytes,0)))/1024/1024 已使用M

from dba_free_space a,dba_data_files b

where

a.file_id=b.file_id group by b.tablespace_name,b.file_name,b.bytes

)

where 已使用M/大小M <0.8

)

Resize 后linux下显示为 209G, windows下 新建虚拟硬盘

220G,把oracle目录复制到新硬盘,复制完成没有错误;但新硬盘可用空间为0;没办法,把虚拟硬盘expand到230G,然后在linux下重新调整分区大小。

a4c26d1e5885305701be709a3d33442f.png

[root@syfdemo ~]# fdisk /dev/sdc

The number of cylinders for this disk is set to 30024.

There is nothing wrong with that, but this is larger than

1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of

LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2

FDISK)

Command (m for help): p

Disk /dev/sdc: 246.9 GB, 246960619520 bytes

255 heads, 63 sectors/track, 30024 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device

Boot Start End Blocks Id System

/dev/sdc1 1 28719 230685336 83 Linux

Command (m for help): m

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility

flag

d delete a partition

l list known partition

types

m print this menu

n add a new partition

o create a new empty DOS

partition table

p print the partition

table

q quit without saving

changes

s create a new empty Sun

disklabel

t change a partition's system

id

u change display/entry

units

v verify the partition

table

w write table to disk and

exit

x extra functionality (experts

only)

Command (m for help): p

Disk /dev/sdc: 246.9 GB, 246960619520 bytes

255 heads, 63 sectors/track, 30024 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device

Boot Start End Blocks Id System

/dev/sdc1 1 28719 230685336 83 Linux

Command (m for help): d

Selected partition 1

Command (m for help): p

Disk /dev/sdc: 246.9 GB, 246960619520 bytes

255 heads, 63 sectors/track, 30024 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device

Boot Start End Blocks Id System

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-30024, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-30024, default

30024): 30024

Command (m for help): p

Disk /dev/sdc: 246.9 GB, 246960619520 bytes

255 heads, 63 sectors/track, 30024 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device

Boot Start End Blocks Id System

/dev/sdc1 1 30024 241167748+ 83 Linux

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@syfdemo ~]# fdisk /dev/sdc

The number of cylinders for this disk is set to 30024.

There is nothing wrong with that, but this is larger than

1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of

LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2

FDISK)

Command (m for help): p

Disk /dev/sdc: 246.9 GB, 246960619520 bytes

255 heads, 63 sectors/track, 30024 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device

Boot Start End Blocks Id System

/dev/sdc1 1 30024 241167748+ 83 Linux

Command (m for help): q

[root@syfdemo ~]#

[root@syfdemo ~]# resize2fs -p /dev/sdc1 241167748

resize2fs 1.35 (28-Feb-2004)

The containing partition (or device) is only 60291937 (4k)

blocks.

You requested a new size of 241167748 blocks.

[root@syfdemo ~]# e2fsck -f /dev/sdc1

e2fsck 1.35 (28-Feb-2004)

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

/dev/sdc1: 800563/28835840 files (0.4% non-contiguous),

54814204/57671334 blocks[root@syfdemo ~]# resize2fs -p

/dev/sdc1

resize2fs 1.35 (28-Feb-2004)

Resizing the filesystem on /dev/sdc1 to 60291937 (4k) blocks.

Begin pass 1 (max = 80)

Extending the inode

table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The filesystem on /dev/sdc1 is now 60291937 blocks long.

[root@syfdemo ~]# mount /dev/sdc1 /d02

[root@syfdemo ~]#

调整完毕后, EBSR12.1.3 中英文版的vmdk为230G

(里面还留有可用空间为大约10G,足以支持并发程序产生的日志之类的需求了,另外有些特殊试验需要扩展表空间也是可以的)。

这样子瘦身其实也就是减小了大约20G,效果并不理想,以后有时间再搞,待续。。。。

其他参考:

1、(如果要看哪些表使用了比较大的空间,可以先进行分析后从数据字典统计):

对所有表和索引进行一次分析收集(过程比较长,大约15小时,试验结果表明即便不分析对于统计所有表和索引所占的空间大小差异也不大,所以也可以不统计)

begin

--分析所有表:analyze table TABLENAME compute

statistics for cur_item in (select owner, table_name from dba_tables where

owner<>'SYS' and last_analyzed < sysdate -1)

loop begin dbms_stats.gather_table_stats(cur_item.owner,cur_item.table_name);

exception when others then

dbms_output.put_line('Analyze Table

Exception:'||sqlerrm); end; end loop; --分析所有索引:analyze index INDEXNAME estimate

statistics for cur_item in (select owner, index_name from dba_indexes

where owner<>'SYS'

and last_analyzed < sysdate -1)

loop begin dbms_stats.gather_index_stats(cur_item.owner,cur_item.index_name);

exception when others then dbms_output.put_line('Analyze Index

Exception:'||sqlerrm); end; end

loop; end;

2、Joanne S. Davis 的EBS清理总结文档附件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值