Friday, 22 May 2020

SAP ERP Server Architecture




SAP ERP Server Architecture:

There are three Types architecture in SAP ERP.

  • R/1 : Single tier Architecture.
  • R/2 : Two tier Architecture.
  • R/3 : Three tier Architecture.

Here!, "R" stands for Real Time Data Processing.

R/1 : Single tier Architecture:

            SAP Single tier architecture is a Single Layer Architecture application in which all three components Presentation, Application and Database are merged and installed in one Server.

R/2 : Two tier Architecture:

          SAP Two tier architecture is a Two Layer Architecture application in which all three components Presentation, Application and Database are merged and installed in two Servers.
In two tier model, Presentation component is installed in one Server and Application component and Database component is installed in other server.

R/3 : Three tier Architecture:

        SAP three tier architecture is a Three Layer Architecture application in which all three components Presentation, Application and Database are installed in three Servers.In Three tier model Presentation component is installed in one Server and Application component is installed in other server. Database component is installed in other server.






Friday, 28 February 2020

Delete old HANA database diagnosis trace files


Hi all,

Here I am going to show delete HANA old trace file easy workaround for this is this:

    Create another folder, say “old_tracefiles

    Move all files older than, say 7 days (or whenever you last upgraded to the most recent revision), to this “old_tracesfiles” folder.
 
Follow these steps:

1. Logon to the SAP HANA server as SID.

2. Navigate to the trace file folder

For that, just use the predefined shell command alias ‘cdtrace

hanatest:/usr/sap/THR/HDB00> cdtrace

hanatest:/usr/sap/THR/HDB00/hanatest/trace>


3. Create the “old_tracefiles” folder
 
Heres simply create the “old_tracefiles” folder as a sub-folder of the actual trace folder.

You might and probably should create it at a different location, to release the storage space in the trace file folder.

hanatest:/usr/sap/THR/HDB00/hanatest/trace> mkdir old_tracefiles


4. Move old trace files into the new folder:

This can take some time…

hanatest:/usr/sap/THR/HDB00/hanatest/trace>find . -type f -mtime +7 -print | xargs -I {} mv {} old_traces/
If you find that you don’t actually need the trace files any more, you may just go on and delete this folder later on.

In general, it usually doesn’t make sense to keep the trace files generated by older revisions.

Exceptions to this general approach could be, that you faced bugs that you still wait to see fixed or to compare messages from normal/baseline system operations (think of time required for restart, message output during restart/shutdown/backup…).


Source: SAP SCN blog.

Saturday, 22 February 2020

hdbdaemon HDB Daemon not running due to nameserver.ini missing or deleted


You try to start HANA DB from the command line with 'HDB Start' and an error returns 'FAIL: process hdbdaemon HDB Daemon not running'.

Possible Reason:

1. The nameserver.ini file is corrupt 
2. The nameserver.ini file is missing, the error messages in the nameserver trace files:
    [75956]{-1}[-1/-1] 2020-02-21 16:24:16.302707 f NameServer TREXNameServer.cpp(02829) :     [landscape]/master is missing in nameserver.ini. did someone delete SYS/global/hdb/custom/config/nameserver.ini ? -> stopping instance ...
 [75956]{-1}[-1/-1] 2020-02-21 16:24:16.312673 e Basis TREXNameServer.cpp(02859) : Process exited due to an error via explicit exit call with exit code 1 , no crash dump will be written


Solution :
 
Check the nameserver.ini  file if there any nameserver entry in that file if no maintain manually below the entry.

Open a text editor and copy the following text into the file and save it as nameserver.ini
 
[landscape]

 id = 

master = 

worker = 

active_master =

The id for your system is located in the landscape.id file: Location of file: [...]/hana/SID/data/mnt0001/hdb00001/landscape.id

open landscape.id get ID
 
For master = hostname: port number (single node system)

worker= hostname

active master= hostname: port number (single node system)

Default locations of the nameserver.ini file:

[...]/global/hdb/custom/config/nameserver.ini [...]/exe/linuxx86_64/HDB_1.00.67.383230_1263754/config/nameserver.ini

Note: The HANA configuration file files (nameserver.ini, indexserver.ini, xsengine.ini, etc.) are not backed up as part of a database backup.




Thursday, 20 February 2020

Oracle Database password expired


Possible Error During SAP Upgrade.

1. Oracle Password expired and required that this be changed.
2. Once changed unable to connect to the database. Sourcing no longer functions.
3. Error: "attempted connection to System Database [jdbc:oracle:thin:@somehost:1527:ABC(source/source)]:0 failed. Reason: ORA-28001: the password has expired"

Run the below Command to reset or extend Password Lifetime in DB Level.

 In the Oracle case simply applying the following SQL command as an admin user will allow the specified profile (and users assigned to it) to have a nonexpiring password:

    SQL> ALTER PROFILE PASSWORD_LIFE_TIME UNLIMITED;

 

Tuesday, 18 February 2020

How to Access to HANA DB trace files via sapstartsrv


Now it's possible to see all trace files of your SAP HANA DB instance via the SAP Start Service (sapstartsrv) to an additional operating system user.

 The following steps are required to grant the new sidtrc user access to the trace files of your SAP HANA DB instance.

(1) Enable authentication for additional users in the SAP Start Service. Execute as user root the following commands:
chmod u+s,o-rwx /usr/sap//HDB/exe/sapuxuserchk 
sudo chown root /usr/sap//HDB/exe/sapuxuserchk
 
In addition, you should check if the following file system is mounted with "nosuid": /usr/sap

 (2) Add user sidtrc to the SAP Start Service profile as an admin user.
Edit file /usr/sap//SYS/profile/_HDB_ and add the
 following line:

service/admin_users = sidtrc 

(3) Restart the SAP Start Service.

Execute as sidadm: sapcontrol -nr -function RestartService The new user is now set up to access the trace files via the SAP Start Service. Be aware that the user has the administrative rights, for example :  the user will also be able to start and stop your instance.

Monday, 2 December 2019

How to Take SAP MAXDB Backup using command line tool

We can use the command-line tool DBMCLI to take the backup of the MAX-DB database. If you are facing problems while taking a backup from MAX-DB GUI tools you can opt for this option.
Steps:

1. Open DBMCLI from the command prompt

./dbmcli on TRM> dbmcli -d -u superdba,

2. Stop Database (For Offline backup)

./dbmcli on TRM> db_offline

                         (or)

./dbmcli on TRM> db_admin

3. Create a Backup template for data and logs.

For data

./dbmcli on TRM> backup_template_create  drive:\\ FILE DATA

Example :

./dbmcli on TRM> backup_template_create DATA1 TO FILE /sap_dump/trmdatabck COMPRESSED CONTENT DATA

For Log

./dbmcli on TRM> backup_template_create  drive:\\ FILE LOG

Example:


./dbmcli on TRM> backup_template_create LOG1 TO FILE /sap_dump/trmlogbck COMPRESSED CONTENT LOG
 
4.   Connect Database

./dbmcli on TRM> db_connect

Example: 

./dbmcli on TRM> db_connect
OK

___

5.  Take Complete data backup

./dbmcli on TRM> backup_start

Example:

 For DATA

./dbmcli on TRM> backup_start DATA1
 
6.  Take log backup

./dbmcli on TRM> backup_start


Example :
 
For LOG

./dbmcli on TRM> backup_start LOG1

7.  Check backup status after completion

./dbmcli on TRM> backup_state

(and)

./dbmcli on TRM> medium_label

8. Start database

./dbmcli on TRM> db_online

Example:

Example: 

./dbmcli on TRM> db_online
OK 

ONLINE
___

Data backup Result:


./dbmcli on TRM> backup_template_create DATA1 TO FILE /sap_dump/smadatabck COMPRESSED CONTENT DATA
OK

---

./dbmcli on TRM> backup_start DATA1
OK

 
Return code               0
Date                          20191202
Time                         00150842
Server                       MAXDB
Database                  TRM
Kernel Version         Kernel    7.9.09   Build 005-123-259-005
Pages Transferred    12953632
Pages Left                0
Volumes                   1
Media name               DATA1
Location                  /sap_dump/trmdatabck
Error text
Label                       DAT_000000004
Is Consistent            true
First LOG Page          33607623
Last LOG Page
DB Stamp 1 Date         20191202
DB Stamp 1 Time         00143617
DB Stamp 2 Date
DB Stamp 2 Time
Page Count              12953591
Devices Used            1
Database ID             MAXDB:TRM_20191202_150840
Max Used Data Page      0
Converter Page Count    7670