You are on page 1of 4

Daily Archive Log Generation :

==============================

select trunc(COMPLETION_TIME,'DD') Day, thread#,


round(sum(BLOCKS*BLOCK_SIZE)/1024/1024/1024) GB,
count(*) Archives_Generated from v$archived_log
group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;

DAY THREAD# GB ARCHIVES_GENERATED


--------- ---------- ---------- ------------------
01-MAR-18 2 219 358
01-MAR-18 1 155 300
02-MAR-18 2 190 396
02-MAR-18 1 163 353
03-MAR-18 1 177 321
03-MAR-18 2 152 314
04-MAR-18 1 124 220
04-MAR-18 2 90 195
05-MAR-18 1 166 300
05-MAR-18 2 99 226
06-MAR-18 2 156 364
06-MAR-18 1 209 343
07-MAR-18 2 136 242
07-MAR-18 1 130 235
08-MAR-18 2 161 319
08-MAR-18 1 149 313
09-MAR-18 1 196 411
09-MAR-18 2 198 376
10-MAR-18 1 174 351
10-MAR-18 2 176 306
11-MAR-18 2 140 230
11-MAR-18 1 60 173
12-MAR-18 1 169 406
12-MAR-18 2 226 408
13-MAR-18 1 135 318
13-MAR-18 2 210 342
14-MAR-18 1 352 538
14-MAR-18 2 195 452
15-MAR-18 2 216 463
15-MAR-18 1 367 581
16-MAR-18 1 255 483
16-MAR-18 2 336 545
17-MAR-18 2 261 452
17-MAR-18 1 176 417
18-MAR-18 1 215 464
18-MAR-18 2 199 400
19-MAR-18 1 168 417
19-MAR-18 2 274 461
20-MAR-18 2 207 419
20-MAR-18 1 262 482
21-MAR-18 2 285 505
21-MAR-18 1 168 428
22-MAR-18 1 279 530
22-MAR-18 2 216 489
23-MAR-18 1 243 489
23-MAR-18 2 266 520
24-MAR-18 1 296 539
24-MAR-18 2 238 494
25-MAR-18 2 193 462
25-MAR-18 1 297 529
26-MAR-18 1 258 495
26-MAR-18 2 316 550
27-MAR-18 2 369 574
27-MAR-18 1 177 445
28-MAR-18 2 357 583
28-MAR-18 1 197 465
29-MAR-18 2 445 645
29-MAR-18 1 98 398
30-MAR-18 1 194 474
30-MAR-18 2 356 590
31-MAR-18 2 482 668
31-MAR-18 1 64 364
01-APR-18 1 7 304
01-APR-18 2 470 650
02-APR-18 2 425 574
02-APR-18 1 33 268

154 rows selected.

select trunc(COMPLETION_TIME,'DD') Day, thread#,


round(sum(BLOCKS*BLOCK_SIZE)/1024/1024/1024) GB,
count(*) Archives_Generated from v$archived_log
group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;

SELECT TRUNC(COMPLETION_TIME) ARCHIVED_DATE,


SUM(BLOCKS * BLOCK_SIZE) / 1024 / 1024 SIZE_IN_MB
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(COMPLETION_TIME)
ORDER BY 1;

count(*) Archives

SELECT TRUNC(COMPLETION_TIME) ARCHIVED_DATE,THREAD#,


SUM(BLOCKS * BLOCK_SIZE) /1024/1024/1024 SIZE(GB),count(*) Archives
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(COMPLETION_TIME),THREAD#
ORDER BY 1;

=================

SELECT TRUNC(COMPLETION_TIME) ARCHIVED_DATE,


SUM(BLOCKS * BLOCK_SIZE) /1024/1024/1024 "SIZE(GB)",count(*) Archives
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(COMPLETION_TIME)
ORDER BY 1;

set line 150


set pages 200
select trunc(COMPLETION_TIME,'DD') Day,
(sum(BLOCKS*BLOCK_SIZE)/1024/1024/1024) "SIZE (GB)",
count(*) "Total Arc" from v$archived_log
group by trunc(COMPLETION_TIME,'DD')
order by 1;

set line 150


set pages 200
select trunc(COMPLETION_TIME,'DD') Day,
(sum(BLOCKS*BLOCK_SIZE)/1024/1024/1024) "SIZE (GB)",
count(*) "Total Arc" from v$archived_log
group by trunc(COMPLETION_TIME,'DD') order by 1;

Prod
====
select thread#,trunc(COMPLETION_TIME,'DD') Day, count(*) Archives_Generated,
round((sum(BLOCKS*BLOCK_SIZE)/1024/1024/1024),2) GB
from v$archived_log
group by trunc(COMPLETION_TIME,'DD'),thread#
order by 2 desc;

cd /oracle/app/oracle/product/11.2.0.3/diag/rdbms

exp tables=INDSOFTX1PROD.TBL_TDQ_Q file=/dev/null log=/tmp/testexport.log

INDSOFTX1PROD

================================

Select sum(bytes)/1024/1024 "MB" from dba_extents where segment_name='TBL_TDQ_Q'


and owner='INDSOFTX1PROD';

MB
----------
902512

Select sum(bytes)/1024/1024 "MB" from dba_extents where


segment_name='TBL_TDQ_Q_TDQ_DATA_SF' and owner='INDSOFTX1PROD';

MB
----------
1100155

Select segment_name,column_name,table_name,tablespace_name from dba_lobs where


table_name='TBL_TDQ_Q' and owner='INDSOFTX1PROD';

SEGMENT_NAME COLUMN_NAME TABLE_NAME TABLESPACE_NAME


------------------------------ -------------------- ------------------------------
------------------------------
TBL_TDQ_Q_TDQ_DATA_SF TDQ_DATA TBL_TDQ_Q INDSOFTX1PROD_DATA
TBL_TDQ_Q_CLIENT_SQL_SF CLIENT_SQL TBL_TDQ_Q INDSOFTX1PROD_DATA