建站服务器
使用expdp在完成数据导出时,可以使用estimate参数评估待导出数据库对象的大小,简单演示一下,供参考。
1.查看有关estimate参数的帮助信息
1)查看命令行帮助信息
ora10g@secdb /expdp$ expdp help=y
……
estimate calculate job estimates where the valid keywords are:
(blocks) and statistics.
……
2)oracle官方文档中关于estimate参数的描述
参考链接:http://download.oracle.com/docs/cd/b19306_01/server.102/b14215/dp_export.htm#sthref105
引用内容如下:
estimate
default: blocks
purpose
specifies the method that
export will use to estimate how
much disk space each table in the export job will consume (in bytes).
the estimate is printed in the log file and displayed on the client\\\’s
standard output device. the estimate is for table row data only; it does
not include metadata.
syntax and description
estimate={blocks | statistics}
blocks – the estimate is calculated by multiplying the
number of database blocks used by the source objects, times the
appropriate block sizes.
statistics – the estimate is calculated using statistics
for each table. for this method to be as accurate as possible, all
tables should have been analyzed recently.
restrictions
if the data pump export job involves compressed tables, the default
size estimation given for the compressed table is inaccurate when estimate=blocks
is used. this is because the size estimate does not reflect that the
data was stored in a compressed form. to get a more accurate size
estimate for compressed tables, use estimate=statistics.
example
the following example shows a use of the estimate
parameter in which the estimate is calculated using statistics for the employees
table:
> expdp hr/hr tables=employees estimate=statistics directory=dpump_dir1
dumpfile=estimate_stat.dmp
2.显式指定estimate参数为blocks
ora10g@secdb /expdp$ expdp sec/sec directory=expdp_dir dumpfile=sec.dmp estimate=blocks
export: release 10.2.0.3.0 – 64bit production on saturday, 10 april, 2010 6:23:26
copyright (c) 2003, 2005, oracle. all rights reserved.
connected to: oracle database 10g enterprise edition release 10.2.0.3.0 – 64bit production
with the partitioning, oracle label security, olap and data mining scoring engine options
starting sec.sys_export_schema_01: sec/ directory=expdp_dir dumpfile=sec.dmp estimate=blocks
estimate in progress using blocks method…
processing object type schema_export/table/table_data
. estimated sec.test_sec 2 mb
. estimated sec.test_sec1 2 mb
. estimated sec.test_sec2 2 mb
total estimation using blocks method: 6 mb
processing object type schema_export/user
processing object type schema_export/system_grant
processing object type schema_export/role_grant
processing object type schema_export/default_role
processing object type schema_export/pre_schema/procact_schema
processing object type schema_export/table/table
processing object type schema_export/table/index/index
processing object type schema_export/table/constraint/constraint
processing object type schema_export/table/index/statistics/index_statistics
processing object type schema_export/table/comment
. . exported sec.test_sec 1.018 mb 11716 rows
. . exported sec.test_sec1 1.018 mb 11717 rows
. . exported sec.test_sec2 1.018 mb 11718 rows
master table sec.sys_export_schema_01 successfully loaded/unloaded
dump file set for sec.sys_export_schema_01 is:
/expdp/sec.dmp
job sec.sys_export_schema_01 successfully completed at 06:23:37
此时预估单位是按照数据库块进行统计的,相比最终导出的大小来说不是很准确,不过有一定的参考意义。
3.指定estimate参数为statistics
ora10g@secdb /expdp$ expdp sec/sec directory=expdp_dir dumpfile=sec.dmp estimate=statistics
export: release 10.2.0.3.0 – 64bit production on saturday, 10 april, 2010 6:22:02
copyright (c) 2003, 2005, oracle. all rights reserved.
connected to: oracle database 10g enterprise edition release 10.2.0.3.0 – 64bit production
with the partitio
百度云服务器可以做几个网站吗物理云服务器怎么组建请帮忙上传手持身份证核验照片备案了阿里云服务器到期了域名是什么?域名有什么作用?学linux的理由阿里云首购服务器到期续费腾讯云1核4g服务器一年多少钱