單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(3)
拷貝密碼檔案:
cp orapwhellodb /data/oracle/product/10205/db1/dbs/
B 恢復:
export ORACLE_SID=hellodb
rman target /
startup nomount;
restore controlfile from '/data/backup/stdctl_hellodb.ctl';
根據
output filename=/data/oracle/oradata/hellodb/controlhellodb01.ctl
修改
control_files = /data/oracle/oradata/hellodb/controlhellodb01.ctl
startup mount;
catalog start with '/data/backup';
在備庫恢復資料庫
run{
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
restore database;
release channel d1;
release channel d2;
release channel d3;
release channel d4;
}
C 開啟恢復程式(如果沒有STANDBY LOGFILE ,應該增加):
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 4 ('/data/oracle/oradata/hellodb/stdlog_5_1.log') SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 5 ('/data/oracle/oradata/hellodb/stdlog_6_1.log') SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 6('/data/oracle/oradata/hellodb/stdlog_7_1.log') SIZE 50M;
shutdown immediate
startup mount
alter database recover managed standby database disconnect from session using current logfile;
D 轉邏輯備庫
02 先停止
alter database recover managed standby database cancel;
52 執行
SQL> exec dbms_logstdby.build;
PL/SQL procedure successfully completed.
SQL> alter system archive log current;
System altered.
02 執行
SQL> ALTER DATABASE RECOVER TO LOGICAL STANDBY hellodb;
ALTER DATABASE RECOVER TO LOGICAL STANDBY hellodb
*
ERROR at line 1:
ORA-16254: change db_name to HELLODB in the client-side parameter file (pfile)
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
shutdown immediate
startup mount
alter database open resetlogs;
alter database start logical standby apply immediate;
52 執行(如果日誌沒有傳過來,該操作會立即啟用傳輸)
shutdown immediate
startup
02 看到類似,表示成功了
Indexes of table SYSTEM.LOGMNR_ATTRCOL$ have been rebuilt and are now usable
Indexes of table SYSTEM.LOGMNR_ATTRIBUTE$ have been rebuilt and are now usable
……
Indexes of table SYSTEM.LOGMNR_USER$ have been rebuilt and are now usable
LSP2 started with pid=27, OS id=21614
Thu Dec 09 18:26:16 CST 2010
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 21, /data/oracle/oradata/hellodb/arch/1_21_737312896.dbf
Thu Dec 09 18:26:16 CST 2010
LOGMINER: Turning ON Log Auto Delete
LOGSTDBY Analyzer process P003 started with pid=27 OS id=21616
LOGSTDBY Apply process P004 started with pid=28 OS id=21618
LOGSTDBY Apply process P006 started with pid=30 OS id=21622
LOGSTDBY Apply process P005 started with pid=29 OS id=21620
LOGSTDBY Apply process P008 started with pid=32 OS id=21626
LOGSTDBY Apply process P007 started with pid=31 OS id=21624
Thu Dec 09 18:26:17 CST 2010
LOGMINER: End mining logfile: /data/oracle/oradata/hellodb/arch/1_21_737312896.dbf
Thu Dec 09 18:26:17 CST 2010
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 22, /data/oracle/oradata/hellodb/arch/1_22_737312896.dbf
Thu Dec 09 18:26:17 CST 2010
LOGMINER: End mining logfile: /data/oracle/oradata/hellodb/arch/1_22_737312896.dbf
52 測試
create user testuser
identified by "test123"
default tablespace system
temporary tablespace TEMP
profile DEFAULT;
grant dba to testuser;
create table testuser.test(a int);
insert into testuser.test values(1);
commit;
02 檢視結果
SQL> select * from testuser.test;
A
----------
1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-681930/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(1)
- 單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(2)
- 單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(4)
- 單節點主庫、邏輯備庫升級為RAC、物理備庫、邏輯備庫(5)
- 配置物理備庫+邏輯備庫
- 4節點RAC建立邏輯備庫
- 邏輯備庫Switchover
- rac與邏輯備庫不能自動建表空間,物理備庫正常
- 【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫 (四)--新增一個物理dg節點
- 11 管理邏輯備庫
- 【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫(二)
- 【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫(一)
- 【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫 (三)
- 邏輯Data Guard主備庫的轉換
- 資料庫邏輯備份(轉)資料庫
- 認識資料庫物理備份和邏輯備份區別資料庫
- 邏輯DG主備庫轉換的failoverAI
- 主庫RAC,備庫單節點ASM的dataguard搭建ASM
- oracle邏輯備用資料庫(一)Oracle資料庫
- 邏輯備份全庫或者邏輯備份多個使用者的資料
- 11g 邏輯備庫簡單故障處理
- 【DataGuarad】邏輯遷移與standby備庫
- dataguard之邏輯備庫表空間不足
- 邏輯備庫上有指定表不應用
- ORACLE資料庫的邏輯備份(轉)Oracle資料庫
- oracle 10g 物理備庫轉換邏輯備庫ORA-19953故障解決方法Oracle 10g
- dataguard回顧之安裝——建立邏輯備庫
- 資料庫(表)的邏輯備份與恢復資料庫
- dataguard之邏輯備庫移動資料檔案
- 邏輯備用資料庫主要作用是什麼。資料庫
- DataGuard切換(主庫為Rac+備庫為Rac)
- DG為RAC的邏輯備庫?LOG_AUTO_DELETE(TRUE)引數不起作用delete
- 一主一物一邏備庫
- 物理備庫互轉快照備庫
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- 【DATAGUARD】DG系列之11g邏輯備庫的搭建
- 利用邏輯備庫進行rolling upgrade
- Oracle資料庫的邏輯備份工具-expdp資料泵Oracle資料庫