How to find Max, Min and Avg generation of redo to a database

I'm trying to remake maximum, minimum and average, a database to generate daily. This information, as well as knowledge of
specific database will be useful for me to determine the log archiving directory space allocation is sufficient for our database activity.

I want to just make sure that the request is correct or not.

Select upper (B.HOST_NAME) HOST_NAME, upper (B.INSTANCE_NAME) INSTANCE_NAME, A.* FROM)
Select max (redo_in_gb) MAX_REDO_IN_GB, min (redo_in_gb) MIN_REDO_IN_GB, avg (redo_in_gb) AVG_REDO_IN_GB)
Select sum (blocks * block_size) /(1024*1024*1024) REDO_IN_GB, trunc (first_time) as "RUN_DATE"
v $ archived_log where trunc (first_time) > (select trunc (resetlogs_time) in v$ database_incarnation where status = 'CURRENT')
Trunc Group (first_time))) A, V$ INSTANCE B


Thank you
Guz

Yes, that sounds good.

Tags: Database

Similar Questions

  • Max, Min, and Count with Group By

    Hello

    I want the max, min and the meter of a table that is grouped by a column

    I need a combination of these two selects:

    select
         max(COUNTRY_S) MAXVALUE,
         min(COUNTRY_S) MINVALUE
    from
         tab_Country
    
    

    select
         count(*)
    from
         (select COUNTRY_TXT from tab_Country group by COUNTRY_TXT) ;
    
    

    The result should be a line with the maximum and minimum of the table value and the County grouped by table, not the max and min of each group! -J' hope you understand my question?

    Is this possible in a SQL-select?

    Thank you very much

    Best regards

    Heidi

    Hi, Heidi,.

    HeidiWeber wrote:

    Hello

    I want the max, min and the meter of a table that is grouped by a column

    I need a combination of these two selects:

    1. Select
    2. MAXVALUE, Max (COUNTRY_S),
    3. min (COUNTRY_S) MINVALUE
    4. Of
    5. tab_Country
    1. Select
    2. Count (*)
    3. Of
    4. (select the COUNTRY_TXT of the COUNTRY_TXT tab_Country group);

    The result should be a line with the maximum and minimum of the table value and the County grouped by table, not the max and min of each group! -J' hope you understand my question?

    Is this possible in a SQL-select?

    Thank you very much

    Best regards

    Heidi

    It is not clear what you want.  Maybe

    SELECT MAX (country_s) AS max_country_s

    MIN (country_s) AS min_country_s

    COUNT (DISTINCT country_txt) AS count_country_txt

    OF tab_country

    ;

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • How to find corrupted files and remove them on mac i

    How to find corrupted files and remove them on i mac?  AM currently using OS x EL capitan 10.11.12 Mac said to run slowly and the recent upload did not work until the 3rd attempt.

    Thank you

    You do not have.

    You can run this program and post the results so that we can see what you have installed that could cause your problems.

    http://www.etresoft.com/etrecheck

  • I have Dreamweaver CS6 but want to update for cc, how ever I did mine and I sign in and upward at the site web adobe and want to use css Designer because with my courses, I do and they use CC. How can I get upgrade with refund f

    I have Dreamweaver CS6 but want to update for cc, how ever I did mine and I sign in and upward at the site web adobe and want to use css Designer because with my courses, I do and they use CC. How can I get the upgrade with this new refund. Thank you

    There is no way to update the version of perpetual license / DWCS6 drive to the creative cloud, they are two completely separate programs. There used to be a discount for the Creative Suite owners switch to CC, but that ship has sailed.

    If you want to the CSS designer, you will need a subscription here: pricing and membership creative cloud plans | Adobe Creative Cloud

  • Find dates MIN and MAX

    Please, advise how correctly find MIN and MAX dates.
    The XML code:
    <DATES>
    <DT>2011-02-24</DT>
    <DT>2011-02-25</DT>
    <DT>2011-02-26</DT>
    <DT>2011-02-27</DT>
    <DT>2011-02-28</DT>
    </DATES>
    Model:
    <?xdoxslt:minimum(DT)?>
    <?xdoxslt:maximum(DT)?>
    The output:
    0
    20110224
    Expected results:
    2011-02-24
    2011-02-28

    Hello

    If your data is:



    2008-10-04

    1


    2009-10-21

    3


    2009-11-05

    4


    2008-11-10

    2

    The maximum is given by: / ROWSET/ROW/DT [.. / DT_RANK = count (//ROW)]
    and the minimum is: / ROWSET/ROW/DT [.. / DT_RANK = 1]

    There may be more effective, but it works.

    concerning

    Jorge

  • Grouping and then find the min and max

    DROP TABLE purge of y;

    CREATE TABLE y
    (
    ID NUMBER (10),
    START_DATE_TIME NUMBER (15),
    END_DATE_TIME NUMBER (15)
    );

    INSERT INTO y VALUES (1, 20140602164819, 20140606140851);
    INSERT INTO y VALUES (1, 20140827141743, 20140827142131);
    INSERT INTO y VALUES (1, 20140827141744, 20140827141835);
    INSERT INTO y VALUES (1, 20140827141744, 20140827142131);
    INSERT INTO y VALUES (1, 20140827141944, 20140827142131);
    INSERT INTO y VALUES (1, 20140827141944, 20140924142131);
    INSERT INTO y VALUES (1, 20140927141944, 20141027142131);
    INSERT INTO y VALUES (2, 20140602164819, 20140606140851);
    INSERT INTO y VALUES (2, 20140827141743, 20140827142131);
    INSERT INTO y VALUES (2, 20140827141744, 20140827141835);
    INSERT INTO y VALUES (2, 20140827141744, 20140827142131);
    INSERT INTO y VALUES (2, 20140827141944, 20140827142131);
    INSERT INTO y VALUES (2, 20140827141944, 20140924142131);
    INSERT INTO y VALUES (2, 20140927141944, 20141027142131);

    COMMIT;

    Select
    *
    Of
    There
    order by 2, 3;

    out necessary: when the output of the table are sorted by start_date_time and end_date_time in ascending order.
    and when the value of for a particular id start_date_time is located between the
    another set of values start_date_time and end_date_time for the same id then min (start_date_time) and max (end_date_time) is the desired output.

    and if there is no overlap then (start_date_time) min and max (end_date_time) is the output desired.

    and for each line of the output in ascending order of line number order addd;

    Example output is in the output table named

    drop table output is serving;

    create an output table
    (
    ID NUMBER (10),
    START_DATE_TIME NUMBER (15),
    END_DATE_TIME NUMBER (15),
    ROW_NUMBER NUMBER (10)
    );


    Values to INSERT OUTPUT (1, 20140602164819, 20140606140851, 1);
    Values to INSERT OUTPUT (1, 20140827141743, 20140924142131, 2);
    Values to INSERT OUTPUT (1, 20140927141944, 20141027142131, 3);
    Values to INSERT OUTPUT (2, 20140602164819, 20140606140851, 1);
    Values to INSERT OUTPUT (2, 20140827141743, 20140924142131, 2);
    Values to INSERT OUTPUT (2, 20140927141944, 20141027142131, 3);

    COMMIT;

    SELECT
    *
    Of
    output
    ORDER BY 1,2,3,4;

    Thank you

    SQL_Novice

    Hello

    Your postal code.  It is difficult to tell what you're doing wrong without knowing what you are doing.

    user6166680 wrote:

    Hi Frank:

    Max works for ID 3 values only because there is only one group here, as all other values compared, they overlap with max (end_date_time);

    but when I use MAX for ID 1 and 2, the result set is not the same thing as LAG works because there is a GAP...

    Exactly, you have to find the gaps.  If start_date_time is less than or equal to the MAXIMUM of all the end_date_times earlier, then it isn't a gap; Otherwise, there is a gap.

    What is the problem with MAX?

    WITH got_new_group AS

    (

    SELECT id, start_date_time and end_date_time

    CASE

    WHEN start_date_time <= > MAX (end_date_time) OVER (PARTITION BY id )

    ORDER BY start_date_time

    end_date_time

    ROWS BETWEEN UNBOUNDED PRECEDING

    AND 1 PRECEDING

    )

    THEN 0

    1. OTHER

    END AS new_group

    OF y

    )

    got_group_number AS

    (

    SELECT id, start_date_time and end_date_time

    SUM (new_group) OVER (PARTITION BY ID.

    ORDER BY start_date_time

    end_date_time

    ) AS group_number

    OF got_new_group

    )

    SELECT id

    MIN (start_date_time) AS group_start_date_time

    MAX (end_date_time) AS group_end_date_time

    group_number

    OF got_group_number

    GROUP BY id, group_number

    ORDER BY id, group_number

    ;

    You will notice that it is exactly what I posted earlier, in response #5, except that instead of using the OFFSET it uses MAX.

    Output:

    ID GROUP_START_DATE_TIME GROUP_END_DATE_TIME GROUP_NUMBER

    --------------- --------------------- ------------------- ---------------

    1 20140602164819 20140606140851 1

    1 20140827141743 20140924142131 2

    1 20140927141944 20141027142131 3

    2 20140602164819 20140606140851 1

    2 20140827141743 20140924142131 2

    2 20140927141944 20141027142131 3

    3 20140330041350 47121231000000 1

  • How do I uninstall sweetim and avg toolbar

    I use window 8 and to uninstall sweetim and avg toolbar and can't seem to find a way to do it.
    Any suggestion would be appreciated a lot.

    SweetIM Toolbar has been blocked as of today.
    https://addons.Mozilla.org/en-us/Firefox/blocked/i236

  • How to find the Maxima and Minima for each column of a 2D array?

    Hello

    I have a 2D chart and I would find the maxima and minima of each column of the 2-D table. Even though I know how to get maxima and minima for the whole picture but don't know how columnwise? Any ideas please?

    Thank you

    Rohit

    Hello

    @Smercurio-What you said is true, I should have shown using automatic indexing enabled which is really excellent choice. I just tried to show in a very simple way.

    Anyway, here's the best way

  • How to find where VMDK and ISO mounted

    VMware dear master,

    I have trouble with my virtual environment,

    1. when I need remove ISO file, it says that currently used. How to find where the ISO is mounted?

    (manual search with see providing the edict for small environment is OK, but with vm 468 comments it is very complicated )

    2. I need to clean my data store, I found a file with file 3 vmdk, how to find this vmdk mounted?

    Thank you for your attention and support,

    Kind regards

    I would like to give a RVTools: RVTools - home

    1. you should be able to use the vCD tab to find the ISO image in the device column (you can export to Excel and make a 'discovery' on the name of the file to facilitate this)

    2. you can use the tab vDisk and search again on the path column.

  • How to find the version and the arc of the installed Oracle client

    Hi all

    I have a sles 10 sp2 x86_64 on which customer oracle 10.2 is installed. This facility has not been made by me!
    so I don't know how the oracle client version/architecture (32/64-bit) is installed on the client.

    of sqlplus v I get only the version that is installed, and not if it is 32 or 64 bit. How can I find that.

    sqlplus v
    SQL * more: Release 10.2.0.1.0 - Production

    with a little research on Google I found that the link that says 10g below client 32-bit cannot be installed on a 64-bit system.

    I read this Client 32-bit installation on Linux x86_64 RDBMS software. [1075717.1 ID]
    Installing 32-bit RDBMS Client software on x86_64 Linux.
    The only release of 32-bit RDBMS Client software that will properly install on an x86_64 Linux OS system is 11gR2 (aka 11.2.0.x)
    
        * 9iR2 (aka 9.2.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system.
        * 10gR1 (aka 10.1.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system.
        * 10gR2 (aka 10.2.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system.
        * 11gR1 (aka 11.1.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system.
    
    The answer to "why", is that the 11gR2 Client software is the first version that includes syntax so that a 32-bit object is linked.
    can anyone please shed more light on this?

    Hello

    PL see TechNote MOS:
    * How to find if the Oracle Client Software is 32-bit or 64-bit platforms UNIX [434295.1 ID] *.

    Thank you
    A H E E R X

  • How to find the lock and more information why the prg conc taking too long

    Oracle Apps R12-Orader management

    Hi all

    I am new to Oracle Apps, we I run my simultaneous program
    its taking too long to complete. How to find that there is a lock to produce in the table while that simultaneous execution of the program, another way to find why the simultaneous program takes too long to run and how can you speed up the process.

    Yesterday we made a few changes to speed up the process with our DBA to accelerate the simultaneous program

    The first simultaneous program takes 2 h 30 and after these changes taking 1 h 45. Please suggest it's okay

    Connected with the responsibility of the system administrator.

    Manager - set - Manager of the standard.

    Set the value of PROCESS like 15 (instead of 10).

    Set the value of SECONDS of SLEEP as 10 (Changed from 30).

    Manager - set - Manager2 Standard.

    Set the value of PROCESS like 15 (instead of 10).

    Set the value of SECONDS of SLEEP as 10 (Changed from 60).


    Any suggestion on how to find why it takes too much time.

    Any help is highly appricatable

    Thanks and greetings
    Srikkanth.M

    Hello

    I suggest you draw the simultaneous program and analyze the trace file. To do this, mark the simultaneous program as Trace enable (RESP system administrator, Menu simultaneous > program > define) and then run the program and download the trace file after dealing with tkprof. Check which are the staements who take most of the time and try to optimize them.

    It will be useful.

  • How to find the utilities and windows drivers VGN-CR36G 8?

    Hello

    I use laptop Vaio VGN-CR36G with vista ultimate. Now, I want to install windows 8 enterprise edition.

    But I can't find the drivers and utilities on the site of sony vaio.

    But my product is compatible for windows 8 OS.

    Here is the link below:

    http://www.Sony-Asia.com/support/product/VGN-CR36G

    Can someone please help me to download all drivers and software?

    Thank you

    Hi Whiteeasy.

    This model does not support Windows 8 operating system which you can confirm from the link below.

    http://www.Sony-Asia.com/microsite/VAIO/support/GetWindows8/GetWindows8_EN_NA.html?referer=http%3A%2...

    If my post answered your question, please mark it as an "accepted Solution".

  • How to find the maximum and minimum of a waveform between cursors

    Hello!

    Does anyone know an easy way to find the maximum and minimum of a waveform between two sliders?

    Kind regards

    Andreas

    Hi Andreas,

    attached, you get an example of it in MeasurementStudio.

  • How to find the audio and recording mixers

    Cannot find Audio Mixers and recording in Windows 7 as I had XP

    My Medion computer purchased recently does not appear to have full audio mixer for volumes or a similar mixer to record levels as I have already in Win XP.

    Is it possible to reproduce pages of mixer teas? I would be grateful for any help on this problem.

    TIA Mike

    Cool Edit 2000 (compatibility issue)

    Hello

    The mixer similar to that of Windows XP volume has been removed in Windows 7.

    Windows 7 has its own volume mixer. Check this link for more information:

    Adjust the sound level on your computer:
    http://Windows.Microsoft.com/en-us/Windows7/adjust-the-sound-level-on-your-computer

    Cool edit 2000 is not compatible with Windows 7. Cool Edit was taken over by Adobe, a few years ago and renamed Adobe Audition. The manufacturer
    offers a paid upgrade to the software.

    Check this link for more information:
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/details.aspx?type=software&p=cool%20Edit%20PRO&v=Adobe&UID=2&pf=0&PI=
    6 & s = Cool % 20Edit % 202000 & os 32-bit =

    Kind regards
    Amal-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to find the last date of execution of the objects in database

    Hi all

    We're going for an upgrade of the database 11g and for the same thing, we want to know the last date of the following-

    Packages, Tables, views
    Conc. programs / value Sets / look up / profile options

    Is there a way we can find the same thing.
    The answers would be really useful.

    Kind regards
    Shruti

    So can you provide clues on how to find the last opportunity registration

    I don't think you can find such a script with having activated audit.

    Thank you
    Hussein

Maybe you are looking for