Search This Blog

Sunday, May 8, 2011

DST issues with SAP BusinessObjects XI 3.X

Foe those who face DST issues every other year, here is some relevant information:


- What is Extended DST?
A. Starting in 2007, most of the United States and Canada observe DST from the second Sunday in March to the first Sunday in November, almost two-thirds of the year. The 2007 U.S. change was part of the Energy Policy Act of 2005; previously, from 1987 through 2006, the start and end dates were the first Sunday in April and the last Sunday in October, and Congress retains the right to go back to the previous dates now that an energy-consumption study has been done.


- What is the impact of the change on SAP BusinessObjects XI 3.1?
  • An unending series of failed instances
  • Swelling of CMS Database.
  • Abnormal growth of Audit Database
  • Delay of an hour in the reports.
  • Instance Manager either does not come up or takes a very long time to come up.
  • Slow response from CMS while browsing CMC/InfoView
- How to Fix the above mentioned issues?
A. SAP has released a couple of KB Articles to address the issues mentioned above. here are the list of most important ones:
  • 1448881 - Multiple instances spawned after daylight savings time change
  • 1568239 - After DST change Schedules fail in Business Objects Enterprise XI 3.1 with: Object could not be scheduled within the specified time interval
  • 1568718 - How to delete all failed instances in XI3.1 programmatically

To update JRE:
  • Java TimeZone updater tool needs to be downloaded and installed form the Java vendor. Eg. For Sun Java http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • Extract the tzupdater.jar
  • Run the tzupdater.jar using the java command from the JDK in the Business Objects folder
  • In this example Business Objects Enterprise XI3.1 and tzupdater are on the C drive:
  • C:\>"C:\Program Files\Business Objects\javasdk\bin\java" -jar tzupdater.jar -v -u
To fix existing recurring schedules:
  • Refer to SAP KB - 1448881 to download the script developed by SAP to fix the 1 hr time difference observed in the instance time.
  • Stop the Job Servers.
  • Double click on the .hta file.
  • Change the System Name to that of your CMS name.
  • Add the Administrator's password.
  • Click Logon.
  • Click List All Recurring Instances.
  • Select All.
  • Make note of what it says in: Schedule Selected Recurring Instances: Should be 1 hr earlier.
  • Click Reschedule Selected Recurring Instances.
  • Choose All instances again and change Schedule Selected Recurring Instances to 1 hour Later.
  • Click Reschedule Selected Recurring Instances.
  • Now start your Job Servers.
  • The issue should not occur again.
To Delete excessive failed instances:
- SAP has provided a couple of scripts to delete failed instances generated by the issue. The script queries for all instances that have a SI_SCHEDULE_STATUS = 3 (3 being failed). It then loops through all the found instances and deletes them in batches of 100/1000 objects. The script outputs to the browser the instances names and ids of what it is deleting.
  • Download the script from the SAP KB - 1568718 and extract the jsp into the ”/<tomcat>/webapps/InfoViewApp/” directory.
  • Open the file in a test editor and modify the following as per your requirements:
String userName = "Administrator";
String password = "<PASSWORD>";
String CMSName = "CMSNAME:6400";
int batchSize = 1000;
  • Save your changes.
  • The script can be run by calling: http://<servername>:8080/InfoViewApp/deleteFailedInstancesV3.jsp
To delete Audit logs of Failed instances deletion:


Note: Take backup of your Auditing database before making the below mentioned changes. The steps provided below are for Oracle database and needs to be modified as per your requirements:

//To check the number of failed jobs
select count(Event_Type_ID)
from audit_event
where (start_timestamp between 'dd-MON-yy' and 'dd-MON-yy') and Event_Type_ID = 327682

//To delete the number of failed jobs

delete
from audit_event
where (start_timestamp between 'dd-MON-yy' and 'dd-MON-yy') and Event_Type_ID = 327682

delete
from audit_detail d
where not exists (select 'x'
from audit_event e
where e.event_id = d.event_id
and e.server_cuid = d.server_cuid)

- Is there a permanent fix available for these issues?
A. EDST affects only BOE XI 3.1 SP3 and FP 3.1-FP 3.5. As per SAP the issue is scheduled to be fixed in SP4 and FP 3.6 which is to be released shortly. A Limited Availability Fix (LAFIX) is available to stay away from the issue if DST has not occurred in your region. Links to download the fixes are mentioned below:



Installation Instruction:

For Windows:
  1. Unzip the install package.
  2. For Windows deployments, open a cmd window and invoke the installer using:

  • "setup.exe SKIP_PATCH_VERSION_CHECK=1"
  • If prompted to redeploy the web applications, choose NO.
For Unix:
  1. "./install.sh <install dir> INSTALLMODE=silent,install REDEPLOYWEBAPPS=false CMSNAMESERVER=<cmsname> CMSPORTNUMBER=<cms port> CMSPASSWORD=<password>"
The fix will update the problematic SchedulerSubsystem.dll.

1 comment:

  1. Hello everyone,

    Please find a VB script to delete failed instances. This can be triggered from any Windows machine which can speak with CMS server and have BOE client tools/SDK installed.

    You may need to provide CMS name, User Name with admin privileges and its password along with the authentication type.

    You should also change the path of the log file which the script generates.

    Steps to run the script:

    On 32-bit machine:
    Double click on the script and wait for the prompt.

    On 64-bit machines:
    It is a little tricky. You may need to open 32-bit Command Prompt from the following location C:\WINDOWS\SysWow64\

    ' **********************************************************
    ' ***********Delete Excessive Failed Instances**************
    ' ***********************WARNING****************************
    ' Please take backup of the CMS Database before executing
    ' *********************script*******************************
    ' **********************************************************
    Const oUsername = "Administrator"
    Const oPassword = "PASSWORD"
    Const oAPSName = "CMSNAME:PORT"
    Const oAuthType = "secEnterprise"


    'Log File Name
    LogFile = "C:\FailedInstanceLog.log"

    ' Open log file
    Dim objLog, objLogFile
    Set objLog = CreateObject("scripting.filesystemobject")
    Set objLogFile = objLog.CreateTextFile(LogFile, True)
    objLogFile.WriteLine "==============================================="
    objLogFile.WriteLine "Starting the process to Delete Failed Instances"
    objLogFile.WriteLine "==============================================="

    Set oSessionManager = CreateObject("CrystalEnterprise.SessionMgr")
    Set oSession = oSessionManager.Logon(oUserName, oPassword, oAPSName, oAuthType)
    Set oInfoStore = oSession.Service("","InfoStore")

    Dim ObjInstanceCount
    ObjInstanceCount = 0
    Call deleteIns()

    objLogFile.WriteLine "Instance ID - Instance Name - Type of Object"

    objLogFile.WriteLine "========================================================="
    Function deleteIns()
    Set oDelInstances = oInfoStore.query("select top 1000 si_id, si_name, si_kind from ci_infoobjects where si_instance=1 and si_schedule_status=3")
    On Error Resume Next
    For each oDelIns in oDelInstances
    if Err <> 0 then
    Exit Function
    else
    On Error GoTo 0
    instanceid=oDelIns.Properties.Item("SI_ID").value
    instancename=oDelIns.Properties.Item("SI_NAME").value
    instancekind=oDelIns.Properties.Item("SI_KIND").value
    objLogFile.WriteLine instanceid & " - " & instancename & " - "& instancekind
    objLogFile.WriteLine "========================================================="
    ObjInstanceCount=ObjInstanceCount + 1
    oDelInstances.Delete("#" & instanceid)

    End If
    Next

    oInfoStore.commit oDelInstances
    Call deleteIns()
    End Function
    objLogFile.WriteLine "**********************************************************"
    objLogFile.WriteLine "Total Instances Deleted -" & ObjInstanceCount
    objLogFile.WriteLine "Script complete"
    wscript.echo "No Of Instances Deleted -" & ObjInstanceCount & ". Logs are written to - " & LogFile

    ReplyDelete