I'm trying to create a HANA database at a specific location (mounted drive). Using hddsql
I can create/insert/modify. However controlling the location where I want this database to be created is the problem. I'm trying following command,
hdbsql SYSTEMDB=> CREATE DATABASE test1_demo AT LOCATION 'mnt/test' SYSTEM USER PASSWORD Password12345
* 2: general error: Add Service for database failed;Unknown host:mnt/test SQLSTATE: HY000
hdbsql SYSTEMDB=>
Please note, I have created the mounted directory with proper permission.
~# ls -l /mnt/test/
total 0
-rw-r----- 1 hxeadm sapsys 0 Mar 21 02:13 test.txt
is there any way I can choose the location where I want this database to be installed. or any other suggestions will be helpful.
N.N: I have installed free express edition. I do not have Hana cockpit
The AT LOCATION
parameter of the CREATE DATABASE
command specifies the HANA cluster node by hostname
and port
not the filesystem location of the physical storage used for the database.
Instead, the file storage for a HANA system is configured when the system is installed. See SAP HANA Server Installation and Update Guide - Recommended File System Layout for details.
In order to use a different drive for the new database, the hana/data/<SID>
and hana/log/<SID>
folders need to be mounted from that drive.
The following steps should do it:
HDB stop
/hana/data/<SID>
and /hana/log/<SID>
folders on new drive/hana/data/<SID>
and /hana/log/<SID>
folders in /hana/data
and /hana/log
. These will be the mount points. Ensure that the permissions follow that of the other folders in /hana/
.fstab
entries to mount the folders on the new drive at the target mount points.mount /hana/data/<SID>
and mount /data/log/<SID>
.HDB start
SystemDB
and create new database via CREATE DATABASE
.If everything went OK, HANA should now create the files in the new folders on the external drive.