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









Saturday, 14 October 2017

SAP User Security profile parameter



SAP User Security Profile Parameter

Profile parameter
Description
Default value
Recommended value
login/min_password_lng
Minimum password length for user password
3
3
login/password_expiration_time
Number of days between forced password change
0
90
Login/fails_to_session_end
Number of invalid logon attempts allowed before the SAP GUI is disconnected
3
3
Login/fails_to_user_lock
Number of invalid logon attempts within a day before the user id is automatically locked by the system
12
5
rdisp/gui_auto_logout
Time, in seconds, that SAPGUI is automatically disconnected because of in-activity
0
30
Auth/test_mode
Switch to report RSUSR400 for authority check
N
N
Auth/system_access_check_off
Switch off automatic authority check
N
N
Auth/no_check_in_some_cases
Special authorization checks turned off by customer
N
Y
Login/ext_security
Security access controlled by external software
N
N
Auth/rfc_authority_check
Permission for remote function calls from within ABAP programs
0
1
Login/failed_user_auto_unlock
Disable system function for automatic unlock of users at midnight
0
1
Login/no_automatic_user_sapstar
Disable ability to logon as SAP* with PASS of password when SAP* deleted
0
1
Auth/no_check_on_tcode
Disable check of S_TCODE on non-basis transactions
N
N
Auth/auth_number_in_userbuffer
Number of authorizations allowed in the user buffer
800
1000
Auth/authorization_trace
Every trace will be logged once in table USOBX
N
N
Auth/check_value_write_on
Write value for SU53 security checking/authorization failure
Y
Y