【DataGuarad】邏輯遷移與standby備庫

楊奇龍發表於2011-09-20
standby 庫不支援expdp,可以使用exp代替
oracle@rac3:/home/oracle>expdp yang/yang directory=dump dumpfile=yang.dmp tables=yang                     
Export: Release 11.2.0.1.0 - Production on Tue Sep 20 19:46:42 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31633: unable to create master table "YANG.SYS_EXPORT_TABLE_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 1020
ORA-16000: database open for read-only access
原因:執行expdp匯出時需要建立一個master table。standby 庫是隻讀的,所以不能使用expdp工具,然而可以使用exp工具在備庫上進行資料邏輯匯出
oracle@rac3:/home/oracle>exp yang/yang file=yang_20110920.dmp tables=yang
Export: Release 11.2.0.1.0 - Production on Tue Sep 20 19:47:46 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table                           YANG     574121 rows exported
Export terminated successfully without warnings.
oracle@rac3:/home/oracle>
google 之後看到一篇文章:
說使用network_link可以進行匯出。於是做了測試,但是均以失敗告終:
yangdb 指向第一備庫,yangdbstd 指向第二備庫
oracle@rac1:/tmp>expdp yang/yang network_link=yangdb directory=dump dumpfile=yang.dmp tables=yang
Export: Release 11.2.0.1.0 - Production on Tue Sep 20 19:22:21 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/opt/oracle/oradata/yangdb/rac/tempfile/temp.268.761930967'
ORA-06512: at "SYS.DBMS_DATAPUMP", line 806
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5822

ORA-39097: Data Pump job encountered unexpected error -1157

oracle@rac1:/tmp>expdp yang/yang network_link=yangdbstd directory=dump dumpfile=yang.dmp tables=yang
Export: Release 11.2.0.1.0 - Production on Tue Sep 20 19:22:58 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "YANG"."SYS_EXPORT_TABLE_02":  yang/******** network_link=alifpre directory=dump dumpfile=yang.dmp tables=yang 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS [] 
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_METADATA", line 2625
ORA-06512: at "SYS.DBMS_METADATA", line 2668
ORA-06512: at "SYS.DBMS_METADATA", line 2974
ORA-06512: at "SYS.DBMS_METADATA", line 5161

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPW$WORKER", line 8159

----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xb60d7438     19028  package body SYS.KUPW$WORKER
0xb60d7438      8191  package body SYS.KUPW$WORKER
0xb60d7438     12728  package body SYS.KUPW$WORKER
0xb60d7438      2425  package body SYS.KUPW$WORKER
0xb60d7438      8846  package body SYS.KUPW$WORKER
0xb60d7438      1651  package body SYS.KUPW$WORKER
0xabf53b48         2  anonymous block

ORA-39126: Worker unexpected fatal error in KUPW$WORKER.MAIN [] 
ORA-04052: error occurred when looking up remote object YANG.DBMS_DATAPUMP@ALIFPRE
ORA-00604: error occurred at recursive SQL level 3
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPW$WORKER", line 8159

----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xaa652970     19028  package body SYS.KUPW$WORKER
0xaa652970      8191  package body SYS.KUPW$WORKER
0xaa652970      1705  package body SYS.KUPW$WORKER
0xaa50fb60         2  anonymous block

Job "YANG"."SYS_EXPORT_TABLE_02" stopped due to fatal error at 19:23:04
UDE-00001: user requested cancel of current operation
和內部錯誤有關。。

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

相關文章