Saturday, 21 October 2017

Startup of SAP HANA Service With Persistence can Hang



Symptom:

                The SAP HANA database hangs during startup. In the traces of the SAP HANA service with a persistence that is hanging (e.g. index server or xsengine) you find repeatedly entries similar to:

[0000]{-1}[-1/-1] 0000-00-00 00:00:00.000000 w Service_Startup  Starter.cc : Version collection triggered times. but version(s) still remain(s). Please check if there is a blocker transaction

Reason and Prerequisites Reason:

Due to a programming error in the time synchronization, a deadlock can occur when a SAP HANA service starts up.

Affected Releases:

SAP HANA 2.0 database:
Revisions of SPS00
Revisions <= 012.01 (SPS01)

Prerequisites:

During startup of a service of the SAP HANA database row store versions are present. This especially can happen if SAP HANA service is not terminated gracefully or if a takeover is performed.
These row store versions are being garbage collected.


Solution :
Apply one of the following SAP HANA database Revisions:

SAP HANA 2.0 database:
Revisions >= 012.02 (SPS01)
or higher

Workaround:

To resolve the deadlock you can restart the master indexserver of the affected SAP HANA database. For details how to stop and start a service with SAP HANA Studio please refer to the section "Stop and Start a Database Service" in the SAP HANA Administration Guide.

More Details refer Snote : 2528893

Thursday, 19 October 2017

SAP HANA Crash during database start up


Symptom:

The indexserver or other database services crash during the database start up with following call stack:

0: ptime::Transaction::Transaction
1: ptime::TraceUtil::getOidsFromObjects
2: ptime::ExpensiveStatementTraceFilter::load
3: ptime::ExpensiveStatementTracerImpl::loadConfig
4: ptime::Config::startup
5: TRexAPI::TREXIndexServer::startup
6: nlsui_main

Reason and Prerequisites
The expensive statement trace is turned on and there is a filter on a specific object defined. During start up the tracer tries to use a transaction but the object has not been initialized yet.

Solution
Solution: The crash is fixed with SAP HANA revision 81.

Workaround: to be able to start up the database the filter on the objects needs to be removed. Therefore, please remove the related entry in the global.ini. The complete section about expensive statement trace in the global.ini looks similar to this:

[expensive_statement]
threshold_duration = 1
user = system
object = sys.m_connections

To solve the situation, the entry "object = ..." needs to be removed.

More details refer Snote: 2018947

Wednesday, 18 October 2017

SAP Hana Log Backup


SAP Hana Log Backup
                       
                     SAP HANA creates redo log backups automatically at regular intervals By default and in during a log backup, only the actual data of the log segments for each service with persistence is written from the log area to service-specific log backups in the file system or to a third-party backup tool.

SAP HANA automatically continues creating log backups of all the log segments that have not so far been backed up. 

So we can Set the default log backup location in the system.

After a system failure, you may need log backups to recover the database to the desired state. 

Log Backup file format :

(log_backup) __(volume ID)_(log partition ID)_(first redo log position)_(last redo log position).(backup_ID)

Example:
A log backup name could look like this : (log_backup_5_1_876543_76543.8734647847)

Tuesday, 17 October 2017

SAP Kernel Upgrade steps for Windows Environment


Introduction:

Following the procedure for Kernel Upgrade for a SAP system in windows platform.


1. Login to www.support.sap.com  and download the latest Kernel files.


Downloads—->SAP Support Packages—->Support packages & Patches-Entry By application group—->SAP application Components—->SAP ERP—->SAP ERP 6.0—->  Entry By Component—->SAP ECC Server—-> SAP KERNEL 7.40 EXT 64-BIT UC—->Windows Server on X64 64BIT—->Sybase ASE “SAPEXEDB_XXX.SAR”    (Kernel Part II)


Downloads—->SAP Support Package—->Support packages & Patches-Entry By application group—->SAP application Components—->SAP ERP—->SAP ERP 6.0—->Entry By Component—->SAP ECC Server—->SAP SAP KERNEL 7.40 EXT 64-BIT UC—->Windows Server on X64 64BIT—->#Database  Independent “SAPEXE_XXX.SAR” (Kernel Part I).                                       

2. Login to the Server through OS level with SIDadm.

3. Make the copies of the existing folders in the backup folder:-
                   Drive:\usr\sap\\SYS\exe
4. Stop the SAP Instance & Services

  • SAPSID_00
  • SAPSID_01
  • SAPHostControl
  • SAPHostExec

5. Extract the SAR Files 


  •      Go to command prompt
  •      Go to as above path & Extract the files
  •       Drive:\sapcar –xvf   SAPEXEXXX*.sar
  •       Drive:\sapcar -xvf   SAPEXEDBXXX*.sar

6. Copy and paste the uncared files to \usr\sap\SID\SYS\exe\uc\NTAMD64\ .

Hint:

Before that the take the kernel folder backup

7. Select the option copy and Replace if it prompts pop message as “There is already a file with the same name in the location.”

8. Start the SAP Instance & Services

  • SAPSID_00
  • SAPSID_01
  • SAPHostControl
  • SAPHostExec
9.  Check the updated kernel from Command Prompt by giving disp+work..

10.  Check the Kernel version and patch level go to SM51.

Monday, 16 October 2017

SAP Kernel Upgrade steps for SUSE Linux Environment



Steps to Upgrade SAP Kernel  in SUSE Linux Environment

Preparation:
   Go to transaction code SM51, Check Current SAP Kernel version and patch level.

Kernel Dump download:

             Kernel Download, Backup & Transfer Process follow the steps.

1. Download the necessary Kernel Patch from http://support.sap.com
   
     Downloads -> SAP Support Packages and Patchs ->SAP Kernel-> choose particular version like SAP KERNEL 721.

The packages should be similar like this, Database Independent, SAPEXE_XX.SAR – Kernel Part 1 and SAPEXEDB_XX.SAR – Kernel Part II.

2. Create a new directory folder and transfer the two downloaded packages to created directory.

 mkdir /newkernel 

3. Backup the old kernel to other location


cp -pR /sapmnt/SID/exe/* /oldkernel

Hint:


Default location for kernel is in /sapmnt//exe

Kernel Upgrade Process steps

1. Login to the system as adm and go to / directory to uncar the two packages.

  • SAPCAR -xvf SAPEXE_XX.SAR
  • SAPCAR -xvf SAPEXEDB_.SAR

2. Stop the SAP system and saposcol (login adm mode)

  • stopsap R3
  • saposcol -k

Hint :

Before stopping the SAP system, please make sure the logged user, batch jobs are alerted.

3. Login to the system as root and copy all the extracted kernel packages into /sapmnt//exe
  • cd /new_kernel
  • cp -pR * /sapmnt/SID/exe/
4. After all the packages copied, run the following commands
  • cd /sapmnt/SID/exe/
  • /saproot.sh SID
5. Switch user to adm and start the SAP system and saposcol as well.
  • saposcol
  • startsap R3
After Upgrade Check the Kernel Versions:

1. Go to transaction code SM51, click on Release Notes. Check the latest kernel number.








Sunday, 15 October 2017

How to check SAP HANA Database Version


Check SAP HANA Database Version

There are three ways to check SAP HANA Database Version.

1. Via SAP GUI
2. Via SAP HANA Studio
3. Via SQL Command

Using Command Line:

Log in to DATABASE ADM

example: 
usr/sap/SID/HDB00> HDB version


Using SAP HANA STUDIO

Open SAP HANA Studio and right click added HANA System and open properties 
Get version History.


Using SAP GUI

Login SAP GUI  and click SYSTEM ---> Status get DATABASE Version