【DataGuarad】逻辑迁移与standby备库

简介: standby 库不支持expdp,可以使用exp代替oracle@rac3:/home/oracle>expdp yang/yang directory=dump dumpfile=yang.
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 之后看到一篇文章: http://www.dbvisit.com/forums/showthread.php?t=552
说使用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
和内部错误有关。。
相关实践学习
数据库实验室挑战任务-初级任务
本场景介绍如何开通属于你的免费云数据库,在RDS-MySQL中完成对学生成绩的详情查询,执行指定类型SQL。
阿里云云原生数据仓库AnalyticDB MySQL版 使用教程
云原生数据仓库AnalyticDB MySQL版是一种支持高并发低延时查询的新一代云原生数据仓库,高度兼容MySQL协议以及SQL:92、SQL:99、SQL:2003标准,可以对海量数据进行即时的多维分析透视和业务探索,快速构建企业云上数据仓库。 了解产品 https://www.aliyun.com/product/ApsaraDB/ads
目录
相关文章
|
11月前
|
数据库
在备库上进行冷备份的三个步骤
数据库处于mount状态不一定是一致的,要看mrp进程是否存在!
|
SQL 存储 数据库
在DG环境中,主库丢失归档,对主库进行基于SCN的增量备份来恢复物理DG环境
在DG环境中,主库丢失归档,对主库进行基于SCN的增量备份来恢复物理DG环境
354 0
|
Oracle 关系型数据库
dataguard 增量恢复
dataguard 增量恢复
104 0
dataguard级联备库设置
dataguard级联备库设置
95 0
|
运维
简单记录一次ADG备库同步故障
这是一套11g的老库,主库3节点,备库1节点。项目上于昨天晚上做某测试扩容了表空间,在其他位置新建了9个数据文件,在备库无法创建这个非标准位置的datafile,从而导致同步中断。
329 0