Command that give me the log sequence number of Specifc date

hi,
I need a command that gives me the LSN number of previous date. e.g if current date is 20-02-2013. & i want to get the LSN number that have date last month.28-01-2013.
thanks.
Regards,

No Replies

Similar Messages

  • Doubt about CURRENT LOG SEQUENCE NUMBER

    I just want to know that why the "current log sequence number" is added to the header of each data file ? why oracle needs to do that ? as it is also added to the control file and whenever it needs to know the current log sequence number , it can get it from control file , then why to add this in the header of data files ?

    For Recovery.
    When you are doing a Recovery of a database where the datafiles have been restored from backups but the controlfile has been recreated (thus, the controlfile has no information about log sequence numbers and checkpoint scns), the Recovery must read this information from the datafile headers.
    Say you have 5 datafiles and they have been backed up 6 months ago using ALTER TABLESPACE BEGIN BACKUP commands and, therefore, have different checkpoint SCNs. The checkpoint SCNs could be 1021, 1059, 1085, 1745, 2045.
    How would Oracle know which Log Sequence Numbers are needed ? It knows that a Recovery must start with SCN 1021. But if the information about Log Sequence Numbers is not available in the controlfile (either because it is as of today and the controlfile doesn't store information about 6 months of redo logs OR because the controlfile has been recreated), what is the Log Sequence Number corresponding to that SCN 1021 ?
    That information is available in the datafile header. You will NOT see it in V$DATAFILE or V$DATAFILE_HEADER. You will not see it in a level 1 dump of datafile headers.
    You will see an example here :
    http://web.singnet.com.sg/~hkchital/Incomplete_Recovery_with_BackupControlfile.doc
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Log sequence number

    who updates the log sequence number in control file and datafiles , I know chkpoint is responsible to update checkpoint number in datafile and control file number.

    it is LGWR.

  • In the previous version, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    in the previous version  of Number, the menu table in table options, there is an option that gives me the option: the Return key moves to next cell. I do not see this option in the new number. can you help me please?

    Hi silvano,
    If you use a regular pattern when entering values, press enter (return) after entering the last value in a row. That will take you to the first Body Cell of the next row.
    Start in Cell B2
    1 Tab 2 Tab 3 Enter
    4 Tab 5 Tab 6 Enter
    7 Tab 8 Tab 9 Enter
    Now you are ready to type into B5 .
    Another way that some people find easier is to enter one column at a time
    Start at B2
    1 enter
    4 enter
    7 enter
    etc.
    Now start with C2.
    Use whatever suits your work flow.
    Regards,
    Ian.

  • Need to query the database to get the last sequence number

    Hi all
    I am trying to get the last sequence number of the last row inserted into my Oracle database. Please could someone give me the SQL which would allow me to do this - using Oracle SQL Explorer I have confirmed that there is a sequence on the table which is called: XYZ_SEQ and the code for this is:
    CREATE SEQUENCE "MY_USER_NAME"."XYZ_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOCYCLE ;
    My Java application is inserting a row into my table and to insert a new row I need to have the last sequence inserted +1 so the new row can be added.
    Any help would be much appreciated.

    Hi,
    Welcome to the forum!
    If you are using a sequence just do (example):
    INSERT INTO TABLE_NAME
       (COL1,
        COL2)
    VALUES
       (SEQUENCE_NAME.NEXTVAL,
        OTHER_VALUE);to obtain (and use) the next number in the sequence when you are inserting.
    If you have a sequence to use for a specific table, you should use it when your insert new data (no matter your are doing that: java application, procedure, etc). Doing this you avoid some problems when you have the sequence 'out of date' about the associated data.
    Regards,
    Edited by: Walter Fernández on Sep 19, 2009 10:08 AM
    Edited by: Walter Fernández on Sep 19, 2009 10:10 AM

  • Redo log sequence number

    hi everyone,
    I am looking at our SB system, and try to do only redo log backup. however it comes back with error message: The current redo log sequence number is not greater than the sequence number of the last saved offline redo log file.
    So, we suspect that since last refresh, we may reset the sequence back from 1.  Any one know how to solve this problem?  Thanks in advance.
    Amy

    Hi,
    Is your probh solved?
    Can u pl tell if u executed a recovery of database earlier?
    Pl check if there was a case of reset logs.
    To do this run BRTOOLS-->Instance Mgt->Show Inst Status.
    This will show if there was a case of reset logs.
    If it is so try the following:
    Shut down sap and the database.
    Look for a folder named oraarch
    Oracle/sid/oraarch
    Copy all the archive files to another folder and delete all the arc files from the oraarch folder.
    The name of the arch files will be like <SID>ARCHARC123456.001
    After copying to another location and subsequently deleting them from oraarch folders start up oracle in mount mode.
    Then issue the following sql
    alter database open resetlogs;
    then start sap.
    NB:Dont forget to take a complete backup before and after diong this.
    Hope this will help.
    Most probably your database contains two icarnations of redo log files so this error is comming.
    regards

  • It shows the log sequence not found error while all the log seqences exist?

    Why the database shows the log sequence not found error while all the log seqences exist?
    SQL> select*from v$log_history;
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    1 657328345 1 1 519368 13-JUN-08 543434
    519368 13-JUN-08
    2 657370849 1 2 543434 13-JUN-08 567705
    519368 13-JUN-08
    3 657373012 1 3 567705 14-JUN-08 570408
    519368 13-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    4 657373039 1 4 570408 14-JUN-08 570464
    519368 13-JUN-08
    5 657374623 1 5 570464 14-JUN-08 573505
    519368 13-JUN-08
    6 657375015 1 6 573505 14-JUN-08 573856
    519368 13-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    7 657376537 1 1 570465 14-JUN-08 573543
    570465 14-JUN-08
    8 657377084 1 2 573543 14-JUN-08 575109
    570465 14-JUN-08
    9 657377094 1 3 575109 14-JUN-08 575114
    570465 14-JUN-08
    RECID STAMP THREAD# SEQUENCE# FIRST_CHANGE# FIRST_TIM NEXT_CHANGE#
    RESETLOGS_CHANGE# RESETLOGS
    10 657377103 1 4 575114 14-JUN-08 575121
    570465 14-JUN-08
    11 657377106 1 5 575121 14-JUN-08 575123
    570465 14-JUN-08
    11 rows selected.
    RMAN> flashback database to sequence=10 thread=1;
    Starting flashback at 14-JUN-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=155 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of flashback command at 06/14/2008 13:03:15
    RMAN-20206: log sequence not found in the repository

    Apart from the output being hardly readable (please refer to the FAQ in the right upper hand corner how to post output), I don't see any sequence 10.
    You seem to mistake the column recid for the sequence column.
    The sequences are listed in -not surprisingly- the sequence# column.
    Sybrand Bakker
    Senior Oracle DBA

  • Current log sequence number

    i have a small doubt :
    when there is log switch , the current log sequence number is stored in the control file . Is the same current log sequence number stored in the headers of the datafiles??????
    waiting for your answers eargerly.....
    kumaresan.M

    nops i don think so.
    there is no need for doing this, only controlfile needs to know about the current sequence number
    Regards

  • [svn:fx-trunk] 5295: -add property file that will have the TLF build number in it

    Revision: 5295
    Author: [email protected]
    Date: 2009-03-13 08:50:57 -0700 (Fri, 13 Mar 2009)
    Log Message:
    -add property file that will have the TLF build number in it
    Added Paths:
    flex/sdk/trunk/in/tlf/tlf.properties

    Thats good news.

  • Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format

    Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format. Siebel wants to send the data as xml to BI but not sure of the BI capabilities on giving WSDL embedded with XSD (input is a hierarchical)

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • I received a second iPad Air as a gift and sold on Ebay.  The person who bought it asked if is a Oem pad.  Not sure what that means.  The model part number is PF004LL/A

    I received a second iPad Air as a gift and sold on Ebay.  The person who bought it asked if is a Oem pad.  Not sure what that means.  The model part number is PF004LL/A.

    You can see the model number in Settings>General>About>Model. The model number has a two-letter code, a number and some more letters. The last part stands for the country/region. The first letter can be "F" (refurbished), "M" (normal retail), or "P" (personalized / engraved). For example MC605B is the model MC605 and B is for the region.
    What country does my device belong to?
    http://www.jbfaq.com/article.asp?id=63
     Cheers, Tom

  • APEX Sequence number when passing data from different instances

    Hello there,
    I have a question for you guys.
    I have an application sitting in my Production area, and the one in test needs to be up-to-date (the data). So I grab the excel file, truncate the table in my test area and load the table from prod into the one in TEST.
    The problem with this is that when I tried to insert a record to the table it gave me the unique constrain error. Because the sequence for the table in test next number is 500 and the last number (primary key) in PROD is 10,000.
    I tried to change that number in APEX but it won't alow me to. The only thing I can change is the minimum and the maximum value.
    Can I change the min to 10,001 so it can now start fro there or what would you recommend to shance the last sequence number of the table to 10,001?
    Regards,
    Ruben Tapia

    Hi,
    Copy your sequence SQL e.g. to notepad. Drop that sequence.
    Edit SQL in notepad by changing number after START WITH to be 10001.
    Then just recreate sequence from your edited SQL =)
    Br,Jari

  • How do you find the iPad phone number for cellular data?

    How do you find the iPad phone number for cellular data?

    I know this post was a long time ago but people still seem to be viewing it.
    Quickest way:
    Via the iPad on 3G, go to http://m.telstra.com. The service number is then displayed and you are given the option to recharge.

  • Who writes LOG SEQUENCE NUMBER to CONTROL FILE,whether CKPT or LGWR process

    I am in confusion that,
    When log switch occurs that time Log sequence no. is generated by LGWR. then after who writes that LSN to CONTROL FILE whether Checkpoint or LGWR.
    Please provide me proper answer with example.....

    I notice by using fuser on a controlfile on hp-ux, a number of processes keep the controlfile open.  So it would make sense that the one that writes logs would write log sequence numbers to the controlfile too.
    $ for z in  `/usr/sbin/fuser  control03.ctl|awk ' {x=split($0,args); for (i=2;i<=x;i++){print args[i]}}'`
            do
                ps -efx|grep $z|grep -v grep
            done
    control03.ctl: oooooooooo
      oracle 27129     1  0  Sep  5  ?        12:15 ora_arc1_TPRD
      oracle 27073     1  0  Sep  5  ?        52:45 ora_dbw0_TPRD
      oracle 27127     1  0  Sep  5  ?        10:52 ora_arc0_TPRD
      oracle  9485     1  0  Nov  3  ?         9:14 oracleTPRD (LOCAL=NO)
      oracle 22395     1  0 08:36:22 ?         0:24 oracleTPRD (LOCAL=NO)
      oracle 27075     1  0  Sep  5  ?        68:53 ora_lgwr_TPRD
      oracle 22116     1  0 08:33:24 ?         1:06 oracleTPRD (LOCAL=NO)
      oracle 27077     1  0  Sep  5  ?        41:05 ora_ckpt_TPRD
      oracle 26510     1  0  Nov 30  ?        21:26 oracleTPRD (LOCAL=NO)

  • Multiple email addresses against Vendor. What is the ID / sequence number?

    We have a particular vendor with multiple e-mail addresses. These can be viewed via XK03, looking at the address details of the vendor and expanding the e-mail address.
    What I see for one particular vendor are two lines, each with a different e-mail address.
    Line one has a radio button (standard number) selected, has some text saying ' Remittance advice' and an ID of 001.
    Line two has a radio button unselected, has text saying 'PO' and an ID of 002.
    The problem that we have is that when PO's are e-mailed it sends it to the e-mail address on line 1 rather than line 2. Obviously this ID/sequence number is configured somewhere and I assume that the PO's somehow need to told to use ID 002 instead of 001, but where is this defined?.
    Jas

    SAP takes the email adress (fax number) that has the radio button for standard default.
    The text  ' Remittance advice'  is just a note which does not control anything, especially not that this one is taken for the  ' Remittance advice'  only and all others would use the second mail adress.
    If you want it different, then you have to code this yourself in an exit.

Maybe you are looking for