Hana Selected Concepts for Interview

Embed Size (px)

Citation preview

  • 8/9/2019 Hana Selected Concepts for Interview

    1/29

    Qs. What is SAP HANA? SAP HANA is an in-memory database.

    o It is a combination of hardware and software made to process massive real time data

    sin! In-"emory comptin!.

    o It combines row-based# colmn-based database technolo!y.

    o $ata now resides in main-memory %&A"' and no lon!er on a hard dis(.

    o It)s best sited for performin! real-time analytics# and developin! and deployin! real-

    time applications.

    An in-memory database means all the data is stored in the memory %&A"'. *his is no time wasted in

    loadin! the data from hard-dis( to &A" or while processin! (eepin! some data in &A" and temporary

    some data on dis(. +verythin! is in-memory all the time# which !ives the ,Ps ic( access to data for

    processin!.

    SAP HANA is eipped with mltien!ine ery processin! environment which spports relational as well as

    !raphical and te/t data within same system. It provides featres that spport si!ni0cant processin! speed#

  • 8/9/2019 Hana Selected Concepts for Interview

    2/29

    handle h!e data si1es and te/t minin! capabilities.

    Qs. So is SAP ma(in!2sellin! the software or the hardware?

    SAP has partnered with leadin! hardware vendors %HP# 34its# I5"# $ell etc' to sell SAP certi0ed hardware

    for HANA.

    SAP is sellin! licenses and related services for the SAP HANA prodct which incldes the SAP HANA

    database# SAP HANA Stdio and other software to load data in the database.

    Qs. What is the lan!a!e SAP HANA is developed in?

    *he SAP HANA database is developed in ,66.

    Qs. What is the operatin! system spported by HANA?

    ,rrently SS+ 7in/ +nterprise Server /89-9: %S7+S' ;; SP; is the

  • 8/9/2019 Hana Selected Concepts for Interview

    3/29

  • 8/9/2019 Hana Selected Concepts for Interview

    4/29

    SAP HANA spports both row-based and colmn-based approach.

    3ollowin! 0!re e/plains the dierence between the two stora!e mechanisms.

  • 8/9/2019 Hana Selected Concepts for Interview

    5/29

    Qs. What are the advanta!es and disadvanta!es of row-based tables?

    &ow based tables have advanta!es in the followin! circmstances@

    o *he application needs to only process a sin!le record at one time %many selects

    and2or pdates of sin!le records'.

    o *he application typically needs to access a complete record %or row'.

    o Neither a!!re!ations nor fast searchin! are reired.

    o *he table has a small nmber of rows %e. !. con0!ration tables# system tables'.

    &ow based tables have dis-advanta!es in the followin! circmstances@

    o In case of analytic applications where a!!re!ation are sed and fast search and

    processin! is reired. In row based tables all data in a row has to be read even tho!h the

    reirement may be to access data from a few colmns.

    Qs. What are the advanta!es of colmn-based tables?

    Advanta!es@

    o 3aster $ata Access@

  • 8/9/2019 Hana Selected Concepts for Interview

    6/29

    In colmnar tables# this information is stored physically ne/t to each other# si!ni0cantly increasin! the

    speed of certain data eries. $ata is also compressed# enablin! shorter loadin! times.

    ,onclsion@

    *o enable fast on-the-By a!!re!ations# ad-hoc reportin!# and to bene0t from compression mechanisms it is

    recommended that transaction data is stored in a colmn-based table.

    *he SAP HANA data-base allows 4oinin! row-based tables with colmn-based tables. However# it is more

    ecient to 4oin tables that are located in the same row or colmn store. 3or e/ample# master data that is

    freently 4oined with transaction data shold also be stored in colmn-based tables.

    3ew more important points abot colmn table@

    ;. HANA modelin! views are only possible for colmn tables. &ow based tables cannot be sed in modelin!

    views.

    =. 3or that reason &eplication Server creates SAP HANA tables in colmn store by defalt.

    C. $ata Services also creates tar!et tables in colmn store as defalt for SAP HANA database

    :. *he SQ7 command to create colmn table@ D,&+A*+ ,

  • 8/9/2019 Hana Selected Concepts for Interview

    7/29

    that can be processed by dierent processor cores. With the SAP HANA database# eries can be e/ected

    rapidly and in parallel.

    Qs. Why SAP HANA is fast?

  • 8/9/2019 Hana Selected Concepts for Interview

    8/29

    Qs. $escribe SAP HANA $atabase Architectre in brief.

    *he SAP HANA database is developed in ,66 and rns on SS+ 7in/ +nterpise Server. SAP HANA

  • 8/9/2019 Hana Selected Concepts for Interview

    9/29

    database consists of mltiple servers and the most important component is the Inde/ Server. SAP HANA

    database consists of Inde/ Server# Name Server# Statistics Server# Preprocessor Server and S +n!ine.

    Inde/ Server@

    o Inde/ server is the main SAP HANA database component

    o It contains the actal data stores and the en!ines for processin! the data.

    o *he inde/ server processes incomin! SQ7 or "$ statements in the conte/t of

    athenticated sessions and transactions.

    Persistence 7ayer@

    *he database persistence layer is responsible for drability and atomicity of transactions. It ensres that

    the database can be restored to the most recent committed state after a restart and that transactions are

    either completely e/ected or completely ndone.

    Preprocessor Server@

    *he inde/ server ses the preprocessor server for analy1in! te/t data and e/tractin! the information on

    which the te/t search capabilities are based.

    Name Server@

    *he name server owns the information abot the topolo!y of SAP HANA system. In a distribted system#

    the name server (nows where the components are rnnin! and which data is located on which server.

    Statistic Server@

    *he statistics server collects information abot stats# performance and resorce consmption from the

    other servers in the system.. *he statistics server also provides a history of measrement data for frther

    analysis.

    Session and *ransaction "ana!er@

    *he *ransaction mana!er coordinates database transactions# and (eeps trac( of rnnin! and closed

    transactions. When a transaction is committed or rolled bac(# the transaction mana!er informs the

    involved stora!e en!ines abot this event so they can e/ecte necessary actions.

    S +n!ine@

    S +n!ine is an optional component. sin! S +n!ine clients can connect to SAP HANA database to fetch

    data via H**P.

    Qs.What is ad hoc analysis?

    In traditional data warehoses# sch as SAP 5W# a lot of pre-a!!re!ation is done for ic( reslts. *hat is

    the administrator %I* department' decides which information mi!ht be needed for analysis and prepares

    the reslt for the end sers. *his reslts in fast performance bt the end ser does not have Be/ibility.

  • 8/9/2019 Hana Selected Concepts for Interview

    10/29

    *he performance redces dramatically if the ser wants to do analysis on some data that is not already

    pre-a!!re!ated. With SAP HANA and its speedy en!ine# no pre-a!!re!ation is reired. *he ser can

    perform any (ind of operations in their reports and does not have to wait hors to !et the data ready for

    analysis.

    Column Data Storage vs Row Data Storage: How Diferent are they Really?

    Overview o Row Data Storage and Column Data Storage:

    &elational databases typically se row-based data stora!e. However ,olmn-based stora!e is more

    sitable for many bsiness applications. SAP HANA spports both row-based and colmn-based stora!e#

    and is particlarly optimi1ed for colmn-based stora!e.

    As shown in the 0!re below# a database table is conceptally a two-dimensional strctre composed of

    cells arran!ed in rows and colmns.

    5ecase compter memory is strctred linearly# there are two options for the seences of cell vales

    stored in conti!os memory locations@

    Row Storage It stores table records in a seence of rows.

    Column Storage It stores table records in a seence of colmns i.e. the entries of a colmn is stored in

    conti!os memory locations.

    http://saphanainterview.com/column-store-vs-row-store-how-different-are-they-really/http://saphanainterview.com/column-store-vs-row-store-how-different-are-they-really/
  • 8/9/2019 Hana Selected Concepts for Interview

    11/29

    *raditional databases store data simply in rows. *he HANA in-memory database stores data in both rows

    and colmns. It is this combination of both stora!e approaches that prodces the speed# Be/ibility and

    performance of the HANA database.

    Advantages o column-ased tales:

    !aster Data Access:

  • 8/9/2019 Hana Selected Concepts for Interview

    12/29

    In colmnar tables# this information is stored physically ne/t to each other# si!ni0cantly increasin! the

    speed of certain data eries.

    *he followin! e/ample shows the dierent sa!e of colmn and row stora!e# and positions them relative to

    row and colmn eries. ,olmn stora!e is most sefl for

  • 8/9/2019 Hana Selected Concepts for Interview

    13/29

    's:( %hich o the ollowing nodes can you use when you create a calculation view with the

    SA$ HA)A studio gra#hical interace? *Choose two+

    A. $ata 3ondation

    5. A!!re!ation

    ,. Join

    $. Analytic Privile!e

    Answer

    5#,

    's:, %hen tale re#lication is sus#ended what does the SA$ .andsca#e /ransormation *S./+

    server do?

    A. It prevents the &3, connection from readin! the sorce system lo!!in! tables.

    5. It deletes the database tri!!ers and the lo!!in! tables in the sorce system.

    ,. It stops the &3, connection and deletes the tar!et tables in SAP HANA.

    $. It (eeps readin! via the &3, connection from the sorce system bt does not load the data into SAP

    HANA.

    Answer:A

    's:0 %hich o the ollowing can e #art o an analytic view? *Choose three+

    A. Qery transformation

    5. nions

    ,. 7o!ical 4oins

    $. $ata fondation

    +. Attribtes

    Answer:,#$#+

    's:1 %hich tool do you use or real-time data #rovisioning into SA$ HA)A?

    A. SAP 7andscape *ransformation %S7*'

    5. SAP 5siness

  • 8/9/2019 Hana Selected Concepts for Interview

    14/29

    ,. *ransaction 7*& on S7*

    $. $ata Provisionin! view in SAP HANA stdio

    Answer:,#$

    's: 3ou create a usiness layer in the SA$ "usinessO5ects ;normation Design /ool *;D/+6

    %hich o the ollowing could you add to the data oundation? *Choose two+

    A. Pac(a!es

    5. ,olmn *ables,. Synonyms

    $. Information "odels

    Answer:5# $

    's:< 3ou im#lemented SA$-delivered usiness content on SA$ HA)A6 %hen you try to activate

    the usiness content the activation ails6 %hat could e a reason or this?

    A. >o have not created a calclation view to e/pose the data to the sers.

    5. *he data has not been loaded into SAP HANA memory yet.

    ,. *he schema mappin! was not set p correctly.

    $. *he import of bsiness content was performed with the ES>SE&+P< ser.

    Answer@ ,

    's:= 3ou want to allow another develo#er to access the inormation models in one o your

    #ac9ages6 %hat #rivilege do you have to assign to this user to allow access?

    A. S+7+,* on ES>SE&+PSE&+P< with the !rant option

    ,. &+P

  • 8/9/2019 Hana Selected Concepts for Interview

    15/29

    ,. $ecision table

    $. *able

    +. Procedre

    Answer:A#,#$

    's:(0 %hich o the ollowing can you chec9 to investigate the uery time in SA$ HA)A?

    *Choose three+

    A. *he SQ7 plan cache

    5. *he ,entral "ana!ement ,onsole

    ,. *he e/pensive statements trace

    $. *he statistics server warnin! for lon! rnnin! statements

    +. *he System information tab of the Administration console

    Answer:A#,#$

    A. &ecreate the role with the command ,&+A*+ &

  • 8/9/2019 Hana Selected Concepts for Interview

    16/29

    ,. In the ES>SE5I, schema

    $. In a pac(a!e

    Answer:5

    's:(= %hich o the ollowing automatically aggregates data? *Choose two+

    A. Analytic view

    5. ,alclation view

    ,. ,olmn table$. Attribte view

    Answer:A#5

    's:,> %hich #rivilege ty#e do you have to assign to a role when you want to #rovide row-

    level access to data?

    's6 %hat is the ma4imum numer o tales in a schema?

    ;C;O=

    's6 %hat can e the ma4imum tale name length?

    ;=O characters

    's6 %hat can e the ma4imum column name length?

    ;=O characters

    's6 %hat can e the ma4imum numer o columns in a tale?

    ;

    's6 %hat can e the ma4imum numer o columns in a view?

    ;

    's6 %hat can e the ma4imum numer o #artitions o a column tale?

    ;

    's6 %hat can e the ma4imum numer o rows in each tale?

    7imited by stora!e si1e &S@ ;*52si1eof%row'

    ,S@ =C; nmber of partitions

    's6 ;n which tale you can get the current system limits?

    "ES>S*+"E7I"I*S

    's6 %hat is SA$ HA)A Direct 84tractor Connection *D@C+?

    SAP HANA $irect +/tractor ,onnection %$,' is an +/tractor based replication technolo!y for data

    replication from e/istin! SAP $ata Sorce e/tractors into SAP HANA.

    's6 %hat are the enets o D@C?

    $, levera!es SAP $elivered 5siness ,ontent $ataSorces # which are e/istin! fondational data

    models for (ey entities in SAP 5siness Site systems

    Si!ni0cantly redces comple/ity of data modelin! tas(s in SAP HANA

    *,< advanta!es %de to simplicity# minimal system landscape impact'

  • 8/9/2019 Hana Selected Concepts for Interview

    17/29

    $, provides a special In-"emory $ataStore

  • 8/9/2019 Hana Selected Concepts for Interview

    18/29

    Administration:sed to monitor the system and chan!e settin!s.

    Deug:sed to deb! code sch as SQ7Script %.procedre 0les' or Server-side Java script %./s4s 0les'.

    *o open a perspective# !o to Window R

  • 8/9/2019 Hana Selected Concepts for Interview

    19/29

    ;. +nter the database sername password to connect to the SAP HANA database.

    ,lic( on Ne/t and then 3inish.

    ;. *he SAP HANA system now appears in the Navi!ator.

    's6 %hat is the diference etween catalog and content?

    In HANA Stdio every HANA system has two main sb-nodes# ,atalo! and ,ontent.

  • 8/9/2019 Hana Selected Concepts for Interview

    20/29

    Catalog:

    *he ,atalo! represents SAP HANA)s data dictionary# i. e. all data strctres# tables# and data which can be

    sed.

    All the physical tables and views can be fond nder the ,atalo! node.

    Content:

    *he ,ontent represents the desi!n-time repository which holds all information of data models created withthe "odeler.

    Physically these models are stored in database tables which are also visible nder ,atalo!. *he "odels are

    or!ani1ed in Pac(a!es. *he ,ontents node 4st provides a dierent view on the same physical data.

    *he created ,olmn Kiews are always located in schema ES>SE5I,# their metadata in schema ES>SE5I.

    's6 Does 0, it version o HA)A client wor9 with SA$ HA)A re#ository and SA$ HA)A

    Develo#ment #ers#ective?

    *here is no C= bit version of the repository client.

    If yo want to ma(e se of the repository inte!ration featres# for e/ample# in the Pro4ect +/plorer view inthe SAP HANA $evelopment perspective# yo mst install the 9: bit version of the repository client.

    's6 How can we set #ath to the re#ository client in HA)A Studio?

    ;. In SAP HANA stdio# choose Window T Preferences T SAP HANA $evelopment T &epository Access

    =. ,hoose 5rowse and enter the path to the SAP HANA client e/ectable# re!i.e/e. 3or e/ample# ,@UPro!ram

    3ilesUsapUhdbclientUre!i.e/e

    C. ,hoose Apply to enable the new settin!.

    :. ,hoose

  • 8/9/2019 Hana Selected Concepts for Interview

    21/29

    ;. SF

    's6 %hat is the system view which shows recently used #asswords or each user?iew name: D7AS*ES+$EPASSWSF

    's6 %hat are the system view which shows the runtime inormation o columns o column

    tales and runtime data o column tales?

    Runtime inormation o columns o column tales:

    iew name: D "E,SE,

  • 8/9/2019 Hana Selected Concepts for Interview

    22/29

    iew name: D"E,SE*A57+SF

    Schema: DS>SF

    's6 %hat are the system view which shows inormation o row ased tales?

    iew name: D"E&SE*A57+SD

    Schema: DS>SF

    's6 %hat are the system view which shows the list o su##orted languages and su##orted

    mime ty#es or te4t analysis?.ist o su##orted languages:

    iew name: D "E*+*EANA7>SISE7ANMAM+SF

    Schema: DS>SF

    .ist o su##orted mime ty#es:

    iew name: D "E*+*EANA7>SISE"I"+E*>P+SF

    Schema: DS>SF

    's6 %hat are the system view which shows the a##lications de#loyed and running in the

    @S8ngine?

    iew name: D"ESEAPP7I,A*ISF

    's6 How can you nd list o all schemas and their corres#onding owner?

    S+7+,* S,H+"AENA"+# S,H+"AE

  • 8/9/2019 Hana Selected Concepts for Interview

    23/29

    *he SAP 7andscape *ransformation %7*' &eplication Server is the SAP technolo!y that allows s to load and

    replicate data in real-time from SAP sorce systems and non-SAP sorce systems to an SAP HANA

    environment.

    *he SAP 7* &eplication Server ses a tri!!er-based replication approach to pass data from the sorce

    system to the tar!et system.

    's6 %hat is the advantage o S./ re#lication?Advantages:

    ;. SAP 7* ses tri!!er based approach. *ri!!er-based approach has no measreable performance impact in

    sorce system.

    =. It provides transformation and 0lterin! capability.

    C. It allows real-time %and schedled' data replication# replicatin! only relevant data into HANA from SAP

    and non-SAP sorce systems.:. It is flly inte!rated with HANA Stdio.

    G. &eplication from mltiple sorce systems to one HANA system is allowed# also from one sorce system

    to mltiple HANA systems.

    's6 ;s it #ossile to use a re#lication or multi#le sources and target SA$ HA)A systems?

    >es# the SAP 7* &eplication Server spports both ;@N replication and and N@; replication.

    "ltiple sorce system can be connected to one SAP HANA system.

  • 8/9/2019 Hana Selected Concepts for Interview

    24/29

    's6 ;s there any #re-reuisite eore creating the conguration and re#lication?

    !or SA$ source systems:

    ;. $"IS add-on mst be installed in S7* replication server.

    =. An &3, connection between the SAP sorce system and the SAP 7* &eplication Server

    has to be established.

    C. ser for &3, connection mst have the role I,E&+P7E&+"

  • 8/9/2019 Hana Selected Concepts for Interview

    25/29

    A rle speci0ed in the Advanced &eplication settin!s transaction for sorce tables sch that data is

    transformed drin! the replication process. +/ample yo can specify rle to

    ,onvert 0elds

    3ill empty 0elds

    S(ip records

    's6 %hat ha##ens when you set-u# a new conguration?

    When a new con0!ration in the SAP 7* &eplication Server is created# the database connection is

    atomatically created alon! with a schema MI$ and "ass transfer id %"*EI$'.

    A schema MI$ ensres that con0!rations with the same schema name can be created.

    *he "ass transfer I$ is sed in the namin! of S7* 4obs and the system can niely identify a schema.

    *he mappin! of mass transfer I$s and related schema are stored in the S7* control table $",E"*EH+A$+&

    in the SAP 7* &eplication Server.

    's6 %hat are the 5os involved in re#lication #rocess?

    3ollowin! 4obs are involved in replication process@

    ;. "aster Job %I,E"

  • 8/9/2019 Hana Selected Concepts for Interview

    26/29

    Y 7oadin! data %load'

    Y &eplicatin! data %replication'

    Y ,han!in! stats Ba! for entries in control tables in the SAP 7* &eplication Server

    's6 %hat is the #ur#ose o Bigration O5ect Denition Ko *;CED8!EB;LEO"KEI,digitsJ+?

    *his 4ob de0nes the mi!ration ob4ect of a speci0c table %that yo choose to load2replicate'# which is the

    fndamental ob4ect for 7* replication. *he mi!ration ob4ect de0nition shold normally be ite fast for all

    tables.

    's6 %hat is the #ur#ose o Access $lan Calculation Ko *ACCE$.A)ECA.CEIB/E;DJEI,digitsJ+?

    *his 4ob calclates the access plan of a speci0c table %that yo choose to load2replicate'# and the access

    plan is sed for data load or replication. *he access plan is also a fndamental ob4ect for the replication.

    3or a normal si1ed table# access plan calclation shold 0nish ite ic(ly %less than ; minte' while lar!e

    tables mi!ht ta(e p to several hors to 0nish.

    's6 %hat is the relation etween the numer o data transer 5os in the conguration settings

    and the availale "LD wor9 #rocesses?

    +ach 4ob occpies ; 5M$ wor( processes in S7* replication server. 3or each con0!ration# the parameter

    $ata *ransfer Jobs restricts the ma/imm nmber of data load 4ob for each mass transfer I$ %"*EI$'.

    A mass transfer I$ reires at least : bac(!rond 4obs to be available@

  • 8/9/2019 Hana Selected Concepts for Interview

    27/29

    = Stored procedres

    &SEM&AN*EA,,+SS

    &SE&+K

  • 8/9/2019 Hana Selected Concepts for Interview

    28/29

    If yo sspend tables for a lon! time the si1e of lo!!in! tables may increase and ad4st the table space if

    reired.

    Resume:

    &estarts the application for a sspended table. *he previos sspended replication will be resmed %no

    new initial load reired'.

    's6 %hat ha##ens i the re#lication is sus#ended or a long #eriod o time or system outage o

    S./ or HA)A system?

    *he si1e of the lo!!in! tables increases.

    's6 How to avoid unnecessary logging inormation rom eing stored?

    Pase the replication by stoppin! the schema-related 4obs.

    's6 %ill the tale sie in SA$ HA)A dataase and in the source system the same?

    No. As HANA database spports compression# the table si1e in SAP HANA may be decreased.

    's6 %hen to go or tale #artitioning?

    If the table si1e in HANA database e/ceeds = billion records# split the table by sin! portionin! featres by

    sin! DAdvanced replication settin!sF %transaction I,E&+P7E,

  • 8/9/2019 Hana Selected Concepts for Interview

    29/29

    C. S7* $erived Schema

    ser Dened Schema:*hese are created by ser %$5A or System Administrator'

    S./ Derived Schema:When S7* is con0!red# it creates schema in HANA system. All the tables

    replicated into HANA system are contained in this schema

    System Dened Schema:*hese schemas are delivered with the SAP HANA database and contains HANA

    system information. *here are system schemas li(e ES>SE5I,# ES>SE5I# ES>SE&+PSES*A*IS*I,S etc.

    ES3SE";C:*his schema contains all the colmns views of activated ob4ects. When the ser activates the

    Attribte Kiew2Analytic Kiew2,alclation Kiew2Analytic Privile!e 2Procedre# the respective rn-time ob4ects

    are created nder ES>SE5I,-T,olmn Kiews.

    ES3SER8$O: Whatever the ob4ects are there in the system is available in repository. *his schema contains

    the list of Activated ob4ects# Inactive