REDOLOGi i ARCHIVELOGi w Oracle

DODAWANIE I POWIĘKSZANIE REDOLOGÓW

Najpierw sprawdzamy jak jest skonfigurowana baza Oracle (ile mamy redologów i o jakim rozmiarze)

SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
INACTIVE                      50          1
ACTIVE                        50          2
CURRENT                       50          3

Status INACTIVE oznacza że redolog nie jest używany, ACTIVE oznacza że jest trzymany jeszcze przez bazę (np przerabiany na archiveloga), CURRENT że jest on aktualnie używany przez bazę jako aktywny redolog.

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
         1          1      93928   52428800        512          1 NO  INACTIVE            4.5682E+10 20-DEC-17   4.5682E+10 20-DEC-17
         2          1      93929   52428800        512          1 NO  ACTIVE              4.5682E+10 20-DEC-17   4.5682E+10 20-DEC-17
         3          1      93930   52428800        512          1 NO  CURRENT             4.5682E+10 20-DEC-17   2.8147E+14 20-DEC-17

SQL> select group#, type, substrb(member, 1, 90) from v$logfile;

    GROUP# TYPE    SUBSTRB(MEMBER,1,90)
---------- ------- ------------------------------------------------------------------------------------------
         3 ONLINE  /oradata/FISHER/FISHER/redo03.rdo
         2 ONLINE  /oradata/FISHER/FISHER/redo02.rdo
         1 ONLINE  /oradata/FISHER/FISHER/redo01.rdo

Jako że obecnie redologi sa dość małe co powoduje że często są przełączane zmianumy ich rozmiar z 50MB na 500MB.

Utworzymy dodatkowe 500MB redologi o nazwie redo04.rdo i redo05.rdo oraz powiększymy istniejące 3 redologi też do 500MB.

SQL> alter database add logfile group 4 '/oradata/FISHER/FISHER/redo04.rdo' size 500M;
SQL> alter database add logfile group 5 '/oradata/FISHER/FISHER/redo05.rdo' size 500M;

Database altered.

Sprawdzamy czy się utworzył (będzie w statusie UNUSED czyli nigdy nieużywany)
SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
INACTIVE                      50          1
ACTIVE                        50          2
CURRENT                       50          3
UNUSED                       500          4
UNUSED                       500          5

Przełączamy aktywnego redologa tak aby aktywnym stał się redo04.rdo
SQL> alter system switch logfile;

System altered.

SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
INACTIVE                      50          1
ACTIVE                        50          2
ACTIVE                        50          3
CURRENT                      500          4
UNUSED                       500          5

Usuwamy pierwszego redologa usuwając całą grupę 1.

SQL> alter database drop logfile group 1;

Database altered.

Jeśli byśmy chcieli teraz dodać nowego redologa nie uda się nam to bo plik cały czas istnieje.

SQL> alter database add logfile group 1 '/oradata/FISHER/FISHER/redo01.rdo' size 500M;

alter database add logfile group 1  '/oradata/FISHER/FISHER/redo01.rdo' size 500M
*
ERROR at line 1:
ORA-00301: error in adding log file '/oradata/FISHER/FISHER/redo01.rdo' - file cannot be created
ORA-27038: created file already exists
Additional information: 1

Musimy go ręcznie usunąć lub zmianić mu nazwę.

$> mv redo01.rdo redo01.rdo_old

Jeszcze raz go dodajemy (z nowym rozmiarem 500MB)

SQL> alter database add logfile group 1 '/oradata/FISHER/FISHER/redo01.rdo' size 500M;

Database altered.

Poszło. Tak samo postępujemy z redologiem 2 i 3

SQL> alter database drop logfile group 2;
$> mv redo02.rdo redo02.rdo_old
SQL> alter database add logfile group 2 '/oradata/FISHER/FISHER/redo02.rdo' size 500M;

SQL> alter database drop logfile group 3;
$> mv redo03.rdo redo03.rdo_old
SQL> alter database add logfile group 3 '/oradata/FISHER/FISHER/redo03.rdo' size 500M;

Sprawdzamy czy się utworzyły

SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
UNUSED                       500          1
UNUSED                       500          2
UNUSED                       500          3
CURRENT                      500          4
UNUSED                       500          5

Parę razy przełączamy loga

SQL> alter system switch logfile;

Sprawdzamy

SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
ACTIVE                       500          1
ACTIVE                       500          2
ACTIVE                       500          3
ACTIVE                       500          4
CURRENT                      500          5

Po jakimś czasie ponownie sprawdzamy

SQL> select status, bytes/1024/1024, group# from v$log;

STATUS           BYTES/1024/1024     GROUP#
---------------- --------------- ----------
INACTIVE                     500          1
INACTIVE                     500          2
INACTIVE                     500          3
INACTIVE                     500          4
CURRENT                      500          5

SWITCHLOG czyli przełączenie się Redologów

Aby sprawdzić jak często przełączają się redologi podczas pracy bazy wykonujmy

set lines 140;
set pages 999;
SELECT
to_char(first_time,'YYYY-MON-DD') day,
to_char(sum(decode(to_char(first_time,'HH24'),'00',1,0)),'99') "00",
to_char(sum(decode(to_char(first_time,'HH24'),'01',1,0)),'99') "01",
to_char(sum(decode(to_char(first_time,'HH24'),'02',1,0)),'99') "02",
to_char(sum(decode(to_char(first_time,'HH24'),'03',1,0)),'99') "03",
to_char(sum(decode(to_char(first_time,'HH24'),'04',1,0)),'99') "04",
to_char(sum(decode(to_char(first_time,'HH24'),'05',1,0)),'99') "05",
to_char(sum(decode(to_char(first_time,'HH24'),'06',1,0)),'99') "06",
to_char(sum(decode(to_char(first_time,'HH24'),'07',1,0)),'999') "07",
to_char(sum(decode(to_char(first_time,'HH24'),'08',1,0)),'999') "0",
to_char(sum(decode(to_char(first_time,'HH24'),'09',1,0)),'999') "09",
to_char(sum(decode(to_char(first_time,'HH24'),'10',1,0)),'999') "10",
to_char(sum(decode(to_char(first_time,'HH24'),'11',1,0)),'999') "11",
to_char(sum(decode(to_char(first_time,'HH24'),'12',1,0)),'999') "12",
to_char(sum(decode(to_char(first_time,'HH24'),'13',1,0)),'999') "13",
to_char(sum(decode(to_char(first_time,'HH24'),'14',1,0)),'999') "14",
to_char(sum(decode(to_char(first_time,'HH24'),'15',1,0)),'999') "15",
to_char(sum(decode(to_char(first_time,'HH24'),'16',1,0)),'999') "16",
to_char(sum(decode(to_char(first_time,'HH24'),'17',1,0)),'999') "17",
to_char(sum(decode(to_char(first_time,'HH24'),'18',1,0)),'999') "18",
to_char(sum(decode(to_char(first_time,'HH24'),'19',1,0)),'999') "19",
to_char(sum(decode(to_char(first_time,'HH24'),'20',1,0)),'999') "20",
to_char(sum(decode(to_char(first_time,'HH24'),'21',1,0)),'999') "21",
to_char(sum(decode(to_char(first_time,'HH24'),'22',1,0)),'999') "22",
to_char(sum(decode(to_char(first_time,'HH24'),'23',1,0)),'999') "23"
from v$log_history GROUP by to_char(first_time,'YYYY-MON-DD')
order by day;

DAY                  00  01  02  03  04  05  06  07   0    09   10   11   12   13   14   15   16   17   18   19   20   21   22   23
-------------------- --- --- --- --- --- --- --- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
2017-DEC-12            0   0   0   0   0   0   0    0    0    0    0    0    0   16  103   27    8    8    7    7    7    8    9    7
2017-DEC-13            7   7   8   9   8   7   7    8   19   38   37   55   75   45   20    8    7    7    7    7    8    9    9    8
2017-DEC-14            8   8   7   8   9   7   7    8   19   44   49   57   66   37   15    7    7    7    7    7    8    9    9    8
2017-DEC-15            7  10   8   8   7   7   7    7   26   43   48   66   63   37  101   39    8    7    7    7    7   10   10    7
2017-DEC-16            7  10   8   8   7   7   8    7   19   35   41   67   66   40   23   18    7    7    7    7    8   10    9    7
2017-DEC-17            7   9   7   7   8   8   8    7   19   41   41   61   70   37   20   12    7    7    8    6    8   10    9    7
2017-DEC-18            6   9   8   7   8   8   7    8   25   30   27   36  148   57   38  290   84  144  131   82    7    8    9    8
2017-DEC-19            6   8   8   8   8   7   7    8  103  131    9    8    9    8    7    8  185  159   97   81    8    8   10    7
2017-DEC-20            8   7   8   8   9   8   7    9    7   13    8    7    1    1    8    0    1    1    1    0    1    1    1    0
2017-DEC-21            1   1   1   0   1   1   0    1    1    1   25    5    1   15   15    0    0    0    0    0    0    0    0    0

10 rows selected.

Inne zapytanie

set lines 120;
set pages 999;
col "16" format a3
SELECT
to_char(first_time,'YYYY-MON-DD') day,
to_char(sum(decode(to_char(first_time,'HH24'),'16',1,0)),'999') "16"
from v$log_history GROUP by to_char(first_time,'YYYY-MON-DD');

i jeszcze jedno

#############################
This script display log switches in a linear format:
########

select
b.recid,
to_char(b.first_time,'dd-mon-yy hh24:mi:ss') start_time,
a.recid,
to_char(a.first_time,'dd-mon-yy hh24:mi:ss') end_time,
round(((a.first_time-b.first_time)*25)*60,2) minutes
from
v$log_history a,
v$log_history b
where
a.recid = b.recid+1
and
a.first_time between to_date('2017-12-20:10:00:00','yyyy-mm-dd:hh24:mi:ss')
and
to_date('2017-12-20:13:20:00','yyyy-mm-dd:hh24:mi:ss')
order by
a.first_time asc;

     RECID START_TIME                       RECID END_TIME                       MINUTES
---------- --------------------------- ---------- --------------------------- ----------
     93923 20-dec-17 09:55:33               93924 20-dec-17 10:00:30                5.16
     93924 20-dec-17 10:00:30               93925 20-dec-17 10:10:11               10.09
     93925 20-dec-17 10:10:11               93926 20-dec-17 10:15:10                5.19
     93926 20-dec-17 10:15:10               93927 20-dec-17 10:25:10               10.42
     93927 20-dec-17 10:25:10               93928 20-dec-17 10:35:09                10.4
     93928 20-dec-17 10:35:09               93929 20-dec-17 10:40:11                5.24
     93929 20-dec-17 10:40:11               93930 20-dec-17 10:50:10                10.4
     93930 20-dec-17 10:50:10               93931 20-dec-17 10:55:10                5.21
     93931 20-dec-17 10:55:10               93932 20-dec-17 11:05:11               10.43
     93932 20-dec-17 11:05:11               93933 20-dec-17 11:10:11                5.21
     93933 20-dec-17 11:10:11               93934 20-dec-17 11:14:25                4.41
     93934 20-dec-17 11:14:25               93935 20-dec-17 11:27:15               13.37
     93935 20-dec-17 11:27:15               93936 20-dec-17 11:27:18                 .05
     93936 20-dec-17 11:27:18               93937 20-dec-17 11:27:19                 .02

14 rows selected.

i jeszcze inne zapytanie pokazujące ilość przełączeń w danej godzinie

###############################
This script will show the hourly count of log switches:
#######

col day format a15;
col hour format a4;
col total format 999;

select
to_char(first_time,'yyyy-mm-dd') day,
to_char(first_time,'hh24') hour,
count(*) total
from
v$log_history
group by
to_char(first_time,'yyyy-mm-dd'),to_char(first_time,'hh24')
order by
to_char(first_time,'yyyy-mm-dd'),to_char(first_time,'hh24')
asc;

DAY             HOUR TOTAL
--------------- ---- -----
2017-12-12      12      17
2017-12-12      13      41
2017-12-12      14     103
2017-12-12      15      27
2017-12-12      16       8
........
2017-12-19      21       8
2017-12-19      22      10
2017-12-19      23       7
2017-12-20      00       8
2017-12-20      01       7

192 rows selected.

i jeszcze jedno 🙂

set linesize 300
set pagesize 5000
set trimspool on
column 00 format 99 heading "00:00"
column 01 format 99 heading "1am"
column 02 format 99 heading "2am"
column 03 format 99 heading "3am"
column 04 format 99 heading "4am"
column 05 format 99 heading "5am"
column 06 format 99 heading "6am"
column 07 format 99 heading "7am"
column 08 format 99 heading "8am"
column 09 format 99 heading "9am"
column 10 format 99 heading "10am"
column 11 format 99 heading "11am"
column 12 format 99 heading "12:00"
column 13 format 99 heading "1pm"
column 14 format 99 heading "2pm"
column 15 format 99 heading "3pm"
column 16 format 99 heading "4pm"
column 17 format 99 heading "5pm"
column 18 format 99 heading "6pm"
column 19 format 99 heading "7pm"
column 20 format 99 heading "8pm"
column 21 format 99 heading "9pm"
column 22 format 99 heading "10pm"
column 23 format 99 heading "11pm"
column 24 format 99 heading "12pm"
column "Day" format a3

prompt
prompt Redo Log Switches
prompt

SELECT trunc (first_time) "Date",
to_char (trunc (first_time),'Dy') "Day",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 0, 1)) "00",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 1, 1)) "01",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 2, 1)) "02",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 3, 1)) "03",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 4, 1)) "04",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 5, 1)) "05",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 6, 1)) "06",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 7, 1)) "07",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 8, 1)) "08",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 9, 1)) "09",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 10, 1)) "10",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 11, 1)) "11",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 12, 1)) "12",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 13, 1)) "13",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 14, 1)) "14",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 15, 1)) "15",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 16, 1)) "16",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 17, 1)) "17",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 18, 1)) "18",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 19, 1)) "19",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 20, 1)) "20",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 21, 1)) "21",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 22, 1)) "22",
sum (decode (to_number (to_char (FIRST_TIME, 'HH24')), 23, 1)) "23"
from v$log_history
where trunc (first_time) >= (trunc(sysdate) - 14) -- last X days. 0 = today only. 1 = today and yesterday
group by trunc (first_time)
order by trunc (first_time) DESC
/

Date      Day 00:00 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12:00 1pm 2pm 3pm 4pm 5pm 6pm 7pm 8pm 9pm 10pm 11pm
--------- --- ----- --- --- --- --- --- --- --- --- --- ---- ---- ----- --- --- --- --- --- --- --- --- --- ---- ----
20-DEC-17 Wed     8   7   8   8   9   8   7   9   7  13    8    6
19-DEC-17 Tue     6   8   8   8   8   7   7   8 ### ###    9    8     9   8   7   8 ### ###  97  81   8   8   10    7
18-DEC-17 Mon     6   9   8   7   8   8   7   8  25  30   27   36   ###  57  38 ###  84 ### ###  82   7   8    9    8
17-DEC-17 Sun     7   9   7   7   8   8   8   7  19  41   41   61    70  37  20  12   7   7   8   6   8  10    9    7
16-DEC-17 Sat     7  10   8   8   7   7   8   7  19  35   41   67    66  40  23  18   7   7   7   7   8  10    9    7
15-DEC-17 Fri     7  10   8   8   7   7   7   7  26  43   48   66    63  37 ###  39   8   7   7   7   7  10   10    7
14-DEC-17 Thu     8   8   7   8   9   7   7   8  19  44   49   57    66  37  15   7   7   7   7   7   8   9    9    8
13-DEC-17 Wed     7   7   8   9   8   7   7   8  19  38   37   55    75  45  20   8   7   7   7   7   8   9    9    8
12-DEC-17 Tue                                                        17  41 ###  27   8   8   7   7   7   8    9    7

9 rows selected.

i coś jeszcze

SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300

SELECT to_char(first_time, 'yyyy - mm - dd') aday,
to_char(first_time, 'hh24') hour,
count(*) total
FROM v$log_history
WHERE thread#=&EnterThreadId
GROUP BY to_char(first_time, 'yyyy - mm - dd'),
to_char(first_time, 'hh24')
ORDER BY to_char(first_time, 'yyyy - mm - dd'),
to_char(first_time, 'hh24') asc
/

ADAY           HOUR TOTAL
-------------- ---- -----
2017 - 12 - 19 15       8
2017 - 12 - 19 16     185
2017 - 12 - 19 17     159
2017 - 12 - 19 18      97
2017 - 12 - 19 19      81
...
2017 - 12 - 20 07       9
2017 - 12 - 20 08       7
2017 - 12 - 20 09      13
2017 - 12 - 20 10       8
2017 - 12 - 20 11       6

192 rows selected.

ARCHIVELOGS czyli zarchiwizowane redologi

Jeśli baza działa w trybie ARCHIVE MODE to pliki redologów są systematycznie archiwizowane w skonfigurowanych do tego celu folderach.

SQL> select substr(HOST_NAME,1,10) as HOST_NAME,INSTANCE_NAME,STARTUP_TIME,STATUS,ARCHIVER from v$instance;

HOST_NAME                                INSTANCE_NAME    STARTUP_T STATUS       ARCHIVE
---------------------------------------- ---------------- --------- ------------ -------
carsx01                                  CARHER           21-DEC-17 OPEN         STARTED

SQL> show parameter archive

Wyświetli nam tego sporo. Poniżej najważniejsze dla nas

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string      /oraarch/CARHER
log_archive_format                   string      arch_CARHER_%t_%s_%r.arc
log_archive_local_first              boolean     TRUE
log_archive_max_processes            integer     4
log_archive_min_succeed_dest         integer     1
log_archive_start                    boolean     FALSE
log_archive_trace                    integer     0
standby_archive_dest                 string      ?/dbs/arch

Jak widać tryb Archive jest usuruchomiony a archive logi są składowane w folderze /oraarch/CARHER

TRYB ARCHIVE

Jesli nie jest uruchomiony tryb Archive musimy go uruchomić. Konieczne będzie wyłączenie bazy

SQL> shutdown immediate;

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.
Total System Global Area  612368384 bytes
Fixed Size                  1250452 bytes
Variable Size             159386476 bytes
Database Buffers          448790528 bytes
Redo Buffers                2940928 bytes
Database mounted.

SQL> alter database noarchivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL> archive log list;

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /oraarch/FISHER
Oldest online log sequence     95761
Next log sequence to archive   95765
Current log sequence           95765

SQL> archive log stop;

Statement processed.

SQL> archive log start;

Statement processed.

wielkość archów na dobę

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;

ARCHIVED_ SIZE_IN_MB
--------- ----------
21-DEC-17  16885.481
22-DEC-17 47925.2827
23-DEC-17 47588.6733
24-DEC-17 47883.2275
25-DEC-17 48371.6968
26-DEC-17 48063.8652
27-DEC-17 48315.0078
28-DEC-17 46876.5806
29-DEC-17 50127.2417
30-DEC-17 46799.1182
31-DEC-17 45521.2397
01-JAN-18 47539.9258
02-JAN-18  47678.271
03-JAN-18 24591.0269

14 rows selected.

to samo tylko inna forma daty – wielkość archów na dobę

SQL> alter session set nls_date_format = 'YYYY-MM-DD HH24';

Ponawiamy ostatnie zapytanie

ARCHIVED_DATE SIZE_IN_MB
------------- ----------
2017-12-21 00  16885.481
2017-12-22 00 47925.2827
2017-12-23 00 47588.6733
2017-12-24 00 47883.2275
2017-12-25 00 48371.6968
2017-12-26 00 48063.8652
2017-12-27 00 48315.0078
2017-12-28 00 46876.5806
2017-12-29 00 50127.2417
2017-12-30 00 46799.1182
2017-12-31 00 45521.2397
2018-01-01 00 47539.9258
2018-01-02 00  47678.271
2018-01-03 00 24591.0269

14 rows selected.

ilość wygenerowanych archiveogów (switchlogów)

select trunc(first_time) as ARCHIVED_DATE, count(*) as SWITCHLOG
from v$log_history group by trunc(first_time);

ARCHIVED_DATE  SWITCHLOG
------------- ----------
2017-12-15 00        547
2017-12-26 00        139
2017-12-30 00        135
2017-12-23 00        137
2017-12-27 00        139
2017-12-14 00        418
...
2017-12-17 00        424
2017-12-20 00        115
2018-01-02 00        137
2017-12-13 00        420
2017-12-18 00       1185
2017-12-28 00        135

23 rows selected.

ilość archivelogów per hour

col ARCH_DATE_HOUR format a20;
SELECT TRUNC(COMPLETION_TIME, 'HH') AS ARCH_DATE_HOUR,
SUM(BLOCKS * BLOCK_SIZE) / 1024 / 1024 SIZE_IN_MB
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(COMPLETION_TIME, 'HH')
ORDER BY 1;

ARCH_DATE_HOUR       SIZE_IN_MB
-------------------- ----------
2017-12-21 10        446.431152
2017-12-21 11        225.817871
2017-12-21 12        446.876465
2017-12-21 13        6018.11328
2017-12-21 14        6775.80322
2017-12-21 15        365.277344
2017-12-21 16        306.309082
2017-12-21 17        303.277832
2017-12-21 18        307.666992
2017-12-21 19        354.063965
2017-12-21 20        301.241211
...
2018-01-02 23        366.694336
2018-01-03 00        316.469238
2018-01-03 01        312.631348
2018-01-03 02        306.119629
2018-01-03 03        312.397949
2018-01-03 04         337.72168
2018-01-03 05        378.430176
2018-01-03 06        343.911133
2018-01-03 07        6061.91602
2018-01-03 08        14674.7441
2018-01-03 09        187.299316
2018-01-03 10        574.183105
2018-01-03 11        443.489258
2018-01-03 12        341.713867
2018-01-03 13        357.510742

316 rows selected.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

set linesize 1000
col SEQUENCE# format a15
SELECT * FROM V$ARCHIVED_LOG WHERE ROWNUM <= 1;

     RECID      STAMP NAME         DEST_ID    THREAD#  SEQUENCE# RESETLOGS_CHANGE# RESETLOGS RESETLOGS_ID FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME     BLOCKS BLOCK_SIZE CREATOR REGISTR STA ARC APPLIED   DEL S COMPLETIO DIC DIC END BACKUP_COUNT ARCHIVAL_THREAD# ACTIVATION# IS_ COM FAL END_OF_RED BAC
---------- ---------- --------- ---------- ---------- ---------- ----------------- --------- ------------ ------------- --------- ------------ --------- ---------- ---------- ------- ------- --- --- --------- --- - --------- --- --- --- ------------ ---------------- ----------- --- --- --- ---------- ---
         1  963311256                   1           1 ##########            925702 29-JUL-15    886334074    4.5697E+10 21-DEC-17   4.5697E+10 21-DEC-17     566689        512 FGRD    FGRD    NO  YES NO        YES D 21-DEC-17 NO  NO  NO              1                1  1111603320 YES NO  NO             NO

Ten wpis został opublikowany w kategorii Oracle i oznaczony tagami . Dodaj zakładkę do bezpośredniego odnośnika.

Dodaj komentarz