Friday, 17 November 2023

Create ROW TABLE:

 CREATE ROW TABLE A (A INT PRIMARY KEY, B INT);

Monitoring memory Usage of table

 Memory is SAP HANA is used for a variety of purposes.

 First, the operating systems and support files are using memory.

second, SAP HANA has its own code and stack of program files that alsoconsume memory.

Third,memeory is consumed by the column and row store where data is stored.

Finally, SAP HANA needs memory for its working space where computations occur, temporary results are stored, and shared user memory consumption occurs.

In short, physical memory is the maximum memory available, some of which is used by the operating systems and files.The allocated limit is what is "given" to SAP HANA, and the remaining memory is free space.These allocations are important because you're using preallocated memory pools, and you can't rely on Linux operating system information for memory management.However,you can get this information in many other ways.

In addition to the memory consumption and memory tracking information in the preceding sections, you can also obtain memory information using SQL statements. In the M_SERVICE_MEMORY view, you can  execute a set of predefined SQL statements provided by SAP, including those shown below:


To access these statements, open the SQL console from the context menu of the VIEWS folder in  the SYS schema.


Total Memory Used by All Row Tables:
Select round (sum(USED_FIXED_PART_SIZE +USED_VARIABLE_PART_SIZE)/1024/1024) AS "ROW Tables MB" FROM M_RS_TABLES;


Total Memory used by All Column Tables:

Select round (sum(MEMORY_SIZE_IN_TOTAL)/1024/1024) AS "Column Tables MB" FROM M_CS_TABLES;

Total Memory Used by all column Tables in a Schema

Select SCHEMA_NAME AS "Schema", round (sum(MEMORY_SIZE_IN_TOTAL) /1024/1024) AS "MB" FROM M_CS_TABLES GROUP BY SCHEMA_NAME ORDER BY "MB" DESC;


For column tables, SAP HANA sometimes unloads infrequently used columns from memory to free up space when the allocated memory threshold is near the used capacity.So, when memory consumption is estimated, it's important to look at all column tables, not just those currently loaded in memory. You can see all column table sizes in a schema by using the SAP provided SQL statement:


Total Memory by column Tables in a schema:

Select TABLE_NAME AS "Table", round (MEMORY_SIZE_IN_TOTAL/1024/1024, 2)as "MB" FROM M_CS_TABLES WHERE SCHEMA_NAME = 'SYSTEM' ORDER BY "MB" DESC;

Select TABLE_NAME AS "Table", round (MEMORY_SIZE_IN_TOTAL/1024/1024, 2)as "MB" FROM M_CS_TABLES WHERE SCHEMA_NAME = 'XJRM63' ORDER BY "MB" DESC;



Thursday, 16 November 2023

Exporting and importing table data and definations

 Exporting and importing table data and definations:

Export of table:

you can export and import table data between systems and hosts. 

* for row- based data tables, you can export the data in comma-delimited format(CSV).
* for column - based data tables, you can also choose a binary format.
    Binary formats tend to be smaller in size and also faster, but this option should only be used if you're        moving data tables between SAP HANA systems (eg: from production to a development box).

To export tables, go to the systems list in SAP HANA studio, navigate to the table(s) you want data from and select EXPORT from the right- click context menu for the table.This will take you to an export wizard (see below screenshot).



that will guide you through the process of selecting tables and available formats.
you can also choose to export only the table definations(catalog) or include the data as well (catalog and data).

select where you want to store the file and how many thrreads you want to use for the export. The more threads you select, the faster the export will execute. However, selecting too many threads may impact system performance for others, so keep it small (one to five) unless you do this on a large system, during off times,or on the systems with little usage.The export  wizard will save the file where you specifiied in the format selected.



Import of table: 


To import table(s) into SAP HANA from the file, simply right- click on the catalog in the systems list in the SAP HANA studio.
Select IMPORT from the context menu.
After entering the file path where the file is located, you can select the table you want.you may have to type in the names of the tables if you're using a remote host.The last import steps tell the system the format of the file (CSV or binary) and enter the threads to be used. The table is now automatically imported in to your system and can be seen in the systems.


Friday, 29 September 2023

SM51 - instances of SAP system - monitoring

 1. Access T-code:SM51.

Check:
1. Check the Application server instance - state as active.
2. During any maintenance activity, we can make state as - Deactivate.
       Goto--> Administration -->state -->Deactivate.

3.after completing maintenance activity, we can make state as - Activate.

       Goto--> Administration -->state -->Activate.

4.To check list of Users in all the clients(100,200 etc.,)
       Goto --> Users.
   Analysis the user load in all the clients.

5.This option lets you make the changes made in the OS hosts and services tables in a running.
    SAP system take effect by making the desired changes at the operating system level and then

      instead of restarting, resetting the host name buffer for the following components.


     SM51 --> Go to -->Host Name Buffer --> Reset --> Entire System.




Tuesday, 26 September 2023

Dialog work process status in sm50

 

Waiting: The process is waiting "Available" to serve the user..


Running: The process is executing the task.


Sleep mode: Waiting for resources( RFC problems).


ON hold: The user request is on hold by process for waiting certain resources on the other systems(RFC CPIC).


PRIV Mode: The process goes in to heap mode, it will be completed only after the task completion/ Timeout.


Stopped: The process is stopped due to an error.


Shutdown: The process is killed/shutdown but restart mode set to NO.