OA脚本创建:
1、表空间
无创建,默认
2、用户:
create user yczboa identified by "****" ; grant connect,dba,resource to yczboa ;
3、给用户授权sys权限
授予用户sys权限(有些角色,或者视图,本用户是没有权限的,可能是有sys创建的,所以需要加上,导入时此不报错)
(1)、yczboa授予sys权限
select receivedpersons, receivedpersonids from workflow_requestlog
4、创建dmp路径
create directory backup_OAP as '/home/BACKUP/backup_OAP'; GRANT READ,WRITE ON DIRECTORY backup_OAP to yczboa;
5、导入,导出命令
impdp yczboa/****@127.0.0.1/oraecology DIRECTORY=backup_OAP DUMPFILE=YCZBOAP-20181016.dmpdp logfile=YCZBOAP-20181016-impdp.log EXCLUDE=STATISTICS
如果不好用,可以直接sys导
impdp sys/****@orcl directory=backup_NCP dumpfile=YCZBNZ-20181016.dmpdp REMAP_SCHEMA=yczboa:yczboa impdp sys/****@orcl directory=backup_NCP dumpfile=YCZBWZ-20181016.dmpdp REMAP_SCHEMA=yczboa:yczboa
6、出现问题
问题1.
在进行到SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS如下错误,据说是11R2的bug,直接排除掉即可
impdp yczboa/****@127.0.0.1/oraecology DIRECTORY=backup_OAP DUMPFILE=YCZBOAP-20181016.dmpdp logfile=YCZBOAP-20181016-impdp.log EXCLUDE=STATISTICS expdp yczboa/****@oraecology schemas=yczboa directory=DUMP_OA dumpfile=OA_8_0_2_expdp.dmp logfile=OA_8_0_2_expdp.log' Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [TABLE_STATISTICS] ORA-06502: PL/SQL: numeric or value error LPX-00225: end-element tag "HIST_GRAM_LIST_ITEM" does not match start-element tag "EPVALUE" ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 ORA-06512: at "SYS.KUPW$WORKER", line 9001 ----- PL/SQL Call Stack ----- object line object handle number name 0xde985aa0 20462 package body SYS.KUPW$WORKER 0xde985aa0 9028 package body SYS.KUPW$WORKER 0xde985aa0 16665 package body SYS.KUPW$WORKER 0xde985aa0 3956 package body SYS.KUPW$WORKER 0xde985aa0 9725 package body SYS.KUPW$WORKER 0xde985aa0 1775 package body SYS.KUPW$WORKER 0xdd42bc68 2 anonymous block ORA-39097: Data Pump job encountered unexpected error -1427 ORA-39065: unexpected master process exception in DISPATCH ORA-01427: single-row subquery returns more than one row
impdp yczboa/****@127.0.0.1/oraecology DIRECTORY=backup_OAP DUMPFILE=YCZBOAP-20181016.dmpdp logfile=YCZBOAP-20181016-impdp.log EXCLUDE=STATISTICS
问题2:
ORA-39082: Object type ALTER_PROCEDURE:"YCZBOA"."HRMROLEMEMBERSSHARE" created with compilation warnings ORA-39082: Object type ALTER_PROCEDURE:"YCZBOA"."" created with compilation warnings ORA-39082: Object type ALTER_PROCEDURE:"YCZBOA"."PRO_GETEMPLFUNCOBJMAXRIGHTTYPE" created with compilation warnings ORA-39082: Object type VIEW:"YCZBOA"."VIACCOUNTTITLE" created with compilation warnings ORA-39082: Object type VIEW:"YCZBOA"."VIACCOUNTTITLETOCOMPANY" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."IMAGELIBRARY_ID_TRI" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."IMAGELIBRARY_ID_TRI" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."IMAGEFOLDER_ID_TRI" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."IMAGEFOLDER_ID_TRI" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRM_RP_SUB_TEP_CON_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRM_RP_SUB_TEP_CON_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."TRG_TBACCOUNTTITLETYPE_INSERT" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."TRG_TBACCOUNTTITLETYPE_INSERT" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."COWORKQUITER_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."COWORKQUITER_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRMPROVINCE_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRMPROVINCE_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRMCITY_TRIGGER" created with compilation warnings ORA-39082: Object type TRIGGER:"YCZBOA"."HRMCITY_TRIGGER" created with compilation warnings
八、删除用户及对象
drop user itp cascade;
九、exp,expdp,imp,impdp
exp,imp导出导入到oa表中目前ok expdp,impdp导出导入到oA表中,有表workflow_requestlog的列receivedpersons, receivedpersonids 值对调了
文章评论