problem query v$ archived_log

Hi gurus.

I am using the view v$ archived_log to check the last applied (it must be applied) archivelog to our expectation.

It works with the following text:

SELECT SEQUENCE #, USED FROM V$ ARCHIVED_LOG IN CASE OF APPLICATION = 'YES ';

The above gives me a list of the papers applied:
SEQUENCE # APP
YES 1234
1235 YES

etc etc.

However, I would like to ask the same point of view and extract the sequence number of the last log applied.
I would like to just the last number so that I can add to a text file and compare with the primary database.

Can someone please help?

I am trying this:
SELECT MAX (SEQUENCE #), APPLIED FROM V$ ARCHIVED_LOG IN CASE OF APPLICATION = 'YES ';

However, this returns an error:
ORA-00937: not a single group group function

Thank you and best regards,

DA

Linux Red Hat 4
10.2.0.4

SELECT MAX (SEQUENCE #), APPLIED FROM V$ ARCHIVED_LOG IN CASE OF APPLICATION = 'YES' GROUP BY APPLIED.

Tags: Database

Similar Questions

  • Problem query invocation 10.1

    I have this code that worked very well in QML on 10.0 but now 10.1 it causes an error this query is a read-only property.

    {Of invocation

    ID: invokeReview

    query: {InvokeQuery}

    MIME type: ' application/x-bb-appworld.

    URI: "appworld://content/9081".

    }

    },

    No idea why this is now a problem and how to set the query in QML.

    I never quite understood how anyone got this works before, because I always got the error of the ReadOnly property.

    Essentially the InvokeQuery object exists already and is assigned to the property of the query, if you want to simply modify its content.

    Either question {mimeType: "...} "} (without the colon or InvokeQuery), or simply assign to individual fields directly, as in query.mimeType: «...» "and query.uri: «...» ».

  • 10.1.2 form problem querying the Masters details with underscore

    I have a problem a form, we were by the user performs a query a record and the detail block through a wrong record brings. This happens on all the records that have an underscore character "_".

    The shape is huge, so I'll try to shoot everything in testing, but thought I'd ask to see if its obvious thing.

    Basically, there are 3 tables all there own blocks connected by relationships built into the forms.

    the user asks the top one and the other 2 are at the request of the car.

    the problem is only one referenced primary key. It includes underscore.

    That is, the user brings to the highest level "1000_0".
    This brings another primary key which is '1000-0' through on all the records in detail, but the upper level shows the good '1000_0 '.

    Is anyone aware of nothing, maybe, iwill endeavor to put in place testing.

    I don't think that you can keep in shape. Because each table has its own condition of join and the columns. So, you have to keep on each block of retail. Otherwise on pre-requete level form it will still validate this detail blocks. So its best to keep on every detail prior query block.
    And ione nothing more that he forgot to mention in my previous post. You can use code like this...

    IF :blockname.itemname is NULL OR instr(:blockname.itemname, '%') != 0 THEN
      NULL;
    ELSE
      -- Your join condition with = sign.
    END IF;
    

    -Clément

  • Weird problem - query http 408 expired a - 2 sec

    Hi all

    I have developed a system somewhat between bb and ASP. Everything has been working well for 2 weeks, but now all of a sudden I'm getting an http request 408 has expired error for any other request to the server. The weird part is it fails after a few seconds - I get the error message and press the new button (make another request) and everything is fine.

    The connection is nothing special, I open the connection, adding the values of the position and it was working fine all the time until yesterday.

    It might be a problem of asp, I know, but nobody has anything to offfer please help me try to solve this problem?

    If this is not the case - I have a workaround provided (I don't like) but I have to do something. I plan on checking the response code and the thread to call again if the code is 408. Is it a bad thing?

    Thank you Alex

    Looks like a problem of asp for me.

  • Problem query?

    I work with flash remoting and I'm having a little trouble. If I pass a param to my document coldfusion as a number, and that is a number defined in the database, the query works very well. I can't work properly if I check to no numbers of corresponding text. Can someone help me with what I'm doing wrong? Here's my CF document code:

    OK, thanks for all your help. Everything works fine now, I'll go to mysql, before I go too far... Thanks again!

  • Problem query building...

    Here's my data...

    Oracle: 10 / 2G
    WITH xTable AS (
                    SELECT 2010 AS YEAR, 1 AS SEQ, 'JOHN'  AS NAME, 1110 AS ID fROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 2 AS SEQ, 'JOHN'  AS NAME, 1110 AS ID FROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 1 AS SEQ, 'BOB'   AS NAME, 1112 AS ID FROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 1 AS SEQ, 'TERRY' AS NAME, 1114 AS ID FROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 1  AS SEQ, 'CARL'  AS NAME, 1115 AS ID  FROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 2  AS SEQ, 'CARL'   AS NAME, 1115 AS ID FROM DUAL UNION ALL
                    SELECT 2010 AS YEAR, 3  AS SEQ, 'CARL' AS NAME, 1115 AS ID FROM DUAL UNION ALL
                    SELECT 2009 AS YEAR, 1 AS SEQ, 'JOHN'  AS NAME, 1110 AS ID FROM DUAL UNION ALL
                    SELECT 2009 AS YEAR, 1 AS SEQ, 'BOB'   AS NAME, 1112 AS ID FROM DUAL UNION ALL
                    SELECT 2009 AS YEAR, 2 AS SEQ, 'BOB' AS NAME, 1112 AS ID FROM DUAL 
                   )
     SELECT YEAR,SEQ,NAME,ID, count(seq) over (partition by name, year) as seq_cnt
     FROM   xTable
     ORDER BY YEAR, NAME
    Output current:
            YEAR     SEQ     NAME     ID     SEQ_CNT
    1     2009     1     BOB     1112     2
    2     2009     2     BOB     1112     2
    3     2009     1     JOHN     1110     1
    4     2010     1     BOB     1112     1
    5     2010     1     CARL     1115     3
    6     2010     3     CARL     1115     3
    7     2010     2     CARL     1115     3
    8     2010     1     JOHN     1110     2
    9     2010     2     JOHN     1110     2
    10     2010     1     TERRY     1114     1
    What I'm trying to do is to remove only the sequence (seq) max to know where the id there is more than one record for a given year. So, I want the output to be as follows...

    Desired output:
            YEAR     SEQ     NAME     ID     
         2009     2     BOB     1112     
         2009     1     JOHN     1110     
         2010     1     BOB     1112     
         2010     3     CARL     1115     
         2010     2     JOHN     1110     
         2010     1     TERRY     1114     
    I'm not entirely sure how to in this regard, so any help would be appreciated.

    Hello

    A regular GROUP BY going to:

    SELECT year,
           max(seq) seq,
           name,
           id
    FROM xTable
    GROUP BY year, name, id
    ORDER BY year, name, seq
    ;
    
  • update in tcDataSet query

    Hi all

    I wrote a code for an adapter where I want to update a particular column of a table.
    for that I use:

    tcDataSet tcdataset = new tcDataSet();
    String query = "update UD_EDIR_USR set UD_EDIR_USR_USERID = '" + newCn + "' where UD_EDIR_USR_USERID ='" + Userid + "'";
    tcdataset.setQuery (dataProvider, query); dataProvider is passed to the base of the adapter reference object
    tcdataset.executeQuery ();

    now when I perform the task it is to launch me following error on jboss console

    tcDataBase/readpartialStatement a few problems: query doesnot contain "Select".
    java.lang.IllegalArguementException: query doesnot contain "Select".

    So how can I update a line through the adpater code?

    Thank you.

    If you make the statement within the IOM in an adapter, use the reference database as your variable passed in your adapter. tcDataProvider is the data type.

    If you run in a scheduled task, you should be able to do getDataBase () .writeStatement (arg0) with your return.

    -Kevin

  • Data Guard - journal not attributed to primary school

    Data Guard

    ==========

    When I run

    Select count (*) from v$ archived_log in case of application = 'NO' on the primary, I had more than 3000 results.

    the day before I got only one (but that another question I am trying to solve with the help of the Oracle).

    is that normal or what? its something about a new database that you install for the study, but its another thing on a database that worked for awhile and I recently presented to it.

    one thing is sure that the archive log is shipped on the eve and applied in real time. and also switch are fine (SUCCESS). the mark in the data manager Guard gives also the success, but wan't the right answer is '0' or no line selected, right?

    Thank you.

    Hello

    The fact that your query returns more than 3000 is not necessarily say that there is no problem because when you query v$ archived_log it will always report "N" for the destinations of local newspaper archive, you should check for APPLIED only = "" and standby_dest = 'YES '.

    If your update query should be:

    Select count (*) from v$ archived_log in case of application = 'NO' and standby_dest = 'YES '.

  • History of archivelog in table v$ perhaps complete?

    Hi all

    9i
    OEL 5.6

    Our database of the value in archivelog mode, but we continue to remove the archive logs because we do cold backup all day at 12:00.
    Since then, we have only the hours of 09:00 - 18:00 and apps window treatment.
    All users go home after 18:00. Then we closed the database and perform all the directory/u01/oradata tar where all data files.
    Then we delete all archive logs.

    My question is... Since we do manual removal of the archivelogs (and not rman delete obsolete logs) means in the dictionary of data views all the logs are still saved?
    I'm afraid that the dictionary of data for archiving logs will get full since generate us a lot of newspapers every day.

    Comments or suggestions please...


    Thank you very much

    Yxz

    You can query V$ CONTROLFILE_RECORD_SECTION to see the number of entries on the ArchiveLogs that are present in the controlfile. Oracle will wrap the entries to avoid hitting problems «archivelog full story»

    Retention of the inputs is determined by CONTROLFILE_RECORD_KEEP_TIME. Assuming that the value is 7 (days), {i.e. the default value}, the number of archivelog records maintained in the controlfile will be the maximum number of the archivelogs in a 7 day period. If in the past you had 1000 archivelogs in 7 days, the controlfile pushed to accommodate 1000 entries - even though in current days you build only 250 archivelogs in 7 days.

    You can also query V$ ARCHIVED_LOG to see the archivelog that are actually present in the controlfile.

    Hemant K Collette

  • Activate the backup database

    Hi gurus,

    Had a small request for you guys, I have a production and a configuration of standby on Windows 2003 (10.2.0.4) database, my day has been recovered up to archive log 883, because of some problems with my production, I activated my database pending. Because the standby mode is enabled, the database gets open resetlogs. My archives to start generating sequences 1,2,3...

    But now when I query v$ archived_log to verify that the sequence max # generated it still shows as 883... as opposed to 6 which is my creation of journal number of archive.

    According to my understanding, when activate us a backup database, the wait flag of database in the control file is reset so that the control file behaves like that of the production database (I know that I am using profane taps here)... so, what makes the view v$ archived_log show the old value of sequence # before activation rather than the new value after activation?

    Help or direction in this on your side you would know...

    Thank you
    Aurélie

    Interesting...

    I think why you faced with this is, the v$ archived_log retrieves the information from the control file and the control file keeps the information up to it's minimum (default 7 days) retention period. Now even if you did resetlog on the database, the old are always stored in the controlfile according to its retention period, controlled by the parameter "control_file_record_keep_time". Please refer to 'archive log list' for the correct sequence number.

    C:\Documents and Settings\sakumar>set oracle_sid=santu
    
    C:\Documents and Settings\sakumar>sqlplus /nolog
    
    SQL*Plus: Release 11.1.0.6.0 - Production on Sat Feb 6 07:17:16 2010
    
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    
    SQL> conn /as sysdba
    Connected.
    SQL> shu immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    
    Total System Global Area  535662592 bytes
    Fixed Size                  1334380 bytes
    Variable Size             176161684 bytes
    Database Buffers          352321536 bytes
    Redo Buffers                5844992 bytes
    Database mounted.
    
    SQL> recover database until cancel;
    Media recovery complete.
    SQL> alter database open resetlogs;
    
    Database altered.
    
    SQL> select max(sequence#) from v$archived_log;
    
    MAX(SEQUENCE#)
    --------------
                16
    
    SQL> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     1
    Next log sequence to archive   1
    Current log sequence           1
    SQL>
    

    I hope that's what you wanted to ask. Now once again, it would be interesting to see what the result of the query on v$ archived_log after the retention period.

    Kind regards
    S.K.

  • Need of CD drive bootable compatible 16 bit for Portege R100

    Hi all.

    I have a protected R100 I need to run the recovery cd on.
    So far, I discovered that I need a CD bootable (usb not supported) 16-bit pcm.

    My problem/query is that I can't find anywhere to establish:

    (A) a device approved, favorite or compatible

    (B) the best place to do it.

    Would be very grateful for any info...

    Thanks in advance.

    Chris

    Hey dude

    I found something for you:
    http://support.toshiba-tro.de/KB0/TSB5100S70004R01.htm

    It s a TSB Toshiba Portege R100 on sustained recovery disks.

    I hope I could help ;)

  • Cannot install Windows 10, no compatible graphics

    Windows10 compatibility says my screen is not compatible and will not be updated to Windows 10 of my Windows 7 Pro 32-bit. The monitor is supported, but not the graphics card, a Pro PCI Express RadeonX1300. By AMD, the former driver for this card is only compatible with Windows8 and 10, but not 7. There is a long post on this community on how to make your old card work after installing Windows 10, but my problem is that it installs any. I thought that Windows10 was supposed to select a generic driver that I would then have to tweek, but does not. Can anyone help?

    Original title: Windows 10 and older graphics cards

    I don't know where, on the AMD website, you found a statement that he was a driver for the Radeon X 1300, that would work for Windows 8 and 10, but not 7.  When I looked, the Windows operating system only mentioned for this card were XP and Vista.  On the HP site, there is a version a little more early of Vista driver which is supposed to work for 7.

    I suspect that the X 1300 is just too old for Windows 10, despite the claims of various sketchy web sites they have 10 Windows drivers for this card.

    I suggest you get a new video card.  It may be an old (and so expensive), but not quite as old as the X 1300.  See, for example, the last two posts on this thread--> http://www.tenforums.com/drivers-hardware/12162-x1300-windows-10-problem-query.html

  • Gap of Eve

    I have physical standby and primary database in 11.2.0.2 on linux. This is used for purposes of learning and today I could see that the waking state is saying as "pending gap" but when I query v$ archived_log, I see that the watch is synchronized. I'm a little confused about this.

    Primary:

    Sys@Prim> select thread #, max(sequence#) in Group v$ archived_log by thread #;

    THREAD # MAX(SEQUENCE#)
    ---------- --------------
    1 117

    Standby time:

    Sys@stndby > select thread #, max(sequence#) in v$ archived_log in case of application = 'YES' group by thread #;

    THREAD # MAX(SEQUENCE#)
    ---------- --------------
    1 117

    Standby:

    Sys@stndby > select process, status, sequence # in v$ managed_standby;

    STATUS OF PROCESS SEQUENCE #.
    --------- ------------ ----------
    CONNECTED ARCH 0
    CONNECTED ARCH 0
    CONNECTED ARCH 0
    CONNECTED ARCH 0
    MRP0 WAIT_FOR_GAP 50
    RFS IDLE 0
    RFS IDLE 0
    RFS IDLE 0
    RFS IDLE 113

    Is there a gap?

    OK, as said, 117 sequence seems to be of the previous incarnation.

    Your database is currently looking for 50 sequence and a sequence gap 50 to 57.

    You have backups of these archives? If so, then restore it from the backup on the primary and the standby will search automatically.

    If this is not the case, use the roller before incremental YVERT backup method to get your watch synchronized.

    You can return this Roll Forward Physical Standby Database using RMAN incremental backup | Shivananda Rao

    HTH

    -Jonathan Rolland

  • Validate restore them database

    Hello

    I'm just checking if the database backup can be resatored at a time give in time. I did it-

    restore database validate until time ' to_date (3 March 10 20:30 "," MM/DD/RR HH24 ') ";

    Its output is-

    From restoration to 3 March 10
    allocated channel: ORA_SBT_TAPE_1
    channel ORA_SBT_TAPE_1: SID = 133 device type = SBT_TAPE
    channel ORA_SBT_TAPE_1: for Oracle Data Protection: version 5.5.1.0
    allocated channel: ORA_SBT_TAPE_2
    channel ORA_SBT_TAPE_2: SID = 120 device type = SBT_TAPE
    channel ORA_SBT_TAPE_2: for Oracle Data Protection: version 5.5.1.0
    allocated channel: ORA_SBT_TAPE_3
    channel ORA_SBT_TAPE_3: SID = 127 device type = SBT_TAPE
    channel ORA_SBT_TAPE_3: for Oracle Data Protection: version 5.5.1.0
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID = 121 type device = DISK

    DataFile 13 not treated because the file is offline
    channel ORA_SBT_TAPE_1: from the validation of the data file backup set
    channel ORA_SBT_TAPE_2: from the validation of the data file backup set
    channel ORA_SBT_TAPE_1: reading of the backup piece TESTDB_5nl7lsi2
    channel ORA_SBT_TAPE_2: reading of the backup piece TESTDB_5ml7lsi2
    channel ORA_SBT_TAPE_1: piece handle = TESTDB_5nl7lsi2 tag = TESTDB_2010_03_03_20H_21M
    channel ORA_SBT_TAPE_1: restored the backup part 1
    channel ORA_SBT_TAPE_1: validation complete, duration: 00:07:25
    channel ORA_SBT_TAPE_2: piece handle = TESTDB_5ml7lsi2 tag = TESTDB_2010_03_03_20H_21M
    channel ORA_SBT_TAPE_2: restored the backup part 1
    channel ORA_SBT_TAPE_2: validation complete, duration: 00:07:45
    Restoration finished in March 3, 10

    Question: Is this restore database to validate "Up to" command takes into account Archivelogs also? Assume that the backup piece TESTDB_5nl7lsi2 and TESTDB_5ml7lsi2 were taken on 2 March, and from there we had 100 Archivelogs until March 3, 10 at 20:30." Will check RMAN these 100 logs archiving also verifying the quality of this database until March 3, 10 at 20:30 "?"

    Thank you!

    Your automated job allows TIME until or the query V$ ARCHIVED_LOG to identify the #s SEQUENCE to specify SEQUENCE for up to WHAT SEQUENCE - that is to say he must "create" command RESTORE ARCHIVELOG VALIDATE with appropriate FROM... Until the values for each series.

    Hemant K Collette

  • where is the location of the files in the tablespace and control

    Hi all

    where is the location of the files of the tablespace and control? TKS

    For data files, ask DBA_DATA_FILES V$ DATAFILE
    For TempFiles, ask DBA_TEMP_FILES or V$ TEMPFILE
    For online redo logs, query v$ LOGFILE
    For archived Redo Logs, query v$ ARCHIVED_LOG
    for Controlfiles, query v$ CONTROLFILE

    Hemant K Collette
    http://hemantoracledba.blogspot.com

Maybe you are looking for

  • How can I add my name to my outgoing emails which, for the time being, only shows my name?

    When my emails are received by the person I sent the e-mail to-only my name shows. I would like to know how to change or other so my first and the spectacle of the family name.

  • chapters, kind of music videos on apple tv 4

    Enjoying my new Apple TV 4th Gen well find some quirks in tvOS v9.1 Here are two, like reflections on possible solutions: 1. I have a number of music videos and noticed that the default sort went from artist, title, which adds complexity to conclude

  • This Web page could not be saved.

    Lately, I noticed that I could record is no longer a webpage via Internet Explorer 7. I thought it had something to do with the release of the new version, IE 8. Finally, I installed IE 8, thinking that the problem could be solved, but whenever I try

  • Remove the Apple software update

    POSTED ON BEHALF OF A CLIENT: Try to remove an Apple software update, which is the only file left on the computer on Itunes, but get the following error: http://t.co/Aq5LDt2s Someone at - all experienced this problem?

  • Availability of support

    I upgraded from XP MCE to Vista 32 Ultimate with a retail DVD Microsoft puirchase.  The new operating system works fine, except when I'm looking for support, I am directed to the manufacturer of the computer.  I applied again the DVD product identifi