Recovering data using SQL transaction logs

Hi-If we have a backup of our HFM database (in SQL) as of 8am today, and we backup the transaction logs too, can we use them to restore the database in case of an issue. Example, the database gets corrupted or someone deletes the wrong data. Can we restore the backup and then use the transaction logs to recreate the activities since the backup? Would this work if some of those activities were data loads via FDQM?
just checking if it makes sense to do these transaction log backups in SQL as it relates to HFM 9.2.1
Thanks
Wags

If your company performs full backups at the close of business every Friday and differential backups every Monday through Thursday evening. You could include hourly backups of the transaction log during business hours. Assume a database failure at 11:05AM Wednesday. Under this strategy, you would use Friday's full backup and Tuesday's differential backup to restore the database to it's state at the close of business Tuesday. This resulted in a loss of two hours of data (9-11AM Wednesday). Using the transaction log backups, you could apply the 9AM and 10AM transaction log backups after the Tuesday differential backup to restore our database to it's state at 11AM Wednesday. Restoring all but five minutes of database activity.

Similar Messages

  • The system failed to flush data to the transaction log. Corruption may occur.

    We have a windows server 2008 R2 Virtual machine and we are getting the following Warning Event.
    Event 51 Volmgr
    The system failed to flush data to the transaction log.  Corruption may occur.
    Any idea what is wrong with this server? Why this event is occurring?

    Hi Jitender KT,
    Before going further, would you please let me know the complete error message that you can find (such as a
    screenshot if you can provide)? Please check and confirm in Event Viewer if there other related event you can find, such as Event 57 and so on. Meanwhile, can you remember what operations you have done before the warning occurred?
    Based on current message that you provided, please run
    Chkdsk command to check if you can find error. The issue seems to be related to the storage device. Please refer to the following similar question.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/044b10af-c253-46de-b40d-ce9d128b83d7/event-id-57-source-volmgr?forum=winservergen
    In addition, please also refer to the following link. It should be helpful.
    http://www.eventid.net/display-eventid-57-source-volmgr-eventno-8865-phase-1.htm
    Hope this helps.
    Best regards,
    Justin Gu

  • How to view clob data using sql

    Hi,
    In our database, we have one table that is having one column of CLOB datatype but now i want to view the data using sql select query but it throws error: "Datatype not supported".
    Could any one please let me know how to view the clob data using select query.
    Oracle DB version : 10.2.0.3
    Thanks

    h5.
    use read procedure
    PROCEDURE READ (
    lobsrc IN BFILE|BLOB|CLOB ,
    amount IN OUT BINARY_INTEGER,
    offset IN INTEGER,
    buffer OUT RAW|VARCHAR2 );
    example  Updating LOB by Using DBMS_LOB in PL/SQL
    DECLARE
    lobloc CLOB; -- serves as the LOB locator
    text VARCHAR2(32767):='Resigned: 5 August 2000';
    amount NUMBER ; -- amount to be written
    offset INTEGER; -- where to start writing
    BEGIN
    SELECT resume INTO lobloc
    FROM employees
    WHERE employee_id = 405 FOR UPDATE;
    offset := DBMS_LOB.GETLENGTH(lobloc) + 2;
    amount := length(text);
    DBMS_LOB.WRITE (lobloc, amount, offset, text );
    text := ' Resigned: 30 September 2000';
    SELECT resume INTO lobloc
    FROM employees
    WHERE employee_id = 170 FOR UPDATE;
    amount := length(text);
    DBMS_LOB.WRITEAPPEND(lobloc, amount, text);
    COMMIT;
    END;

  • Can we change the system date using Sql

    can we change the system date using Sql statement..
    can anyone help
    Tariq.

    There is an initialization parameter called FIXED_DATE which lets you set a fixed sysdate for testing purposes, and you can alter that date using the ALTER SYSTEM command, but as implied by the name you are setting a data/time that doesn't change. Since the normal sysdate is derived from the O/S it cannot be altered through SQL

  • How can I validate a date using sql

    How can I validate a date using sql or pl/sql
    select to_date('01/01/2009','mm/dd/yyyy') from dual this is a good date
    but how can I check for a bad date
    select to_date('0a/01/2009','mm/dd/yyyy') from dual
    Howard

    William Robertson wrote:
    It'll be complicated in pure SQL, as you'll have to parse out day, month and year and then validate the day against the month and year bearing in mind the rules for leap years. It would be simpler to write a PL/SQL function and call that.Nah, not that complicated, you just need to generate a calender to validate against.
    SQL> ed
    Wrote file afiedt.buf
      1  with yrs as (select rownum-1 as yr from dual connect by rownum <= 100)
      2      ,mnth as (select rownum as mn, case when rownum in (4,6,9,11) then 30
      3                            when rownum = 2 then 28
      4                       else 31
      5                       end as dy
      6                from dual
      7                connect by rownum <= 12)
      8      ,cent as (select (rownum-1) as cen from dual connect by rownum <= 21)
      9      ,cal as (select cen, yr, mn,
    10                      case when ((yr = 0 and mod(cen,400) = 0)
    11                             or (mod(yr,4) = 0 and yr > 0))
    12                            and mn = 2 then dy+1
    13                      else dy
    14                      end as dy
    15               from cent, yrs, mnth)
    16  --
    17      ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    18  --
    19  select case when cal.cen is null then 'Invalid Date'
    20              when not regexp_like(dt,'^[0-9]{1,2}[\/.-_][0-9]{1,2}[\/.-_][0-9]{4}$') then 'Invalid Date'
    21         else dt
    22         end as dt
    23  from dt left outer join
    24               cal on (to_number(regexp_substr(dt,'[0-9]+')) between 1 and cal.dy
    25                   and to_number(regexp_substr(dt,'[0-9]+',1,2)) = cal.mn
    26                   and floor(to_number(regexp_substr(dt,'[0-9]+',1,3))/100) = cal.cen
    27*                  and to_number(substr(regexp_substr(dt,'[0-9]+',1,3),-2)) = cal.yr)
    SQL> /
    Enter value for date_dd_mm_yyyy: a1/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select 'a1/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 01/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '01/02/2008' as dt from dual)
    DT
    01/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2008' as dt from dual)
    DT
    29/02/2008
    SQL> /
    Enter value for date_dd_mm_yyyy: 30/02/2008
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '30/02/2008' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 29/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '29/02/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 28/02/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '28/02/2009' as dt from dual)
    DT
    28/02/2009
    SQL> /
    Enter value for date_dd_mm_yyyy: 0a/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '0a/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL> /
    Enter value for date_dd_mm_yyyy: 00/01/2009
    old  17:     ,dt as (select '&date_dd_mm_yyyy' as dt from dual)
    new  17:     ,dt as (select '00/01/2009' as dt from dual)
    DT
    Invalid Date
    SQL>

  • How to upload data using SXDA Transaction

    HI,
    Can any one explain step by step procedure to upload data using SXDA transaction.
    I have already uploaded to txt file in Application server.
    I have created a project and  entered into the sub-project wizard and selected the object type as BKPF and then pressed continue, then i enter into task tab....
    There i see convert data , Check file,File split,load data,
    In convert data i have selected the program name as RFBIBL00.
    In check file i have selected the file type as Physical file and selected the file name from F4 button.
    I am fasing the probelm in load data ....
    Can any one please explain how to proceed further..

    Hi Yogesh,
    Use this function module
    ALSM_EXCEL_TO_INTERNAL_TABLE to upload the excel sheet data into internal table.
    Then from the internal table data use KE13 transaction to upload data.
    Regards
    Arun

  • Loading data with dates using SQL*Loader

    Dear everyone
    I am currently trying to load some data containing dates using SQL*Loader.
    For termination of fields I have been using ^ because I have some book titles which contain " and ' as part of their title. I found that the TO_DATE function did not seem to work using ^ instead of ". Would I be correct? I think the Oracle manual says that " must be used.
    After some Web research I eventually amended my control file to as follows:
    load data
    infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
    REPLACE
    into table SCAN_FILE_INFO
    fields terminated by "," optionally enclosed by '^'
    TRAILING NULLCOLS
    (scan_id, scan_filename
    file_format_id
    orig_scanning_resolution_dpi
    scanner_id, scanner_operator_id
    scanning_date "TO_DATE (:scanning_date, 'YYYY-MM-DD')"
    original_map_publication_id
    reprint_publication_id)
    A simple line of data is as follow:
    280001, ^1910 - London^, 270001, 400, 250001, 260001, "TO_DATE('2007-06-06', 'YYYY-MM-DD')", 200019,
    The final column being null.
    However when I attempt that I get the following error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    If I change the scanning_date part to:
    scanning_date "EXPRESSION TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    or
    scanning_date "CONSTANT TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    I get the error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO, column SCANNING_DATE.
    ORA-00917: missing comma
    As soon as I do the following:
    scanning_date "EXPRESSION, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    or
    scanning_date "CONSTANT, TO_DATE (:scanning_date, 'YYYY-MM-DD')",
    I get too many values error message:
    Record 1: Rejected - Error on table SCAN_FILE_INFO.
    ORA-00913: too many values
    I also tested out scanning_date DATE "YYYY-MM-DD", but that just gave the same ORA-01841 error message as above.
    I must be doing something very simple which is wrong but I cannot figure it out.
    Kind regards
    Tim

    And why do you have scanning date as "TO_DATE('2007-06-06', 'YYYY-MM-DD')" in your infile? All you need is 2007-06-06. If you can not change infile generation code, use:
    load data
    infile 'h:\insert_statements\22_insert_into_SCAN_FILE_INFO.txt'
    REPLACE
    into table SCAN_FILE_INFO
    fields terminated by "," optionally enclosed by '^'
    TRAILING NULLCOLS
    (scan_id, scan_filename
    file_format_id
    orig_scanning_resolution_dpi
    scanner_id, scanner_operator_id
    scanning_date "TO_DATE(REPLACE(REPLACE(:scanning_date,'TO_DATE('),'''YYYY-MM-DD'')'), 'YYYY-MM-DD')"
    original_map_publication_id
    reprint_publication_id)SY.

  • Get a date using Sql

    hi
    how i can get the following date using sql, ie i want to get '01-APR-2005'
    if the sysdate is between (01/04/2005 - 31/3/2006). in the same way if it is
    01/04/2004 - 31/3/2005 i want to get '01-apr-2004'...in the same way for any year..
    how i can get this...
    thx in adv
    Kris
    Message was edited by:
    Kris

    SQL> select dt, add_months(trunc(add_months(dt, -3), 'yyyy'), 3) new_dt
      2    from t
      3   order by dt;
    DT        NEW_DT
    01-APR-04 01-APR-04
    31-DEC-04 01-APR-04
    01-JAN-05 01-APR-04
    31-MAR-05 01-APR-04
    01-APR-05 01-APR-05
    31-DEC-05 01-APR-05
    01-JAN-06 01-APR-05
    31-MAR-06 01-APR-05
    8 rows selected.
    SQL> select add_months(trunc(add_months(sysdate, -3), 'yyyy'), 3) from dual;
    ADD_MONTH
    01-APR-05

  • SAP xMII Log/ SQL transaction Log

    We have an application where we are inserting data from a PLC to the SQL Server using the xMII.
    The SQL server no. of times gives the Transaction Log Full error.
    This causes the error any data insertion  or deletion in SQL
    In tern the xMII logs error, the log file for a day (in the Lighthammer\Logs\cms.log)is seen as large as 15 GB.
    We are not able to open such a huge file...
    Moreover we are unable to know if there are anyu other errors other than due to the SQL logged by xMII
    How can we see the Log created by xMII, this will help us in troubleshooting .
    Message was edited by:
            Amol Kurdukar

    Hi All,
    Thanks for the help.
    Ryan,
    I have resolved the issue of transaction log by archiving the Log at increased frequency.
    Jeremy,
    We are required to have the PLC data in SQL as the Customer wants to have that and they do not have any other database, SCADA  etc.
    The SQL server logs (consolidates) not only the PLC data but  data from some other devices as well
    Moreover this is data then used for confirming the production to SAP and maintaining the status of the confirmation. This also involves queuing of the data in SQL if the data is not confirmed to SAP for any reason.
    We are not logging the data every minute, The data is logged depending on a batch completion, shift completion etc.
    Hope this clarifies, let us know your comments.

  • Data Warehouse SQL error log shows failed login

    In addition to the above title, on our management servers (x2 Win 2012 R2 - SCOM 2012 R2), I am seeing the event ID 31551 stating:
    Failed to store data in the Data Warehouse. The operation will be retired. Exception 'SqlException':Login failed for user 'xx'.
    One or more workflows were affected by this.
    Workflow name: Microsoft.SystemCenter.DataWarehouse.CollectEntityHealthStateChange
    Instance name: management server
    Instance ID: {xxxxxxxxxxxxxxxxx}
    Management Group: XXXX
    I've logged onto Data Warehouse server using the account referenced in the error message, loaded SQL Management Studio (2012 Std), and logged in and am able to see, view tables within the OperationsManagerDW database. So I'm trying to establish what's going
    on! If I can access the DW DB using the account, why am I getting these errors?

    Hi
    Unfortunately, this hasn't resolved the issue. I've ran the query DBCC CHECKIDENT ("EventChannel"); and have got the following response back: 
    Checking identity information: current identity value '1', current column value '1'.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    I've revisited the run as account for 'Data Warehouse SQL Account' - this is a domain account. I've checked the Data Warehouse DB and can confirm that it's got write access over the database. I'm using the same account as the 'Data Warehouse Action Account'.
    However, the SQL log on the data warehouse server is saying failed login, see below:
    Login failed for user 'sv-scom-dw'. Reason: Could not find a login matching the name provided. [CLIENT: Management server 1 IP]
    I've checked the 'Management Group' table and can confirm the WriterLoginName is DOMAIN\sv-scom-dw
    However, the SQL error looks like it's looking for a local SQL login. The database is set to Mixed mode authentication.
    Any ideas?

  • Filtering data using sql query

    I am pulling data from a database which is a log of events type data. It consists of entries at a certain time, entry text, and even has an entry type. One of those types is known as "open item." This entry has the potential to be present on multiple days over and over. The problem is I only want the "open item" entries to appear that occur on the most recent day of a date range that is input by the user, but also not excluding all other entries from all of the other days that are not "open item." The "is_open=0" is what is excluding the "open items" from all of the entries, but now there needs to be a way to include (ie. "is_open=1") the "open items" on the current day. My query is as follows:
    SELECT     b.log_title, a.log_id, MIN(a.shift_date) AS shift_date,a.shift_id,a.operator_position_descr,a.is_open,a.user_id, MAX(a.annotation_number) AS annotation_number,
                          a.entry_text, MIN(a.entry_time) AS entry_time,a.font_num
    FROM         log_entries AS a INNER JOIN
                          log_list AS b ON a.log_id = b.log_id
    WHERE ((entry_type_code NOT LIKE '%NLOG%'
                AND entry_type_code <> 'daily'
                AND entry_type_code <> 'shift act') or entry_type_code is null)
              AND (is_open = 0  AND is_standing_order = 0 AND is_rolled_forward is null) 
    GROUP BY b.log_title, a.log_id, a.user_id,a.shift_id,a.operator_position_descr,a.is_open, a.entry_text,a.font_num
    Order by entry_time

    Change you WHERE clause to something like this... (You didn't say what kind of DB you were using so I used SQL Server syntax)
    WHERE ((entry_type_code NOT LIKE '%NLOG%'
    AND entry_type_code IN ('daily', 'shift act')) OR entry_type_code is null)
    AND (is_open = 0 OR (is_open = 1 AND a.shift_date >= DateAdd(dd, DateDiff(dd, 0, GetDate()), 0)))
    AND is_standing_order = 0
    AND is_rolled_forward is null
    The biggest change is this... AND (is_open = 0 OR (is_open = 1 AND a.shift_date >= DateAdd(dd, DateDiff(dd, 0, GetDate()), 0))).
    It allows is_open = 1 if the shift_date is =&gt; midnight of the of the current day.
    HTH,
    Jason

  • Error in loading data using SQL loader

    I am getting a error like ‘SQL*Loader -350 syntax error of illegal combination of non-alphanumeric characters’ while loading a file using SQL loader in RHEL. The command used to run SQL*Loader is:
    Sqlldr userid=<username>/<password> control =data.ctl
    The control file, data.ctl is :
    LOAD data
    infile '/home/oraprod/data.txt'
    append  into table test
    empid terminated by ',',
    fname terminated by ',',
    lname terminated by ',',
    salary terminated by whitespace
    The data.txt file is:
    1,Kaushal,halani,5000
    2,Chetan,halani,1000
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    Replace ''{" by "(" in your control file
    LOAD data
    infile 'c:\data.txt'
    append  into table emp_t
    empid terminated by ',',
    fname terminated by ',',
    lname terminated by ',',
    salary terminated by whitespace
    C:\>sqlldr user/pwd@database control=c.ctl
    SQL*Loader: Release 10.2.0.3.0 - Production on Wed Nov 13 10:10:24 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    Commit point reached - logical record count 2
    SQL> select * from emp_t;
         EMPID FNAME                LNAME                    SALARY
             1 Kaushal              halani                     5000
             2 Chetan               halani                     1000
    Best regards
    Mohamed Houri

  • ORA-01841 Error when value for date col is NULL in .dat (using SQL Loader)

    Hello Gurus,
    I have some data in .dat file which needs to be loaded into oracle table. I am using SQL * Loader to do the job. Although "NULLIF col_name =BLANKS" works for character datatype, but when value for date col is NULL then I get ORA-01841 error. I have to make NULL for all rows withour value for date column
    Early reply will be highly appreciated
    Farooq

    Hi,
    May be this problem is not with the NULLIF. The value for the date column is not in proper date format.
    create table:
    create table kk (empno number, ename varchar2(20), deptno number, hiredate date)
    Control file:
    LOAD DATA
    INFILE 'd:\kk\empdata.dat'
    insert into TABLE kk ( empno position (1:2) integer external,
    ename position(4:5) char NULLIF ename=BLANKS,
    deptno position (7:8) integer external NULLIF deptno=BLANKS,
    hiredate position (10:20) date NULLIF hiredate=BLANKS)
    data file:
    10 KK 01-jan-2005
    20 10
    SELECT * FROM KK;
    EMPNO ENAME DEPTNO HIREDATE
    10 KK 01-JAN-05
    20 10
    Verify the data file.
    Hope it will help

  • Cancel the query which uses full transaction log file

    Hi,
    We have reindexing job to run every week sunday. During the last run, the transaction log got full and the subsequent transactions to the database got errorred out stating 'Transaction log is full'. I want to restrict the utilization of the log file, that
    is, when the reindexing job reaches the utilization of the log file to a certain threshold automatically the job should get cancelled. Is there any way to get it.

    Hi,
    We have reindexing job to run every week sunday. During the last run, the transaction log got full and the subsequent transactions to the database got errorred out stating 'Transaction log is full'. I want to restrict the utilization of the log file, that
    is, when the reindexing job reaches the utilization of the log file to a certain threshold automatically the job should get cancelled. Is there any way to get it.
    Hello,
    Instead of Putting limit on trn log it would be good to find out cause causing high utilization.Even if you find that your log is growing because of some transaction it would be a blunder to rollback its little easy to do it for Index rebuild but if you
    cancel for some delete operation you would end up in mess.Please don't create a program to delete or kill running operation.
    You can create custom job for alert for trn log file growth.That would be good.
    From 2008 onwards Index rebuild is fully logged so sometimes it causes trn log issue.To solve this either you run index rebuild for specific tables or for selective tables.
    Other option is widely accepted Ola Hallengren script for index rebuild.I suggest you try this
    http://ola.hallengren.com/
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Recovering data using "dd"

    Hi,
    I'm using this tip from MacOSXHints to try to recover data from an external drive attached by FireWire. It essential involves using "dd" in the terminal to perform a bit-by-bit transfer of data from a failing disk to a disk image on a healthy one. The command is as follows:
    dd bs=512 if=/dev/rdisk1 of=~/Desktop/Recovery.dmg conv=noerror
    Unfortunately, this command returns only a "device not configured" error. The following command
    diskutil -mountDisk /dev/rdisk1
    reports success, but *diskutil list* only reports disk1 as having 0 bytes and no partitions, even though it is 80GB in size and has two partitions.
    The drive in question is reported as unreadable by the OS and I'm given the option to format. Is this drive truly unrecoverable now (without spending a great deal of cash on a professional service)?
    By the way, I would have added this query to the foot of the MacOSXHints thread, but it hasn't received a response in a while, so Apple Discussions seemed a better choice.
    Many thanks,
    SiR G.

    I'd guess that you're much more likely to have success with either GNU ddrescue or dd_rescue (different things), or with one of the commercial disk-recovery products, any of which is designed for the task, while dd is not. You can install ddrescue or dd_rescue free of charge using MacPorts, after first installing Xcode. Or you can search for a term such as "rescue" on one of the Mac software repositories such as macupdate. Those solutions will cost something, but a lot less than a recovery service. However, if the data on the drive is worth more to you than about $10,000, don't mess around with it. Send it straight to somebody like Drivesavers. Anything you do carries the risk of making things worse.
    The real point is that you should never need to recover a drive. When a drive fails, the right approach is to destroy it and restore to a new one from one of your several backups.

Maybe you are looking for

  • E26 253 Error while checking in and storing: \\sapserver\file.tif

    Hi Experts, I have now been fighting with this problem for a couple of weeks, and not been able to solve the issue. My problem is to upload/check-in documents from the application serve in background. I have a program to create DIF and attach files u

  • Dates are not flowing properly into bw

    Hi Friends, We have some serious problem. we have few reports on Sales and the data is extracted from r/3 into bw on daily basis. some times the reports working fine other times either the production date or exp date is not flowing into BW or it is g

  • Link to word document

    How to link a PDF, word, & Excel file in fla by clicking a button?

  • Field value in function module BAPI_SALESORDER_GETSTATUS

    Hi Ppl, I am using FM BAPI_SALESORDER_GETSTATUS and for each line item a value of "B" is returned in DLV_STAT_H field, can somebody tell me where where to find the meaning of these values? Thanks Rob

  • Problem in downloading After Effect

    Hello, I tried to download after effect cs6 and it give me the error code.  I have read the "Download and installation help" and knowing that the computer can't download after effect unless it is a 64 -bits but mine is 32 -bits. So is there a way tha