Oracle 11g RAC to RAC ADG搭建(一)采用rman备份恢复方式
(一)基础环境
主库 | 备库 | |
操作系统 | RedHat6.7 | RedHat6.7 |
服务器名称 | primarydb1 primarydb2 |
standbydb1 standbydb2 |
IP地址规划 |
192.168.10.31 primarydb1 10.10.10.31 primarydb1-priv |
192.168.10.41 standbydb1 10.10.10.41 standbydb1-priv |
------------------------ | ------------------------------ | --------------------------------------- |
数据库版本 | 11.2.0.4 | 11.2.0.4 |
db_name | testdb | testdb |
db_unique_name | testdb | testdbdg |
instance_name | testdb1 testdb2 |
testdbdg1 testdbdg2 |
service_name | testdb | testdbdg |
数据库安装情况 | 安装GI+数据库软件+创建数据库 | 安装GI+数据库软件 (不用创建数据库) |
在配置dataguard之前,主库已经安装了GI+数据库软件+创建了数据库,备库也已经安装了GI+数据库软件,备库不需要使用dbca建库。
(二)主库配置
(2.1)配置归档,主库需要运行在归档模式下
--查看是否开启归档
archive log list
如果没有开启归档,需要开启,方法如下:
--step1: 设置归档日志文件存放地址
alter system set log_archive_dest_1='LOCATION=+ARCH' ; --step2: 关闭数据库,2个节点都关闭
shutdown immediate --step3: 重启节点1到mount状态
startup mount --step4: 开启归档
alter syetem archivelog --step5: 打开数据库
alter database open --step6: 确认归档状态
archive log list --最好使用alter system switch logfile切换日志,确认日志已经存到归档位置 --step7:打开另外一个节点
startup open;
(2.2)主库启用强制记录日志
--开启数据库强制记录日志功能
alter database force logging --查看强制记录日志功能是否开启
select force_logging from v$database;
(2.3)主库网络配置
(2.3.1)静态监听配置
主库可以使用动态监听,也可以使用静态监听,这里新创建一个监听LISTENER_ADG,监听新的端口1522。以下操作使用grid用户执行
step1:在节点1执行添加监听命令
srvctl add listener -l LISTENER_ADG -o $ORACLE_HOME -p "TCP:1522"
step2:启动监听
srvctl start listener -l LISTENER_ADG
step3:修改监听配置文件,加入静态注册信息,2个节点都需要修改,这里以节点1为例
[grid@primarydb1 ~]$ vim /u01/app/11.2.0/grid/network/admin/listener.ora
LISTENER_ADG=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ADG)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_ADG=ON # line added by Agent #添加以下信息 SID_LIST_LISTENER_ADG =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = testdb)
(ORACLE_HOME = /u01/app/11.2./grid) #填写的是grid_home
(SID_NAME=testdb1) #如果是节点2,需改为SID_NAME=testdb2
)
)
step4:重启监听,一个节点执行
srvctl stop listener -l LISTENER_ADG srvctl start listener -l LISTENER_ADG
(2.3.2)tns配置,主库2个节点都添加
[oracle@primarydb1 ~]$ cd /u01/app/oracle/product/11.2./db_1/network/admin/
[oracle@primarydb1 admin]$ ls
samples shrept.lst tnsnames.ora
[oracle@primarydb1 admin]$ vim tnsnames.ora
在tnsnames.ora文件中添加如下内容
tnstestdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.33)(PORT = ))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.34)(PORT = ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb)
)
) tnstestdbdg =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.43)(PORT = ))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.44)(PORT = ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdbdg)
)
)
(2.4)主库参数配置
alter system set db_unique_name = 'testdb' scope=spfile;
alter system set log_archive_config='DG_CONFIG=(testdb,testdbdg)';
alter system set log_archive_dest_2='SERVICE=tnstestdbdg LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testdbdg';
alter system set log_archive_dest_state_1 = "enable";
alter system set log_archive_dest_state_2 = "enable";
alter system set db_file_name_convert='+DATA/testdbdg','+DATA/testdb' scope=spfile;
alter system set log_file_name_convert='+DATA/testdbdg','+DATA/testdb' scope=spfile;
alter system set standby_file_management=auto;
alter system set fal_client='tnstestdb';
alter system set fal_server='tnstestdbdg';
因为有的参数重启才会生效(scope=spfile),因此改完参数需要重启
[grid@primarydb1 ~]$ srvctl stop database -d testdb
[grid@primarydb1 ~]$ srvctl start database -d testdb
(2.5)添加standby online redo log
standby redo log的大小与redo log大小相同。组数为比在线日志多一组。
查看在线日志组数信息
SQL> select a."GROUP#",a."THREAD#",a."BYTES",a."MEMBERS"
from v$log a,
v$logfile b
where a."GROUP#" = b."GROUP#"
order by group#; GROUP# THREAD# BYTES MEMBERS
---------- ---------- ---------- ----------
1 1 52428800 1
2 1 52428800 1
3 2 52428800 1
4 2 52428800 1
可以看到,每个线程(可以理解为每个实例)有2组日志文件,每组有1个日志文件。因此我们在创建standby redo log时需要为每个thread创建3组日志文件。
--thread1
alter database add standby logfile thread 1 group 11 ('+DATA') size 50M;
alter database add standby logfile thread 1 group 12 ('+DATA') size 50M;
alter database add standby logfile thread 1 group 13 ('+DATA') size 50M;
--thread2
alter database add standby logfile thread 2 group 14 ('+DATA') size 50M;
alter database add standby logfile thread 2 group 15 ('+DATA') size 50M;
alter database add standby logfile thread 2 group 16 ('+DATA') size 50M;
(2.6)将主库的密码文件拷贝到备库
拷贝主库密码文件到备库,在节点1执行
[oracle@primarydb1 dbs]$ pwd
/u01/app/oracle/product/11.2./db_1/dbs
# 拷贝密码文件到备库节点1
[oracle@primarydb1 dbs]$ scp orapwtestdb1 oracle@192.168.10.41:`pwd` # 拷贝密码文件到备库节点2
[oracle@primarydb1 dbs]$ scp orapwtestdb1 oracle@192.168.10.42:`pwd`
(2.7)将主库的参数文件拷贝到备库
SQL> create pfile='/home/oracle/pfile_20190818' from spfile; SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4. - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options [oracle@primarydb1 ~]$ scp pfile_20190818 oracle@192.168.10.41:`pwd`
oracle@192.168.10.41's password:
pfile_20190818 % .8KB/s :
(三)备库配置
(3.1)修改密码文件
linux环境中,密码文件命名格式为:orapwd{$sid},因此需要修改密码文件的名字
备库节点1:
[oracle@standbydb1 dbs]$ pwd
/u01/app/oracle/product/11.2./db_1/dbs
[oracle@standbydb1 dbs]$ mv orapwtestdb1 orapwtestdbdg1
备库节点2:
[oracle@standbydb2 dbs]$ pwd
/u01/app/oracle/product/11.2./db_1/dbs
[oracle@standbydb2 dbs]$ mv orapwtestdb1 orapwtestdbdg2
(3.2)修改参数文件
最终参数文件如下:
*.audit_file_dest='/u01/app/oracle/admin/testdbdg/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+DATA/testdb/controlfile/current.266.1016639457'
*.db_block_size=
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_file_name_convert='+DATA/testdb','+DATA/testdbdg'
*.db_name='testdb'
*.db_unique_name='testdbdg'
*.diagnostic_dest='/u01/app/oracle'
*.fal_client='tnstestdbdg'
*.fal_server='tnstestdb'
testdbdg1.instance_number=
testdbdg2.instance_number=
*.log_archive_config='DG_CONFIG=(testdb,testdbdg)'
*.log_archive_dest_1='LOCATION=+ARCH'
*.log_archive_dest_2='SERVICE=tnstestdb LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testdb'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_file_name_convert='+DATA/testdb','+DATA/testdbdg'
*.remote_login_passwordfile='exclusive'
*.standby_file_management='AUTO'
testdb1.thread=
testdb2.thread=
testdb1.undo_tablespace='UNDOTBS2'
testdb2.undo_tablespace='UNDOTBS1'
里面涉及到的路径需要手动创建
su - oracle
# 2个节点都要创建
mkdir -p mkidr -p /u01/app/oracle/admin/testdbdg/adump
(3.3)备库网络配置
(3.3.1)静态监听配置
这里新创建一个监听LISTENER_ADG,监听新的端口1522。以下操作使用grid用户执行
step1:在节点1执行添加监听命令
srvctl add listener -l LISTENER_ADG -o $ORACLE_HOME -p "TCP:1522"
step2:启动监听
srvctl start listener -l LISTENER_ADG
step3:修改监听配置文件,加入静态注册信息,2个节点都需要修改,这里以节点1为例
[grid@standbydb1 ~]$ vim /u01/app/11.2./grid/network/admin/listener.ora LISTENER_ADG=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_ADG)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_ADG=ON # line added by Agent SID_LIST_LISTENER_ADG =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = testdbdg)
(ORACLE_HOME = /u01/app/11.2./grid)
(SID_NAME=testdbdg1)
)
)
step4:重启监听,一个节点执行
srvctl stop listener -l LISTENER_ADG srvctl start listener -l LISTENER_ADG
(3.3.2)tns配置,备库2个节点都添加
[oracle@primarydb1 ~]$ cd /u01/app/oracle/product/11.2./db_1/network/admin/
[oracle@primarydb1 admin]$ ls
samples shrept.lst tnsnames.ora
[oracle@primarydb1 admin]$ vim tnsnames.ora
# 在tnsnames.ora文件中添加如下内容
tnstestdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.33)(PORT = ))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.34)(PORT = ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb)
)
) tnstestdbdg =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.43)(PORT = ))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.44)(PORT = ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdbdg)
)
)
(3.4)启动备库到nomount状态
[oracle@standbydb1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4. Production on Mon Aug :: Copyright (c) , , Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount pfile='/home/oracle/pfile_20190818';
ORACLE instance started. Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
SQL>
注意:再将备库启动到nomount状态后,理论上,可以从主库通过sqlplus连接到备库,同样也可以在备库通过sqlplus连接到主库,这里建议测试主库备库之间网络的连通性。在主库与备库上执行
tnsping tnstestdb
tnsping tnstestdbdg sqlplus sys/Oracle123@tnstestdb
sqlplus sys/Oracle123@tnstestdbdg
确保所有命令都能执行成功。
(3.5)将数据库注册到集群中,才能够使用ASM
在节点1的oracle用户下执行:
[oracle@standbydb1 db_1]$ srvctl add database -d testdbdg -o /u01/app/oracle/product/11.2./db_1
[oracle@standbydb1 db_1]$ srvctl add instance -d testdbdg -i testdbdg1 -n standbydb1
[oracle@standbydb1 db_1]$ srvctl add instance -d testdbdg -i testdbdg2 -n standbydb2
(四)主库备份
rman target / RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
sql' alter system archive log current';
backup database format '/databaseBackup/full_db_%U';
sql' alter system archive log current';
backup archivelog all format '/databaseBackup/archlog_%U';
backup current controlfile format '/databaseBackup/controlfile_%U';
backup spfile format '/databaseBackup/spfile_%U';
release channel c1;
release channel c2;
}
将备份传到备库服务器:
[oracle@primarydb1 /]$ cd databaseBackup/
[oracle@primarydb1 databaseBackup]$ ls
archlog_0au9imjq_1_1 archlog_0cu9imnk_1_1 full_db_06u9imbr_1_1 full_db_08u9imhs_1_1 spfile_0gu9imtt_1_1
archlog_0bu9imju_1_1 controlfile_0du9imrd_1_1 full_db_07u9imbr_1_1 full_db_09u9imhv_1_1
[oracle@primarydb1 databaseBackup]$ scp * oracle@192.168.10.41:/databaseBackup/
(五)备库还原
(5.1)restore控制文件
[oracle@standbydb1 ~]$ rman target / Recovery Manager: Release 11.2.0.4. - Production on Mon Aug :: Copyright (c) , , Oracle and/or its affiliates. All rights reserved. connected to target database: TESTDB (not mounted) RMAN> restore standby controlfile from '/databaseBackup/controlfile_0du9imrd_1_1'; Starting restore at -AUG-
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= instance=testdbdg1 device type=DISK channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: ::
output file name=+DATA/testdbdg/controlfile/current.268.1016664445
Finished restore at -AUG-
备注:在恢复控制文件时,遇到错误:
解决方法:https://jingyan.baidu.com/album/9faa7231c13269473c28cb33.html?picindex=9
(5.2)修复数据库
在启动到mount状态时报了2个错误:
报错1:初始化参数文件找不到
解决方法:复制pfile到给定位置
[oracle@standbydb1 bin]$ cp /home/oracle/pfile_20190818 /u01/app/oracle/product/11.2.0/db_1/dbs/inittestdbdg1.ora
报错2:控制文件找不到
解决方法:
1.通过asmcmd找到控制文件的位置;
ASMCMD> pwd
+data/testdbdg/CONTROLFILE
ASMCMD> ls
current.256.1016666437
2.修改初始化参数文件中
[oracle@standbydb1 ~]$ vim /u01/app/oracle/product/11.2./db_1/dbs/inittestdbdg1.ora
...
*.control_files='+data/testdbdg/CONTROLFILE/current.256.1016666437'
...
重新启动数据库到mount状态
[oracle@standbydb1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4. Production on Mon Aug :: Copyright (c) , , Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount;
ORACLE instance started. Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted.
开始修复数据库
RMAN> restore database; Starting restore at -AUG-
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= instance=testdbdg1 device type=DISK channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile to +DATA/testdbdg/datafile/system.268.1016639305
channel ORA_DISK_1: restoring datafile to +DATA/testdbdg/datafile/users.267.1016639305
channel ORA_DISK_1: reading from backup piece /databaseBackup/full_db_06u9imbr_1_1
channel ORA_DISK_1: piece handle=/databaseBackup/full_db_06u9imbr_1_1 tag=TAG20190819T035434
channel ORA_DISK_1: restored backup piece
channel ORA_DISK_1: restore complete, elapsed time: ::
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile to +DATA/testdbdg/datafile/sysaux.260.1016639305
channel ORA_DISK_1: restoring datafile to +DATA/testdbdg/datafile/undotbs1.263.1016639305
channel ORA_DISK_1: restoring datafile to +DATA/testdbdg/datafile/undotbs2.264.1016639859
channel ORA_DISK_1: reading from backup piece /databaseBackup/full_db_07u9imbr_1_1
channel ORA_DISK_1: piece handle=/databaseBackup/full_db_07u9imbr_1_1 tag=TAG20190819T035434
channel ORA_DISK_1: restored backup piece
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -AUG-
(六)打开备库
打开备库
SQL> alter database open ; Database altered.
查看数据库状态:
SQL> select name,db_unique_name,open_mode from v$database; NAME DB_UNIQUE_NAME OPEN_MODE
--------- ------------------------------ --------------------
TESTDB testdbdg READ ONLY
开始数据库实时日志应用,在开启之前,需要确认standby redo logfile是否已经创建,这里已经从主库恢复过来,故不需要创建
SQL> alter database recover managed standby database using current logfile disconnect; Database altered.
在执行该语句后,数据库会自动去同步主库新生成的日志,可以打开主库与备库的告警日志,查看数据库同步状态。
(七)启动另外一个节点
(7.1)首先使用pfile生成spfile
SQL> create spfile='+DATA/testdbdg/spfiletestdbdg.ora' from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/inittestdbdg1.ora'; File created.
关闭节点1,修改pfile参数:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down. #节点1
[oracle@standbydb1 ~]$ cd /u01/app/oracle/product/11.2./db_1/dbs/
[oracle@standbydb1 dbs]$ vim inittestdbdg1.ora
# 仅保留一行参数,指向spfile
spfile='+DATA/testdbdg/spfiletestdbdg.ora' #节点2
[oracle@standbydb1 ~]$ cd /u01/app/oracle/product/11.2./db_1/dbs/
[oracle@standbydb1 dbs]$ vim inittestdbdg2.ora
# 仅保留一行参数,指向spfile
spfile='+DATA/testdbdg/spfiletestdbdg.ora'
(7.2)启动节点
首先查看数据库状态:
[grid@standbydb1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
...
ora.testdbdg.db
OFFLINE OFFLINE Instance Shutdown
OFFLINE OFFLINE
...
打开节点1:
[oracle@standbydb1 dbs]$ sqlplus / as sysdba SQL> startup --开启实时日志应用
SQL> alter database recover managed standby database using current logfile disconnect;
打开节点2:
[oracle@standbydb2 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 22 06:07:55 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup
ORACLE instance started. Total System Global Area 313196544 bytes
Fixed Size 2252744 bytes
Variable Size 255852600 bytes
Database Buffers 50331648 bytes
Redo Buffers 4759552 bytes
Database mounted.
Database opened.
再次确认数据库的状态,已经正常启动:
[grid@standbydb1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
...
ora.testdbdg.db
1 ONLINE ONLINE standbydb1 Open,Readonly
2 ONLINE ONLINE standbydb2 Open,Readonly
...
查看备库的数据库状态:
主库:
SQL> select name,db_unique_name,open_mode,database_role from v$database; NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
TESTDB testdb READ WRITE PRIMARY
备库:
SQL> select name,db_unique_name,open_mode,database_role from v$database; NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
--------- ------------------------------ -------------------- ----------------
TESTDB testdbdg READ ONLY WITH APPLY PHYSICAL STANDBY
(八)测试数据同步情况
(1)主库创建表,插入数据:
SQL> create table test02 (id number , name varchar(20)); Table created. SQL> insert into test02 values(1,'lijiaman'); 1 row created. SQL> commit; Commit complete.
SQL> select * from test02;
ID NAME
---------- --------------------
1 lijiaman
备库查看:
SQL> select * from test02; ID NAME
---------- --------------------
1 lijiaman
数据已同步。
(2)主库删除表,表进入了回收站,11gR2的dataguard不需要关闭回收站。
SQL> drop table test02; Table dropped. SQL> select * from tab; TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$kKkJUDt4hvrgUyAKqMC61w==$0 TABLE
发现备库表也进入了回收站
SQL> select * from tab; TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$kKkJUDt4hvrgUyAKqMC61w==$0 TABLE
同样,主库执行闪回删除,将sales表从回收站恢复回来,备库也会执行相同的操作。
主库执行闪回删除恢复已经删除的test02表
SQL> flashback table test02 to before drop;
Flashback complete. SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
TEST02 TABLE
备库也会自动恢复已经删除的test02表
SQL> select * from tab; TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
TEST02 TABLE
数据同步测试无异常。
(九)存在的问题
存在的问题1:备库使用scan-ip无法连接:
配置信息:ip192.168.10.40 port:1521 service:testdbdg
需要设置初始化参数:remote_listener
SQL> alter system set remote_listener='standbydb-scan:1521'
【完】
Oracle 11g RAC to RAC ADG搭建(一)采用rman备份恢复方式的更多相关文章
- RHEL6.4 + Oracle 11g DG测试环境快速搭建参考
环境现状: 两台虚拟主机A和B: 1. A机器已安装ASM存储的Oracle 11g 实例 参考:http://www.cnblogs.com/jyzhao/p/4332410.html 2 ...
- Oracle RMAN备份恢复指导书
目 录 1 目的与范围... 1 2 术语和定义... 1 3 角色和职责... 2 4 使用RMAN备份数据库... 2 4.1.1 检查数据库模式... 2 4.1.2 连接到target数据库. ...
- ORACLE模拟一个数据文件坏块并使用RMAN备份来恢复
1.创建一个实验用的表空间并在此表空间上创建表 create tablespace blocktest datafile '/u01/oradata/bys1/blocktest.dbf' size ...
- Oracle之RMAN备份恢复1-基础篇
1,rman的作用与体系架构 1.1 什么是rman rman(recovery manager)是oracle8i以后dba的一重要工具一般位于$oracle_home/bin目录下,主要用来备份, ...
- Oracle Rman备份恢复和管理
参考资料: Oracle之Rman入门指南 一步一步学Rman Rman简介 Rman-Recover manager恢复管理工具. Oracle集成了很多环境的一个数据库备份和恢复的工具. Rman ...
- ORACLE 11G没有备份文件參数文件在异机通过rman备份恢复找回被误删的数据
背景: 同事误删除线上数据.所以须要从备份中找回数据恢复. 真实屋漏偏逢连夜雨.船迟又遇打头风.前两天备份的磁盘坏块,如今仅仅有rman全备的.bak文件,没有控制文件和參数文件,所 ...
- Oracle DataGuard主库丢失归档日志后备库的RMAN增量恢复一例
第一部分 问题描述和环境状态确认 ----1. 问题场景 Oracle DataGuard主库丢失archivelog,如何不重建备库完成同步? 在Oracle DataGuard主从同步过程中可能 ...
- ORACLE11G 将dataguard的rman备份恢复到測试环境的单机oracle中的具体过程
. 也就是说此时数据库仅仅能进行不全然恢复了,在打开数据库时得使用resetlogs打开. recover database until scn 11412370952; RMAN> recov ...
- oracle直通车6关于rman备份恢复数据文件,以及创建分区表的实验
1.创建一张表,在表上创建一个索引,分别查询表,索引各自分配了多少个extents,多少个数据块以及总共占用空间的大小(bytes). 答:创建一张表t,为字段object_id创建索引t_objec ...
随机推荐
- ARM 链接脚本分析
分析连接脚本的语法规则 /* ---------------------------------------------------------------------------- * Memory ...
- 连接池-Mybatis源码
持续更新:https://github.com/dchack/Mybatis-source-code-learn Mybatis连接池 有这么个定律,有连接的地方就有池. 在市面上,可以适配Mybat ...
- EasyDSS高性能RTMP、HLS(m3u8)、HTTP-FLV、RTSP流媒体服务器解决方案之CDN内容分发网络
背景分析 EasyDSS流媒体解决方案提供一站式的转码.点播.直播.录像.检索.时移回放服务,极大地简化了开发和集成的工作,并且EasyDSS支持多种特性,完全能够满足企业视频信息化建设方面的需求.其 ...
- 小程序报错:对应的服务器 TLS 为 TLS 1.0 ,小程序要求的 TLS 版本必须大于等于 1.2
我这里出现此错误的原因是,搭载域名网站的服务器是windows2008 r2,配置的域名证书是TLS1.0版本,需要在服务器注册表中加入TLS的其他版本. 处理办法如下 小程序报错 TLS 版本必须大 ...
- docker安装ES,Kibana
docker安装ES 1.docker pull elasticsearch:6.8.2 2.docker run -it --name elasticsearch -d -p 9200:9200 ...
- zookeeper实现的分布式锁
在分布式系统中,多个jvm对共享资源进行操作时候,要加上锁,这就是分布式锁 利用zookeeper的临时节点的特性,可以实现分布式锁 public class ZookeeperDistrbuteLo ...
- aspnetcore identity result.Succeeded SignInManager.IsSignedIn(User) false?
登陆返回的是 result.Succeeded 为什么跳转到其他页面SignInManager.IsSignedIn(User)为false呢? result.Succeeded _signInMan ...
- 第十届蓝桥杯大赛-特别数的和-C++
解法一(暴力获取): #include<stdio.h> #include<stdlib.h> int main(void) { int n; ; ; printf(" ...
- PHP调用webServer接口遇到的坑
昨天公司分配给我一个任务,写一个中转接口,目标接口是一个webservice类型的接口,平时没有接触过,然后遇到一些坑, 一般情况下,能在浏览器打开并显示数据的接口是直接可以使用 CURL或者file ...
- Delphi RSA加解密【 (RSA公钥加密,私钥解密)、(RSA私钥加密,公钥解密)、MD5加密、SHA加密】
作者QQ:(648437169) 点击下载➨delphi RSA加解密 [Delphi RSA加解密]支持 (RSA公钥加密,私钥解密).(RSA私钥加密,公钥解密).MD5加密.SHA1加密.SHA ...