EXP的consistent参数

CONSISTENT
默认值:n
使用SET TRANSACTION READ ONLY语句限制数据以保证一致读,确保导出的数据在同一个时间点上。在导出开始后,如果有其他应用试图更改数据,我们就应该在exp命令中指定CONSISTENT=y 。
当consistent=n时,每张表一般都是一个导出事务。然而,如果表时nest表,outer表和inner表会被不同的事务分开导出,如果是分区表,也会有同样的效果。因此,如果nest表和分区表被其他事务update,导出的数据可能是不一致的。为了最小化数据不一致的可能,导出的时候应该选择在没有事务处理的时候。


CONSISTENT=y可用保证数据导出的一致性。但是有一些注意事项:
  ? CONSISTENT=y is unsupported for exports that are performed when you are connected as user SYS or you are using AS SYSDBA, or both.CONSISTENT=y 不支持SYS用户或者SYSDBA权限?
? Export of certain metadata may require the use of the SYS schema within recursive SQL. In such situations, the use of CONSISTENT=y will be ignored. Oracle recommends that you avoid making metadata changes during an export process in which CONSISTENT=y is selected.导出指定元数据时可能使用递归SQL涉及SYS schema。?
? To minimize the time and space required for such exports, you should export tables that need to remain consistent separately from those that do not. For example, export the emp and dept tables together in a consistent export, and then export the remainder of the database in a second pass.为了优化时间和空间,我们应该在导出表的时候保持数据的一致性。比如,一致性导出emp表和dept表,然后其他对象可以在另一个导出语句中导出。简而言之,导出数据时应该保持数据一致性,甚至可以多段导出数据来保证数据不会紊乱。?
? A "snapshot too old" error occurs when rollback space is used up, and space taken up by committed transactions is reused for new transactions. Reusing space in the rollback segment allows database integrity to be preserved with minimum space requirements, but it imposes a limit on the amount of time that a read-consistent image can be preserved.
If a committed transaction has been overwritten and the information is needed for a read-consistent view of the database, then a "snapshot too old" error results.
To avoid this error, you should minimize the time taken by a read-consistent export. (Do this by restricting the number of objects exported and, if possible, by reducing the database transaction rate.) Also, make the rollback segment as large as possible.回滚段使用告急时会出现“快照太久”的错误,在导出的时候需使用回滚段。如果已提交的事务的回滚段已经被覆盖但是又需要使用其数据来保持一致性读取,这个时候就会发生“快照太久”的错误。为了避免这个错误,我们需要尽量少的开销导出时间(限制导出的对象数目,减少事务发生率等),设置回滚段足够大。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31461640/viewspace-2141554/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31461640/viewspace-2141554/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值