ORA-39181: Only partial table data may be exported due to fine grain access control on "OE"."PURCHAS

来源:互联网 发布:华为软件设计方案模板 编辑:程序博客网 时间:2024/05/04 09:03

      操作环境:Oracle Linux 6.5+Oracle11g

      今天在用数据泵导出表空间的实验中出现一个错误:ORA-39181: Only partial table data may be exported due to fine grain access control on  第一次遇到这个错误,从Oracle 11g的官方文档Oracle® Database Error Messages 11g Release 2 (11.2) (编号E17766-03)一书中查到如下错误描述:

     ORA-39181: Only partial table data may be exported due to fine grain access control onstring

Cause: An unprivileged user has tried to export a table that has fine grain access control. The table owner is subjected to access control and may not be able to export all rows in the table. Only the rows that can be seen by that user will be exported. In order to preserve integrity of the table, the user importing the table should have enough privilege to recreate the table with the security policies at import time.

Action: It is strongly recommended that the database administrator handle exporting of this table.
 
错误的原因是一个没有权限的用户试图导出一个具有细粒度访问控制的表。该表的拥有者访问该表会受限,因此不能导出该表里的所有行。该表的所有者只能导出其能看到的那些表行。因此,要保证表的完整性,在安全策略的前提下导入该表时,导入该表的用户必须拥有足够的权限来重建该表。


        解决的办法就是将EXEMPT ACCESS POLICY这个权限赋给system用户:


       


       虽然之前的导出有错误,但同样会生成导出的数据文件和日志文件,将其删除,再重复一次命令:




     成功!

   最后还有一句,导出的时候数据库是要处于open状态,数据库处于close、nomount、mount都无法导出的。


0 0