This blog provides valuable insights and information for Oracle DBA professionals.
db_files.sql
Get link
Facebook
X
Pinterest
Email
Other Apps
-- ************************************************************************************************************
-- * Filename : db_files.sql
-- * Author : Saravanakumar K
-- * Description : This script with show all database physical file info
-- * Usage : @db_files.sql
-- * Version : v1
-- *************************************************************************************************************
SET TERMOUT OFF;
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
SET TERMOUT ON;
SET ECHO OFF
SET FEEDBACK 6
SET HEADING ON
SET LINESIZE 250
SET PAGESIZE 50000
SET TERMOUT ON
SET TIMING OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET VERIFY OFF
SET TAB OFF
COLUMN ft_sort NOPRINT
COLUMN tablespace FORMAT a30 HEADING 'Tablespace Name / File Class'
COLUMN filename FORMAT a100 HEADING 'Filename'
COLUMN filesize FORMAT 9999999999999 HEADING 'File Size GB'
COLUMN autoextensible FORMAT a4 HEADING 'Auto'
COLUMN increment_by FORMAT 999999999999 HEADING 'Next in GB'
COLUMN maxbytes FORMAT 999999999999 HEADING 'Max Size GB'
BREAK ON REPORT ON ft DUPLICATES SKIP 1
COMPUTE SUM OF filesize ON REPORT
COMPUTE SUM OF maxbytes ON REPORT
SELECT /*+ ordered */
1 ft_sort,
d.tablespace_name tablespace,
d.file_name filename,
d.bytes / 1024 / 1024 / 1024 filesize,
d.autoextensible autoextensible,
( d.increment_by * e.value ) / 1024 / 1024 / 1024 increment_by,
d.maxbytes / 1024 / 1024 / 1024 maxbytes
FROM
sys.dba_data_files d,
v$datafile v,
(
SELECT
value
FROM
v$parameter
WHERE
name = 'db_block_size'
) e
WHERE
( d.file_name = v.name )
UNION
SELECT
2 ft_sort,
d.tablespace_name tablespace,
d.file_name filename,
d.bytes / 1024 / 1024/ 1024 filesize,
d.autoextensible autoextensible,
( d.increment_by * e.value ) / 1024 / 1024/ 1024increment_by,
d.maxbytes / 1024 / 1024 / 1024 maxbytes
FROM
sys.dba_temp_files d,
(
SELECT
value
FROM
v$parameter
WHERE
name = 'db_block_size'
) e
UNION
SELECT
3 ft_sort,
'[ ONLINE REDO LOG ]',
a.member,
b.bytes / 1024 / 1024 / 1024,
NULL,
to_number(NULL),
to_number(NULL)
FROM
v$logfile a,
v$log b
WHERE
a.group# = b.group#
UNION
SELECT
4 ft_sort,
'[ STANDBY REDO LOG ]',
a.member,
b.bytes / 1024 / 1024 / 1024,
NULL,
to_number(NULL),
to_number(NULL)
FROM
v$logfile a,
v$standby_log b
WHERE
a.group# = b.group#
UNION
SELECT
5 ft_sort,
'[ CONTROL FILE ]',
a.name,
to_number(NULL),
NULL,
to_number(NULL),
to_number(NULL)
FROM
v$controlfile a
UNION
SELECT
6 ft_sort,
'[ SP FILE ]',
value "name",
to_number(NULL),
NULL,
to_number(NULL),
to_number(NULL)
FROM
v$parameter
WHERE
name = 'spfile'
ORDER BY
1,
2,
3
/
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
SET LINES 175 PAGES 9999 TAB ON
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