This blog provides valuable insights and information for Oracle DBA professionals.
session_all.sql (No Background process)
Get link
Facebook
X
Pinterest
Email
Other Apps
-- ************************************************************************************************************
-- * Filename : ses_all.sql
-- * Author : Saravanakumar K
-- * Create : 13-Aug-2018
-- * Last Update : 13-Aug-2018
-- * Description : It will provide database all session information exclueding background process
-- * Usage : start ses_all.sql
-- * Version : v1
-- *************************************************************************************************************
set pagesize 9999
set lines 700 tab off feedback on
col ses_info for a12 heading 'SID,SER#|SesInfo'
col program for a25 heading Program trunc
col LOGON-TIME for a17 heading 'Logon-Time'
col machine for a15 heading 'Machine/|Server Name'
col username for a15 heading 'User Name'
col osuser for a10 heading 'OS user'
col PROCESS for a8 heading 'Server|Proc ID'
col cl_proc for a15 heading 'Client|Proc ID'
col sql_id for a15 heading 'SQL ID'
col last_call_et for a16 heading 'Last UserCall|Act/Inact'
col STATUS for a10 heading 'Session|Status'
SELECT
c.inst_id,
SUBSTR(c.sid||','||c.serial#,1,12) ses_info,
SUBSTR(c.username,1,15) USERNAME,
SUBSTR(c.program,1,25) PROGRAM,
SUBSTR(c.osuser,1,10) osuser,
SUBSTR(d.spid,1,9) PROCESS,
SUBSTR(c.machine,1,15) MACHINE,
c.sql_id sql_id,
c.status status,
trim(to_char(trunc(c.last_call_et / 60 / 60 / 24),'09'))||' '
|| trim(to_char(trunc(mod(c.last_call_et / 60 / 60, 24)),'09'))||':'
|| trim(to_char(trunc(mod(c.last_call_et, 3600) / 60),'09'))||':'
|| trim(to_char(mod(mod(c.last_call_et, 3600), 60),'09')) last_call_et,
TO_CHAR(logon_time,'dd-mm-yy hh24:mi:ss') "LOGON-TIME"
FROM
gv$session c,
gv$process d
WHERE
c.paddr=d.addr
and c.inst_id=d.inst_id
and type <> 'BACKGROUND'
and c.sql_id is not null
ORDER BY
c.inst_id,
logon_time,
c.program;
set tab on feedback on
clear col
Automating DBA Tasks with Oracle GoldenGate Oracle GoldenGate is widely recognized as one of the best tools for real-time data replication. It allows seamless database migrations, schema or table replication across homogeneous and heterogeneous environments, and enhances database performance by offloading reporting workloads. Additionally, it ensures high availability by enables Bi-directional or cascading database replication configurations. Beyond these well-known benefits, GoldenGate can also be leveraged for automating routine DBA tasks, reducing manual intervention and improving efficiency by Streamline Your DBA Tasks with EVENTACTIONS. Let's explore how you can leverage its EVENTACTIONS parameter to automate routine DBA tasks, reduce manual effort, and optimize workflows. In this post, I will demonstrate how GoldenGate can assist in automating key DBA operations, such as: Starting or stopping GoldenGate processes – Automate the m...
RPO and RTO in Oracle Data Guard 1. Recovery Point Objective (RPO) What it is: RPO is about how much data loss you can tolerate if your primary database crashes. More precisely, it’s the maximum acceptable amount of time between your last backup (or last synchronized data) and the failure. In Oracle Data Guard terms: RPO means how far behind your standby database can lag before it’s no longer acceptable. It’s the "point in time" to which you can recover data after a failure. Example: Suppose you set your RPO as 5 minutes . If the primary database crashes, you accept that you might lose up to 5 minutes of data changes. Your standby must be kept synchronized enough so that, in case of failover, it won’t be more than 5 minutes behind the primary. 2. Recovery Time Objective (RTO) What it is: RTO is the maximum acceptable time to restore the database and get it up and running after a failure. In Oracle Data Guard terms: It’s the time between the failure ...
Comments
Post a Comment