SAP Hana Interview Questions

 Q.What is the reason for going In-memory? Answer: One reason is the number of CPU cycles per second is increasing and the cost of processors is decreasing. For managing the data in memory, there is five-minute rule which is based on the suggestion that it costs more to wait for the data to be fetched from disk than it costs to keep data in memory so it depends on how often you fetch the data. For example there is a table and no matter how large it is and this table is touched by a query at least once every 55 minutes, it is less expensive (in hardware costs) to keep it in memory than to read it from memory and if it is frequently accessed it is less expensive to store it in memory. Q.What is a Five-minute rule? Answer: It is a rule of thumb for deciding whether a data item should be kept in memory, or stored on disk and read back into memory when required. The rule is “randomly accessed disk pages of cache are re-used every 5 minutes”. Q.What is multi-core CPU? Answer: Multiple CPU’s on one chip or in one package is called multi-core CPU. . Traditional databases for online transaction processing (OLTP) do not use current hardware efficiently. Q.What is Stall? Answer: Waiting for data to be loaded from main memory into the CPU cache is called as Stalls. Q.What is SAP In-Memory Appliance (SAP HANA)?  Answer: HANA is an in-memory technique to store data that is particularly suited for handling very large amounts of tabular, or relational, data with extra ordinary performance. Common databases store tabular data row-wise. Reorganizing the data in memory column-wise brings a tremendous speed increase when accessing a subset of the data in each table row. Q.What are the components or products of HANA? Answer: SAP HANA contains the following components and administration tools: • SAP® In-Memory Computing Engine (IMCE) Server 1.0 • SAP® IMCE Clients 1.0 – The IMCE clients are the interfaces by which the IMCE can communicate with other components. The following subcomponents are included: IMCE ODBO 1.0 IMCE ODBC 1.0 IMCE JDBC 1.0 IMCE SQLDBC 1.0 • SAP® IMCE Studio1.0 (includes SAP HANA Modeler) • Sybase Replication Server 15 + Sybase Enterprise Connect Data Access (ECDA) • Sybase Replication Agent • SAP® HANA Load Controller 1.0 (includes R3Load, RepServer De-cluster Add-On) • SAP® Host Agent 7.20 Q.What are the different editions available in HANA appliance software? Answer: Platform , and Enterprise edition. Platform edition is intended for customers who want to use ETL-based replication and already have a license for SAP BO Data Services. Enterprise edition is intended for customers who want to use either trigger-based replication or ETL-based replication and do not already have all of the necessary licenses for SAP BO Data Services. Extended edition is intended for customers who want to use the full potential of all available replication scenarios including log-based replication. Q.What is columnar and Row-Based Data Storage? Answer: A database table contains data in the form of rows and columns. However Computer memory is organized as a linear structure. To store a table in linear memory, there are two options. A row-based storage stores a table as a sequence of records, each of which contains the fields of one row.  In a columnar storage the entries of a column are stored in contiguous memory locations. The SAP HANA database allows to specify whether a table is to be stored column-wise or row-wise. It is also possible to alter an existing table from columnar to row-based and vice versa. Search operations in tabular data can be accelerated by organizing data in columns instead in rows. Q.What are the advantages of Column based tables? Answer: Calculations are typically executed on single or a few columns only. The table is searched based on 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, etc.). High compression rates can be achieved because the majority of the columns contain only few distinct values (compared to number of rows). Q.What are the advantages of Row-based tables? Answer: The application needs to only process a single record at one time (many selects and/or updates of single records). The application typically needs to access a complete record (or row). The columns contain mainly distinct values so that the compression rate would be low. Neither aggregations nor fast searching are required. The table has a small number of rows (e. g. configuration tables). Q.In which case the data to be stored in columnar storage? Answer: To enable fast on-the-fly aggregations, ad-hoc reporting, and to benefit from compression mechanisms it is recommended that transaction data to be stored in a column-based table. Q.Is it possible to join tables of row-based with column-based tables? Answer: Yes Q.Are column-based tables always the better choice than row-based tables? Answer:  No. There are also situations in which row based tables are advantageous. Q.What are the advantages of Columnar tables? Answer: Higher Data Compression Rates Higher Performance for Column Operations Elimination of Additional Indexes Parallelization Elimination of Materialized Aggregates Q.What are the different Compression Techniques you know? Answer:  Run-length encoding Cluster encoding Dictionary encoding Q.Why materialized aggregates are not required? Answer:  With a scanning speed of several gigabytes per millisecond, in-memory column stores, make it possible to calculate aggregates on large amounts of data on the fly with high performance. This is expected to eliminate the need for materialized aggregates in many cases. Q.What are the advantages of Eliminating materialized aggregates? Answer:  No additional tables for storing aggregate results means: Simplified data model Simplified application logic Higher level of concurrency and With the fly Aggregation we have aggregated values up to date Q.What is parallelization? Answer: Column-based storage makes it easy to execute operations in parallel using multiple processor cores. In a column store data is already vertically partitioned means that operations on different columns can easily be processed in parallel. If multiple columns need to be searched or aggregated, each of these operations can be assigned to a different processor core. In addition operations on one column can be parallelized by partitioning the column into multiple sections that can be processed by different processor cores (core 3 and 4 below). Q.What are the different types of replication techniques? Answer:  1.ETL based replication using BODS 2.Trigger based replication using SLT 3.Extractor based data acquisition using DXC Q.What is SLT? Answer:  SLT stands for SAP Landscape Transformation which is a trigger based replication. SLT replication server is the replication technology to pass data from source system to the target system. The source can be either SAP or non-SAP. Target system is SAP HANA system which contains HANA database. Q.Is it possible to load and replicate data from one source system to multiple target database schemas of HANA system? Answer: Yes. It is possible for up to 4. Q.Is it possible to specify the type of data load and replication? Answer: Yes either in real time, or scheduled by time or by interval. Q.What is Configuration in SLT? Answer: The information to create the connection between the source system, SLT system, and the SAP HANA system is specified within the SLT system as a Configuration. You can define a new configuration in Configuration & Monitoring Dashboard (transaction LTR). Q.Is there any pre-requisite before creating the configuration and replication? Answer: For the SAP source systems DMIS add-on is installed in SLT replication server. User for RFC connection has the role IUUC_REPL_REMOTE assigned but not DDIC. For non-SAP source systems DMIS add-on is not required and grant a database user sufficient authorization for data replication. Q.What is Configuration and Monitoring Dashboard? Answer: It is an application that runs on SLT replication server to specify configuration information (such as source system, target system, and relevant connections) so that data can be replicated. It can also use it to monitor the replication status (transaction LTR). Status Yellow: It may occur due to triggers which are not yet created successfully. Status Red: It may occur if master job is aborted (manually in transaction SM37). Q.What is advanced replication settings? Answer: A transaction that runs on SLT replication server to specify advanced replication settings like Modifying target table structures, Specifying performance optimization settings Define transformation rules Q.What is Latency? Answer: It is the length of time to replicate data (a table entry) from the source system to the target system. Q.What is logging table? Answer: A table in the source system that records any changes to a table that is being replicated. This ensures that SLT replication server can replicate these changes to the target system. Q.What are Transformation rules? Answer: A rule specified in the Advanced Replication settings transaction for source tables such that data is transformed during the replication process. Example you can specify rule to Convert fields Fill empty fields Skip records Q.What happens when you set-up a new configuration? Answer: The database connection is automatically created along with GUID and Mass transfer id (MT_ID). A schema GUID ensures that configurations with the same schema name can be created. The Mass transfer ID is used in the naming of SLT jobs and the system can uniquely identify a schema. Q.What factors influence the change/increase the number of jobs? Answer: Number of configurations managed by the SLT replication server Number of tables to be loaded/replicated for each configuration Expected speed of initial load Expected replication latency time.  As a rule of thumb, one BDG job should be used for each 10 tables in replication to achieve acceptable latency times. Q.When to change the number of Data Transfer jobs? Answer: If the speed of the initial load/replication latency time is not satisfactory If SLT replication server has more resources than initially available, we can increase the number of data transfer and/or initial load jobs After the completion of the initial load, we may want to reduce the number of initial load jobs Q.What are the jobs involved in replication process? Answer:  1. Master Job (IUUC_MONITOR_) 2. Master Controlling Job (IUUC_REPLIC_CNTR_) 3. Data Load Job (DTL_MT_DATA_LOAD__<2digits>) 4.Migration Object Definition Job (IUUC_DEF_MIG_OBJ_<2digits>) 5.Access Plan Calculation Job (ACC_PLAN_CALC__<2digits>) Q.What is the relation between the number of data transfer jobs in the configuration settings and the available BGD work processes? Answer: Each job occupies 1 BGD work processes in SLT replication server. For each configuration, the parameter Data Transfer Jobs restricts the maximum number of data load job for each mass transfer ID (MT_ID). A mass transfer ID requires at least 4 background jobs to be available: One master job One master controller job At least one data load job One additional job either for migration/access plan calculation/to change configuration settings in “Configuration and Monitoring Dashboard”. Q.If you set the parameter “data transfer jobs” to 04 in a configuration “SCHEMA1”, a mass transfer ID 001 is assigned. Then what jobs should be in the system? Answer: 1 Master job (IUUC_MONITOR_SCHEMA1) 1 Master Controller job (IUUC_REPL_CNTR_001_0001) At most 4 parallel jobs for MT_ID 001 (DTL_MT_DATA_LOAD_001_ 01/~02/~03/~04) Performance:  If lots of tables are selected for load / replication at the same time, it may happen that there are not enough background jobs available to start the load procedure for all tables immediately. In this case you can increase the number of initial load jobs, otherwise tables will be handled sequentially. For tables with large volume of data, you can use the transaction “Advanced Replication Settings (IUUC_REPL_CONT)” to further optimize the load and replication procedure for dedicated tables. Q.What happens after the SLT replication is over? Answer: The SLT replication server creates 1 user, 4 roles, 2 stored procedures and 8 tables. 1 User 1 Privilege 4 Roles _DATA_PROV _POWER_USER _USER_ADMIN _SELECT 2 Stored procedures RS_GRANT_ACCESS, RS_REVOKE_ACCESS 8 Tables DD02L, DD02T, RS_LOG_FILES, RS_MESSAGES, RS_ORDER, RS_ORDER_EXT, RS_SCHEMA_MAP, RS_STATUS Q.What are the different replication scenarios? Answer: Load, Replicate, Stop, Suspend and Resume. Before you select any application table, the initial load of the tables DD02L, DD02T & DD08L must be completed as they contain the metadata information. Load: Starts an initial load of replication data from the source system. The procedure is a one-time event. After it is completed, further changes to the source system database will not be replicated. For the initial load procedure, neither database triggers nor logging tables are created in the source system. Default settings use reading type 3 (DB_SETGET) with up to 3 background jobs in parallel to load tables in parallel or subsequently into the HANA system. Replicate: Combines an initial load procedure and the subsequent replication procedure (real time or scheduled). Before the initial load procedure will start, database trigger and related logging table are created for each table in the source system as well as in SLT replication server. Stop Replication: Stops any current load or replication process of a table. The stop function will remove the database trigger and related logging tables completely. Only use this function if you do want to continue a selected table otherwise you must initially load the table again to ensure data consistency. Suspend: Pauses a table from a running replication. The database trigger will not be deleted from the source system. The recording of changes will continue and related information is stored in the related logging tables in the source system. If you suspend tables for a long time the size of logging tables may increase and adjust the table space if required. Resume: Restarts the application for a suspended table. The previous suspended replication will be resumed (no new initial load required). Q.What happens if the replication is suspended for a long period of time or system outage of SLT or HANA system? Answer: The size of the logging tables increases. Q.How to avoid unnecessary logging information from being stored? Answer: Pause the replication by stopping the schema-related jobs. Q.Will the table size in SAP HANA database and in the source system the same? Answer: No as HANA database supports compression. Q.When to go for table partitioning? Answer: If the table size in HANA database exceeds 2 billion records, split the table by using portioning features by using “Advanced replication settings” (transaction IUUC_REPL_CONT, tab page IUUC_REPL_TABSTG). Q.Where do you define transformation rules? Answer: By using “Advanced replication settings” (transaction IUUC_REPL_CONT, tab page IUUC ASS RULE MAP) Q.Are there any special considerations if the source system is non-SAP system? Answer: The concept of trigger-based replication is actually meant for SAP source systems. The main differences are: There will be a database connection between non-SAP source and SLT system instead of RFC. Source must have primary key Tables DD02L, DD02T which contains metadata are just initially loaded but not replicated. The read modules reside on SLT system. Tables with database specific formats may need transformation rules before they are replicated. Only SAP supported databases (with respective DBSL for SAP Net Weaver 7.02) are supported as non-SAP source systems. Q.What are the potential issues in the creation of configuration? Answer: Missing add-on DMIS_2010 in source system Missing the proper role of SAP_IUUC_REPL_REMOTE for RFC user ( SAP_IUUC_USER for SLT system ) Logon credentials are not correct Q.How can you ensure that data is consistent in source system and HANA system? Answer: Since any changes in the source system is tracked in dedicated logging tables, the replication status for each changed data record is transparent. A entry of logging table is deleted after a successful commit statement from HANA database and this procedure ensures the data consistency between source system and HANA system. Q.Does SLT for SAP HANA support data compression like SAP HANA database? Answer: Yes, this is automatically covered by the RFC connection used for data replication from the SAP source system. Q.Maximum number of tables in a schema? Answer: 131072 Q.What can be the maximum table name length? Answer: 127 characters Q.What can be the maximum column name length? Answer: 127 characters Q.What can be the maximum number of columns in a table? Answer: 1000 Q.What can be the maximum number of columns in a view? Answer: 1000 Q.What can be the maximum number of partitions of a column table? Answer: 1000 Q.What can be the maximum number of rows  in each table? Answer: Limited by storage size RS: 1TB/sizeof(row) CS: 2^31 * number of partitions Q.In which table you can get the current system limits? Answer: M_SYSTEM_LIMITS Q.Maximum number of jobs you can view the information in the Current tab of Job log? Answer:  5 Q.What is SQLScript? Answer: It is a set of SQL extensions for SAP HANA database which allow developers to push data intensive logic into the database. Q.When should be SQLScript used? Answer: It should be used in cases where other modeling constructs of HANA such as Attribute views or Analytic views are not sufficient. Q.Explain how SQLScript procedure is processed in HANA database? Answer: When a user creates a new procedure, the HANA database query compiler first: Parse the statements Check the statement semantic correctness Optimize the code for Declarative and Imperative logic Code generation creates Calculation models for Declarative logic and L nodes for Imperative logic Compiled procedure creates Content in the database Catalog and in Repository. Q.What happens when you compile the procedure? Answer: During compilation, the call to the procedure is rewritten for processing by the calculation engine. Q.What happens when you execute the procedure? Answer: It binds the actual parameters to the calculation models generated in the definition phase. Q.What are the data types supported in SQLScript? Answer: SQLScript allows the definitions of table types and also supports primitive data types such as Integer, Decimal(p,q), Varchar, Blob, Timestamp, etc. Q.What is a table type? Answer: Table types are used to define parameters for a procedure that represent tabular results. Example: CREATE TYPE tt_publishers AS TABLE ( publisher INTEGER, name VARCHAR(50), price DECIMAL, cnt INTEGER); CREATE TYPE tt_years AS TABLE ( year VARCHAR(4), price DECIMAL, cnt INTEGER); Q.What is the general syntax used in creating procedure? Answer: CREATE PROCEDURE ] AS BEGIN END Q.How to recompile a procedure? Answer: ALTER PROCEDURE proc_name RECOMPILE Q.Can you specify a default value while creating procedure? Is there any change while calling the procedure? Answer: CREATE PROCEDURE my_proc (IN P1 INT, IN P2 INT DEFAULT 1, OUT out1 DUMMY) AS BEGIN out1 = SELECT  1 +  2 AS DUMMY FROM DUMMY; END; While calling the procedure, we need to pass ‘Named Parameters’ with token (=>). CALL my_proc (P1 => 3, out1 => ?) If you want to specify all the input fields then call statement would be: CALL my_proc (3, 4, ?) Q.What is the purpose of procedure ‘Call… With Overview’ option? Answer: To write the results of a procedure call directly into a physical table. CALL my_proc (3, 4, NULL) WITH OVERVIEW; Q.What is the purpose of procedure ‘Call…..In Debug Mode’ option? Answer: It creates the additional debug information during the execution of the procedure. This type of call has additional runtime overhead hence should be used for debugging purposes only. CALL my_proc (3, 4, NULL) IN DEBUG MODE; Q.What is Table variable? Answer: These are variables with table type which are bound to the value of a physical table, SQL query or a calculation engine plan operator. Table variables are bound using equality operator. Q.What is a scalar variable? Answer: We define scalar variable as IN, OUT, or INOUT and can be referenced anywhere in a procedure. lt_expensive_books = SELECT title, price, crcy FROM  :it_books WHERE price > :minPrice AND crcy = :currency; In above assignment, the variable lt_expensive_books is bound. Variable :it_books refers to an IN parameter of a Table type. :minPrice and :currency refer to IN parameter of a scalar type. Q.What is CE plan operator? What are the different categories? Answer: CE plan operator does the data transformation functionality internally and used in definition of functions. It is an alternate to using SQL statements. Data Source Access operators that bind a column table or a column view to a table variable. (CE_COLUMN_TABLE, CE_JOIN_VIEW, CE_OLAP_VIEW, CE_CALC_VIEW) Relational operators that allow a user to bypass the SQL processor during evaluation and directly executed in the calculation engine. (CE_JOIN, CE_LEFT_OUTER_JOIN, CE_RIGHT_OUTER_JOIN, CE_PROJECTION,CE_CALC, CE_AGGREGATION, CE_UNION_ALL) Special extensions implement, e.g., crucial business functions inside the database kernel. (CE_VERTICAL_UNION, CE_CONVERSION) Q.What is CE_COLUMN_TABLE operator? Answer: It provides access to an existing column table. It takes the name of the table and returns its content bound to a variable. Example: ot_books1 = CE_COLUMN_TABLE (“BOOKS”); ot_books2 = CE_COLUMN_TABLE (“BOOKS”, ); This example  only works on a column table and does not invoke the SQL processor. It is semantically equivalent to the following: ot_books3 = SELECT * FROM books; ot_books4 = SELECT title, price, crcy FROM books; The function that provide data source access does not allow renaming of attributes. Q.What is CE_JOIN_VIEW operator? Answer: It return results for an existing join view (also known as Attribute view). It takes the name of join view and optional list of attributes as parameters. Example: out = CE_JOIN_VIEW (“PRODUCT_SALES”, ); Q.What is  CE_OLAP_VIEW operator? Answer: It return results for an existing OLAP view (also known as Analytical view). It takes the name of OLAP view and an optional list of key figures and dimensions as parameters. The OLAP view is grouped by dimensions and the key figures are aggregated using the default aggregation of the OLAP view. Example: out = CE_OLAP_VIEW (“OLAP_view”,); Is equivalent to out = SELECT dim1, SUM(kf) FROM OLAP_view GROUP BY dim1; Q.What is CE_CALC_VIEW operator? Answer: It returns results for an existing calculation view. It takes the name of the calculation view and optionally a projection list of attribute names. Example: out = CE_CALC_VIEW (“CALC_view”, ); Is equivalent to out = SELECT  cid, cname FROM CALC_view; Q.What is CE_JOIN operator? Answer: It calculates a inner join of the given pair of tables on a list of join attributes. Each pair of join attributes must have identical attribute names  else one of them  must be renamed prior to the join. Example: ot_pubs_books1 = CE_JOIN (:lt_pubs, :it_books, ); ot_pubs_books2 = CE_JOIN (:lt_pubs, :it_books, , ); Is equivalent to ot_pubs_books3 = SELECT P.publisher as publisher, name, street, post_code, city, country, isbn, title, edition, year, price, crcy FROM :lt_pubs AS P, :it_books as B WHERE P.publisher = B.publisher; ot_pubs_books4 = SELECT  title, name, P.publisher as publisher, year FROM :lt_pubs AS P, :it_books AS B WHERE P.publisher = B.publisher; Q.What is CE_LEFT_OUTER_JOIN operator? Answer: It calculates the left outer join. Besides the function name the syntax is same as  CE_JOIN. Q.What is CE_RIGHT_OUTER_JOIN operator? Answer: It calculates the right outer join. Besides the function name the syntax is same as  CE_JOIN. Q.What is CE_PROJECTION operator? Answer: It restricts the columns in the table variable and optionally renames columns, computes expression, or applies a filter. Example: ot_books1 = CE_PROJECTION(:it_books, , ‘“PRICE” > 50′); Is equivalent to ot_books2 =  SELECT  title, price, crcy AS currency FROM :it_books WHERE price > 50; 24.What is CE_CALC operator? It evaluates an expression and then bound to a new column Example: with_tax = CE_PROJECTION(:product, , ””CNAME” = ‘:cname”’); Is equivalent to with_tax2 = SELECT cid, cname, oid, sales, sales * :vat_rate AS sales_vat FROM :product WHERE cname = ‘:cname’; All columns used in CE_CALC have to be included in the projection list. Another frequent use of CE_CALC is computing row numbers. CE_CALC(‘rownum()’, integer) AS “RANK” Q.What is CE_AGGREGATION operator? Answer: It groups the input and computes aggregates for each group. Supported aggregate functions are  count(“column”), sum(“column”), max(“column”), min(“column”). Use sum(“column”)/count(“column”) to compute the average. Example: ot_books1 = CE_AGGREGATION(:it_books, , ); Is equivalent to ot_books2 = SELECT COUNT (publisher) as cnt, year FROM :it_books GROUP BY year; 26.What is CE_UNION_ALL operator? It computes the union of two tables which need to have identical schemas. Example: ot_all_books1 = CE_UNION_ALL (:lt_books, :it_audit_books); Is equivalent to ot_all_books2 = SELECT * FROM :lt_books UNION ALL SELECT * FROM :it_audit_books; Q.What is special operator? Answer: CE_VERTICAL_UNION and CE_CONVERSION are the special operators which do not have any immediate SQL equivalent. 28.What operator is used to debug SQLScript procedures? TRACE operaor. It traces the tabular data passed as its argument into a local temporary table and return its input unmodified. The names of the temporary tables can be retrieved from the SYS.SQLSCRIPT_TRACE view. Example: out = TRACE (:input); Q.How to set-up tracing? Answer: From the Administration perspective, navigate to tab “Trace Configuration” . In order to change settings, you need to have system privileges “TRACE ADMIN” and “INFILE ADMIN”. Q.What is the difference between BREAK and CONTINUE? Answer: Break means loop should stop processing, CONTINUE means loop should stop processing the current iteration and immediately start processing the next iteration. Q.What is Cursor? Answer: It is used to fetch single rows from the result set returned by a query. CREATE PROCEDURE cursor_proc LANGUAGE SQLSCRIPT AS v_isbn VARCHAR(20); CURSOR c_cursor1 (v_isbn VARCHAR(20)) FOR SELECT isbn, title, price, crcy FROM books WHERE isbn = :v_isbn ORDER BY isbn; BEGIN OPEN c_cursor1(’978-3-86894-012-1′); IF c_cursor1::ISCLOSED THEN CALL ins_msg_proc(‘WRONG: cursor not open’); ELSE CALL ins_msg_proc(‘OK: cursor open’); END IF; FETCH c_cursor1 INTO v_isbn, v_title, v_price, v_crcy; IF c_cursor1::NOTFOUND THEN CALL ins_msg_proc(‘WRONG: cursor contains no valid data’); ELSE CALL ins_msg_proc(‘OK: cursor contains valid data’); END IF; CLOSE c_cursor1; END; Q.How to loop cursor over result sets? Answer: Using FOR loop. CREATE PROCEDURE foreach_proc() LANGUAGE SQLSCRIPT AS v_isbn VARCHAR(20) := ”; CURSOR c_cursor1 (v_isbn VARCHAR(20)) FOR SELECT isbn, title, price, crcy FROM books ORDER BY isbn; BEGIN FOR cur_row as c_cursor1 DO CALL ins_msg_proc(‘book title is: ‘ || cur_row.title); END FOR; END; Q.What are the two developer roles in HANA SPS05? Answer: The two developer roles are Modeler and Application Programmer. Modeler:  modeler is concerned with the definition of model and schemas used in the SAP HANA, the specification and definition of tables, views, primary keys, indexes, partitions and inter-relationship of the data, designing and defining authorization and access control through the specification of privileges, roles and users and generally uses the perspective “Administration Console” and “Modeler”. Application Programmer: Programmer is concerned with building SAP HANA applications which are designed based on MVC (model-view-controller) architecture and generally uses the perspective “SAP HANA Development”. Q.Explain HANA database Architecture (SP05)? Answer: Clients connect to the database system which forms a session within the database in the form of SQL statements. In the HANA database, each SQL statement is processed in the context of a transaction. New sessions are assigned to a new transaction. Traditional database applications uses JDBC and ODBC interface to communicate with the database management system over a network connection and application uses SQL to manage and query the data stored in the database. In the HANA database Index server is the main component of database management which contains the actual data stores and the engines for processing the data. The index server processes incoming SQL or MDX statements in the context of transaction. The Transaction manager coordinates database transactions, and keeps track of running and closed transactions. When a transaction is committed or rolled back, the transaction manager informs the involved storage engines about this event so they can execute necessary actions. The HANA database has its own scripting language called SQLScript that is designed to enable optimization and parallelization. HANA supports the Business Functional Library (BFL) and Predictive Analysis Library (PAL) and can be called directly from within SQLScript. It also supports the development of programs written in R language. SQL and SQLScript are implemented using a common infrastructure of Built-in functions. That have access to various meta definitions such as definitions of relational tables, columns, views, and indexes, definitions of SQLScript procedures.  This Metadata is stored in one common catalog (row store or column store). The Persistence layer ensures that the database after a restart is restored to the most recent committed state. It uses a combination of write-ahead logs, shadow paging and save points. The persistence layer also contains Logger that manages the transaction log. The Index server uses the Preprocessor Server for analyzing the text data and extracting the information based on text search capabilities. The Name Server knows where the components are running and which data is located on which server. The Statistics Server collects information about status, performance and  resource consumption from other servers in the system. Q.What is SAP XS (Extended Application Service)? Answer: SAP HANA XS provides end-to-end support for web-based applications . Q.What are Development objects? Answer: The building blocks of SAP HANA applications are called development objects. Q.What is Repository? Answer: The HANA Repository is storage system for development objects and is built into SAP HANA. The repository supports Version control, Transport, and Sharing of objects between multiple developers. We can add objects to the repository, update the objects, publish the objects, and compile these objects into runtime objects. Q.What are the different perspectives available in HANA? Answer: Modeler: used for creating various types of views and analytical privileges. SAP HANA Development: Used for programming applications for creating development objects to access or update data models such as Server-side Java script or HTML files. Administration: Used to monitor the system and change settings. Debug: Used to debug code such as SQLScript (.procedure files) or Server-side Java script (.xsjs files). To open a perspective, go to Window → Open Perspective. Q.Before starting development work in SAP HANA studio, What are the roles a user should have on SAP HANA server ? Answer: Modeling, Content_Admin. Q.What is a Delivery Unit? Answer: Delivery unit (DU) is a container used by the Life Cycle Manager (LCM) to transport repository objects between the SAP HANA systems. The name of DU must contain only capital letters (A-Z), digits (0-9) and underscores (_). Q.What is a workspace? Answer: The place where you work on project-related objects is called a repository workspace. Q.What is a package and its types? Answer: Package is used to group together related content objects in SAP HANA studio. By default it creates Non-structural. Type                            Description Structural            Package only contains sub-packages. It cannot contain repository objects. Non-Structural    Package contains both repository objects and sub-packages. Q.What are the default packages delivered with the repository? Answer:  Sap System-local System-local.generated System-local.private Q.What can be the maximum length of a package name? Answer: 190 characters including dots.   Example: RajKumar.pkg123 Q.What are package privileges? Answer: REPO.READ:  Read access to the selected package and design-time objects (both native and imported). REPO.EDIT_NATIVE_OBJECTS:  Authorization to modify design-time objects in packages originating in the system the user is working in. REPO.ACTIVATE_NATIVE_OBJECTS:  Authorization to activate/reactivate design-time objects in package originating in the system the user is working in. REPO.MAINTAIN_NATIVE_PACKAGES: Authorization to update or delete native packages or create sub-packages of packages  originating in the system in which the user is working. Q.How each object is uniquely identified in the repository? Answer: Each object is uniquely identified by the combination of package name, object name and object type. Q.Can multiple objects of the same type can have the same object name? Answer: Yes, only when they belong to different packages. 16.What are the different tasks you can perform in setting up the basis persistence model for SAP HANA XS? Creating Schema, Creating Table, Creating View, Creating Sequence and Importing table content. Q.What are the different tasks you can perform in modeler perspective? Answer: Import metadata, Load data, Create packages, Create information views, Create Procedures, Create Analytical privileges, Import SAP NetWeaver BW objects, Create Decision Tables, Import and Export objects. Q.What are the supported object types in modeler perspective? Answer: Attribute views, Analytical views, Calculation views, Analytical privileges, Procedures, Decision tables, Process Visibility Scenario. Q.What are the different modeler preferences and how do you set? Answer: You can set the modeler preferences by choosing the menu Window → Preferences → Modeler  (or) Quick launch → Manage Preferences. Q.Why to configure Import server? Answer: In order to load data data from external sources to SAP HANA we need to establish a connection with the server. To connect, we need to provide details of Business Objects Data Services repository and ODBC drivers. Once the connection is established, we can import the tables definition and then load data into table definitions. Quick launch – Configure Import Server Enter the IP address of the server from which you want to import data Enter the repository name Enter the ODBC data source, and choose OK. Q.How to Import table definitions? Answer: If you want to import all table definitions, Go to File menu → Choose Import Expand the  SAP HANA Content node Choose “Mass Import of Metadata” and choose next Select the target system where you want to import all the table definitions, and choose next In the Connections Details Dialog , enter the user name and password of the target system Select the required source system and choose Finish. Note: If you want to import selective table definitions use “Selective Import of Metadata”. Q.How to load data into tables? Answer: Quick Launch → Data Provisioning Choose Source Choose Load (for Initial load) or Replicate (for data replication) Select the required tables to load or replicate Click Finish. Q.How to upload data from Flat files? Answer: File menu → Import In ‘Select an Import Source’ section, expand the ‘SAP HANA Content’ node Select ‘Data from Local file’ and choose Next Select the Target system to which you want to import the data using Flat file, choose Next In ‘Define Properties Import Page’ browse the file containing the data Select ‘New’ option (If you want to load the data into a new table) or Select the ‘Existing’ option (If you want to append the data to an existing table) Click Finish. Q.How to copy standard content delivered by SAP? Answer: Quick Launch → Mass Copy Create a mapping between source package and target package Choose Next to view the summary Click Finish to confirm content copy. Q.What is Schema mapping? How do you do Schema mapping? Answer: Schema mapping is done when the physical schema in the target system is not the same as the physical schema in the source system. Quick Launch → Schema Mapping Choose Add Create a mapping in the Target system between the Authoring schema and Physical schema Click OK. Note: Schema mapping only applies to references from repository objects to catalog onjects. It is not intended to be used for repository to repository references. Q.In which configuration table, the mapping between authoring and physical schema is stored? Answer: SYS_BI.M_SCHEMA_MAPPING Q.What’s the purpose of Generating Time Data? Answer: If you model a time attribute view without generating time data, an empty view will be shown when you use data preview. To generate Time Data go to Quick Launch → Generate Time Data If your financial year is from January to December, Choose ‘Calender Type’ as Gregorian else Fiscal Click Generate. Q.In which configuration table the generated time data information will be stored? Answer: For Gregorian calendar type (SYS_BI) M_TIME_DIMENSION_YEAR M_TIME_DIMENSION_MONTH M_TIME_DIMENSION_WEEK M_TIME_DIMENSION For Fiscal M_FISCAL_CALENDAR Q.What is an Attribute? Answer: Attribute represents the descriptive data used in modeling. Example: City, Country, etc. Q.What is a Simple Attribute? Answer: Simple attributes are individual analytical elements that are derived from the data foundation. For example Product_ID, Product_Name are attributes of a Product subject area. Q.What is a Calculated Attribute? Answer: Calculated attributes are derived from one or more existing attributes or constants. For example deriving the full name of a customer (first name and last name), assigning a constant value to an attribute that can be used for arithmetic calculations. Q.What is a Private Attribute? Answer: Private attributes used in an analytical view allow you to customize the behavior of an attribute for only that view. For example if you create an analytical view and you want a particular attribute to behave differently than it does in the attribute view to which it belongs, you can define it as a private attribute. Q.What is a Measure? Answer: Measures are simple measurable analytical elements and are derived from Analytic and Calculation views. Q.What is a Simple Measure? Answer: Simple Measure is a measurable analytical element that is derived from the data foundation. Q.What is a Calculated Measure? Answer: Calculated Measures are defined based on a combination of data from OLAP cubes, arithmetic operators, constants, and functions. Q.What is a Restricted Measure? Answer: Restricted measures are used to filter the value for an output field based on the user-defined rules For example you can restrict the revenue column only for Region = APJ, Year = 2013. Q.What are Counters? Answer: Counters add a new measure to the Calculation view definition to count the recurrence of an attribute. For example, to count how many times Product appears. Q.What is an Attribute View? Answer: Attribute views are used to model entity based on the relationships between attribute data contained in multiple source tables. You can model Columns, Calculated columns and Hierarchies. Also you can fine-tune the attributes of an Attribute view: Can apply filter to restrict values Can be defined as Hidden so that they can be processed but not visible to end users Can be defined as key attributes and used when joining multiple tables Can be further drill down by ‘Drill Down Enable’ property. Q.What are the tables to be imported for creating attribute view of type Time? Answer:  T009 and T009B. Q.What is Label Mapping? Answer:  We can choose to associate an attribute with another attribute description. Label mapping is also called as Description mapping. For example if A1 has a label column B1, then you can rename B1 to A1.description. The related columns appear side by side during data preview. Q.What happens when one of the table in Attribute view has modified column with data type? Answer: It reflects the previous state of the columns, even if you remove and add it again. It is referring to the cache. To resolve this issue close the editor and reopen it. Q.What happens when you open an attribute view with a missing column in the required object? Answer: An error will be shown “column is not found in table schemaname.tablename” and the editor does not open. To make it consistent Open the required object and add the missing column/attribute/measure temporarily Now open the object which was previously giving error Find all references to this column, Save the object Now go ahead and delete the column from the required object. Q.What is an Analytic view? Answer: Analytic views are used to model data that includes measures. In case of multiple tables, measures must originate from only one of these tables (central table). You can model Columns, Calculated columns, Restricted columns, Variables,  and Input parameters. Also you can fine-tune the attributes of an Analytic view: Can apply filter to restrict values Can be defined as Hidden so that they can be processed but not visible to end users Can be defined as key attributes and used when joining multiple tables Can be further drill down by ‘Drill Down Enable’ property You can model Aggregation type on measures You can model Currency and Unit of Measure. Q.Can we include Attribute views in Analytic view definition? Answer: Yes Q.What does the Scenario panel of Analytic view editor contains? Answer: Data Foundation: represents the tables used for defining the fact table of the view. You can specify the central table by selecting a value in ‘Central Entity’ property. Logical Join: represents the relation between fact table and attribute views to create start schema. Semantics: represents the output structure of the view. Q.What does the aggregation type ‘Calculate Before Aggregation’ mean? Answer: If you select ‘Calculate Before Aggregation’, the calculation happens as per the expression specified and then the results are aggregated as SUM, MAX, MIN, or COUNT. If it is  NOT selected, the calculation happens as per the expression specified but the data is not aggregated but shown as FORMULA. Q.How to activate the other objects (required or impacted objects) along with current object? Answer: By using ‘Save and Activate All’ option in the toolbar. Q.Can you add column views to Analytic view and Calculation view? Answer: We can add column views in a Calculation view but not in the Analytic view. Q.Consider there is a table that contains product ID’s with no product description and you have a text table for products that has language specific description for each product? How can you get the language specific data? Answer: Create a text join between these two tables. The right table should be the text table and is mandatory to specify the “Language Column” in the ‘Properties’ view. Q.What are the restrictions while creating the join between the views and fact table? Answer: A table should not appear twice in any join path, i.e. Self join is not supported. While creating join between Analytic view and Attribute view the same table cannot be used in both the views. Q.What is Calculation view? Answer: Calculation view is more advanced slice of the data and can include measures from multiple source of tables, can include advanced SQL logic. The data foundation of the calculation view can include any combination of tables, column views, attribute views and analytic views. We can create joins, unions, projections, and aggregation levels on the sources. You can model Attributes, Measures, Calculated measures, Counters, Hierarchies (created outside of the attribute view), Variables and Input parameters. Q.Calculation views are modeled based on what? Answer: Graphical views or Scripted views but not as SQLScript. However there are exceptions to this rule. SQLScript with the following properties can be used in Calculation view: No input parameters Always Read-only (do not make changes to database) Side-effect free. Q.What are the option available in ‘Run With’ while creating calculation view? Answer: Definer’s Right, Invoker’s Right. Definers right: System uses the rights of  the definer while executing the view or procedure for any user. Invokers right: System uses the rights of the current user while executing the view or procedure. Q.While creating a Graphical Calculation view, what are the options available in Tools palette? Answer: Union, Join, Projection, and Aggregation. Note: You can have only one source of input for Projection and Aggregation views. You can create filters on Projection and Aggregation view attributes. Q.How to create Counters in Graphical Calculation view? Answer:  For example to get the number of distinct values of an attribute: Go to the Output pane, right click Counters From the context menu, choose New Choose Attribute Click ok. Q.Is it mandatory to include measures for Calculation view? Answer: No. Calculation view containing no measures works like an attribute view and is not available for reporting purposes. Q.How do you debug the Calculation view with lot of complexity at each level? Answer: By previewing the data of an intermediate node. Q.What is Mapping input parameter in Calculation view? Answer: It is used for mapping the input parameters in the underlying data sources of the calculation view with calculation view parameters. Q.In calculation view, What is the option ‘Auto Map by Name’ used for? Answer: It automatically creates the input parameters corresponding to the source and perform a 1:1 mapping. Q.What are the options available in Source input parameter? Answer: Create New Map 1:1 Map by Name Remove Mapping Q.Consider there are two tables (Actual sales and Planned sales) with similar structures. I want to see the combined data in a single view but at the same time how can I differentiate the data between these two tables Answer: Create a union view (Graphical) between the two tables and have a ‘Constant column’ indicating constant values like ‘A’ for Actual sales and ‘P’ for Planned sales. The default value for the constant column is NULL. Q.What is a Constant column and how to create it? Answer: In a Union view, a Constant column is created for the output attributes for which there is no mapping to the source attributes. To create Constant column: Right click the attribute in the target list Choose Manage Mappings To map the source to the target column, select the required source from the dropdown list To assign a default value to the constant column, enter a value in the Constant value field Select the required data type, length and scale as required Click ok. Q.What is the difference between HANA Variable and Input parameter? Answer: HANA Variables do not impact the execution and used to filter the attributes, for example we can filter a result to a specific country or product  and are applied in the WHERE clause of the SQL query. HANA Input parameters used to manipulate the execution of the information model, for example currency codes or dates when exchange rates have to be calculated and are passed as PLACEHOLDER in the FROM clause of the SQL query. Q.In which configuration table you can find the variables information? Answer: You can find in _SYS_BI schema BIMC_VARIABLE  BIMC_VARIABLE_ASSIGNMENT BIMC_VARIABLE_VIEW BIMC_VARIABLE_VALUE Q.What are the different types of Input parameters supported? Answer: Attribute value/Column Currency (Available in Calculation view only) Date (Available in Calculation view only) Static list Derived from Table (Available in Analytic and Graphical Calculation view) Empty Direct Type (Available in Analytic view) Q.How can you check whether an input parameter is mandatory or not? Answer: From the properties of Input parameter in the Properties pane. Q.What is Hierarchy? Answer: We create hierarchies between attributes to improve analysis by displaying attributes according to their defined relationships. There are two types of hierarchies: Level Hierarchy: The root and child nodes are accessed only in the defined order. It consists of one or more levels of aggregation. Example: We can drill down from Country to State and to City etc. Parent/Child Hierarchy: This hierarchy contains a parent attribute and constructed from a single parent attribute. Example: Employee master (employee and manager). Q.How to create an hierarchy for Analytic view? Answer: Hierarchy is not supported in Analytic view but can be used only in Attribute view and Calculation view. Q.While creating hierarchy, what does the option ‘Aggregate All Nodes’ mean? Answer: For example there is a member A with value 100, A1 with value 10, A2 with value 20 where A1 and A2 are children of A. By default the option ‘Aggregate All Nodes’ is set to false and you will see a value of 30 for A. When this option is set to true, you will count the posted value 100 for A as well and see a result of 130. Q.How can you generate a Sales report for a region in a particular currency where you have the sales data in a database table in a different currency? Answer: Create an Analytic view by selecting the table column containing the sales data and currency and perform currency conversion. Once the view is activated, we can use it to generate reports. Q.What are the factors that affect currency conversion? Answer: Currency conversion is performed based on source currency, target currency, exchange rate, and date of conversion. You can select currency from the attribute data used in the view. Currency conversion is enabled for Analytic view and Calculation views. Q.What is the prerequisite for doing the currency conversion? Answer: You need to import tables TCURC, TCURF, TCURN, TCURR, TCURT, TCURV, TCURW & TCURX. Q.What is the prerequisite for Unit of Measure? Answer: You need to import the tables T006 & T006A. Q.What happens when you activate an object? Answer: The object is exposed to repository and for analysis. Q.What is the difference between Activate and Redeploy? Answer:  Activate – It deploys the inactive objects. Redeploy – It deploys the active objects. You do this when run-time object is corrupted or deleted and you want to create it again. OR when the object goes through client-level activation and server-level activation but fails at MDX, and the object status is still active. Q.What are the supported activation modes? Answer: Activate and Ignore the inconsistencies in impacted objects Stop activation in case of inconsistencies in impacted objects. Irrespective of the activation mode, if even one of the selected objects fails (either during validation or during activation), the complete activation job fails and none of the selected objects will be activated. Q.Can you explain the behavior of activation job? Answer: The status of the activation job indicates whether the activation of the objects is successful or failed. In case of failure (status is completed with errors) the process is rolled back and none of the objects are activated In the summary part the job log shows success, even in the case of failure. This is to help the user to indicate that those objects were successfully activated without any issues. When you open the job log, the summary list only shows those objects that are submitted for activation. It does not list all the affected objects. They are listed in detail section. Q.What is a Decision table? Answer: It creates related business rules in a tabular format for automating the decisions. It helps in managing business rules, data validation, data quality rules without any language knowledge. The active version of the decision table can be used in applications. You create decision table in a package just like any attribute view. You can create from scratch or from an existing decision table. Q.Where to see the detailed report of the decision table? Answer: In the ‘Job Log’ section you can see the validation status and detailed report of the decision table. 80.How to execute the decision table? The decision table is executed by calling the procedure. CALL  “”.””; CALL  “”.””(, …… , , ?); for Condition as parameters and Action as parameters. On execution of the procedure, if no parameters are used then physical table is updated based on the data you enter in the form of condition values and action values. Q.Are there any restrictions on Decision table to preview the data? Answer: Data preview is supported only if: Decision table is based on physical table and has at-least one parameter as action Decision table is based on Information view and parameter(s) as action. Q.How can you change the layout of a decision table? Answer: You can change the layout by arranging the condition and action columns. By default all the conditions appear as vertical columns in the decision table and you can mark a condition as a horizontal condition under the Decision table editor, choose ‘Change Layout’. Q.Can you switch ownership of objects? Answer: We can take the ownership of objects from other user’s workspace only if it is inactive version of the object Authorization required is “Work in Foreign Workspace”. The active version is owned by the user who created and activated the object. 84.What is the difference between Switch Ownership and Take Over? Switch Ownership: To take multiple inactive objects from other users. Take Over: To take single inactive object from another workspace. Q.You are working on a inactive version of a object. How can you view changes made to the active version? Answer: Select the required object in a package you are working From the context menu, choose ‘open’ In the editor pane, choose ‘Show Active Version’ Compare the active and inactive versions of the object. Q.How can you view the version history of content objects? Answer: Select the required object from the package From the context menu choose ‘History’. Q.What is Refactoring Object? Answer: Restructuring the Content objects without changing their behavior is call Refactoring. Q.What are the objects eligible for Refactoring? Answer: Packages, Attribute views, Analytic views, Graphical Calculation views, and Analytical Privileges. Q.How do you validate models? Answer: Quick launch menu → Validate From the ‘Available’ list, select the required models that system must validate. Choose Add Click Validate. Q.How do you generate the documentation for the objects you created? Answer: By using ‘Auto Documentation’ which captures the details of an information model or a package in a single document. Process to create is: Quick Launch → Auto Documentation In ‘Select Content Type’ choose  ‘Model Details’ OR ‘Model List’ Add the required objects to the Target list Browse the location where you want to save the file Click finish. Q.How to identify whether an information model is referenced by any other information model? Answer: We can check the model references by using ‘Where Used’. Process is: Go to the package Select the required object From the context menu, choose ‘Where Used’. Q.What is the difference among Raw Data, Distinct values and Analysis while doing the Data Preview? Answer: Raw Data  : It displays all attributes along with data in tabular format. Distinct Values: It displays all attributes along with data in graphical format. Analysis  : It displays all attributes and measures in graphical format. Q.What are the different types of functions can be used in expressions? Answer: Conversion, String, Mathematical, Date and Misc functions. if(”SCORE” > 7, “SELECTED”, IF(”SCORE” > 4, “ONHOLD”, “REJECTED”)); returns REJECTED if the SCORE is <= 4. case(“CODE”,1,’NEW’,2,’VENDOR REBUILT’,3,’SHOP REBUILT’,'INVALID’); if the value of CODE is other than 1/2/3 then a default value of ‘INVALID’ will be selected. Q.How to search Tables, Models, and Column views? Answer: In the Modeler search field, enter the object you want Select the system in dropdown Click search. The matching objects are listed in results pane with 3 tab pages: Tables, Models, and Column views. Q.Is it possible to Import SAP Netweaver BW objects? Answer: Yes it is possible to import SAP BW objects. Q.How to Import BW models? Answer: The process to Import BW models: File menu → Import Expand SAP HANA Content node, choose ‘Import SAP NetWeaver BW Models’ In ‘Source System’ enter BW credentials Select the target system Select BW InfoProviders If you want to import selected models along with display atributes  for IMO Cube and IMO DSO, select ‘Include Display Attributes’ We can select analysis authorizations associated with InfoProviders/Role based. Click finish. contact for more on SAP Hana Online Training