Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes | ||
informatique:base_de_donnees:tips [2010/03/09 08:37] – modification externe 127.0.0.1 | informatique:base_de_donnees:tips [2023/03/21 09:28] – ben | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ===== Switchover (Dataguard) ===== | ||
+ | |||
+ | < | ||
+ | [oracle@oda2db0host PHBIO1 dbhome_2]$ | ||
+ | DGMGRL for Linux: Release 19.0.0.0.0 - Production on Tue Mar 21 09:27:07 2023 | ||
+ | Version 19.15.0.0.0 | ||
+ | |||
+ | Copyright (c) 1982, 2019, Oracle and/or its affiliates. | ||
+ | |||
+ | Welcome to DGMGRL, type " | ||
+ | Password: | ||
+ | Connected to " | ||
+ | Connected as SYSDBA. | ||
+ | DGMGRL> show configuration | ||
+ | |||
+ | Configuration - dg_phbio | ||
+ | |||
+ | Protection Mode: MaxPerformance | ||
+ | Members: | ||
+ | p72hbio - Primary database | ||
+ | p21hbio - Physical standby database | ||
+ | |||
+ | Fast-Start Failover: | ||
+ | |||
+ | Configuration Status: | ||
+ | SUCCESS | ||
+ | |||
+ | DGMGRL> validate database p21hbio ; | ||
+ | |||
+ | Database Role: | ||
+ | Primary Database: | ||
+ | |||
+ | Ready for Switchover: | ||
+ | Ready for Failover: | ||
+ | |||
+ | Flashback Database Status: | ||
+ | p72hbio: | ||
+ | p21hbio: | ||
+ | |||
+ | Managed by Clusterware: | ||
+ | p72hbio: | ||
+ | p21hbio: | ||
+ | |||
+ | |||
+ | |||
+ | DGMGRL> | ||
+ | |||
+ | Database - p21hbio | ||
+ | |||
+ | Role: | ||
+ | Intended State: | ||
+ | Transport Lag: 0 seconds (computed 1 second ago) | ||
+ | Apply Lag: 0 seconds (computed 1 second ago) | ||
+ | Average Apply Rate: 67.00 KByte/s | ||
+ | Real Time Query: | ||
+ | Instance(s): | ||
+ | PHBIO1 (apply instance) | ||
+ | PHBIO2 | ||
+ | |||
+ | Database Status: | ||
+ | SUCCESS | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Voir ce qu'il se passe ===== | ||
+ | |||
+ | < | ||
+ | set head off pages 0 lines 120 | ||
+ | select | ||
+ | s.program, | ||
+ | buffer_gets, | ||
+ | , | ||
+ | from v$process p, v$session s, v$sqlarea a | ||
+ | where a.address=s.sql_address | ||
+ | and p.addr=s.paddr | ||
+ | and users_executing > 0 | ||
+ | and s.status=' | ||
+ | / | ||
+ | </ | ||
+ | |||
===== Mettre le résultat d'une requête sql dans une variable ===== | ===== Mettre le résultat d'une requête sql dans une variable ===== | ||
< | < |