hana db commands

Download Hana Db Commands

If you can't read please download the document

Upload: ks97626

Post on 26-Dec-2015

15 views

Category:

Documents


1 download

DESCRIPTION

HANA_DB_COMMANDS.txt

TRANSCRIPT

Log on to WinSCP:_________________host: hanasuid: rootpsw: Ninne1234Log on to Extra Putty:______________________IP: 192.168.1.209port No: 22Connection Type: SSHLog in as: rootPws: Nine1234switch to HANA DB:__________________su hanadmTo See Contents of HANA DB:___________________________ls lTo Start Sap system:____________________startsapSwitch to HDB client Interface:_______________________________hdbsql i52 usystem pNine1234To get help:____________\hTo exit Client Interface:_________________________\qTo see the Schemas:___________________\ds(To Exit running press 'CTRL+C' and then press 'enter' twice)Again connect to Client by providing hdbsql i52 usystem pNine1234To 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 pNine1234To see the Views:_________________\dv(To Exit running press 'CTRL+C' and then press 'enter' twice)Again connect to Client by providing hdbsql i52 usystem pNine1234Execute any commands:_____________________hdbsql i52 usystem pNine1234select * from EFASHION_TUTORIAL.SHOP_FACTS---------------------------------------------------------------To execute multiple commands at a time need to create SQL fileTo create .SQL file:____________________su hanadmvi a.sql (a=> file name)We will get editorprovide 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 ESCType :wq (save and quit) to save our fileTo 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 editorprovide SQL statements_______________________Select * from ASDD.ROW_local_climate;Press ESCType :wq (write and quit) to save our fileTo Execute input file:______________________hdbsql i52 usystem pNine1234 Ib.sql oc.out To see contents:________________more c.sql (c=> file name)------------------------------------------------------------------