Wednesday 22 March 2023

SAP Basis administration - ABAP Dump st22 "Dump ZDATE_LARGE_TIME_DIFF"

ABAP Dump st22  "Dump ZDATE_LARGE_TIME_DIFF"  


Purpose:

Large time difference between the Application server and the Database server.














Procedure:

The short dump ZDATE_LARGE_TIME_DIFF occurs when a time difference is found within a work process or when it happens between an Application server and a Database server. When this happens, the only way to resolve the issue is to restart the system.

Go through Notes: 102088, 697353 and 101726 which address the issue. Run RSDBTIME according to the note and check the result.

The explanation of this dump is described in note: 447839 - ZDATE_ILLEGAL_LOCTIME.


To solve the problems proceed as follows:


1: Setting the UTC timer" 

  a: Stop database and R/3

  b: Log on as Superuser (root).

  c: Set the General Mean Time (GMT) time zone (Greenwich time) for example in the C-shell with 'setenv TZ GMT'.

 d: Display the time with 'date'

The time displayed must match Greenwich time.

Greenwich time is 2 hours behind compared to Central European Summer Time and 1 hour compared to Central European Winter Time.


If this is not the case, you must correct the UTC timer with 'date'.

Caution: you must enter the correct Greenwich time here


The UTC timer is now correctly set.

2. Setting the time zone:


Log on as the user for which you want to make or check the time zone setting, for example ora<sid> or <sid>adm

Display the time with 'date'. The displayed time must match the local time, both in daylight saving time and standard time.

If this is not the case, you must set a correct time zone, for example with C-shell 'setenv TZ <zeitzone>'

In you have questions regarding the correct time zone, contact your operating system manufacturer.


Make sure that the correct time zone is set automatically in the login script of the user in question.

It is even better to configure the correct time zone as a default in the operating system. You then do not need to set a time zone in the login script.

Make sure that processes which are not started in the normal login (for example via 'rexec', 'cron') also have a correct time zone setting. With rexec, an R/3 instance is started if it is started from the CCMS system monitor (RZ03) or an R/3 start-up profile or a computer (instead of 'local').

The time zone is now set correctly for the databases and R/3 processes.


3. Check the settings to R/3:


Start the database (DB) and R/3

Start the R/3 report RSDBTIME, all times should now be displayed correctly.

If times are displayed incorrectly, check the time zone setting in the environment variable TZ of the DB shadow processes and the R/3 processes, for example with 'ps eww <prozessnumber' or a suitable monitor of the operating system. 'ps' shows the contents of environment variables, however only in the Berkeley(BSD) mode that does not exist on all UNIX derivatives. If you have questions contact your operating system manufacturer.


Thanks 

Rupesh Chavan

Tuesday 21 March 2023

How to change configuration file of SAP HANA System or change parameter in HANA database in *.INF file. ?

 SAP HANA System parameter change in *.INF file


In the SAP HANA system, we have multiple .ini files for each HANA database service. these files contain properties for configuring the system as a whole and individual tenant database, as well as hosts and services.

For example

 indexserver.ini

compileserver.ini

nameserver.ini 

so on 

For service-independent properties, there is a file called "global.ini"

SAP HANA uses a prioritized layered configuration framework. This means that properties can be configured at different levels or layers depending on the configuration file. The following layers are available; values from higher layers overwrite values of lower layers:








Configuration files are stored on the SAP HANA server at the following locations according to layer:

● Default: /usr/sap/<SID>/HDB<instance>/exe/config (read only)

● System: <sapmnt>/<SID>/SYS/global/hdb/custom/config

●Database: <sapmnt>/<SID>/SYS/global/hdb/custom/config/DB_<dbname>

● Host: /usr/sap/<SID>/HDB<instance>/<hostname>


Note: The default location is<sapmnt> is /hana/shared. system replication scenario reconfigures the database using  " hdbnsutil -reconfig"

All public configuration parameters are defined in table   "CONFIGURATION_PARAMETER_PROPERTIES". In addition to basic properties such as data type, unit and default value the definition includes a flag to indicate if a system restart is required before a changed value becomes effective.

When you attempt to change a parameter value, the change is validated against the definition. Validation can be applied as follows:

● Value restrictions where a list of permitted values has been defined, either as a range (for example 0-100) or as a list of values ({default,on,off})

Layer restrictions where a change is only permitted at a specified layer (either SYSTEM or HOST)

Custom restrictions are additional restrictions where more detailed parsing of the value entered is required; this may be used, for example, to validate a value where a file path must be entered.

If the changed value is not valid for some reason, the new value is stored but a warning message is returned. You can prevent invalid values from being saved by setting the unsupported_configuration_change parameter to 'error', in which case the change is then rejected.

Alert 136 checks if any parameters are set to an unsupported value and Alert 137 triggers an information message if a configuration change has been made which requires a service restart in order to make it effective. The source of this information is 

system view M_CONFIGURATION_PARAMETER_VALUES which shows the current value for each parameter and the layer where it is defined, whether the value violates any restrictions and if a restart is required.








do not recommend that you change the default values of parameters unless stated in the documentation or instructed to do so by SAP Support.

Parameter Tracking

For traceability purposes changes to configuration values can be logged; optionally, a reason for the change can be entered in a comment value.

The tracking feature is enabled by default but can be disabled by setting the configuration parameter write_log in the indexserver.ini file to false. 

When it is enabled the SQL ALTER CONFIGURATION statement automatically updates the view SYS.M_INIFILE_CONTENT_HISTORY, this includes details of the time the change was made, the user name, the current and previous values and any comment text that was entered.

We can see same in below snap where changes date, user details and other information given for our reference. 

M_INIFILE_CONTENT_HISTORY










Note: These views are not available in the old Hana database version. 


Regards

Rupesh Chavan





Type of tables SAP HANA database - Row store and column store tables

SAP HANA - Row store and column store  tables  # Basis Admin

Application developers who want to use the database can focus on the application logic and they never bothering about where the data is stored, what is done in
order to guarantee transactional consistency.  But as database administrator or Basis admins i will say we should know basic of it.

1: Tables: 

Tables are the most fundamental data structure in any relational database. tables are the central object in SAP HANA. AS SAP Basis administrator we know about below point 

Tables in general consist of at least one column, every column needs to have a distinct name in this table. 
Across tables, column names can be used multiple times with different data type definitions and meanings, 
 Although the actual table name does not have any functional relevance, choosing good names can make all the difference when it comes to understanding your
application and the data design.

though tables are made up of a set of columns, these columns could not exist in the database on their own; they can exist only in the compound of a table

Types of Tables in HANA System: 

Row and column store table: 

























1: Row Tables: 


 SAP HANA, like most other database systems, offers multiple different types of tables. The data may be stored by row or by column. Row store table record data row by row over many pages. Most RDBMS use one of these types, and row store data representation is the most common choice. HANA database is exception to this rule. It allows either a row store or a column store representation for its tables as well as for the conversion of a table from one type to the other.

There are several other types of tables available in the system for special use cases, such as temporary tables, flexible schema tables, or history tables

Limitations of row store tables : 

1: Row store tables cannot be partitioned
2: SAP HANA offers no compression for row store tables
3: Columns in row store tables cannot be accessed independently and in parallel
4: Row store tables cannot be displaced from memory 
5: If Row store table failed to load in memory then system can't start.
6: cannot be directly used as data sources

Considering all above limitation it preferred to use column store table, Hence we check parameter " default_table_type" its default set at column. Mean when table get create in HANA database it will column store 


For row store tables, two different index types are available: a classic b-tree index implementation and a cpb+-tree index  (compressed prefix) . To review runtime information of indexes on row store tables, 
can be used monitoring view M_RS_INDEXES .
Indexes on row store tables are not saved to the persistency but rebuilt when the table is loaded into memory. This happens during index server process startup

When to Use

● The application needs to process only one single record at one time (many selects and /or updates of single records).
● The application typically needs to access the complete record.
● The columns contain mainly distinct values so compression rate would be low.
● Neither aggregations nor fast searching are required.
● The table has a small number of rows (for example, configuration tables).


Column Store Tables


Column store tables are the major table data structure used in SAP HANA.  As the information is already stored in separate data structures, SAP HANA can directly access the columns requested by an SQL query without needing to read and decode other column data

SAP HANA column store tables actually can only store about two billion records per partition or table, depending on whether the table is partitioned or not. 

tables that are organized in columns are optimized for high-performing read operations while still providing good performance for write operations. 

Efficient data compression is applied to save memory and speed up searches and calculations.

Table partitioning is available for only for Column tables not row store 

Column tables have several advantages:
Higher data compression rates

Columnar data storage allows for highly efficient compression. Especially if the column is sorted, there will be ranges of the same values in contiguous memory, so compression methods such as run length encoding or cluster encoding can be used more effectively.

Higher performance for column operations


With columnar data organization, operations on single columns, such as searching or aggregations, can be implemented as loops over an array stored in contiguous memory locations. Such an operation has high spatial locality and efficiently utilizes the CPU caches.
In addition, highly efficient data compression not only saves memory but also increases speed.

Elimination of additional indexes


In many cases, columnar data storage eliminates the need for additional index structures since storing data in columns already works like having a built-in index for each column: The column-scanning speed of the in-memory column store and the compression mechanisms (especially dictionary compression) already allow read operations with very high performance. In many cases, it will not be required to have additional index structures. Eliminating indexes reduces memory size, can improve write performance, and reduces development efforts. However, this does not mean that indexes are not used at all in SAP HANA. Primary key fields always have an index and it is possible to create additional indexes, if required. In addition, full text indexes are used to support full-text search.

Elimination of materialized aggregates


Thanks to its column-scanning speed, the column store makes it possible to calculate aggregates on large amounts of data on the fly with high performance. This eliminates the need for materialized aggregates in many cases. Eliminating materialized aggregates has several advantages. It simplifies data model and aggregation logic, which makes development and maintenance more efficient; it allows for a higher level of concurrency because write operations do not require exclusive locks for updating aggregated values; and it ensures that the aggregated values are always up-to-date (materialized aggregates are sometimes updated only at scheduled times).

Parallelization


Column-based storage also simplifies parallel execution using multiple processor cores. In a column store data is already vertically partitioned. That means operations on different columns can easily be processed in parallel.

When to Use


● Calculations are typically executed on individual or a small number of columns.
● The table is searched based on the values of a few columns.
● The table has a large number of columns.
● The table has a large number of rows and columnar operations are required (aggregate, scan, and so on)
● High compression rates can be achieved because the majority of the columns contain only a few distinct values (compared to the number of rows).


3: Document Store for JSON artifacts


the Document Store for JSON artifacts is fully integrated into the SAP HANA database architecture. The document collections of the Document Store are also classified as a type of table and they can be created, updated and read by SQL. The Document Store allows native operation on JSON, for example, filtering, aggregation, and joining JSON documents with HANA column or row store tables.


4: Temporary tables are there for data that is not needed beyond the context of a session or transaction and thus does not need to be written to the persistence
layer. 

3: History tables allow running transactions against the state of the table at a time in the past. 

4: the DUMMY table is an auxiliary table in the database for the convenience of database developers. 







Thanks 
Rupesh Chavan



Monday 20 March 2023

How to create user in SAP IBP system ?

How to create a user in the SAP IBP system? 

In this blog, we are going to see how to create users in SAP Integrated Business Planning ( IBP) 


Prerequisite: 

1: IBP site URL

2: user name and password of tenant 


Procedure : 

1: Maintain Employee 

a: Search maintain Employees 





b: Click “Create” to add a new user 



c: Add Employee ID, first name, last name, and valid from/ to dates, and email
--> Then, click “Create” to save the employee data. 





2: Create a Business User in IBP 

  1. a: Click Maintain Business Users Tile 





    b: Click “New” to add a user 



c: The screen pops up and select the user from the list.  Then click OK. 




Make sure the email address is filled in correctly. 

e: once the user is created then assign the role by double-clicking on the user.

Go to --> Assigned business roles --> click on add --> select role click on apply --> then click on save.


Below Steps are applicable if using single sign-on 




d: Choose “Download for IDP” from the dropdown.  A csv file is created. 



e: Open IAS and import users 
  1. Select Import Users -> select IBP system -> Upload CSV file (then select the CSV file) 


f: Import the file.  See confirmation screen. 














g: Send an activation email to the user 





Thanks 
Rupesh Chavan