Wednesday, December 18, 2013
How to find an Index size
select segment_name,segment_type,bytes/1024/1024 MB
from dba_segments
where segment_type='INDEX' and segment_name='your_index_name';
How to find a table size
select segment_name,segment_type,bytes/1024/1024 MB
from dba_segments
where segment_type='TABLE' and segment_name='your_table_name';
from dba_segments
where segment_type='TABLE' and segment_name='your_table_name';
Tuesday, February 12, 2013
Script to see Database Size
COLUMN "Redo Mb" FORMAT 999,999,999.0
COLUMN "Temp Mb" FORMAT 999,999,999.0
COLUMN "Data Mb" FORMAT 999,999,999.0
SELECT (SELECT Sum(bytes / 1048576)
FROM dba_data_files) "Data Mb",
(SELECT Nvl(Sum(bytes / 1048576), 0)
FROM dba_temp_files) "Temp Mb",
(SELECT Sum(bytes / 1048576) * Max(members)
FROM v$log) "Redo Mb",
(SELECT Sum(bytes / 1048576)
FROM dba_data_files)
+ (SELECT Nvl(Sum(bytes / 1048576), 0)
FROM dba_temp_files)
+ (SELECT Sum(bytes / 1048576) * Max(members)
FROM v$log) "Total Mb"
FROM dual;
Sunday, February 10, 2013
Active session information
SELECT SID, Serial#, UserName, Status, SchemaName, Logon_Time
FROM V$Session
WHERE
Status='ACTIVE' AND
UserName IS NOT NULL;
FROM V$Session
WHERE
Status='ACTIVE' AND
UserName IS NOT NULL;
Subscribe to:
Posts (Atom)
How to Trouble shoot Logfile_sync wait event
First Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...
-
Refference with the document How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema [ID 1030426.6] Hi Had faced an issue where ...
-
Login to the first node column is_recovery_dest_file format a25 column name format a60 set linesize 160 select status, name, is_recover...
-
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE; LOG_MODE ------------ NOARCHIVELOG show parameter archive will tell u the archive...