搭建windows到linux的oracle 12c physical standby备库
发表于:2024-11-11 作者:千家信息网编辑
千家信息网最后更新 2024年11月11日,primary上修改参数ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldg)';ALTER SYSTEM SET LOG_ARCHI
千家信息网最后更新 2024年11月11日搭建windows到linux的oracle 12c physical standby备库primary上修改参数
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldg)';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orcldg NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldg';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='%t_%s_%r.arc' SCOPE=SPFILE;
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=30;
ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE;
ALTER SYSTEM SET FAL_SERVER=orcl;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
alter system set db_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL' scope=spfile;
alter system set log_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL\' scope=spfile;
主库上创建standby logfile group
SQL> alter database add standby logfile group 4 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\REDO04.LOG') SIZE 50M;
数据库已更改。
SQL> alter database add standby logfile group 5 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO05.LOG') SIZE 50M;
数据库已更改。
SQL> alter database add standby logfile group 6 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO06.LOG') SIZE 50M;
数据库已更改。
SQL> ALTER DATABASE DROP LOGFILE GROUP 4;
数据库已更改。
SQL> alter database add standby logfile group 4 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO04.LOG') SIZE 50M;
在primary上创建控制文件,并拷贝至linux服务器的参数文件所对应的目录
备库pfile参数文件, 注意linux下的几个目录预先创建好:
orcl.__data_transfer_cache_size=0
orcl.__db_cache_size=872415232
orcl.__java_pool_size=234881024
orcl.__large_pool_size=1375731712
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=3758096384
orcl.__sga_target=6979321856
orcl.__shared_io_pool_size=234881024
orcl.__shared_pool_size=4160749568
orcl.__streams_pool_size=67108864
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='12.1.0.2'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata/orcl'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL'
*.db_name='ORCL'
*.diagnostic_dest='/u01/app/oracle/'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.fal_server='ORCL'
*.log_archive_config='DG_CONFIG=(orcl,orcldg)'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL\'
*.memory_target=10G
*.open_cursors=300
*.processes=1500
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.db_unique_name='orcldg'
*.fal_server='orcl'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/archivelog/ valid_for=(all_logfiles,all_roles)'
*.log_archive_dest_2='SERVICE=orcl ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
恢复脚本:
run
{
set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/SYSTEM01.DBF';
set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/SYSAUX01.DBF';
set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/UNDOTBS01.DBF';
set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/USERS01.DBF';
restore database;
switch datafile all;
recover database;
}
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,orcldg)';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orcldg NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldg';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='%t_%s_%r.arc' SCOPE=SPFILE;
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=30;
ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE;
ALTER SYSTEM SET FAL_SERVER=orcl;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
alter system set db_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL' scope=spfile;
alter system set log_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL\' scope=spfile;
主库上创建standby logfile group
SQL> alter database add standby logfile group 4 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\REDO04.LOG') SIZE 50M;
数据库已更改。
SQL> alter database add standby logfile group 5 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO05.LOG') SIZE 50M;
数据库已更改。
SQL> alter database add standby logfile group 6 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO06.LOG') SIZE 50M;
数据库已更改。
SQL> ALTER DATABASE DROP LOGFILE GROUP 4;
数据库已更改。
SQL> alter database add standby logfile group 4 ('E:\APP\ADMINISTRATOR\ORADATA\O
RCL\STBY_REDO04.LOG') SIZE 50M;
在primary上创建控制文件,并拷贝至linux服务器的参数文件所对应的目录
备库pfile参数文件, 注意linux下的几个目录预先创建好:
orcl.__data_transfer_cache_size=0
orcl.__db_cache_size=872415232
orcl.__java_pool_size=234881024
orcl.__large_pool_size=1375731712
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=3758096384
orcl.__sga_target=6979321856
orcl.__shared_io_pool_size=234881024
orcl.__shared_pool_size=4160749568
orcl.__streams_pool_size=67108864
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='12.1.0.2'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata/orcl'
*.db_domain=''
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL'
*.db_name='ORCL'
*.diagnostic_dest='/u01/app/oracle/'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.fal_server='ORCL'
*.log_archive_config='DG_CONFIG=(orcl,orcldg)'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','E:\APP\ADMINISTRATOR\ORADATA\ORCL\'
*.memory_target=10G
*.open_cursors=300
*.processes=1500
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.db_unique_name='orcldg'
*.fal_server='orcl'
*.log_archive_dest_1='LOCATION=/u01/app/oracle/archivelog/ valid_for=(all_logfiles,all_roles)'
*.log_archive_dest_2='SERVICE=orcl ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
恢复脚本:
run
{
set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/SYSTEM01.DBF';
set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/SYSAUX01.DBF';
set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/UNDOTBS01.DBF';
set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/USERS01.DBF';
restore database;
switch datafile all;
recover database;
}
数据
数据库
参数
文件
目录
拷贝
服务器
脚本
建好
控制
服务
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
生物数据库下载实验总结
僵尸毁灭工程服务器卡顿
宝塔面板如何优化服务器性能
浙江综合软件开发市价
监控数据库服务器
数据库如何计算主属性
盗用数据库违法吗
山东工控网络安全知名公司
sql数据库不动了
2022校园网络安全工作方案
软件开发评估计划怎么写
运营商服务器采购方案
电视台服务器
数据库技术学院奖
甲方软件开发合同
聊天软件后台服务器工作过程
正规服务器安全加固系统
数据库中码表的定义
网络安全诚信损害指什么
国家网络安全战略试题
网络技术子网掩码的计算
自贡网络安全平台
基岩版服务器延迟高怎么办
计算机三级数据库难学吗
数据库数据规模估算
网络安全防护函
每个网民都要有网络安全的意识
铁路网络安全八禁止十不准
火山软件开发进销存源码
软件开发人员 难招