informatique:base_de_donnees:tips

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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.1informatique:base_de_donnees:tips [2023/03/21 09:27] ben
Ligne 1: Ligne 1:
 +===== Switchover (Dataguard) =====
 +
 +<code>
 +[oracle@oda2db0host PHBIO1 dbhome_2]$  dgmgrl sys@P72HBIO
 +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.  All rights reserved.
 +
 +Welcome to DGMGRL, type "help" for information.
 +Password:
 +Connected to "P72HBIO"
 +Connected as SYSDBA.
 +DGMGRL> show configuration
 +
 +Configuration - dg_phbio
 +
 +  Protection Mode: MaxPerformance
 +  Members:
 +  p72hbio - Primary database
 +    p21hbio - Physical standby database
 +
 +Fast-Start Failover:  Disabled
 +
 +Configuration Status:
 +SUCCESS   (status updated 17 seconds ago)
 +
 +DGMGRL>  show database p21hbio ;
 +
 +Database - p21hbio
 +
 +  Role:               PHYSICAL STANDBY
 +  Intended State:     APPLY-ON
 +  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:    OFF
 +  Instance(s):
 +    PHBIO1 (apply instance)
 +    PHBIO2
 +
 +Database Status:
 +SUCCESS
 +</code>
 +
 +
 +
 +
 +
 +
 +
 +
 +===== Voir ce qu'il se passe =====
 +
 +<code>
 +set head off pages 0 lines 120 
 +select  p.spid,s.sid, s.serial#, substr(s.username,1,10)||','||process, 
 +s.program,s.module,s.status, osuser ,  
 +buffer_gets, disk_reads, executions,users_executing, first_load_time,'**',s.wait_class 
 +,a.rows_processed,  a.sql_id,  sql_text -- sql_fulltext 
 +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='ACTIVE' 
 +
 +</code>
 +
 ===== Mettre le résultat d'une requête sql dans une variable ===== ===== Mettre le résultat d'une requête sql dans une variable =====
 <code> <code>
  • informatique/base_de_donnees/tips.txt
  • Dernière modification : 2024/05/07 14:32
  • de ben