Oracle 11g DataGuard搭建(一) - 单节点到单节点
(一)DataGuard概要
DataGuard中文称为”数据卫士“,提供了数据库高可用性、数据保护和灾难恢复的功能。DataGuard通过建立primary数据库和standby数据库来确立参照关系,DataGuard将主库(primary)的redo日志传递给备库(standby),然后在备库中应用redo进行同步。
备库又分为2种类型:物理备库和逻辑备库
- 物理standby是通过块拷贝方式同步,通过接受并应用primary数据库的redo log,以介质恢复的方式同步。在物理备库中,数据是完全相同的,包括schema、表、索引都是一样的。
- 逻辑standby是通过应用SQL语句进行同步,通过接收primary数据库的redo log并转换成sql语句。
物理备库在实际生产中使用较多,这里记录物理备库的搭建过程。
(二)DataGuard环境规划
主库 | 备库 | |
操作系统 | redhat 6.7 x86-64(64位) | redhat 6.7 x86-64(64位) |
服务器名称 | primarynode | standbynode |
IP地址规划 | 192.168.10.51 | 192.168.10.52 |
--------------- | ----------------------- | ---------------- |
数据库版本 | 11.2.0.4 | 11.2.0.4 |
db_name | adgdb | adgdb |
db_unique_name | adgdb | adgdbstandby |
instance_name | adgdb | adgdbstandby |
service_name | adgdb | adgdb |
数据库安装 | 安装数据库软件+创建监听+安装数据库 | 安装数据库软件+创建监听 |
常规配置:
( 1 )主库和备库hosts文件配置
[root@primarynode ~]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4
::1 localhost localhost.localdomain localhost6
192.168.10.51 primarynode
192.168.10.52 standbynode
(2)主库oracle用户环境配置
[oracle@primarynode ~]$ more .bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin ORACLE_SID=adgdb; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2./db_1; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin; export PATH
export TEMP=/tmp
export TMPDIR=/tmp
umask export PATH
(3)备库环境变量配置
[oracle@standbynode ~]$ more .bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin ORACLE_SID=adgdbstandby; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2./db_1; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin; export PATH
export TEMP=/tmp
export TMPDIR=/tmp
umask export PATH
(三)DataGuard主库配置
( 1 )主库启用强制记录日志功能
查询是否启用强制记录日志
select force_logging from v$database;
如果未启用,则使用下面语句来开启强制记录日志
alter database force logging; --强制记录日志
( 2 )启用归档
查询是否启用归档
archive log list
--或者
select log_mode from v$database;
如果未启用归档,可以按照如下步骤开启归档
----Oracle 11g数据库归档模式开启 --STEP1:以sysdba角色登陆数据库
sqlplus / as sysdba --STEP2:干净的关闭数据库
shutdown immediate --STEP3:将数据库启动到mount状态
startup mount --STEP4:开启归档
alter database archivelog; --STEP5:打开数据库
alter database open
( 3 )主库参数配置
(3.1)db_unique_name
SQL> alter system set db_unique_name = 'adgdb' scope=spfile;
(3.2)log_archive_config
SQL> alter system set log_archive_config='DG_CONFIG=(adgdb,adgdbstandby)' scope=spfile;
(3.3)log_archive_dest_1
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/product/11.2.0/db_1/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=adgdb' scope=both;
(3.4)log_archive_dest_2
SQL> alter system set log_archive_dest_2='SERVICE=tnsadgdbstandby LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=adgdbstandby' scope=spfile;
(3.5)log_archive_dest_state_1
alter system set log_archive_dest_state_1 = ENABLE;
(3.6)log_archive_dest_state_2
alter system set log_archive_dest_state_2 = ENABLE;
(3.7)db_file_name_convert
查看数据文件的位置:
SQL> select name from v$datafile;
NAME
--------------------------------------------------
/u01/app/oracle/oradata/adgdb/system01.dbf
/u01/app/oracle/oradata/adgdb/sysaux01.dbf
/u01/app/oracle/oradata/adgdb/undotbs01.dbf
/u01/app/oracle/oradata/adgdb/users01.dbf
/u01/app/oracle/oradata/adgdb/example01.dbf
如果主库与备库数据文件位置不相同,则需要使用db_file_name_convert来转换。
SQL> alter system set db_file_name_convert='/u01/app/oracle/oradata/adgdbstandby','/u01/app/oracle/oradata/adgdb' scope=spfile;
(3.8)log_file_name_convert
查看在线日志文件的位置:
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------
/u01/app/oracle/oradata/adgdb/redo03.log
/u01/app/oracle/oradata/adgdb/redo02.log
/u01/app/oracle/oradata/adgdb/redo01.log
如果主库与备库在线日志文件位置不相同,则需要使用log_file_name_convert来转换。
SQL> alter system set log_file_name_convert='/u01/app/oracle/oradata/adgdbstandby','/u01/app/oracle/oradata/adgdb' scope=spfile;
(3.9)standby_file_management
SQL> alter system set standby_file_management=auto scope=spfile;
(3.10)fal_client
SQL> alter system set fal_client='tnsadgdb' scope=both;
(3.11)fal_server
SQL> alter system set fal_server='tnsadgdbstandby' scope=both;
( 4 )主库静态监听配置
[oracle@primarynode admin]$ vim listener.ora
# listener.ora Network Configuration File: /u01/oracle/product/11.2./db_1/network/admin/listener.ora
# Generated by Oracle configuration tools. LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = primarynode)(PORT = ))
)
)
) SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=adgdb)
(SID_NAME = adgdb)
(ORACLE_HOME = /u01/app/oracle/product/11.2./db_1)
)
) ADR_BASE_LISTENER = /u01/oracle
查看监听:
[oracle@primarynode admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4. - Production on -APR- :: Copyright (c) , , Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primarynode)(PORT=)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4. - Production
Start Date -APR- ::
Uptime days hr. min. sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2./db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2./db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primarynode)(PORT=)))
Services Summary...
Service "adgdb" has instance(s).
Instance "adgdb", status UNKNOWN, has handler(s) for this service...
Instance "adgdb", status READY, has handler(s) for this service...
Service "adgdbXDB" has instance(s).
Instance "adgdb", status READY, has handler(s) for this service...
The command completed successfully
( 5 )主库tnsnames.ora文件配置
[oracle@primarynode admin]$ vim tnsnames.ora
tnsadgdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.51)(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = adgdb)
)
) tnsadgdbstandby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.52)(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = adgdb)
)
)
(四)DataGuard备库配置
( 1 )密码文件
在dataguard中,主库与备库sys密码需一致。可以将主库的密码文件拷贝到备库中
--登陆到主库,将密码文件复制到备库
[oracle@primarynode ~]$ cd $ORACLE_HOME/dbs
[oracle@primarynode dbs]$ scp orapwadgdb 192.168.10.52:/u01/app/oracle/product/11.2./db_1/dbs
oracle@192.168.10.52's password:
orapwadgdb % .5KB/s : --登陆到备库,修改密码文件的名称
[oracle@standbynode dbs]$ mv orapwadgdb orapwadgdbstandby
或者不拷贝密码文件,直接使用orapwd生成一个新的密码文件,密码需与主库一致:
orapwd file=orapwadgdbstandby password='oracle';
( 2 )初始化参数文件
(2.1)在主库生成初始化参数文件
SQL> create pfile from spfile;
File created.
(2.2)拷贝主库的参数文件到备库并重命名
--在主库上执行复制操作
[oracle@primarynode dbs]$ scp initadgdb.ora 192.168.10.52:/u01/app/oracle/product/11.2./db_1/dbs
oracle@192.168.10.52's password:
initadgdb.ora % .5KB/s : --在备库上执行重命名操作
[oracle@standbynode dbs]$ mv initadgdb.ora initadgdbstandby.ora
(2.3)修改备库的参数文件内容
--将初始化参数中的这些参数做修改,其他参数不用动
db_name='adgdb'
db_unique_name='adgdbstandby'
audit_file_dest='/u01/app/oracle/admin/adgdbstandby/adump'
compatible='11.2.0.4.0'
control_files='/u01/app/oracle/oradata/adgdbstandby/control01.ctl','/u01/app/oracle/oradata/adbdbstandby/control02.ctl'
log_archive_config='DG_CONFIG=(adgdb,adgdbstandby)'
log_archive_dest_1='LOCATION=/u01/app/oracle/product/11.2.0/db_1/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=adgdbstandby'
log_archive_desc_2='SERVICE=tnsadgdb LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NMAE=adgdb'
db_file_name_convert='/u01/app/oracle/oradata/adgdb','/u01/app/oracle/oradata/adgdbstandby'
log_file_name_convert='/u01/app/oracle/oradata/adgdb','/u01/app/oracle/oradata/adgdbstandby'
fal_client='tnsadgdbstandby'
fal_server='tnsadgdb'
standby_file_management='AUTO'
注意:里面涉及到路径的需要手动创建
mkdir -p /u01/app/oracle/admin/adgdbstandby/adump
(2.4)使用pfile文件创建spfile文件
--登陆到idle数据库
sqlplus / as sysdba --创建spfile,可在$ORACLE_HOME/dbs下查看
create spfile from pfile --启动数据库到nomount状态
startup nomount
( 3 )配置静态监听
[oracle@standbynode trace]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/
[oracle@standbynode admin]$ touch listener.ora [oracle@standbynode admin]$ vim listener.ora
# listener.ora Network Configuration File: /u01/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools. LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = standbynode)(PORT = 1521))
)
)
) SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=adgdb)
(SID_NAME = adgdbstandby)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
) ADR_BASE_LISTENER = /u01/oracle
备注:备库为什么一定需要使用静态监听
nomount状态下必须使用静态监听才能连接到实例。
( 4 )配置tnsnames.ora文件,直接把主库的拷贝过来即可
[oracle@standbynode trace]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/
[oracle@standbynode admin]$ vim tnsnames.ora tnsadgdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.51)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = adgdb)
)
) tnsadgdbstandby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.52)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = adgdb)
)
)
( 5 )测试网络连通性
在主库与备库上均执行,确保可以正常访问:
tnsping tnsadgdb
tnsping tnsadgdbstandby
在主库:
sqlplus sys/oracle@tnsadgdb as sysdba
sqlpus sys/oracle@tnsadgdbstandby as sysdba
( 6 )参数检查
由于参数配置的较多,需要认真检查参数配置是否正确,主要检查这些参数
1.db_unique_name :2个节点需要不一样
2.compatible :主库与备库兼容性需一致
3.log_archive_config : 配置主库与备库的db_unique_name
4.log_archive_desc_1,2 :归档日志的路径
5.log_archive_desc_state_2 :
enable -- 启用log_archive_desc_2
defer --禁用log_archive_desc_2
6.db_file_name_convert :数据文件转换路径
7.log_file_name_convert :日志文件转换路径
8.standby_file_management :设置为auto
9.log_archive_format :日志文件格式,两边需一致
( 7 )使用duplicate创建物理standby
(7.1)连接到主库和备库
## 一定要加nocatalog,否则在执行duplicate时会报错
[oracle@primarynode ~]$ rman target sys/oracle@tnsadgdb auxiliary sys/oracle@tnsadgdbstandby nocatalog
(7.2)使用duplicate复制数据库
RMAN> duplicate target database for standby from active database nofilenamecheck;
执行过程见:
RMAN> duplicate target database for standby from active database nofilenamecheck; Starting Duplicate Db at -APR-
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID= device type=DISK contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwadgdb' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwadgdbstandby' ;
}
executing Memory Script Starting backup at -APR-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK
Finished backup at -APR- contents of Memory Script:
{
ctl';
restore clone controlfile to '/u01/app/oracle/oradata/adgdbstandby/control02.ctl' from
'/u01/app/oracle/oradata/adgdbstandby/control01.ctl';
}
executing Memory Script Starting backup at -APR-
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file channel ORA_DISK_1: datafile copy complete, elapsed time: ::
Finished backup at -APR- Starting restore at -APR-
using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy
Finished restore at -APR- contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script sql statement: alter database mount standby database contents of Memory Script:
{
set newname for tempfile to
"/u01/app/oracle/oradata/adgdbstandby/temp01.dbf";
switch clone tempfile all;
set newname for datafile to
"/u01/app/oracle/oradata/adgdbstandby/system01.dbf";
set newname for datafile to
"/u01/app/oracle/oradata/adgdbstandby/sysaux01.dbf";
set newname for datafile to
"/u01/app/oracle/oradata/adgdbstandby/undotbs01.dbf";
set newname for datafile to
"/u01/app/oracle/oradata/adgdbstandby/users01.dbf";
set newname for datafile to
"/u01/app/oracle/oradata/adgdbstandby/example01.dbf";
backup as copy reuse
datafile auxiliary format
"/u01/app/oracle/oradata/adgdbstandby/system01.dbf" datafile
auxiliary format
"/u01/app/oracle/oradata/adgdbstandby/sysaux01.dbf" datafile
auxiliary format
"/u01/app/oracle/oradata/adgdbstandby/undotbs01.dbf" datafile
auxiliary format
"/u01/app/oracle/oradata/adgdbstandby/users01.dbf" datafile
auxiliary format
"/u01/app/oracle/oradata/adgdbstandby/example01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script executing command: SET NEWNAME renamed tempfile to /u01/app/oracle/oradata/adgdbstandby/temp01.dbf in control file executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting backup at -APR-
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number= name=/u01/app/oracle/oradata/adgdb/system01.dbf
output file name=/u01/app/oracle/oradata/adgdbstandby/system01.dbf tag=TAG20190406T160954
channel ORA_DISK_1: datafile copy complete, elapsed time: ::
channel ORA_DISK_1: starting datafile copy
input datafile file number= name=/u01/app/oracle/oradata/adgdb/sysaux01.dbf
output file name=/u01/app/oracle/oradata/adgdbstandby/sysaux01.dbf tag=TAG20190406T160954
channel ORA_DISK_1: datafile copy complete, elapsed time: ::
channel ORA_DISK_1: starting datafile copy
input datafile file number= name=/u01/app/oracle/oradata/adgdb/example01.dbf
output file name=/u01/app/oracle/oradata/adgdbstandby/example01.dbf tag=TAG20190406T160954
channel ORA_DISK_1: datafile copy complete, elapsed time: ::
channel ORA_DISK_1: starting datafile copy
input datafile file number= name=/u01/app/oracle/oradata/adgdb/undotbs01.dbf
output file name=/u01/app/oracle/oradata/adgdbstandby/undotbs01.dbf tag=TAG20190406T160954
channel ORA_DISK_1: datafile copy complete, elapsed time: ::
channel ORA_DISK_1: starting datafile copy
input datafile file number= name=/u01/app/oracle/oradata/adgdb/users01.dbf
output file name=/u01/app/oracle/oradata/adgdbstandby/users01.dbf tag=TAG20190406T160954
channel ORA_DISK_1: datafile copy complete, elapsed time: ::
Finished backup at -APR- sql statement: alter system archive log current contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script datafile switched to datafile copy
input datafile copy RECID= STAMP= file name=/u01/app/oracle/oradata/adgdbstandby/system01.dbf
datafile switched to datafile copy
input datafile copy RECID= STAMP= file name=/u01/app/oracle/oradata/adgdbstandby/sysaux01.dbf
datafile switched to datafile copy
input datafile copy RECID= STAMP= file name=/u01/app/oracle/oradata/adgdbstandby/undotbs01.dbf
datafile switched to datafile copy
input datafile copy RECID= STAMP= file name=/u01/app/oracle/oradata/adgdbstandby/users01.dbf
datafile switched to datafile copy
input datafile copy RECID= STAMP= file name=/u01/app/oracle/oradata/adgdbstandby/example01.dbf
Finished Duplicate Db at -APR-
( 8 )添加主库和备库的standby日志组
(8.1)添加standby日志组需要注意的事项
- standby日志组个数:配置为redo日志组个数+1
- 在主库与备库都添加standby日志组。主库可以不添加,但是如果后期发生主备切换,还是要添加,所以最好一次性添加。
- 只查询standby日志组: select * from v$standby_log ;
(8.2)添加主库的standby日志组
alter database add standby logfile group 4 ('/u01/app/oracle/oradata/adgdb/stredo04.log') size 50M;
alter database add standby logfile group 5 ('/u01/app/oracle/oradata/adgdb/stredo05.log') size 50M;
alter database add standby logfile group 6 ('/u01/app/oracle/oradata/adgdb/stredo06.log') size 50M;
alter database add standby logfile group 7 ('/u01/app/oracle/oradata/adgdb/stredo07.log') size 50M;
(8.3)添加备库的standby日志组
alter database add standby logfile group 4 ('/u01/app/oracle/oradata/adgdbstandby/stredo04.log') size 50M;
alter database add standby logfile group 5 ('/u01/app/oracle/oradata/adgdbstandby/stredo05.log') size 50M;
alter database add standby logfile group 6 ('/u01/app/oracle/oradata/adgdbstandby/stredo06.log') size 50M;
alter database add standby logfile group 7 ('/u01/app/oracle/oradata/adgdbstandby/stredo07.log') size 50M;
( 9 )开始同步数据库,在备库上执行
alter database open; --方式一:开启实时同步
alter database recover managed standby database using current logfile disconnect from session;
--或简写为:
alter database recover managed standby database using current logfile disconnect; --方式二:开启同步(日志切换时才同步)
alter database recover managed standby database disconnect from session;
至此配置完成。
(五)DataGuard状态查看
( 1 )主库状态查看
SQL> select open_mode, --数据库打开模式,如果实时同步,则为:read only with apply,取消同步则为:read only
database_role, --数据库角色,是主库还是备库
protection_mode, --保护模式
protection_level --保护级别
from v$database; OPEN_MODE DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
-------------------- ---------------- -------------------- --------------------
READ WRITE PRIMARY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
( 2 )备库状态查看
SQL> select open_mode,
database_role,
protection_mode,
protection_level
from v$database; OPEN_MODE DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
-------------------- ---------------- -------------------- --------------------
READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
(六)DataGuard测试
在主库上创建表lijiaman.test01,并插入数据
SQL> create table test01(id number,name varchar2(50));
Table created. SQL> insert into test01 values(1,'lijiaman');
1 row created. SQL> insert into test01 values(2,'gegeman');
1 row created. SQL> commit;
在standby数据库上查询lijiaman.test01表,数据一致
SQL> select db_unique_name from v$database;
DB_UNIQUE_NAME
------------------------------
adgdbstandby SQL> select * from lijiaman.test01;
ID NAME
---------- --------------------
1 lijiaman
2 gegeman
【完】
Oracle 11g DataGuard搭建(一) - 单节点到单节点的更多相关文章
- Oracle 10gR2 Dataguard搭建(非duplicate方式)
Oracle 10gR2 Dataguard搭建(非duplicate方式) 我的实验环境: 源生产库(主库): IP地址:192.168.1.30 Oracle 10.2.0.5 单实例 新DG库( ...
- Oracle 11g Dataguard参数详解
https://www.jb51.net/article/52269.htm注:本文译自<Oracle Data Guard 11g Handbook> Page 78 – Page 88 ...
- Oracle 11g dataguard check RTA(real time apply)
Oracle 11g dataguard check RTA(real time apply) 2017年8月24日 16:38 环境:oracle 11.2.0.1 OEL 5.8 注:以下操作都在 ...
- oracle 11g goldengate搭建(一)
初学ogg,基本了解ogg原理及架构之后,趁热打铁,搭建一个简单的学习环境,以实现目标:将sourcedb数据库的2个表:sourceuser.test01和sourceuser.dept通过ogg分 ...
- Oracle 11g Dataguard 配置,维护与详解 (ADG)
一.前言: 本手册主要记录如何配置,还介绍了配置原因,以及注意要点,已经主备切换,以及故障转移等重要操作步骤,我希望这个文章可以作为进行dataguard配置的一个参考手册. 二.前提 1.主库是归档 ...
- oracle 11g dataguard创建的简单方法
oracle 10g可以通过基于备份的rman DUPLICATE实现dataguard,通过步骤需要对数据库进行备份,并在standby侧进行数据库的恢复.而到了11g,oracle推出了Dupli ...
- Oracle 11G DataGuard生产环境又一次启动具体过程
场景,重新启动数据库,不重新启动linux系统,所以不用考虑监听程序,#linux输入lsnrctl start1 数据库关闭1.1 关闭主库SHUTDOWN IMMEDIATE; SQL> ...
- Oracle 11g dataguard check real time apply
2017年8月24日 16:38 环境:oracle 11.2.0.1 OEL-5.8 注:以下操作都在备库执行 总结方法: 1.FPYJ(125_7)@fpyj123> select open ...
- oracle 11G dataguard 恢复
检查主备机的sys 密码是否一致,忘记密码可以修改,同步 .alter user sys identified by xxx: orapwd file=oraxxx.ora password=admi ...
随机推荐
- SSH反向代理转发至内网msf
前言 买了个便宜的 vps , 在上面装 msf 也装不上,于是想着把端口映射到内网来. 正文 拓扑如下: 首先在内网主机 B ssh -fCNR 7281:localhost:5000 root@C ...
- Python爬虫教程-03-使用 chardet 检测编码
Spider-03-使用chardet 继续学习python爬虫,我们经常出现解码问题,因为所有的页面编码都不统一,我们使用chardet检测页面的编码,尽可能的减少编码问题的出现 网页编码问题解决 ...
- App更新之dialog数字进度条
App更新之dialog数字进度条 前言:现在一般的Android软件都是需要不断更新的,当你打开某个app的时候,如果有新的版本,它会提示你有新版本需要更新.当有更新时,会弹出一个提示框,点击下载, ...
- MyBatis基本配置和实践(二)
一.前言 从上一篇文章的junit单元测试环节可以看到,每一次调用MyBatis需要先加载SqlMapConfig.xml文件,再通过SqlSessionFactoryBuilder创建SqlSess ...
- 如何解决MSSQL中文数据乱码问题
今天遇到了在数据库中直接写SQL语句,语句中包含中文,但是数据库的表里是包含“?” 的乱码. 我程序代码中,调试时得到的SQL不是乱码,在控制台中也不是乱码.但是在数据库中却出现了乱码. 当用MSSQ ...
- Redis安装和部署--LINUX
一.安装 1.下载3.0.7稳定版本即可 地址:http://www.redis.cn/download.html 2.将 redis-3.0.7.tar.gz 压缩包拷贝到 opt 目录下 3.解压 ...
- Oracle常用名词解释
好久没做rac,最近要做架构梳理,这里针对Oracle常用的名词缩写,这里做个记录,希望对大家有所帮助. RAC 全称是Real Application Cluster,oracle的高可用群集,即实 ...
- 传递给数据库 'model' 中的日志扫描操作的日志扫描号无效
状况描述:在服务器的管理中重新启动MSSQLSERVER启动后马上又停止 通过"事件查看器" 发现 错误: ,严重度: ,状态: LSN(::)无效.该 LSN 是传递给数据库 ...
- 3.5星|《刷屏:视频时代的风传法则》:YouTube热门视频回顾与分析
刷屏:视频时代的疯传法则 作者2010年加入YouTube.本书是作者对YouTube上的热门视频的回顾与分析.第2-9章各讲一个类别的热门视频:恶搞.混音.网络歌曲.广告.现场目击.知识与科技.小众 ...
- 泛型举例:List<T>与DateTable相互转换
一. DataTable转换到List<T> /// <summary> /// TableToList /// </summary> public class T ...