su - hdbadm
--创建租户数据库
hdbsql -u SYSTEM -p 'P@ssw0rd' -i 00 -d SYSTEMDB 'CREATE DATABASE TEST SYSTEM USER PASSWORD "P@ssw0rd"'
--备份系统库以及租户库
hdbsql -d SYSTEMDB -u SYSTEM -p 'P@ssw0rd' -i 00 "BACKUP DATA USING FILE ('initialbackupSYS')"
hdbsql -d SYSTEMDB -u SYSTEM -p 'P@ssw0rd' -i 00 "BACKUP LOG USING FILE ('initialbackupSYS_LOG')"
hdbsql -d TEST -u SYSTEM -p 'P@ssw0rd' -i 00 "BACKUP DATA USING FILE ('initialbackupTEST')"
hdbsql -d TEST -u SYSTEM -p 'P@ssw0rd' -i 00 "BACKUP LOG USING FILE ('initialbackupTEST_LOG')"
--启动、停止、重新启动HANA服务
su - hdbadm
--sapcontrol
hdbadm>sapcontrol -nr 00 -function StopSystem
hdbadm>sapcontrol -nr 00 -function StartSystem
hdbadm>sapcontrol -nr 00 -function RestartSystem
hdbadm>sapcontrol -nr 00 -function GetSystemInstanceList
hdbadm>sapcontrol -nr 00 -function GetProcessList
--HDB
HDB STOP
HDB START
HDB RESTART
--创建租户库
--hdbsql
hdbsql -u SYSTEM -p 'P@ssw0rd' -i 00 -d SYSTEMDB 'CREATE DATABASE TEST SYSTEM USER PASSWORD "P@ssw0rd"'
hdbsql -u SYSTEM -p 'P@ssw0rd' -i 00 -d SYSTEMDB 'CREATE DATABASE TEST2 SYSTEM USER PASSWORD "P@ssw0rd"'
--启动、停止租户库服务
hdbsql=>alter system start database TEST
hdbsql=>alter system stop database TEST2
标签:00,ssw0rd,--,hdbadm,HANA,hdbsql,SYSTEM,基本操作,SAP From: https://www.cnblogs.com/oradba/p/17384164.html