In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Platform:
Suse 11sp4
Oracle11.2.0.4
It is suitable for data migration and disaster recovery drills. The detailed procedures are as follows:
-convert physical standby to snapshot database
1 、 Stop Redo Apply, if it is active.
2 、 Ensure that the database is mounted, but not open.
3 、 Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.
4 、 Issue the following SQL statement to perform the conversion:
SQL > ALTER DATABASE CONVERT TO SNAPSHOT STANDBY
Select process,status,group#,thread#,sequence#,blocks from v$managed_standby
Select FLASHBACK_ON from v$database
Sys@ORA11G > select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED oradg
Sys@ORA11G > alter database recover managed standby database cancel
Database altered.
Sys@ORA11G > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sys@ORA11G > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Sys@ORA11G > select process,status,group#,thread#,sequence#,blocks,BLOCK#,DELAY_MINS,ACTIVE_AGENTS from v$managed_standby
Sys@ORA11G > alter system set db_recovery_file_dest_size=200m
System altered.
Sys@ORA11G > ho mkdir / oracle/11.2.0.4/oradata/oradg/flash
Sys@ORA11G > alter system set db_recovery_file_dest='/oracle/11.2.0.4/oradata/oradg/flash'
System altered.
Sys@ORA11G > ALTER DATABASE CONVERT TO SNAPSHOT STANDBY
Database altered.
Sys@ORA11G > select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS DB_UNIQUE_NAME
ORA11G ARCHIVELOG RESTORE POINT ONLY MOUNTED SNAPSHOT STANDBY NOT ALLOWED oradg
Sys@ORA11G > alter database open
Database altered.
Sys@ORA11G > select * from v$flash_recovery_area_usage
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
--
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 95.24 0 2
FOREIGN ARCHIVED LOG 0 0 0
Sys@ORA11G > select name,space_limit,space_used,number_of_files from v$recovery_file_dest
2
NAME SPACE_LIMIT SPACE_USED NUMBER_OF_FILES
/ oracle/11.2.0.4/oradata/oradg/flash 110100480 104857600 2
-conver to physical
Sys@ORA11G > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sys@ORA11G > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Sys@ORA11G > ALTER DATABASE CONVERT TO PHYSICAL STANDBY
Database altered.
Sys@ORA11G > shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
Sys@ORA11G > startup
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 553650072 bytes
Database Buffers 1577058304 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
Sys@ORA11G > select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
SWITCHOVER_STATUS DB_UNIQUE_NAME
ORA11G ARCHIVELOG NO READ ONLY PHYSICAL STANDBY
RECOVERY NEEDED oradg
Sys@ORA11G > select * from v$flash_recovery_area_usage
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
--
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
Sys@ORA11G > recover MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
Media recovery complete.
Sys@ORA11G >
Sys@ORA11G >
Sys@ORA11G >
Sys@ORA11G > select name, LOG_MODE, FLASHBACK_ON,OPEN_MODE, database_role, SWITCHOVER_STATUS, db_unique_name from v$database
NAME LOG_MODE FLASHBACK_ON OPEN_MODE DATABASE_ROLE
SWITCHOVER_STATUS DB_UNIQUE_NAME
ORA11G ARCHIVELOG NO READ ONLY WITH APPLY PHYSICAL STANDBY
NOT ALLOWED oradg
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.