Wednesday, December 18, 2024

Query to Find the UTLRP Session in an Oracle Database

In RAC:

select a.inst_id,a.sid,a.serial#,b.sql_text,b.sql_id,a.username,a.SCHEMANAME,a.OSUSER,a.MACHINE,a.PROGRAM,a.sql_id,a.action,a.event 

from gv$session a, gv$sqlarea b 

where a.sql_address=b.address and a.action like '%UTL%';


In Non RAC:

select a.inst_id,a.sid,a.serial#,b.sql_text,b.sql_id,a.username,a.SCHEMANAME,a.OSUSER,a.MACHINE,a.PROGRAM,a.sql_id,a.action,a.event 

from v$session a, v$sqlarea b 

where a.sql_address=b.address and a.action like '%UTL%';

Tuesday, August 6, 2024

Find SCN Timestamp in Oracle Database

 SELECT SCN_TO_TIMESTAMP(13232543131) from dual;

Database version on SQL Server Management Studio


SELECT @@VERSION AS FullVersion;

Database Size in SQL Server Management Studio

--List the size of all databases on the server

SELECT 

DB_NAME(database_id) AS DatabaseName,

    SUM(size * 8 / 1024) AS SizeMB

FROM sys.master_files

GROUP BY database_id;