You are on page 1of 29
Unit 8: Operations HAz00 + Check partitioning consistency + Replicate tables to multiple hosts + Load and unload column store tables manually + Trigger delta merge operations manually + Export and import tables and other catalog objects + Know which administrative tasks need to be performed initially, regularly and on demand + Check the SAP HANA system status + Check the status of services + Check the alerts and error logs + Perform backups + Check the performance + Check the volume configuration + Check the system information + Check diagnosis files + Work with traces + Understand the Software Lifecycle Management of SAP HANA + Know what Delivery Units and Packages are in the context of Software Lifecycle Management + ‘Name different transport scenarios and suitable transport management tools + Describe the functionality of the SAP HANA Application Lifecycle Manager + Understand how the Enhanced Change and Transport System (CTS+) is integrated with SAP HANA + Know about the possibility to use SAP HANA Transport Containers + Export and import SAP HANA content manually Unit Contents Lesson: Starting and Stopping SAP HANA ........ Exercise 7: Starting and Stopping SAP HANA Lesson: Configuring SAP HANA.......... a Exercise 8: Configuring SAP HANA 241 249 1.254 269 Lesson: SAP HANA Table Administration 274 Exercise 9: Table Administration .. 289 Lesson: Periodic Manual Tasks... 297 Exercise 10: Moritoring SAP HANA using Administration Console Tools. é i 323 Lesson: Transporting Changes i 329 Exercise 11: Transporting Changes. 347 Exercise 12: Optional exercise for participants with previous SAP HANA knowledge: Transport... ory = 240 © 2014 SAP AG or an SAP affilate company. All rights reserved 2014 Unit 8: Operations HAz00 Stopping and Starting the SAP HANA Database with SAP HANA Studio Note: To start and stop SAP HANA using sapcontrol, you need to log on, at the operating system level, as a user with root authorization. When starting the SAP HANA database with the SAP HANA studio, you have to enter the user name and password of the operating system user adm, Optionally, a start timeout can be specified. The start timeout defines how long sapstartsrv waits for a service to start. Ifthe end of the timeout period is reached, the remaining services are not started. @ + Right click on the system and select start. Note: You need to provide the password of adm on HANA server. Figure 212: Starting SAP HANA Database ~ Using SAP HANA Studio ‘The Administration Editor opens in diagnosis mode and the database services start cone by one. When all services have started, a green dot appears in the system icon in the Navigator view. Ey 242 {© 2014 SAP AG or an SAP affiliate company. Allrghts reserved 2or4 Unit 8: Operations A200 © © Right cick on the system and choose Stop 2B He Note: You need to providethe a) password of adm inthe HANA server [EHO (STUOENION HAD seats eal is Figure 213: Stopping the SAP HANA Database ~ Using HANA Studio ‘The Administration editor opens in diagnosis mode and the database services stop one by one, When all services have stopped, a red dot appears in the system icon in the SAP HANA Systems view. ‘On operating system level, the SAP HANA database can be started or stopped using the commands sepcontrol or HDB. + Starting SAP HANA database ] ~ Using sapcontrol /ust/sap/nostctrl/exe/sapcontrol -nr «Instance Nutber> -function Start - Using HDB as adm /sx/sap///HDB start + Stopping SAP HANA database >Using sapcontrol /usr/sap/hostctrl/exe/sapcontrol -nr function stop - Using HDB as adm /ust/sap///3D8 stop Figure 214: Starting and Stopping the SAP HANA Database ~ Using OS Commands Sy 244 (© 2014 SAP AG or an SAP affiliate company. All rights reserved. 2014 Unit 8: Operations: i) Haz00 Stat essen Goasarrentestsans Figure 216: Starting and Stopping Distributed SAP HANA Systems Using sapcontrol Note: You need to be logged on to the SAP system host as user adm ‘oF as user with root permissions. Stopping and Starting Individual Database Services ‘You can stop and start the individual database services (nameserver, indexserver, statisticsserver, xsengine and so on) running on hosts. tes 15100 (SYSIEW) A200 anon naeanme nj eialt ax SoS = 2 i Figure 21 topping and Starting Individual Database Services To stop and (re)start database services, you must have the system privilege SERVICE ADMIN. Examples of situations where you have to restart an individual database service are, for example: + A host in a distributed system failed and a standby host took over. However, the services of the failed host remain inactive even after the host is reachable again, In this case, you need to restart the services manually. + Afr an update of SAP HANA Extended Application Services (SAP HANA. XS), the xsengine service needs to be restarted. ‘The following options for stopping and (re)starting database services are possible: EY 246 (© 2074 SAP AG or an SAP affiliate company. All rights reserved. 2014 Unit 8: Operations = HAaz00 (© 2014 SAP AG or en SAP affilate company. All rights reserved. 2014 Unit 8: Operations A200 Solution 7: Starting and Stopping SAP HANA Task 1: Use the SAP HANA Studio to stop and start the SAP HANA Database. 1. Open the HANA Studio. 8) Choose Stari —+ All Programs > SAP HANA —+ SAP HANA Studio b) Navigate to Administration Console —» Systems window Stop the SAP HANA Database and check the services to make sure if all services are stopped. a) Right-click the SAP HANA system. b) Choose Stop. ©) Choose Hard and then click OK. d) If required, enter the user ID and password of adm, then click OK. (This user ID and the password are provided by the Instructor.) ¢) The status of the services is displayed in the Processes tab of the Administration editor, Wait until all services have been stopped. 3. Now, start the SAP HANA database and check the services to see if all services are started. a) Right-click the HANA System. b) Choose Start ©) Enter 60 (sec) for the Start wait timeout, then click OK, d) The status of the services is displayed in the Processes tab of the Administration editor. ‘Wait until all services have been started. Continued on next page Ey 250 (© 2014 SAP AG or an SAP afflate company. All ighis reserved, 2016 Unit 8: Operations Task Hazoo 3: Use the sapcontrol commands to stop and start the HANA. database. 1, Use sapcontrol as adm user to stop the HANA database. a) Note: Note: In our training environment, the adm user has root authority, which is required to start and stop HANA with sapcontrol Ifyou are already in Putty, continue with step e, Otherwise, open Putty by choosing Start —> All Programs — Putty — putiy.exe b) Enter the password of adm. (This password is provided by the instructor.) ©) Type the command below: a) sapcontrol -nr 00 -function Stop where 00 is the instance number of HANA. Use the sapcontrol to check the processes during database shutdown, ‘Type the command below: sapcontrol -nr 00 -function GetProcessList 3. Use the sapeontrol to start the HANA database. a) ‘Type the command below sapcontrol -nr 00 -function Start 4, Use sapeontrol to check the processes during startup of the database. a) Type the command below eapeontrel -nr 00 ~function GetProcessiist b) Close this session, EXT 252 (©2014 SAP AG or an SAP afflate company. All rights reserved. 2014 Unit 8: Operations, HA200 Lesson: Configuring SAP HANA Lesson Overview ‘This lesson shows you how to configure the SAP HANA Studio and the SAP HANA Database. Lesson Objectives ‘After completing this lesson, you will be able to: + Configure the SAP HANA studio + Configure the SAP HANA database + Organize SAP HANA systems in folders + Know where configuration files are stored + Use the filter function in the Configuration tab of the SAP HANA Studio + Apply changes to database parameters Business Example You are an administrator and want to adjust the configuration of the SAP HANA. Studio as well as change database parameters according to your requirements. Configuring Properties for SAP HANA Systems ‘The SAP HANA system entry in the SAP HANA Studio and several SAP HANA system details can be configured by right-clicking on the system in the “Systems” window and selecting Properties: Sy 254 {© 2014 SAP AG or an SAP affiiate company. All rights reserved. 2014 A200 Unit: Operations Inthe SAP System Logon, the adm user information of the HANA {stem including the password can be entered, With the logon information Safed ner, It fe not require to re-enter the password of adm when Stopping ard starting the HANA database. car | cess wn perpen do ian | Sexe ssresscremasiare tector ST (aaa epee ene Figure 219: Configuring Properties for SAP HANA Systems: SAP System Logen The adm user credentials are stored if the option Store User Name and Password in Secure Storage is flagged. Organizing SAP HANA Systems in Folders Systems that have been added to an SAP HANA Studio installation can be organized in folders: + When there are multiple systems, folders can be created to put the systems in each {older In thie exemple, two folders are created to separete the systems per user (Ono is created for SYSTEM user ang the other one Is created for STUDENTO4 user. Figure 220: Organize System Landscape => Note: Adding folders only works inthe SAP HANA Adminstration Console perspective. In the SAP HANA Modeler perspective this feature is not available. AQ, Catton i posites lease avoid sing space characters for the folder name as in some SAP HANA Studio versions this can lead to issues. EQ 256 (© 2014 SAP AG or an SAP affiliate company. All rights reserved. 2014 Unit 8: Operations HAz00 Configuring the SAP HANA Database ‘The properties of an SAP HANA database system are determined by the configuration parameters, Configuration Parameters in SAP HANA Studio ‘The properties of an SAP HANA database system are defined in the parameters ofits configuration files. Configuration files are separated into sections; sections bundle parameters of the same category. Parameters can be displayed and changed on the Configuration tab of the ‘Administration Editor of the SAP HANA studio, Do not change parameters directly in the configuration files on operating system level To be able to change the parameters of configuration files, you must have the system privilege INIFILE ADMIN, HE) ataen a © D dase i 5B execs | {D extensone = | © D fers © Digceaee © backp © 0 este | Configuration fies 7 Sections 3 C1 event handler | 30) execution ‘This means use the 20) wie predefined amount, [ECT menerymananer ‘eta 808 blow aeine Fee lage 6 ] Parameters feos theshald i Sa —_ Figure 222: Configuring the SAP HANA Database - Overview Note: The Filter function is quite helpful to find @ parameter in the parameter structure! In the Filter field, simply type the name of a parameter (or few characters of parameter). EY 258 ‘© 2014 SAP AG or an SAP afiliate company. Allghis reserved, 2014 Unit @: Operations HAz00 Configuration Files + Global Parameters: Figure 224: Example: Configuration File Locations ‘The configuration files are located in the following directories: + fusr/sap//SYS/global/hdb/custom/config + /usr/sap//HDB// Note: Configuration files (ni files) are only created in the above directories if customer-specific changes are made to them after installation Ifno customer-specific changes have been made, these directories may bbe empty. During installation of SAP HANA database, the following customer-specific configuration files are created: + sapprofite. Contains system identification information, such as the system name (SID) or the instance number. + daemon. Contains information about which database services to start. ‘The nameserver.ini file contains global information for each installation. The landscape section contains the system-specific landscape ID and assignments of hosts to roles MASTER, WORKER, and STANDBY. Ey 260 (© 2014 SAP AG or an SAP afflate company. All rights reserved 2014 Unit 8: Operations HAz00 + Maintain values in the dialog box: Figuro 226: Changin Parameter Values in SAP HANA Studio (2) In the Change Configuration Value dialog box, you can expand the Hosts area if hhost-specific values are possible. If itis not possible to enter a different value for each hos, the disabled icon (~) is displayed in the Host column of the list view, and there is no Hosts area in the Change Configuration Value dialog box. ‘After you have entered a new value for a parameter at system level, itis displayed in the System column with a green circle . After you have entered a new value for 4 parameter at host level, a gray thombus appears in the Host column, To show information on a specific host, select the host from the Host filter. Exemplary Parameter Settings global_allocation_fimit: EX 262 (©2014 SAP AG or an SAP affiliate company. All rights reserved. 2016 Unit 8: Operations A200 + save_point_interval_s: + Typer integer Range:0, 10-7200 Unit: second Changeable: + Sets savepoint interval. Setting to 0 will disable the savepoint for testing purposes e.g, log 10 performance tests; DO NOT USE for productive settings) {400 (SYHTEM 1009 emtataenss tact nm nn 9 Em ea on Figuro 228: ‘savepoint_interval_s Note: Since changes to data are persisted to the log area synchronously, they are not lost in case of a power failure or crash, enable_auto_log_ backup: ‘Automatic log backup can be enabled or disabled using the parameter ‘enable_auto_log_backup. “The default setting is: enable_auto_log_backup = yes + Defoutt enable_auto_log_backup = yes + Note + During normal system operation (log mode normal), itis recommended that automatic iog backup be kept activated. If automatic log backup Is disabled, the log area grows until the file systom Is full. If the file system Is full, the database will freeze. 1 N09 (SYSTEM) HALO0 wsestnsonn atone Figure 229: nable_auto_log_backup During normal system operation (log mode normal), we recommend that you Keep the automatic log backup activated, EY 264 ‘© 2014 SAP AG or an SAP afflate company. All ghts reserved 2ore Unit 8: Operations. A200 Caution: When you change the log mode, you must restart the database system (0 activate the changes. We also recommend that you create a full data backup of the database. log_buffer_size_kb: ize_Kb sets the size of one in-memory log buffer in ‘The parameter log_buffer kilobytes. @ + log buffer size kb + Type: integer i= + Changeable: online + Sets size of one in-memory log buffer in kilobytes. Figure 231: log_buffer_size_kb Setting a higher buffer size may increase the throughput at the cost of COMMIT latency. During COMMIT of a transaction, this data must be flushed to the YO subsystem (provided all preceding buffers are already flushed). content_yendor: ‘A delivery unit is a collection of packages that are to be transported together. You assign all the packages belonging to your app! to the same delivery unit to ensure that they are transported consistently together within your system landscape. Each delivery unit has a unique identity. ‘The identity of a delivery unit consists of two parts: @ vendor name and a Gelivery-unit name. The combined ID ensures that delivery units from different vendors are easy to distinguish and follows a pattern that SAP uses for all kinds of software components. To create and manage delivery units you first need to maintain the identity of the vendor, with whom the delivery units are associated, and in whose namespace the packages that make up the delivery unit are stored. This means: Before creating a delivery unit, the content_vendor parameter in indexserverini file must be defined: EN 266 (© 2014 SAP AG or an SAP afflate company. Allrights reserved. 2014 Unit 8: Operations A200 © Wunutn sas defpdin spat topos ee aon te esc iin Sab Fae Sede Figure 234: content_vendor (3) EY 268 {© 2014 SAP AG or an SAP affiliate company. All rights reserved 2or4 _ Operations. A200 Solution 8: Configuring SAP HANA Studio Task: 1 Store the adm user ID and password information in the Secure Store of the HANA Studio so that, when stopping the HANA DB using the HANA studio, it will use this information. a) Open the SAP HANA studio. b) Right-click on the system in the Systems window. ©) Select Properties. 4) Click the SAP System logon from the left panel. ©) Enter the adm user ID and its password, which is provided by the instructor. 1) Flag the option Store user name and password in secure storage 2) Then click pply and then OK. Change the Active Provider from Native to Direet for Network Connection. a) Open the SAP HANA studio. b) Choose Window — Preferences from the menu bar. ©) Click General Network Connections. 4) Please check if the value for Active Provider is Direct. If this is not the case, change the value to Direct. ‘Then click Apply and then OK. Continued on next page (© 2014 SAP AG or an SAP affiliate company. All rights reserved. 2014 Unit 8: Operations Haz00 5. Check the database parameter content_vendor so the delivery unit can be created. To change a database parameter, you need the permissions of the SYSTEM user 1a) Navigate to the Modeler Perspective. In Quick Launch, try to create a delivery unit. The message is: “Canmot ereate Delivery Unit as content vendor is not defined for this system.” Navigate back to the Administration Console. Open the Administration Editor with the permissions of the SYSTEM user. Double-click the HANA system entry that is using the SYSTEM user for connection. b) Click the Configuration tab ©) To search for the parameter content_vendor, type a few characters (like Content) in the field Filter. Then it will search all the parameters according to what you are typing. 4d) Double-click the parameter content_vendor. The parameter is located in the file indexserver.ini in the repository section. ‘Type the name of the content vendor sap.tra jing and click Save. 6, Now that you have configured the content vendor, create a new delivery unit and a package. a) Return to the Modeler Perspective. From the Help menu, navigate to Quick Launch. Select Delivery Unit from the Serup section, b) Choose Create. Enter STUDENT for the name and responsible person entries. Enter 1 for the version. Leave the remaining entries blank. ©) Close and verify that your delivery unit has been createed. d) To create a package, navigate to the Content folder in the Modeler Perspective. From the context menu, choose New —» Package. ¢) Enter studen tx for the name and description. ) For the delivery unit, select STUDENTXX from the drop-down list. 2) _ As Person Responsible, enter STUDENTEX. Click OK. h) Check your package in the Content folder. EY 272 (© 2014 SAP AG or an SAP afflate company. Allrights reserved 2014 Unit 8: Operations HAz00 Lesson: SAP HANA Table Administration Lesson Overview For SAP HANA administrators table administration is an important task. In this lesson details on table definition and partitioning are covered, Besides, various administrative tasks in this area are explained Lesson Objectives ‘After completing this lesson, you will be able to: + Decide when to use column-based and row-based storage + Create tables using SQL commands + Create tables using SAP HANA Studio + Display table definition and content + Describe the advantages of table partitioning + Know which specifications for single-level partitioning exist in SAP HANA. + Use the Table Distribution Editor in SAP HANA Studio + Partition tables + Check partitioning consistency + Replicate tables to multiple hosts + Load and unload column store tables manually + Trigger delta merge operations manually + Export and import tables and other catalog objects Business Example inistrator and need to create tables, optimize partitioning and perform administrative tasks in this context. Recap: Column-Based and Row-Based Storage lease keep in mind that the SAP HANA database supports both row-based and column-based storage. However, itis optimized for column storage. When creating a table you have to choose in advance whether it shall be stored row= or column-wise EY 274 (© 2014 SAP AG or an SAP affilata company. All ights reserved 2ore Unit 8: Operations A200 ‘Tables can be created using SQL or alternatively using the SAP HANA Studio interface: Se) ‘Sample SQL command for creating a column table: CREATE COLUMN TABLE "TRAINING"."CUSTOMER” (CUSTOMER ID" NVARCHAR(10) DEFAULT" NOT NULL, ‘CUSTOMER TEXT" VARCHAR(30) DEFAULT " *COUNTRY" VARCHAR(5) DEFAULT", °REGION" VARCHAR(S) DEFAULT", “LOGATION" VARCHAR(90) DEFAULT", -DISCOUNT_GROUP_ID" VARCHAR(4), PRIMARY KEY ("CUSTOMER_ID")) Details and Options: See also SAP HANA SQL Reference Figure 237: Creating Tables (1) - Sample SQL Command for Creating a Column Table {A sample SQL command for creating a column table is depicted above. With that, column table CUSTOMER is created within database schema TRAINING. It contains five different columns of which CUSTOMER_ID is the primary key. & Hint: For details and options please see also SAP HANA SQL Reference. Alternatively it is possible to create a table directly within SAP HANA Studio: Ey 276 {© 2014 SAP AG or an SAP affate company. All rights reserved 2ota Unit 8: Operations, © A200 ‘Some meritering and problem analysis may require you to examine individual tables, for example, the many system views provided by the SAP HANA database. You can open tables and views in different ways. Several viewing options are available depending on what you want to do: ‘= Table definition ‘The table definition view provides you with information about the table's ‘structure and properties (for example, schema, type, column propertes, end indexes). Detaled information relating to the table's memory usage and size is available on the Runtime information sub-tab. Table content Opening a table's content executes @ SELECT statement onthe table. The results set shows the actual records in the table Data preview Opening the data preview of a table allows you to analyze the content of the teble in ciferent ways. Similarly tothe table content view, this is partcularly useful for analyzing system views, Figure 238: Displaying Table Definition and Content Displaying catalog object definitions and changing existing catalog objects requires specific privileges. If these have not been granted to the user, error “Insufficient privilege’ will be retuned. To open the table editor choose ‘Open Definition’ in the context menu of a specific table. ) [Heomnemaaar ‘Fooeoce wacscrne| "9 terae Berean ap 3 Yor srmnm Btonomcing i hcton 2 rom enacts (Ptosrnsecuni sense 2 oe Toomearapenestaons OC Sromiowmecaoa —* ote Sromouerenasto sere nda Rote | Brorceeowrucceun [x Sone. |fcenes = SS HOMLIEICUREVTARSTONS a gyagyTtlMenory Cramotin 8) #78 BMosigavccoaroncs Uneaten} uber of ties: 3 imc pnal See ast pacha ANGE SAPSACT JO 200001201 emery Corsunptonin Man or9e (i MeneryCorsunsion in Dea storage (KE: insted Manan Neary Consargin (8 Figure 240: Displaying Table Definition EY 278 (©2014 SAP AG or an SAP afflate company. All rights reserved. 2014 Unit 8: Operations A200 Table Partioning and Distribution ‘The partitioning feature of the SAP HANA database makes it possible to split column-store tables horizontally into disjunctive sub-tables or partitions. In this ‘way, very large tables can be broken down into smaller, more manageable parts. & : Partitioning is typically used in distributed systems, but it may also be beneficial for single-host systems. There are additional DDL statements for partitionin 1 Create table partitions = Re-pantition tables = Merge partitions to one table = Add/delete partitions = Move partitions to other hosts Figure 243: Additional DDL Statements for Table Partitioning in the SAP HANA Database When a table is partitioned, the split is done in such a way that cach partition contains a different set of rows of the table, There are several alternatives available for specifying how the rows are assigned to the partitions of a table, for example, hash partitioning, partitioning by range or value Advantages of partitionin; = Load balancing Overcoming size-limitation of column store tables Parallelization 1» Partition pruning Improved performance of delta merge operation Explleit partition handling Figure 244: Advantages of Partitioning EY” 280 {© 2014 GAP AG or an SAP afflate company. All rights reserved 2ors Unit 8: Operations A200 ‘Supported single-level partitioning specifications: = Hash = Range » Round Robin Figure 248: Single-lovel Parti ning: Supported Specifications + Hash Partitioning: Hash partitioning is used to distribute rows to partitions equally for load balancing and to overcome the 2 billion row limitation. The number of the assigned partition is computed by applying a hash function to the value of a specified column. Hash partitioning does not require an in-depth knowledge of the actual content of the table. + Range Partitioning: Range partitioning can be used to create dedicated partitions for certain values or certain value ranges in a table, Usually, this requires an in-depth knowledge of the values that are used or are valid for the chosen partitioning column. For example, a range partitioning scheme can be chosen to create ‘one partition for each calendar month, + Round Robin Partitioning: Round-robin partitioning is used to achieve an equal distribution of rows to partitions, However, unlike hash partitioning, you do not have to specify partitioning columns. With round-robin partitioning, new rows are assigned to partitions on a rotation basis. The table must not have primary Keys. Hint: For additional details see also SAP HANA Administration Guide. Note: Besides single-level partitioning, in SAP HANA various options for multi-level partitioning exist. Details are described in the SAP HANA ‘Administration Guide, & => SAP HANA SPS7 a new feature called “Time Selection Partitioning (Aging)” is included Ey 282 (© 2014 SAP AG or an SAP affiliate company, All ight reserved 2ore Unit &: Operations A200 e@ ‘To support the analysis and monttering of performance issues in a distributed SAP HANA system, a lable cstribution editor is availabe in which you can see how tables and table parttions are distrbuted across the hosts. Detailed information ‘about tebles/paritions (for example, memory usage and size) is also available. You access the Table Distribution editor from the SAP HANA Systems view. Figure 248: Table Distribution Editor (1/2) ‘The Table Distribution editor provides an overview about the distribution of tables in a distributed system. It can be opened using the context menu on folder Console or any schema of tables folder in the Navigator. For performance reasons not all tables of the selected schema are displayed, but only 1000 tables of that schema (number configurable in Preferences + Administration Console —+ Common — Table Distribution Editor). A message is displayed, if more tables exist in the selected schema. It is displayed, if a table is distributed to several partitions and on which host each of these partitions is stored. Existing partitions can be moved to different hosts. ‘Tables which are not partitioned yet can be moved to other hosts as well. However, itis not possible to split a table or change the partitioning using this view. Ey 284 (© 2014 SAP AG or an SAP afilate company. All rights reserved 2014 Unit 8: Operations, © A200 In a seale-outaystem tables may be replicates to muliple noste, Tis Useful when slovdy chenging mastor data often has to be joined with tables of parttions of otner tables that are located on mutiple hosts and you want to Feduce network trai. Example for creating column store tables with replicas on all hosts: (2 INT pRIVARY KEY) (CREATE COLLMN TAR REPLICA AT Al For prerequisites and additional details, please see also SAP Guido. Figure 251: Administrative Tasks: Table Replication (Tuning Option) Note: Several aspects need to be considered. Please see SAP HANA. Administration Guide for details. Under normal circumstances, the SAP HANA database manages the loading and unloading of tables into and from memory independently, the ‘aim being to keep all elevant data in memory. However, you can ‘manually load and unload individual tables and table columns it necessary. Options: +Loading and unloading tables using menu ‘command in SAP HANA Studio + Right-lck on table in Systems view + Inthe context menu, click on Load into ‘Memory or Unload from Memory Loading and unloading tables using SQL + LORD + UNLOAD Loading and unloading individual columns + LOAD (, ~) ‘+ UNLOAD (ceolum_name>, .) Figure 252: Administrative Tasks: Loading and Unloading Column Tables As the SAP HANA database automatically manages the loading and unloading of tables, you should normally not have to interfere with this process. However, you can manually load and unload individual tables and table columns if necessary. For example: + To precisely measure the total or “worst case” amount of memory used by a particular table (load) + Toactively free up memory (unload) Hint: You can see detailed information about a table's current memory ‘usage and load status by viewing its table definition (as described above).. EXT 286 ‘© 2014 SAP AG or en SAP affiliate company, Al rights reserved. 2014 Unit 8: Operations A200 ) You can export catalog objects to filesystem and then import them back into an another database. For example, you want to move data trom a test system to a productive system, clone your system, or provide the data to SAP Support so they can repicate a scensrio, = You can exportimport either meta data only or meta data and content © Column-store tables, procedures, and sequences can be exported in either binary or CSV format. Row-etore tables can be exported only in CSV format pes by a Figure 254: Administrative Tasks: Importing and Exporting Tables Note: The size of a CSV format file can be very large compared to the binary file size. As a default, the exported data will be stored on the database server. However, it is also possible to export the data to the local client machine, Importing data will create the tables in the same schema as in the source system. If the table already exists, you have to mark the flag that it can be overwritten — otherwise the import will abort with an error message. Ey 288 (© 2014 SAP AG or en SAP affiliate company. All rights reserved. 2014 Unit 8: Operations HAz00 Task 3: ‘Check the size of the memory consumption of main storage and delta storage and trigger a delta merge operation manvally 1. Check the size of the memory consumption of main storage and delta storage of table SALES_DATA_PART 2. Trigger a delta merge operation of table SALES_DATA_PART manually 3. Check the size of the memory consumption of main storage and delta storage of table SALES_DATA_PART after the delta merge operation has been performed Task 4: Create and merge table partitions and verify the integrity with an extended data check 1. Open the Table Distribution Editor and display table partitions of table SALES_DATA_PART 2, Partition table SALES_DATA_PART by range for the column CUSTOMER_ID 3. Check the integrity of partitions in table SALES_DATA_PART (execute extended data check) 4, Merge the partitions of table SALES_DATA_PART EY 290 ‘© 2014 SAP AG or en SAP affilte company. Allrights reserved 2ora Unit 8: Operations A200 Task 2: Check the loading status ofthe table and trigger unload and load manually 1. Unload table SALES_DATA_PART fiom the memory of the HANA server a) Inthe Systems window right-click on table SALES_DATA_PART b) From the context menu select Unload from Memory. ©) Confirm by clicking on OK 2. Confirm that the table has been unloaded successfully by checking the Toading status in the Runtime Information 8) Right-click on the table in the Sysiems window and select Open Definition b) Navigate to the tab Runtime Information c) Confirm that column Loaded in table Details for Table indicates that the table is not loaded. Additionally, you can see that currently the table does nat consume memory (indicated by “Total Memory Consumption «KBy’) 3. Load the table completely into the memory and check the loading status again ) Inthe Systems window tightlick on table SALES_DATA_PART b) From the context menu select Load into Memory. ©) Confirm by elieking on OK d) Right-click on the table in the Systems window and select Open Definition ©) Navigate to the tab Runtime Information f) Confirm that column Loaded in table Details for Table indicates that the table is fully loaded. Additionally, you can see that currently the table ‘now consumes memory (indicated by “Total Memory Consumption (Key) Continued on next page EY 292 (© 2014 SAP AG or an SAP alflate company, All ights reserved. ote Unit 8: Operations HAz00 2. Partition table SALI CUSTOMER_ID a) Right-click on table SALES_DATA_PART in the Table Distribution itor ; DATA_PART by range for the column b) Choose Partition Table. ©) Forthe Partitioning Specification select Range and click on Next 4) As column leave CUSTOMER_ID ©) Click on Add right to the table Value Ranges to add a value range 1) Asstart value for partition 1 enter 0, 2s end value 1001 2) Add an additional value range with start value 2001 and end value 4000 Note: Since an additional partition for all other values will be created automatically, in total three partitions will be created h) Click on Check Input i) Click on Finish 4) In the partition details (Table Distribution Editor) of table SALES_DATA_PART expand the host. Now the three partitions with their respective sizes should be visible. 3. Check the integrity of partitions in table SALES_DATA_PART (execute extended data check) a) Inthe Systems window right-click on the SAP HANA system where ‘you are logged on as user SYSTEM b) From the context menu choose SOL Console ©) Insert the following SQL command to check partitioning consistency of the table: CALL CHECK_TABLE_CONSISTENCY (' CHECK_PARTITION- ING_DATA’, TRAINING’, ‘SALES DATA PART’); d) Click on Execute ©) Confirm that no errors are displayed, i. the extended data check has shown that no issues exist Continued on next page EY 294 (© 2014 SAP AG or en SAP etfilate company. All rights reserved. 2014 Unit 8: Operations Z HAz200 e Lesson Summary You should now be able to: + Decide when to use column-based and row-based storage + Create tables using SQL commands + Create tables using SAP HANA Studio + Display table definition and content + Describe the advantages of table partitioning + Know which specifications for single-level partitioning exist in SAP HANA + Use the Table Distribution Editor in SAP HANA Studio + Partition tables + Check partitioning co + Replicate tables to multiple hosts + Load and unload column store tables manually. + Trigger delta merge operations manually + Export and import tables and other catalog objects fency EN” 296 © 2014 SAP AG or an SAP affilte company. Al ights reserved ote

You might also like