Listing 1
CREATE DATABASE DB1 SYSTEM USER PASSWORD "your password"
The above create statement will create a new database using the SYSTEM user. Once the database has been created, you can verify its status by executing the following SQL.
Listing 2
SELECT * FROM SYS.M_DATABASES
Take note of the ACTIVE_STATUS field, if the value for this field is NO, it means the database is not running and must be started. To the start the database, execute the following SQL statement.
Listing 3
ALTER SYSTEM START DATABASE DB1
You can now connect to the database using hdbsql or HANA Studio. For hdbsql, use the following command parameters.
hdbsql=> \c -n hostname:39013 -u SYSTEM -p password -d DB1
In HANA Studio, you will need to add a New System, select the Multiple containers mode and specify the tenant database name.
-
JSON_TABLE Function
In this article, we'll take a look at how to use the ++JSON_TABLE++ function to represent JSON data stored in a regular column as a relational table.
31 March 2023 - 2405 views -
Connect To HANA DB Using Rust
Learn how to connect and query a HANA database using Rust with the hdbconnect package.
21 February 2023 - 2587 views -
If Table Exists Function
In this article, I explain how to create a function to determine if a table exists in SAP HANA.
31 October 2019 - 8594 views -
Connect To HANA DB Using NodeJs
This article explains how to connect to a SAP HANA system using the Node HANA client library.
28 October 2019 - 6963 views -
Connect To HANA DB Using Python
This article explains how to connect to a SAP HANA system using the Python hdbcli package.
11 October 2018 - 7730 views -
Adding Auto Numbers To Table Columns
This article explains how to create an auto generated column using IDENTITY.
14 March 2018 - 5957 views -
Connecting To SAP HANA Using PHP ODBC
This article describes how to install and configure PHP odbc to connect to a SAP HANA system on Ubuntu 16.
01 December 2017 - 7486 views