Hi,
In view of multiple databases sharing single SGA how to distinguish which database you will need to see.
Now all dynamic views has two new columns for example:- V$process
SQL> desc v$process Column Datatype ADDR RAW(4 | 8) PID NUMBER SOSID VARCHAR2(24) SPID VARCHAR2(24) STID VARCHAR2(24) EXECUTION_TYPE VARCHAR2(10) PNAME VARCHAR2(5) USERNAME VARCHAR2(15) SERIAL# NUMBER TERMINAL VARCHAR2(30) PROGRAM VARCHAR2(48) TRACEID VARCHAR2(255) TRACEFILE VARCHAR2(513) BACKGROUND VARCHAR2(1) 1 LATCHWAIT VARCHAR2(16) LATCHSPIN VARCHAR2(16) PGA_USED_MEM NUMBER PGA PGA_ALLOC_MEM NUMBER PGA PGA_FREEABLE_MEM NUMBER PGA_MAX_MEM NUMBER CON_ID NUMBER SQL> desc DBA_HIST_SQLTEXT Name Null? Type ----------------------------------------- -------- ---------------------------- DBID NOT NULL NUMBER SQL_ID NOT NULL VARCHAR2(13) SQL_TEXT CLOB COMMAND_TYPE NUMBER CON_DBID NUMBER CON_ID NUMBER
As you see, the CON_ID,
The ID of the container to which the data pertains. Possible values include:
0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs. 1: This value is used for rows containing data that pertain to only the root n: Where n is the applicable container ID for the rows containing data
So we have to always filter the con_id when using v$session or v$process where con_id=container_id
-Thanks
Geek DBA
Follow Me!!!