exp/imp工具雖然已經非常古老,但有些時候還是非常有用。
曾經遇到一個場景:某用戶下的數據對象非常,表有8萬多張,索引有9萬多個。還有其他亂七八糟的東西,也即這個用戶下的對象有幾十萬個。 用expdp導出整個schema,純數據差不多十個小時左右全部導出,然而這些數據對象卻十幾個小時還沒有結束。
迫不得已,只能更換思路,想試試先用expdp導出純數據,再用exp導出數據對象。 結果exp導出數據對象這一步只花了不到2個小時。 這個速度還是可以接受的,最后針對這個schema,就只能采用這種方式進行遷移。
好了,回到今天的主題,IMP-00403告警。
[oracle@19crac1 software]$ imp userid=\"sys/welcome1@gg as sysdba\" fromuser=test touser=test file=exp_test.dmp log=imp_test.log buffer=104857600 recordlength=65535 ignore=y rows=n indexes=y constraints=y statistics=none compile=y
Import: Release 12.2.0.1.0 - Production on Sun Aug 23 10:22:43 2020
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Export file created by EXPORT:V12.01.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
IMP-00403:
Warning: This import generated a separate SQL file "imp_test_sys.sql" which contains DDL that failed due to a privilege issue.
. importing TEST's objects into TEST
About to enable constraints...
Import terminated successfully with warnings.
在使用imp工具導入表結構的過程中,出現了IMP-00403告警信息。
搜索發現“IMP-00403 "Warning: This import generated a separate SQL file" Using 12.2 imp Command (Doc ID 2298963.1)”這篇文章。
大致意思就是在12.2及以上版本,如果執行imp工具的用戶擁有dba權限,則在執行imp命令的過程中會觸發IMP-00403告警信息,當出現這個告警信息時,我們需要檢查告警中提及的DDL腳本文件,如果文件內容為空,則表示沒有DDL語句需要手動執行,這個告警信息可以忽略;如果有內容,則需要手動處理。