meta données pour cette page
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| oracle:database:sessions [12/12/2025 09:28] – mdl | oracle:database:sessions [12/02/2026 09:01] (Version actuelle) – mdl | ||
|---|---|---|---|
| Ligne 7: | Ligne 7: | ||
| * sessions en cours Standalone (SQLPLUS) | * sessions en cours Standalone (SQLPLUS) | ||
| <code PLSQL> | <code PLSQL> | ||
| - | set lines 500 | + | SET lines 500 |
| col LOGON_TIME format a15 | col LOGON_TIME format a15 | ||
| col MACHINE format a20 | col MACHINE format a20 | ||
| Ligne 25: | Ligne 25: | ||
| | | ||
| | | ||
| - | | + | |
| + | | ||
| FROM v$session b, v$process a | FROM v$session b, v$process a | ||
| WHERE | WHERE | ||
| Ligne 33: | Ligne 34: | ||
| </ | </ | ||
| - | | + | |
| + | | ||
| + | <code PLSQL> | ||
| + | SET lines 500 | ||
| + | col LOGON_TIME format a15 | ||
| + | col MACHINE format a20 | ||
| + | col PID format a8 | ||
| + | col SID format a8 | ||
| + | col ser# format a8 | ||
| + | col username format a20 | ||
| + | col os_user format a18 | ||
| + | col BOX format a20 | ||
| + | SELECT | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | FROM gv$session b, gv$process a | ||
| + | WHERE | ||
| + | b.paddr = a.addr | ||
| + | AND TYPE=' | ||
| + | ORDER BY spid; | ||
| + | </ | ||
| + | |||
| + | * sessions en cours (SQL DEV) | ||
| + | <code PLSQL> | ||
| + | SET lines 500 | ||
| + | col LOGON_TIME format a15 | ||
| + | col MACHINE format a20 | ||
| + | col PID format a8 | ||
| + | col SID format a8 | ||
| + | col ser# format a8 | ||
| + | col username format a20 | ||
| + | col os_user format a18 | ||
| + | col BOX format a20 | ||
| + | SELECT | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | FROM v$session b, v$process a | ||
| + | WHERE | ||
| + | b.paddr = a.addr | ||
| + | AND TYPE=' | ||
| + | ORDER BY spid; | ||
| + | </ | ||
| + | |||
| + | * sessions en cours RAC (SQL DEV) | ||
| <code PLSQL> | <code PLSQL> | ||
| SELECT DISTINCT q.sql_id, | SELECT DISTINCT q.sql_id, | ||
| Ligne 86: | Ligne 145: | ||
| </ | </ | ||
| - | * Nombre de session en cours | + | * récupérer la transaction avec un PID determine |
| <code PLSQL> | <code PLSQL> | ||
| - | select | + | col sid format 9999 |
| + | col pid format 9999 | ||
| + | col serial# format 99999 | ||
| + | col process format a8 heading " | ||
| + | col spid format a8 heading " | ||
| + | col username format a9 | ||
| + | col addr format a11 | ||
| + | col program format a20 trunc | ||
| + | col logon_time format a18 | ||
| + | col osuser format a8 heading unixUsr | ||
| + | col p_user format a9 heading unixUsr | ||
| + | col terminal format a7 heading unixtrm | ||
| + | col command format 99 heading Cd | ||
| + | col machine format a7 | ||
| + | col action format a7 | ||
| + | col module format a10 | ||
| + | set pagesize 24 | ||
| + | prompt "Enter the Oracle Session ID (SID) user in question" | ||
| + | select | ||
| + | p.SERIAL#, | ||
| + | p.USERNAME p_user, | ||
| + | p.SPID, | ||
| + | to_char(s.logon_time,' | ||
| + | s.program, | ||
| + | s.command, | ||
| + | s.sid, | ||
| + | s.serial#, | ||
| + | s.username, | ||
| + | s.process, | ||
| + | s.machine, | ||
| + | s.action, | ||
| + | s.module, | ||
| + | s.osuser, | ||
| + | s.terminal | ||
| + | from v$process p, | ||
| + | v$session | ||
| + | where s.sid = &sid | ||
| + | and p.addr = s.paddr | ||
| + | order by s.logon_time | ||
| + | / | ||
| </ | </ | ||
| - | * liste des sessions | + | * Nombre de session |
| <code PLSQL> | <code PLSQL> | ||
| - | SET lines 500 | + | select count(MACHINE) |
| - | col LOGON_TIME format a15 | + | |
| - | col MACHINE | + | |
| - | col PID format a8 | + | |
| - | col SID format a8 | + | |
| - | col ser# format a8 | + | |
| - | col username format a20 | + | |
| - | col os_user format a18 | + | |
| - | col BOX format a20 | + | |
| - | SELECT | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | FROM v$session | + | |
| - | WHERE | + | |
| - | b.paddr = a.addr | + | |
| - | AND TYPE=' | + | |
| - | ORDER BY spid; | + | |
| </ | </ | ||
| + | |||
| + | |||
| * modifier le nombre sessions possible (processes) | * modifier le nombre sessions possible (processes) | ||