Sap hana

43
[Pick the date] SRINIVASULUREDDY SRINIVAS.HANA@GMAIL.COM

description

SAP HANA PRACTICE QUESTIONS....

Transcript of Sap hana

Page 1: Sap hana

Srinivasulureddy Page 1

[Pick the date]

SRINIVASULUREDDY [email protected]

Page 2: Sap hana

Srinivasulureddy Page 2

1. How to add system to HANA Studio?

Answer: Choose Start > Studio.

Choose Window > Open Perspective > Other.

Choose Modeler . Choose OK. Navigate to the Navigator pan

From the context menu, choose Add System

Page 3: Sap hana

Srinivasulureddy Page 3

Enter the host name, instance number, and a description for the

system you want to add.

Choose Next.

Page 4: Sap hana

Srinivasulureddy Page 4

Choose Next.

Select the required options. Choose Finish.

Page 5: Sap hana

Srinivasulureddy Page 5

Check the system is the system is added or not

2. Understand the components under server

Answer: See the content and catalog files

Check Under Catalog we have

Users

Page 6: Sap hana

Srinivasulureddy Page 6

For example check for system user check Granted roles SQL privileges Analytic privileges System privileges Package privileges

Roles

Page 7: Sap hana

Srinivasulureddy Page 7

Granted roles Part of roles SQL privileges Analytic privileges System privileges Package privileges

Public synonyms

Schemas

Page 8: Sap hana

Srinivasulureddy Page 8

under schema we have Column views Procedures Tables Views...Etc...

Under catalog we have packages

Page 9: Sap hana

Srinivasulureddy Page 9

Under the package we have Attribute views Analytic views Calculation views Analytic privileges Procedures...etc.

3. Switch to one perspective to other perspective Open perspective

Select other

Page 10: Sap hana

Srinivasulureddy Page 10

Under perspective you have the following

Administration control Debug Graphiti Life cycle management RCP perspective Resources. Team synchronizing

4. Check all Standard Schemas 1. SYSTEM

Page 11: Sap hana

Srinivasulureddy Page 11

2. SYS 3. SAP_IC 4. IC_TABLES 5. _SYS_REPO 6. _SYS_STATISTICS 7. _SYS_BI_SYS_BIC 8. _SYS_REPL

5. Create custom schema

From the Quick Launch tab page, choose SQL Editor.

In the SQL editor, write the script, create schema <schema name>.

Page 12: Sap hana

Srinivasulureddy Page 12

Execute the script.

Page 13: Sap hana

Srinivasulureddy Page 13

Write grant statement

Execute.

6. Create Row Based Table in SQL Editor Go to modeler Click on SQL editor

Page 14: Sap hana

Srinivasulureddy Page 14

Write the ROW table query

Execute

REFRESH AND CHECK

Page 15: Sap hana

Srinivasulureddy Page 15

7. Create Column Based Table in SQL Editor Go to modeler Click on SQL editor

Write the ROW table query

Execute

Page 16: Sap hana

Srinivasulureddy Page 16

Refresh and Check

8. Create New Column/Row Based Table from already Existed Row Based Table

Page 17: Sap hana

Srinivasulureddy Page 17

I.)Creation of row table from already created column table

Select any COLUMN table right click & select generate Use Table as Template

PROVIDE Name schema name & type of store

Page 18: Sap hana

Srinivasulureddy Page 18

Execute

II.)Creation of row table from already created column table

Select any ROW table

Page 19: Sap hana

Srinivasulureddy Page 19

right click & select generate Use Table as Template PROVIDE Name schema name & type of store

9. Export SQL Statement(Creation of table) from Table

Page 20: Sap hana

Srinivasulureddy Page 20

Select any table

Double click on the table

Click on export SQL .

Page 21: Sap hana

Srinivasulureddy Page 21

Check the SQL table

10. Insert data into Tables Manually

Page 22: Sap hana

Srinivasulureddy Page 22

Select any table right click & select generate Insert Statement

We will get SQL Statement

Insert the values

Page 23: Sap hana

Srinivasulureddy Page 23

After inserting the values , execute

Check the table

Page 24: Sap hana

Srinivasulureddy Page 24

11. Select Data from Tables Select any table Right click & select generate Select Statement

We will get SQL Statement & click on Execute.

Page 25: Sap hana

Srinivasulureddy Page 25

Check the table

Page 26: Sap hana

Srinivasulureddy Page 26

DATA PROVISIONING

12. Execute .DDL File to create Schemas & tables under studio level

Page 27: Sap hana

Srinivasulureddy Page 27

Select .DDL file

open it & copy code

Log on to Studio

Page 28: Sap hana

Srinivasulureddy Page 28

click on SQL Editor

paste the copied DDL data file on SQL editor

click on execute

Check the Schema and Tables

Page 29: Sap hana

Srinivasulureddy Page 29

13. Keep our .DDL file in HANA Data Base PATH: “usr/sap/HAN/HDB(XX)”

Page 30: Sap hana

Srinivasulureddy Page 30

Go to programs WINSCP Give the credentials

Click on Log on We use WIN SCP to execute “DDL scripts” from a customer

schema in HANA database

Page 31: Sap hana

Srinivasulureddy Page 31

Select the DDL file in source pane

Copy the DDL file Paste in target location (PATH: “usr/sap/HAN/HDB(XX)”)

Page 32: Sap hana

Srinivasulureddy Page 32

Go to programs Extra putty

Give the host name or IP address & port Select the SSH Select load Click on load Click on open

Page 33: Sap hana

Srinivasulureddy Page 33

Give the credentials Login as : Password Switch user to HANA user Su – username Ex: su – hanadm

Page 34: Sap hana

Srinivasulureddy Page 34

To check is ddl file is copied or not by using ls -1 cmd

To execute the SQL file write the following cmd

Page 35: Sap hana

Srinivasulureddy Page 35

hdbsql –i52 –uSYSTEM –pNine1234

Page 36: Sap hana

Srinivasulureddy Page 36

Check the schema in HANA studio

Page 37: Sap hana

Srinivasulureddy Page 37

14. Export Efashion_Tutorial Schema & It’s tables to Client Location & It’s tables to one sever to other server(DevTestProd)

Answer:

Go to modeler Click on file Choose export

Open as below Select export destination file format

Page 38: Sap hana

Srinivasulureddy Page 38

Page 39: Sap hana

Srinivasulureddy Page 39

Page 40: Sap hana

Srinivasulureddy Page 40

Page 41: Sap hana

Srinivasulureddy Page 41

Page 42: Sap hana

Srinivasulureddy Page 42

Page 43: Sap hana

Srinivasulureddy Page 43