|
TOP
|
|
dataguard主库检测脚本(二)
| MINUTES |
LOG_SWITCHES |
| <= 5 |
82 |
| 6 TO 10 |
2 |
| 11 TO 15 |
3 |
| 16 TO 20 |
2 |
| 21 TO 25 |
4 |
| 26 TO 30 |
3 |
| 31 TO 35 |
2 |
| 36 TO 40 |
1 |
| >= 41 |
109 |
| Online Redo Logs |
| Check the number and size of online redo logs on each thread. |
| THREAD# |
GROUP# |
SEQUENCE# |
BYTES |
ARCHIV |
STATUS |
| 1 |
1 |
638 |
52428800 |
YES |
INACTIVE |
| 1 |
3 |
639 |
52428800 |
NO |
CURRENT |
2 rows selected.
| Standby Redo Logs |
The following query is run to see if standby redo logs have been created in preparation for switchover. The standby redo logs should be the same size as the online redo logs. There should be (( # of online logs per thread + 1) * # of threads) standby redo logs. A value of 0 for the thread# means the log has never been allocated. |
| THREAD# |
GROUP# |
SEQUENCE# |
BYTES |
ARCHIV |
STATUS |
| 0 |
4 |
0 |
52428800 |
YES |
UNASSIGNED |
| 0 |
5 |
0 |
52428800 |
YES |
UNASSIGNED |
| 0 |
6 |
0 |
52428800 |
YES |
UNASSIGNED |
| 0 |
7 |
0 |
52428800 |
YES |
UNASSIGNED |
4 rows selected.
| Archive Destinations |
| This query produces a list of defined archive destinations. It shows if they are enabled, what process is servicing that destination, if the destination is local or remote, and if remote what the current mount ID is. |
| THREAD# |
DEST_ID |
DESTINATION |
STATUS |
TARGET |
SCHEDULE |
PROCESS |
MID |
| 1 |
1 |
/u01/app/ora11/flash_recovery_area |
VALID |
PRIMARY |
ACTIVE |
ARCH |
0 |
| 1 |
2 |
orcl |
VALID |
STANDBY |
ACTIVE |
LGWR |
0 |
| Archive Destination Options |
This select will give further detail on the destinations as to what options have been set. Register indicates whether or not the archived redo log is registered in the remote destination control file. |
| THREAD# |
DEST_ID |
ARCHIVER |
TRANSMIT_MODE |
AFFIRM |
ASYNC_BLOCKS |
NET_TIMEOUT |
DELAY_MINS |
REOPEN |
REGIST |
BINDING |
| 1 |
1 |
ARCH |
SYNCHRONOUS |
NO |
0 |
0 |
0 |
300 |
YES |
OPTIONAL |
| 1 |
2 |
LGWR |
ASYNCHRONOUS |
NO |
61440 |
30 |
0 |
300 |
YES |
OPTIONAL |
| Archive Destination Errors |
The following select will show any errors that occured the last time an attempt to archive to the destination was attempted. If ERROR is blank and status is VALID then the archive completed correctly. |
| THREAD# |
DEST_ID |
STATUS |
ERROR |
| 1 |
1 |
VALID |
|
| 1 |
2 |
VALID |
|
| Data Guard Status |
| The query below will determine if any error conditions have been reached by querying the v$dataguard_status view (view only available in 9.2.0 and above). |
no rows selected
| Managed Standby Status |
Query v$managed_standby to see the status of processes involved in the shipping redo on this system. Does not include processes needed to apply redo. |
| INST_ID |
THREAD# |
PROCESS |
PID |
STATUS |
CLIENT_PROCESS |
CLIENT_PID |
SEQUENCE# |
BLOCK# |
ACTIVE_AGENTS |
KNOWN_AGENTS |
| 1 |
1 |
ARCH |
9215 |
CLOSING |
ARCH |
9215 |
637 |
88064 |
0 |
0 |
| 1 |
1 |
ARCH |
9217 |
CLOSING |
ARCH |
9217 |
638 |
81920 |
0 |
0 |
| 1 |
1 |
ARCH |
9219 |
CLOSING |
ARCH |
9219 |
569 |
1 |
0 |
0 |
| 1 |
1 |
ARCH |
9221 |
CLOSING |
ARCH |
9221 |
636 |
94208 |
0 |
0 |
| 1 |
1 |
LNS |
9223 |
WRITING |
LNS |
9223 |
639 |
61750 |
0 |
0 |
| Archived Sequences |
The following query will determine the current sequence number and the last sequence archived. If you are remotely archiving using the LGWR process then the archived sequence should be one higher than the current sequence. If remotely archiving using the ARCH process then the archived sequence should be equal to the current sequence. The applied sequence information is updated at log switch time. |
| THREAD# |
DEST_ID |
Current Sequence |
Last Archived
|
|