Search notes:

oradebug dumpvar

oradebug dumpvar [pga|sga|uga] prints or dumps the value of a fixed PGA, UGA or SGA variable.

Dumping a numerical (kscn8) value

The following example prints the current SCN (which is stored in the SGA's fixed variable kcsgscn):
SQL> oradebug setmypid
SQL> oradebug dumpvar sga kcsgscn
kscn8 kcsgscn_ [7FF6A57DF310, 7FF6A57DF318) = 007283D8 00000000
The value of the SCN is printed in hexadecimal (007283D8 00000000). It's possible to print the value in a more readable format, given the value's address (7FF6A57DF310) and data type (kscn8), both of which is reported by the dumpvar command:
SQL> oradebug dumptype 0x7FF6A57DF310 kscn8 1
        kscn8val = 7505534
Compare returned value with traditional method to query the current SCN:
SQL> select dbms_flashback.get_system_change_number from dual;

Dumping a string (ocitext *) value

SQL> oradebug dumpvar sga ksm_ob_path_
oratext * ksm_ob_path_ [7FF6A57B3A30, 7FF6A57B3A38) = D58AA200 00007FFD
Unfortunately, oratext * is not recognized as datatype by oradebug dumptype.
Therefore, we try another text-like datatype:
SQL> oradebug dumptype 0x00007FFDD58AA200 ktsn_name_t
        ktsn_name_t=text[30] = 67,58,92,79,114,97,99,108,101,92,97,112,112,92,82,101,110,101,0 … 
These number can then be joined into a string for example in PowerShell:
(67,58,92,79,114,97,99,108,101,92,97,112,112,92,82,101,110,101 | foreach-object { $_ -as [char]} ) -join ''

Finding variable names

Names of SGA variables are listed in x$ksmfsv.

See also

oradebug

Index