重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
(1)查看数据库当前保护模式:最高性能模式
select
database_role,protection_mode,protection_level from v$database;
主库 Primary :
创新互联专注于河西网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供河西营销型网站建设,河西网站制作、河西网页设计、河西网站官网定制、微信小程序开发服务,打造河西网络公司原创品牌,更为您提供河西网站排名全网营销落地服务。
vim $ORACLE_HOME/dbs/initBJ.ora
shutdown immediate;
startup;
select sequence#,group#,bytes/1024/1024 MB from v$log;
select member from v$logfile;
备库要添加4个standby 日志组,比普通日志组多一个。
alter database add standby logfile group 4 '/u02/oradata/sh/redo04.std' size 50m;
alter database add standby logfile group 5 '/u02/oradata/sh/redo05.std' size 50m;
alter database add standby logfile group 6 '/u02/oradata/sh/redo06.std' size 50m;
alter database add standby logfile group 7 '/u02/oradata/sh/redo07.std' size 50m;
alter database set standby database
to maximize availability;
查看当前主、备库数据保护模式,已经是最高可用模式。
select database_role,protection_mode,protection_level from v$database;
select database_role,protection_mode,protection_level from v$database;
alter database set standby database
to maximize protection;
查看数据库当前保护模式,已经升级成功:最大保护模式
select database_role,protection_mode,protection_level from v$database;
select database_role,open_mode,protection_mode,protection_level from v$database;
alter database set standby database to maximize availability;
select database_role,open_mode,protection_mode,protection_level from v$database;
select database_role,protection_mode,protection_level from v$database;
alter database set standby database to maximize performance;
select database_role,protection_mode,protection_level from v$database;
select database_role,open_mode,protection_mode,protection_level from v$database;
alter database set standby database to maximize protection;
正常关库,把库起到mount状态shutdown immediate;
startup mount;
select database_role,protection_mode,protection_level from v$database;
alter database
open;
select database_role,protection_mode,protection_level from v$database;
alter database set standby database to maximize performance;
select database_role,protection_mode,protection_level from v$database;