搭建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;
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2152279/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 【DG】Data Guard搭建(physical standby)
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle:Failover 到物理備庫OracleAI
- Oracle 12C RAC的單機Standby returning error ORA-16191OracleError
- Oracle搭建rac到單庫的adgOracle
- Windows oracle 11g rman備份恢復到linux系統WindowsOracleLinux
- Oracle的快照standbyOracle
- Oracle Physical Database LimitsOracleDatabaseMIT
- oracle 12c rman備份pdbOracle
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- 將Oracle 12c資料庫註冊到Oracle 19c Grid InfrastructureOracle資料庫ASTStruct
- Oracle 12c 備份與恢復Oracle
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- Oracle ADG 備庫新增備庫Oracle
- Oracle OCP(34):環境準備(Redhat 7 + Oracle 12c)OracleRedhat
- dataguard 搭建 oracle_sid不同 2節點 primary+standbyOracle
- dataguard 搭建 oracle_sid相同 2節點 primary+standbyOracle
- 主庫到standby報錯解決:Error 12154 received logging on to the standby ORA-12154Error
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- ORACLE 12C RAC資料庫的啟停Oracle資料庫
- Oracle 12c資料庫安裝Oracle資料庫
- ORACLE 12C RAC 部署應用包準備Oracle
- Oracle 12C升級到18COracle
- Oracle 11g升級到12COracle
- PL/SQL Developer連線到Oracle 12cSQLDeveloperOracle
- Oracle 12C RAC CDB資料庫部署Oracle資料庫
- Linux系統oracle 12c VMware Tools 的安裝教程LinuxOracle
- Oracle DG Standby Database型別OracleDatabase型別
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- OGG 12c mysql複製到oracle部署方案MySqlOracle
- 從Windows到LinuxWindowsLinux
- Windows升級到oracle 11g的異機物理升級文件(冷備)WindowsOracle
- Oracle 10g/11g下如何將物理Standby庫臨時啟用用於災備測試Oracle 10g