Wednesday, 9 June 2021

How to get the last used time of table in SAP HANA

 

How to get the last used time of table in SAP HANA database.

This below query will work in both environment

  • HANA 1.0
  • HANA 2.0
 Execute the below query to get the last used time of HANA table in HANA database

  • You can get the details from M_TABLE_STATISTICS and HANA_Tables_ColumnStore_Columns_LastTouchTime_*+.txt script.
  • You can get the last touched time from those two columns from M_TABLE_STATISTICS.

LAST_MODIFY_TIME

TIMESTAMP

Displays the timestamp when the last INSERT, UPDATE, DELETE, or REPLACE statement was executed.

LAST_SELECT_TIME

TIMESTAMP

Displays the timestamp when the last SELECT statement was executed.

 

Wednesday, 26 May 2021

SAP IQ

 

SAP IQ

What is SAP IQ?

SAP IQ (Intelligent Query) is a high-performance decision-support server designed specifically for mission-critical business intelligence, analytics, and data warehousing. Component Integration Services within SAP IQ provide direct access to relational and non-relational databases on mainframe, UNIX, or Windows servers.

At the foundation of SAP IQ lies a column store technology that allows for speed compression and ad-hoc analysis. SAP IQ has an open interface approach towards its ecosystem. SAP IQ is also integrated with SAP's Business Intelligence portfolio of products to form an end-to-end business analytics software stack, and is an integral component of SAP's In-Memory Data Fabric Architecture and Data Management Platform.


SAP IQ is a fully ACID-compliant database with guaranteed data integrity regardless of whether your database (or dbspace) is created on raw devices or file system files. Multiplex implementations support GPFS and NFS; simplex implementations support any file system. Both simplex and multiplex support raw devices

Wednesday, 28 April 2021

SAP HANA XSCONTROLLER service does not start | Techrelam

 

 
 
SAP HANA XSCONTROLLER service does not start

If you have an issue in the startup or runtime of the SAP HANA Extended Application Services Advanced Model (XSA), How to troubleshoot it. Let's see

If your are using the XSA 1.0.86 or higher we need to follow the steps.

Run the following command in the XSA host:

> XSA collect-traces -o <zip file>

Example: XSA collect-traces -o techrelam.zip

Note: To use the XSA command, you must log on as the operating-system user <SID>adm.

If you are using lower versions of XSA:

Collect the logs manually:


    The relevant traces are (for all versions):

  1. xscontroller_<n>.log
  2. xscontroller.out
  3. xsexeagent*.log
  4. xsexeagent.out
  5. xsuaaserver.out
  6. uaa.log

      Starting with XSA 1.0.71 there is also:    

  1. xsuaaserver_*.log

    Starting with HANA SPS 03 there is also:

  1. xshanabroker_*.log
  2. xsinstancemanager_*.log

Those files can be retrieved from:

    /usr/sap/<SID>/HDB00/<hostname>/trace

    or

    /hana/shared/<SID>/xs/controller_data/controller/tracing/log

Friday, 9 April 2021

SAP ABAP RFC backup Export and Import using R3trans | Techrelam

 

 

SAP ABAP system and you want to export and import ABAP RFC .

Export and Import the RFC at Operating System level using R3trans

Steps

1. Create export script with following commands , we named this script as "rfc_backup".

export
file '/<dir>/rfc_data'
select * from RFCATTRIB
select * from RFCDES
select * from RFCSYSACL
select * from RSECACHK
select * from RSECACTB
select * from RSECTAB

2. Create import/restore script with following commands ,we named it as "rfc_restore"

import
file='/<dir>/rfc_data'

Before export the SAP RFC check the Script as below screen shot. Once we execute the export script using R3trans, it will export the RFC in the output file named "rfc_data".


3.   Run following command at OS level : " R3trans rfc_backup"



4. Run following command at OS level : " R3trans rfc_restore"



5. After executing the R3trans  RFC export/import script Check the trans.log - Log file will be created in current directory. One can verify the steps executed in trans.log.





Thursday, 18 February 2021

User Types in SAP HANA Database | Techrelam

 


User Types in SAP HANA Database

There are two types of User in SAP HANA database.

  1. Standard User
  2. Restricted User
Standard users can create objects in their own schema and read data in system views. The PUBLIC role grants read access to system views, and this is granted to every standard user. Restricted users initially have no privileges. 

Restricted users are for users who access SAP HANA through client applications and who do not have full SQL access through an SQL console. If the privileges that they need to use the application are included within an application-specific role, then you only have to grant the user this role. In this way, you can ensure that users only have those privileges that are essential to their work.

Limitations of Restricted Users 

Compared to standard database users, restricted users are initially limited in the following ways:
They cannot create objects in the database because they are not authorized to create objects in their own database schema. 

They cannot view any data in the database because they are not granted (and cannot be granted) the standard PUBLIC role. 

They are only able to connect to the database using HTTP/HTTPS. 

To enable a restricted user to use an application, grant the required application-specific roles. Initially, restricted users can only connect to the database using HTTP or HTTPS.

To allow restricted users to connect through ODBC or JDBC, enable ODBC or JDBC access explicitly

Tuesday, 16 February 2021

Types Of Delta Merge in SAP HANA Database | Techrelam

 


Types Of Delta Merge in SAP HANA Database.

There are Four types of delta Merge Operation in SAP HANA Database.

  1. Auto Merge
  2. Smart Merge
  3. Hard and Forced Merges
  4. Critical Merge 
Auto Merge:
 
The standard method for initiating a merge in SAP HANA is the auto merge. A system process called mergedog periodically checks the column store tables that are loaded locally. For each individual table or single partition of a split table, it determines whether or not a merge is necessary based on certain criteria (for example, size of delta storage, available memory, time since last merge, and others). If the active parameter in the mergedog section of the indexserver.ini file is set to yes, auto merge is active. 

Note: You can activate or deactivate auto merge for an individual table in the TABLES (SYS) system view. Change the value in the AUTO_MERGE_ON column to TRUE or FALSE

Smart Merge:

SAP HANA provides a function that allows the system to check whether or not a delta merge makes sense. This function is called smart merge. For example, if an application starts loading relatively large data volumes, a delta merge during the load can have a negative impact both on the load performance and on other system users. Therefore, the application can disable the auto merge for those tables being loaded and send a hint to the database to merge once the load has completed. When the application issues a smart merge hint to the database to trigger a merge, the database evaluates the criteria that determine whether or not a merge is necessary. If the criteria are met, the merge is executed. If the criteria are not met, the database takes no further action. Only a subsequent hint from the application triggers another evaluation of the criteria.

If the active parameter in the smart_merge_enabled section of the indexserver.ini file is set to yes, smart merge is active. Caution: For tables that you want to merge with the smart merge, disable the auto merge. Otherwise, the auto merge and smart merge may interfere with each other. 

Hard and Forced Merges:

     You can trigger the delta merge operation for a table manually by executing the SQL statement MERGE DELTA OF "" . This is called a hard merge. It causes the database to execute the delta merge for the table either immediately if sufficient system resources are available, or as soon as sufficient system resources become available. The hard merge is therefore subject to the merge token control mechanism. If you want the merge to take place immediately regardless of system resource availability, you can pass an optional parameter. A forced merge may be useful in a situation where there is a heavy system load, but a small table needs to be merged. It is also useful if a missed merge of a certain table negatively impacts system performance. To execute a forced merge, execute the SQL statement MERGE DELTA OF '' WITH PARAMETERS ('FORCED_MERGE' = 'ON') .


Critical Merge:

  To keep the system stable, the database can trigger a critical merge. For example, when auto merge is disabled and no smart merge hints are sent to the system, the size of the delta storage can grow too large for a successful delta merge to occur. The system initiates a critical merge automatically when a certain threshold is passed.