时间:2021-07-01 10:21:17 帮助过:47人阅读
最近在导出schema级别的数据时被hang住,不得不停止当前的导出作业,如果你有类似的问题,请继续往下看。
最近在导出schema级别的数据时被hang住,不得不停止当前的导出作业,如果你有类似的问题,请继续往下看。
1、问题描述
导出整个schema时数据库被hang住,如下所示
符号">"是由SecureCRT设定的每300秒发送一次
Oracle@Dev-DB-04:~> expdp goex_admin/xxx directory=db_dump_dir dumpfile=gobo2.dmp logfile=gobo2.log schemas=goex_admin
Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 May, 2013 9:30:52
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Starting "GOEX_ADMIN"."SYS_EXPORT_SCHEMA_01": goex_admin/******** directory=db_dump_dir dumpfile=gobo2.dmp
logfile=gobo2.log schemas=goex_admin
>>>>
-->查询超长时间的操作,没有任何结果,也就是说datapump压根啥也没有做
goex_admin@GOBO2> @long_ops
no rows selected
-->查询job产生的对象的表,表存在
goex_admin@GOBO2> @datapump_master_tb
STATUS OBJECT_ID OBJECT_TYPE OWNER_OBJECT
------- ---------- ------------------- --------------------------------------------------
VALID 315838 TABLE GOEX_ADMIN.SYS_EXPORT_SCHEMA_01
2、问题解决
参数fixed_date引起数据库导入导出被hang住 [ID 563171.1]
goex_admin@GOBO2> show parameter fixed
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fixed_date string 20130506 16:00:00
-- Author : Robinson
goex_admin@GOBO2> alter system set fixed_date=none;
System altered.
-->参数fixed_date被移除后,导出正常
oracle@Dev-DB-04:~> expdp goex_admin/xxx directory=db_dump_dir dumpfile=gobo2.dmp logfile=gobo2.log schemas=goex_admin
Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 May, 2013 9:30:52
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Starting "GOEX_ADMIN"."SYS_EXPORT_SCHEMA_01": goex_admin/******** directory=db_dump_dir dumpfile=gobo2.dmp
logfile=gobo2.log schemas=goex_admin
>>>>
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 89.31 MB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
.......................
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA
. . exported "GOEX_ADMIN"."GO_GA_CUST_TBL" 148.4 KB 551 rows
. . exported "GOEX_ADMIN"."GO_GA_ACC_TBL" 167.9 KB 533 rows
3、参数FIXED_DATE
FIXED_DATE enables you to set a constant date that SYSDATE will always return instead of the current date.
To undo a fixed date setting, specify FIXED_DATE=NONE. This parameter is useful primarily for testing.
The value can be in the format shown above or in the default Oracle date format, without a time.
FIXED_DATE参数可以定义当前的日期为一个常量而不随系统日期的变化而变化,,通常用于测试目的使用
对于使用datapump进行导入导出的情形,应考虑将该参数设置为none来避免导入导出hang住的问题
该参数影响的版本Version 10.1.0.2 to 11.2.0.3