You are on page 1of 2

Log on to WinSCP:

_________________
host: hanas
uid: root
psw: Ninne1234
Log on to Extra Putty:
______________________
IP: 192.168.1.209
port No: 22
Connection Type: SSH
Log in as: root
Pws: Nine1234
switch to HANA DB:
__________________
su
hanadm
To See Contents of HANA DB:
___________________________
ls l
To Start Sap system:
____________________
startsap
Switch to HDB client Interface:
_______________________________
hdbsql i52 usystem pNine1234
To get help:
____________
\h
To exit Client Interface:
_________________________
\q
To see the Schemas:
___________________
\ds
(To Exit running press 'CTRL+C' and then press 'enter' twice)
Again connect to Client by providing hdbsql i52 usystem pNine1234
To see the Tables:
__________________
CTRL+C
(To Exit running press 'CTRL+C' and then press 'enter' twice)
Again connect to Client by providing hdbsql i52 usystem pNine1234
To see the Views:
_________________
\dv
(To Exit running press 'CTRL+C' and then press 'enter' twice)
Again connect to Client by providing hdbsql i52 usystem pNine1234
Execute any commands:
_____________________
hdbsql i52 usystem pNine1234

select * from EFASHION_TUTORIAL.SHOP_FACTS


--------------------------------------------------------------To execute multiple commands at a time need to create SQL file
To create .SQL file:
____________________
su
hanadm
vi a.sql (a=> file name)
We will get editor
provide SQL statements
_______________________
create ROW table ASDD.ROW_local_climate ( location nvarchar(60),temperature_low
int, temperature_high int, annual_precipitation float );
insert into ASDD.ROW_local_climate values ('Berlin', -2, 24, 570.7);
insert into ASDD.ROW_local_climate values ('Heidelberg', 3, 20, 745.0);
insert into ASDD.ROW_local_climate values ('Biel', -2, 25, 1203.0);
insert into ASDD.ROW_local_climate values ('Dublin', 5, 15, 769.0);
insert into ASDD.ROW_local_climate values ('Milano', -2, 29, 943.2);
insert into ASDD.ROW_local_climate values ('Vancouver', -1, 22, 1181.5);
Press ESC
Type :wq

(save and quit) to save our file

To Execute Input file and get Reult in Command Prompt:


______________________________________________________
hdbsql i52 usystem pNine1234 Ia.sql

---------------------------------------------------------------To create .SQL file:


____________________
vi b.sql (b=> file name)
We will get editor
provide SQL statements
_______________________
Select * from ASDD.ROW_local_climate;
Press ESC
Type :wq

(write and quit) to save our file

To Execute input file:


______________________
hdbsql i52 usystem pNine1234

Ib.sql

oc.out

To see contents:
________________
more c.sql (c=> file name)
------------------------------------------------------------------

You might also like