IMP時 ORA-01741 illegal zero-length identifier

studywell發表於2014-10-16
環境:oracle 9.2.0.1匯入; 從9.2.0.4庫上匯出(匯出客戶端是9.2.0.1);

同義詞帶dblink,且table_owner為空的imp時報錯,發現少部分能正常匯入;與dblink是否有效無關;
解決辦法,手工建立同義詞:

IMP-00017: following statement failed with ORACLE error 1741:
 "CREATE SYNONYM "MIE_GOODS_DECL" FOR ""."MIE_GOODS_DECL"@"CEMS_MIE""
IMP-00003: ORACLE error 1741 encountered
ORA-01741: illegal zero-length identifier

查詢語句:
select *
 from dba_synonyms d where D.db_link IS NOT NULL  AND D.table_owner IS NULL  and  d.owner ='CEMS';
 
select 'CREATE OR REPLACE SYNONYM '||SYNONYM_NAME||' FOR '||TABLE_NAME||'@'||db_link||';'
 from dba_synonyms d where D.db_link IS NOT NULL  AND D.table_owner IS NULL  and  d.owner ='CEMS';

後在CEMS使用者下執行語句;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29519108/viewspace-1300716/,如需轉載,請註明出處,否則將追究法律責任。

相關文章