We can connect the Linux environment by using the “EXTRA PUTTY” interphase
Double click on EXTRA PUTTY Provide the ID address of LINUX Environment
Select combo box ʘ SSH to Linux environment with security connection
We will get a command prompt for the LINUX environment
Provide Use name & password
Provide command “SU -- <Sid> dam” so, we can connect to HANA Database so will get the path below
<host> : HDB : <Sid> adm / usr / sap / HAN HDB XK >
XX – instance number
By providing the command KS_LS_L
Note: This command is used to verify RAPID ANALYTICS files (TABLES, Land scopes, views)
SAP HANA HDB SQL command line is cool for entering SQL Statements for executing database procedures and query information about SAP HANA Database
You can use HDBSQL interactively or import commands from external files and execute them in the background.
Inclined to build a profession as SAP HANA Developer? Then here is the blog post on, explore SAP HANA Training |
Executing SQL statements
Executing Database procedures
Requesting information about the database catalog
Executing commands
Overview of HDBSQL dr call options and commands
Provide command “HDBSQL – ixx – U (User’s:)
P (password)
↓
Instance Instance number
SAP has provided some SQL commands to perform
Operations on HANA DB
/dc [PATTERN] list columns
/de [PATTERN] list indices
/dp [PATTERN] list procedures
/ds [NAME] list Selenium
/dl [PATTERN] list tables
/du [NAME] list users
/dv [PATTEREN] list views
[PATTERN] = [OWNER] [OBJECT NAME] g <User name>, % A%
a) For multi-line mode will write long commands on several lines.
HDBSQL stores multiple line commands in the internal command buffer.
Checkout our Blog on SAP HANA Tutorial |
Displaying the contents of the command buffer p
Deleting the contents of the command buffer /r
Editing command in an External file
Executing the command buffer: /g
By providing statement VI – filename .sql so, will get editor we can write multiple commands to manage the HANA database.
Managing the HANA database is meant managing schemas, creating tables and managing tables.
Example:- After finishing our code we need to press “Esc” on the keyboard and type “wq”
CREATE TABLE CITY
(Zip NCHAR (5) primary key,
Name NCHAR (20),
State NCHAR (2));
CREATE TABLE Customer
(CNO INTEGER PRIMARY KEY,
Title NCHAR (7),
First name NCHAR (10),
Name NCHAR (10),
Zip NCHAR (5),
Address NCHAR (25) );
/DT CUSTOMER;
COMMIT
Executing external files on the screen
Provide statement “hdbsql –i52-- p>
“hdbsql – i52 – u <user id> - p<password) – z <file name>
Will get output on the screen
Redirecting output to an external file
Provide statement ‘hdbsql – i52 – U <user id> -- P <password>
F<file name> /sql O{filename> out
To see the file contents provide commands
Input file more <file name> .SQL
Output file more <file name>.OUT
For in-depth knowledge of SAP HANA, click on below
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.