标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,670)
- DB2 (22)
- MySQL (73)
- Oracle (1,532)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (560)
- Oracle安装升级 (91)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (78)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
标签归档:win linux dg
ORACLE 12C Windows-Linux 部署DATAGURAD
环境描述
win 64中的ORACLE 12C(primary)与Linux 64中的ORACLE 12C(standby)搭建datagurad
primary force logging
C:\Users\XIFENFEI>sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on 星期六 8月 24 16:59:53 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. 连接到: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options CDB_CDB$ROOT@SYS> select banner from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production PL/SQL Release 12.1.0.1.0 - Production CORE 12.1.0.1.0 Production TNS for 64-bit Windows: Version 12.1.0.1.0 - Production NLSRTL Version 12.1.0.1.0 - Production CDB_CDB$ROOT@SYS> alter database force logging ; 数据库已更改。
primary rman backup
backup filesperset = 5 as compressed backupset database format 'd:/backup/rman/full_%U.rman';
primary 生成standby controlfile
CDB_CDB$ROOT@SYS> ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'c:/control01.ctl'; 数据库已更改。 CDB_CDB$ROOT@SYS> create pfile='e:/pfile.txt' from spfile; 文件已创建。
standby 参数文件
DB_CREATE_FILE_DEST='+DATA' db_create_online_log_dest_1='+DATA' db_unique_name='cdb_dg' service_names='cdb' log_archive_dest_1='LOCATION=/u02/app/oracle/archivelog/ valid_for=(all_logfiles,all_roles)' log_archive_dest_2='service=primary lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=cdb' log_archive_config='dg_config=(cdb,cdb_dg)' standby_file_management=auto db_file_name_convert='E:\APP\XIFENFEI\ORADATA\','+DATA\CDB_DG\DATAFILE\' log_file_name_convert='E:\APP\XIFENFEI\ORADATA\','+DATA\CDB_DG\LOGFILE\' fal_server=primary
primary 修改参数
CDB_CDB$ROOT@SYS> alter system set log_archive_config='dg_config=(cdb,cdb_dg)'; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set log_archive_dest_2=' 2 service=standby lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=cdb_dg'; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set log_archive_dest_1= 2 'LOCATION=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles)'; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set fal_server=standby; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set standby_file_management=auto; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set db_file_name_convert='+DATA\CDB_DG\DATAFILE\','E:\APP\XIFENFEI\ORADATA\' scope=spfile; 系统已更改。 CDB_CDB$ROOT@SYS> alter system set log_file_name_convert='+DATA\CDB_DG\LOGFILE\','E:\APP\XIFENFEI\ORADATA\' scope=spfile; 系统已更改。
primary and standby tns
STANDBY = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.30.32 )(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdb) ) ) PRIMARY = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.30.1 )(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdb) ) )
standby restore controlfile
ASMCMD> cp /tmp/CONTROL01.CTL control01.ctl copying /tmp/CONTROL01.CTL -> +data/cdb/control01.ctl
standby password file
[oracle@xifenfei dbs]$ pwd /u01/app/oracle/product/12.1/db_1/dbs [oracle@xifenfei dbs]$ cp /tmp/rman/PWDcdb.ora orapwcdb
standby mount
SYS% cdb> create spfile from pfile='initcdb.ora'; File created. SYS% cdb> startup mount; ORACLE instance started. Total System Global Area 521936896 bytes Fixed Size 2290264 bytes Variable Size 314576296 bytes Database Buffers 197132288 bytes Redo Buffers 7938048 bytes Database mounted. SYS% cdb> select banner from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production PL/SQL Release 12.1.0.1.0 - Production CORE 12.1.0.1.0 Production TNS for Linux: Version 12.1.0.1.0 - Production NLSRTL Version 12.1.0.1.0 - Production SYS% cdb> select name from v$datafile; NAME -------------------------------------------------------------------------------- E:\APP\XIFENFEI\ORADATA\CDB\SYSTEM01.DBF E:\APP\XIFENFEI\ORADATA\CDB\PDBSEED\SYSTEM01.DBF E:\APP\XIFENFEI\ORADATA\CDB\SYSAUX01.DBF E:\APP\XIFENFEI\ORADATA\CDB\PDBSEED\SYSAUX01.DBF E:\APP\XIFENFEI\ORADATA\CDB\UNDOTBS01.DBF E:\APP\XIFENFEI\ORADATA\CDB\USERS01.DBF E:\APP\XIFENFEI\ORADATA\CDB\PDB\SYSTEM01.DBF E:\APP\XIFENFEI\ORADATA\CDB\PDB\SYSAUX01.DBF E:\APP\XIFENFEI\ORADATA\CDB\PDB\PDB_USERS01.DBF 9 rows selected.
standby rman restore
--清理控制文件中的备份集垃圾 DELETE noprompt OBSOLETE; crosscheck backup; delete noprompt expired backup; --注册新备份集 catalog start with '/tmp/rman/'; --还原数据文件 run { set newname for database to '+data'; restore database; switch datafile all; }
standby clear redo
SYS% cdb> select group# from v$log; GROUP# ---------- 4 6 5 SYS% cdb> alter database clear logfile group 4; Database altered. SYS% cdb> alter database clear logfile group 5; Database altered. SYS% cdb> alter database clear logfile group 6; Database altered.
standby add standby redolog
SYS% cdb> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 size 50M; Database altered. SYS% cdb> ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 size 50M; Database altered. SYS% cdb> ALTER DATABASE ADD STANDBY LOGFILE GROUP 12 size 50M; Database altered. SYS% cdb> ALTER DATABASE ADD STANDBY LOGFILE GROUP 13 size 50M; Database altered.
primary add standby redolog
CDB_CDB$ROOT@SYS> ALTER DATABASE ADD STANDBY LOGFILE GROUP 10 'E:\APP\XIFENFEI\ORADATA\CDB\std_redo10.log' size 50M; 数据库已更改。 CDB_CDB$ROOT@SYS> ALTER DATABASE ADD STANDBY LOGFILE GROUP 11 'E:\APP\XIFENFEI\ORADATA\CDB\std_redo11.log' size 50M; 数据库已更改。 CDB_CDB$ROOT@SYS> ALTER DATABASE ADD STANDBY LOGFILE GROUP 12 'E:\APP\XIFENFEI\ORADATA\CDB\std_redo12.log' size 50M; 数据库已更改。 CDB_CDB$ROOT@SYS> ALTER DATABASE ADD STANDBY LOGFILE GROUP 13 'E:\APP\XIFENFEI\ORADATA\CDB\std_redo13.log' size 50M; 数据库已更改。
standby readonly
SYS% cdb> ALTER DATABASE OPEN READ ONLY; Database altered.
standby start mrp
SYS% cdb> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION; Database altered.
DATAGURAD 是否正常检查
--primary CDB_CDB$ROOT@SYS> archive log list; 数据库日志模式 存档模式 自动存档 启用 存档终点 USE_DB_RECOVERY_FILE_DEST 最早的联机日志序列 374 下一个存档日志序列 376 当前日志序列 376 --standby Mon Aug 12 13:56:51 2013 All non-current ORLs have been archived. Mon Aug 12 13:56:53 2013 Media Recovery Log /u02/app/oracle/archivelog/1_370_820595806.dbf Mon Aug 12 13:56:57 2013 Media Recovery Log /u02/app/oracle/archivelog/1_371_820595806.dbf Mon Aug 12 13:57:02 2013 Media Recovery Log /u02/app/oracle/archivelog/1_372_820595806.dbf Mon Aug 12 13:57:04 2013 Media Recovery Log /u02/app/oracle/archivelog/1_373_820595806.dbf Mon Aug 12 13:57:05 2013 Media Recovery Log /u02/app/oracle/archivelog/1_374_820595806.dbf Media Recovery Waiting for thread 1 sequence 375 Mon Aug 12 13:57:19 2013 Primary database is in MAXIMUM PERFORMANCE mode RFS[2]: Assigned to RFS process (PID:26114) RFS[2]: No standby redo logfiles created for thread 1 RFS[2]: Opened log for thread 1 sequence 376 dbid 1937199326 branch 820595806 Mon Aug 12 13:57:19 2013 RFS[3]: Assigned to RFS process (PID:26118) RFS[3]: Opened log for thread 1 sequence 375 dbid 1937199326 branch 820595806 Mon Aug 12 13:57:19 2013 Archived Log entry 16 added for thread 1 sequence 375 rlc 820595806 ID 0x7377d8de dest 2: Mon Aug 12 13:57:22 2013 Media Recovery Log /u02/app/oracle/archivelog/1_375_820595806.dbf Media Recovery Waiting for thread 1 sequence 376 (in transit)