SQL to determine the generation of newspaper archived daily

Someone has to calculate reliably sql daily generation of archived newspapers? I have an older script that uses v$ archived_log, but after seeing him recently generate some great numbers, I started doing some research and discovered that v$ archived_log can have several lines of a given log file. After reading the reference manual, I suspect that it is probably not new to many of you. After reviewing data and tweaking the script, I'm still not comfortable, I have something that I can count. I searched the data dictionary for a view of the replacement dictionary, but can't find anything that seemed better than v$ archived_log. appreciate your thoughts, thank you.

Hello

Why not just use the distinct values of the sequence and size? Ignore targets if they do not count.

HTH

Joerg

Tags: Database

Similar Questions

  • find the interval of time between the generation of logs archives of v$ log_history

    Hi all:

    I want to find the interval of generation of newspaper archives of v$ log_history,.

    SEQUENCE # FIRST_TIME
    11349 10/17/2009 12:08:58 AM
    11350 10/17/2009 12:13:10 AM
    11351 10/17/2009 12:15:46 AM
    11352 10/17/2009 12:18:32 AM
    11353 10/17/2009 12:21:32 AM
    11354 10/17/2009 12:23:06 AM
    11355 10/17/2009 12:24:59 AM
    11356 10/17/2009 12:26:10 AM
    11357 10/17/2009 12:27:18 AM
    11358 10/17/2009 12:34:34 AM
    11359 10/17/2009 12:37:43 AM
    11360 10/17/2009 12:48:36 AM
    11361 10/17/2009 12:52:10 AM

    Add a column to display the time difference (in minutes) between 11350 and 11349. It is actually 5 minutes, even between 11351 and 11350 nearly 2 minutes.

    Kind regards

    Hassan
    select sequence#,
           to_char(first_time, 'DD/MM/YYYY HH:MI:SS AM'),
           (first_time - lag(first_time) over (order by first_time)) * (24*60) as mins
    from v$log_history
    
  • destination of the newspaper Archive of current location to new location

    Hello

    I want to change my destination of the newspaper archive of current location to new location. Can you please give me the steps to change the destination of the journal archive

    No need to bounce the database.

    SQL > alter system switch logfile;

    and check the path to the new log archiving in this specific directory.

    Concerning
    Asif Kabir

  • What is the SQL to determine what are the table objects in the KEEP buffer pool?

    What is the SQL to determine what are the table objects in the KEEP buffer pool?

    Select owner, table_name

    from dba_tables

    where USER_TABLES = "KEEP."

    /

    David Fitzjarrell

  • Determine the last archive applied logic pending

    Hello

    I am trying to determine the last log received and applied on my logical standby

    SQL > select thread #, max(sequence#) ' last day before Seq received. "

    v $ archived_log val, v$ database vdb

    where val.resetlogs_change # = vdb.resetlogs_change #.

    Group thread # order by 1;

    THREAD # Seq ensures last receipt

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

    1                       14

    SQL > select thread #, max(sequence#) ' last day before Seq applied.

    v $ archived_log val, v$ database vdb

    where val.resetlogs_change # = vdb.resetlogs_change #.

    and applied = 'YES '.

    Group thread # order by 1;

    Returns nothing

    These statements work well in a physical availability.

    I know apply Sql is enabled on my logical standby - the configuration of my broker is enabled and the logical standby database, is to show the State of destination as we apply without Transport or Lag apply on any of the databases

    Q. How can I determine the last seq. applied to my logical standby?

    Thank you

    Jim

    Hello;

    I got this from my notes:

    SELECT

    L.SEQUENCE #.

    L.FIRST_TIME,

    (CASE WHEN L.NEXT_CHANGE #)< p.read_scn="" then="" 'yes'when="" l.first_change#="">< p.applied_scn="" then="" 'current'="" else="" 'no'="" end)="">

    Of

    DBA_LOGSTDBY_LOG L, DBA_LOGSTDBY_PROGRESS P

    SEQUENCE ORDER #;

    Best regards

    mseberg

  • RMAN-20242: specification does not match any newspaper archive in the catalogue

    Dear Experts,
    My rman script is as follows:
    4 > run
    5 > {}
    6 > allocate channel dev1 "Z:\Rbackup\DMP\db_t%t_s%s_p%p" type disc format
    7 > affect the format of disc type channel dev2 'Z:\Rbackup\DMP\db_t%t_s%s_p%p ';
    8 > backup database FILESPERSET 20;
    9 > archivelog backup until time ' sysdate-1' remove all entries;
    10 > release channel dev1;
    11 > output channel dev2.
    {12 >}

    The above script is executed every day at 14:00.
    Today accidentally I ran this script twice. The second round, wiped out the created first dmp. Indeed, I've lost the newspaper archive of sysdate-2 to sysdate-1. After that, I did a full backup.
    Now, if I have a full back, I lost 1 days newspaper Archives.
    Please tell me what are the consequences of this?

    Concerning
    Renjith Malet

    Renjith Madhavan wrote:

    if already backed up and those archives not exist in OS.... there is no worries on business requirements..because it is already in RMAN repositry
    

    What happens if I want to perform a recovery until a specified... time? Can't be a requirement of the company?

    Published by: Renjith Malet 5 December 2010 21:52

    If you want to perform incomplete recovery until the specified time (time base), then in this case, you must be have full backup taken before this time and backup all archivelogs this time full until your desired time.

  • A PL/SQL to add the archived redo log for logminer files - please help debug

    Hello

    I have a PL/SQL to add recovery logs a day archived files to logminer utility in order to catch all LMD, which happened for a paticular at a particular time scheme

    as below,

    -logmnr.sql

    Set serveroutput on

    declare

    v_redo_dictionary_file VARCHAR2 (100);
    v_archived_log_file VARCHAR2 (100);

    -catch all them archived redo logs today, put in a cursor

    CURSOR logfile_cur IS
    SELECT name from v$ archived_log WHERE the to_char (COMPLETION_TIME, 'dd_MM_yyyy') > '18_01_2010' and not in sequence # (select sequence # v$ archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES');


    Start

    -Create the DICTIONARY file on the files of the SOURCE database redo

    sys. DBMS_LOGMNR_D.build (OPTIONS = > sys.) DBMS_LOGMNR_D.store_in_redo_logs);


    Select name from v_redo_dictionary_file from v$ archived_log where DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES', and sequence # = (select MAX(sequence#) from v$ archived_log WHERE DICTIONARY_BEGIN = 'YES' AND dictionary_end = 'YES');

    -Add newspapers of dictionary files
    sys.dbms_logmnr.add_logfile (nom_fichier_journal = > v_redo_dictionary_file,)
    Options = > sys.dbms_logmnr.new);

    -Add the log files

    Open logfile_cur;

    LOOP

    SEEK logfile_cur INTO v_archived_log_file;
    EXIT WHEN logfile_cur % NOTFOUND;
    sys.dbms_logmnr.add_logfile (nom_fichier_journal = > v_archived_log_file);


    END LOOP;

    CLOSE Logfile_cur;

    -Start LogMiner, also enable the ddl

    sys.dbms_logmnr.START_LOGMNR (options = > dbms_logmnr.dict_from_redo_logs + dbms_logmnr.ddl_dict_tracking);

    EXCEPTION
    WHILE OTHERS
    THEN
    DBMS_OUTPUT. PUT_LINE (SQLERRM);

    END;
    /


    ###############
    SQL > @logmnr.sql
    ORA-01291: missing logfile

    PL/SQL procedure successfully completed.

    What I did wrong?

    Thank you very much
    Roy

    [Double wire | http://forums.oracle.com/forums/message.jspa?messageID=4035521#4035521]

  • specification does not match any newspaper archive in the recovery catalog

    RMAN > delete archivelog until time = ' sysdate-15';

    output channel: ORA_DISK_1
    output channel: ORA_DISK_2
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid = 151 devtype = DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid = 143 devtype = DISK
    specification does not match any newspaper archive in the recovery catalog


    Database 10.2.0.3.0 on win2008 (VMWARE)
    Thank you

    Honey says:
    RMAN > delete archivelog until time = ' sysdate-15';

    output channel: ORA_DISK_1
    output channel: ORA_DISK_2
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid = 151 devtype = DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid = 143 devtype = DISK
    specification does not match any newspaper archive in the recovery catalog

    Database 10.2.0.3.0 on win2008 (VMWARE)
    Thank you

    There is no archived redo log file corressponding your query. There is no archived for 15 days ago redo log file

  • The generation dynamic SQL when records using custom

    Hi all

    We have a few custom folders (we did not create the views) where we joined the table of facts with several dimensions of code so that users don't need to go through several folders. Currently every time a user selects a field in the record, it will automatically joins all the dims in accordance with the definition of record. Is it possible, when the user select only the fact of the table fields in the folder then the sql access only the table of facts (as in dynamic sql) leaving aside the joints.

    I'm not positive all able to do so. But even post the question to check if there is a solution found by any one.

    Here's the hypothetical scenario:

    SQL for my custom folder:

    Select
    EMP.emp_id,
    EMP.emp_name,
    job_id EMP.,.
    jobs. job_desc,
    EMP.location_id,
    Location.location_desc,
    EMP. Salary
    of the emp, jobs, location
    where emp.job_id = jobs.job_id
    and emp.location_id = location.location_id;

    In the example above, when the user select only the emp_id and emp_name, discoverer only accesses the emp table, leaving aside joins jobs and location tables?

    Appreciate your answers.

    Hello

    There are 3 approaches you can take, which is best for you depends on your database and the version of discoverer and how much change you want to make:

    1. optimization of data - if you use database 11 g and the query sent to the database does not refer to an attachment internal table in the first select statement in the query, for example, the query

    Select
    EMP.emp_id,
    EMP.emp_name,
    job_id EMP.,.
    jobs. job_desc,
    EMP.location_id,
    EMP. Salary
    of the emp, jobs, location
    where emp.job_id = jobs.job_id
    and emp.location_id = location.location_id;

    does not reference the table of localization, so as long as location_id is the primary key for location and emp.location_id has a validated and enabled foreign key constraint then the database query plan will not otherwise the table of localization.

    2 synthesis discoverer files - you can manually set the summary files in admin discoverer that contain queries custom with less joins of tables. Thus, for example, you could put

    Select
    EMP.emp_id,
    EMP.emp_name,
    job_id EMP.,.
    jobs. job_desc,
    EMP.location_id,
    EMP. Salary
    of the emp, jobs
    where emp.job_id = jobs.job_id;

    in a personalized summary folder and discoverer would redirect the request to the summary file if the location has not been used. You can also do a similar thing to the database level using the views and materialized views.

    3. complex records discoverer - you can change your custom folder in a folder complex bringing together two or more straightforward cases. If the columns mapped to a single file are not reference, then all joins and discoverer preferences are set correctly the generated query does not reference the table in the simple folder.

    Rod West

  • RMAN not removed the old newspaper archive location disc ASM.

    Dear Oracle gurus

    Our platform
    OS: SUN SOLARIS10 64-bit
    DB: Oracle10g r2 10.2.0.4 64bits
    Architecture: 2 - no Oracle10g RAC with ASM configured for the data file and archivelog

    We have many available on my disk archiving log but when we perform the log backup archive using the following command

    RUN {}
    overlap archivelog all;
    backup as compressed backupset ' / location/%d_DB_%u_%s_%p.rman' all entered archivelog delete;
    }


    It has only removed the 1 month of archives newspapers only.

    that needs to removed the old archive logs using the rman. ?

    Concerning
    Hitesh Gondalia

    Published by: hitgon on November 17, 2011 21:42

    Try this one:

    CROSSCHECK ARCHIVELOG ALL;
    RUN {
      BACKUP AS COMPRESSED BACKUPSET
         FORMAT '/location/%d_db_%u_%s_%p.rman'
         ARCHIVELOG ALL DELETE INPUT;
    }
    DELETE NOPROMPT EXPIRED ARCHIVELOG ALL:
    DELETE NOPROMPT OBSOLETE:
    

    : p

  • How to determine the number of highlight ' to write ' for DAQmx generate analog output?

    On the configuration of the stage for DAQmx generate analog output, there is a field "value to write.  I can't find any explanation for what it is, how it determines the value to enter, nor what he writes.  I am trying to go through the tutorials and it cling.

    Someone would give an explanation?

    Hello

    To write value specifies the value to write in the channels, lines or ports selected in string parameters. In other words, this value will be the value of your DC output (for example if you enter 5, your output will be 5V). To get information on different fields in SignalExpress, access help"context-sensitive help. A pane will appear in your work environment that displays the coordinates of the field when you place your pointer over them.

    For new users of SignalExpress:

    Generation of DC signals with NI DAQmx devices: step in the DAQmx build, select 1 sample (on request) in the generation Mode dropdown. You can select a programmatic input to generate, or you can remove the check mark from the check box use programmatic input and specify a value for generating in the field of value to write . NOR-DAQmx help also provides additional information about the data generation.

    Best regards

    M Ali

    Technical sales engineer

    National Instruments

  • Determine the name of class LVOOP? d ' a class of child...

    Hello

    I have a number of modules (classes) that inherit from a base class called "Module".  I have all these in an array of type 'Module', I would like to save some information of each of these modules, but I need to make the distinction between each module.

    Is there a way to determine the class name of the data cable?

    Can I use the flattened string Variant, but I was wondering if it had built in property for this node/function?

    Thank you
    Jonathan

    Examples of joint:

    Malkieri,

    There is no generation in function that does exactly what you are looking for, but you can use the 'Get LV class Path' VI to return the *.lvclass of an object path given.  Using this way, you can either parse the name, or you can use Server VI to get the name of the class, as shown in the picture as an attachment.

    Chris M

  • Microsoft C++ runtime error. When I am downloading World Of Warcraft. Resources Windows Protection found corrupt files but was not able to fix some. Details are provided in the CBS.log newspaper. (I ran sfc/scannow in the command window twice)

    I am trying to download the demo version of 'WoW' World of Warcraft. I get to the part where he is configing its parameters to my computer and get a runtime error that something caused my program is complete. I read the other posts which had similar problems so I ran sfc/scannow in the command prompt window. It reads...  Resources Windows Protection found corrupt files but was not able to fix some. Details are provided in the CBS.log newspaper. I've shortened, but it is easy to understand that there is a question that the scan will not fix. I tried to access the CBS.log newspaper and opened a text doc, that was a bunch of YYYYYYYYY. I'm a little lost here and my 10 free WoW trial days is weathering away without me =)

    Please help, thanks

    Borrow a Microsoft Vista DVD(not Dell, HP, etc Recovery DVDs) to do a repair installation

    If you see a startup Neosmart repair disk download here, this is NOT what you want.

    You want a good Vista DVD that contains the operating system files.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you need a recovery media for your laptop back to factory settings, read this info:

    How to get Vista recovery Media and/or to use the Vista recovery Partition on your computer.

    There is no Vista free download legal available.

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In addition, ask them if you have a recovery Partition on your computer/laptop to restore it to factory settings.

    See if a manual provided with the computer or go to the manufacturer's website, email or you can call for information on how to make a recovery.

    Normally, you have to press F10 or F11 at startup to start the recovery process...

    Another way I've seen on some models is press F8 and go to a list of startup options, and launch a recovery of standards of plant with it, by selecting the repair option.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Ask them if you can also make recovery disk/s for the recovery Partition in case of a system Crash or hard drive failure.

    They will tell you how to do this.

    Every computer manufacturer has their own way of making recovery disk/s.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    Save all data, because it will be lost during a clean installation.

    See you soon. Mick Murphy - Microsoft partner

  • Determine the compensation period based on the specific date

    I'm developing an application in the APEX and need determine the compensation based on an entered date period.  Our pay period is 14 days and pay period 1 begins after the last pay period of the previous year, which started in any day in December (so, for this year, the pay period 1 began January 11, because the last pay period in 2014 began Dec. 28 and went to January 10).  Some years we have 26 pay periods and in a few years, we have 27.  Does anyone have ideas on how to extract the number of pay for something like this using PL/SQL period?

    If you store the payperiods inside a table with i.e. four columns startdate, enddate, year and periodnumber. You can easily query on this table.

    Kind regards

    Mark

  • determine the storage space for the upgrade of the APEX

    I put on my 11.2.0.3.12 level APEX APEX to APEX 4.2.4.00.08 version 3.2.1.00.12 version database.  I understand that I must perform the full upgrade, I am moving from version 3.2.x to 4.2.x.

    According to the APEX 4.2 Installation Guide for the full development environment, I have to spend in the following arguments:

    @apexins.sql tablespace_apex tablespace_files tablespace_temp images

    Where:

    • tablespace_apexis the name of the storage space for the user of the Oracle Application Express application.
    • tablespace_filesis the name of the storage space for the user to Oracle Application Express files.
    • tablespace_tempis the name of the temporary tablespace and tablespace group.
    • imagesis the virtual directory for the images of Oracle Application Express. To support future upgrades Oracle Application Express, set the directory of the virtual image that /i/ .


    How can I determine which user is the " " " User of the oracle Application Express application" and which the user is the user Oracle Application Express 'files' (if I can then watch their default storage spaces)?



    Hi Mimi Miami,

    Mimi Miami wrote:

    I put on my 11.2.0.3.12 level APEX APEX to APEX 4.2.4.00.08 version 3.2.1.00.12 version database.  I understand that I must perform the full upgrade, I am moving from version 3.2.x to 4.2.x.

    According to the APEX 4.2 Installation Guide for the full development environment, I have to spend in the following arguments:

    @apexins.sql tablespace_apex tablespace_files tablespace_temp images

    Where:

    • tablespace_apexis the name of the storage space for the user of the Oracle Application Express application.
    • tablespace_filesis the name of the storage space for the user to Oracle Application Express files.
    • tablespace_tempis the name of the temporary tablespace and tablespace group.
    • imagesis the virtual directory for the images of Oracle Application Express. To support future upgrades Oracle Application Express, set the directory of the virtual image that /i/ .

    How can I determine which user is the user Oracle Application Express 'application' and that the user is the user Oracle Application Express 'files' (so I can then look at their default storage spaces)?

    APEX 3.2.x installation that follows is users:

    • Oracle Application Express Application user: APEX_030200
    • Oracle Application Express user files: FLOW_FILES

    So to determine the tablespace_apex and the tablespace_files you must connect with the user sys with sysdba privilege and run the following query:

    SELECT USERNAME
         , DEFAULT_TABLESPACE
      FROM DBA_USERS
     WHERE USERNAME IN ('FLOWS_FILES','APEX_030200')
    

    Then use the APEX_030200 user as tablespace_apex tablespace and a tablespace of the FLOW_FILES user as tablespace_files.

    I hope this helps!

    Kind regards

    Kiran

Maybe you are looking for