检查某个环境时发现expdp完全备份成功但有告警
Master table "USR_EXPDP"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for USR_EXPDP.SYS_EXPORT_FULL_01 is:
/backup/expdp/orcl_20231129_1629.dmp
Job "USR_EXPDP"."SYS_EXPORT_FULL_01" completed with 20 error(s) at Wed Nov 28 23:49:49 2023 elapsed 0 00:19:56
搜索ORA-关键字,发现是ORA-39181报错
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_ATTRIBUTES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_COMPONENTS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_DEPENDENCIES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_DEPL_LINEAGES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_LABELS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_LARGE_ATTRIBUTES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_METADATA_DOCS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_PATHS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_SANDBOXES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_STREAMED_DOCS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_ATTRIBUTES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_COMPONENTS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_DEPENDENCIES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_DEPL_LINEAGES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_LABELS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_LARGE_ATTRIBUTES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_METADATA_DOCS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_PATHS"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_SANDBOXES"
ORA-39181: Only partial table data may be exported due to fine grain access control on "ZF_MDS"."ZF_STREAMED_DOCS"
查看mos文档:ORA-39181:Only Partial Table Data Exported Due To Fine Grain Access Control (Doc ID 422480.1)
处理办法:
方法一:直接对备份用户赋权
grant EXEMPT ACCESS POLICY to USR_EXPDP;
方法二:Disable the VPD policy.
DBMS_RLS.ENABLE_POLICY ('object_schema','object_name','policy_name','FALSE');