Use EXPDP FOR Physical Standby Database

0

Posted on by

  正常情况下在物理dataguard上是不能expdp,还好expdp有个NETWORK_LINK功能,可以巧妙的导出dump文件。

 

如果是10g,需要先open下

SQL> alter database recover managed standby database cancel;
SQL> alter database open read only;

 

–在一个临时数据库上新建一个到物理dataguard的dblink

SQL> create database link expdp_primary connect to system identified by password using 'standby_database';
SQL> select sysdate from dual@expdp_primary;
SQL> create directory datapump as '/u01';


–在临时数据库的服务器上执行
expdp system/password directory=datapump network_link=expdp_primary full=y dumpfile=standby_database.dmp logfile=standby_database.log

 

如果是exp就没有问题,直接可以导出。

参考:How To Use DataPump Export (EXPDP) To Export From Physical Standby Database (文档 ID 1356592.1)

oracle copy命令语法

0

Posted on by

copy在没有dblink下可以处理小额数据的迁移

 

SQL*Plus Copy Command的语法:  
COPY {FROM database | TO database | FROM database TO database} {APPEND|CREATE|INSERT|REPLACE} 
destination_table [(column, column, column, ...)]  
USING query  

 

{APPEND|CREATE|INSERT|REPLACE} – 声明操作数据的方式,下面分别解释一下:  
Append – 向已有的目标表中追加记录,如果目标表不存在,自动创建,这种情况下和Create等效。  
Create – 创建目标表并且向其中追加记录,如果目标表已经存在,则会返回错误。  
Insert – 向已有的目标表中插入记录,与Append不同的是,如果目标表不存在,不自动创建而是返回错误。  
Replace – 用查询出来的数据覆盖已有的目标表中的数据,如果目标表不存在,自动创建。 

 

使用过程如下:

C:\Users\Administrator>sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on 星期四 4月 3 15:02:38 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

--copy table xx2
SQL> copy from copy1/copy1@11gtest to copy2/copy2@11gtest create xx2 using selec
t * from xx1;

数组提取/绑定大小为 15。(数组大小为 15)
将在完成时提交。(提交的副本为 0)
最大 long 大小为 80。(long 为 80)
表 XX2 已创建。

75374 行选自 copy1@11gtest。[......]

查看全文

ORACLE 11G SNAPSHOT STANDBY转换

0

Posted on by

PHYSICAL STANDBY Convert to SNAPSHOT STANDBY

 

SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=50g scope=both;
 
SQL> alter system set db_recovery_file_dest='/u01/flasharch' scope=both;

SQL> alter database recover managed standby database cancel;

SQL> select database_role,db_unique_name,open_mode from v$database;

SQL> alter database convert to snapshot standby;

SQL> select database_role,db_unique_name,open_mode from v$database;

SQL> alter database open;

 

 

SNAPSHOT STANDBY Convert to PHYSICAL STANDBY

 

SQL> shutdown immedaite

SQL> startup mount

SQL> select database_role,db_unique_name,open_mode from v$database;

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

SQL> select database_role,db_unique_name,open_mode from v$database;

SQL> alter database recover managed standby database using current logfile disconnect from session;

&nbsp[……]

查看全文

ORA-00600[KGEADE_IS_0]错误解决

0

Posted on by

在RAC ASM文件系统恢复到单机文件系统,open resetlogs 报错:

ORA-00600: internal error code, arguments: [kgeade_is_0], [], [], [], [], [], [], []
ORA-600 signalled during: alter database open resetlogs...
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_10861.trc:
ORA-00313: open failed for members of log group 11 of thread 1
ORA-00312: online log 11 thread 1: '+DATA1/orcl/datafile/redo111'
ORA-17503: ksfdopn:2 Failed to open file +DATA1/orcl/datafile/redo111
ORA-15001: diskgroup "DATA1" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
ORA-00312: online log 11 thread 1: '+DATA1/orcl/onlinelog/redo111'
ORA-17503: ksfdopn:2 Failed to open file +DATA1/orcl/onlinelog/redo111
ORA-15001: diskgroup "DATA1" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to C[......]

查看全文

rman 在oracle 12c的备份还原

0

Posted on by

  由于12c有CDB和PDB的概念。rman在备份使用上会有点区别。

 

备份:

1.备份全部的数据库(包括CDB)

[oracle@ora12c ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:42:27 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORADBCA (DBID=261209273)


RMAN> BACKUP DATABASE;

 

2.只备份CDB

[oracle@ora12c ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:46:10 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORADBCA (DBID=261209273)

RMAN> BACKUP DATABASE ROOT;

 

3.只备份PDB(一个或多个)

单个CDB备份:

[oracle@ora12c ~]$ rman target=sys/oracle@pdb1

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:48:00 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected t[......]

查看全文

第 6 页,共 12 页« 最新...456789...最旧 »