How to delete SAP* from HANA Tenant database

1.如何登录HANA的多租户(TDC)数据库
使用SAPS4端对应的SAP账户,比如S4D的账户为s4dadm
su - s4dadm
采用key的方式登录
How to delete SAP* from HANA Tenant database-LMLPHP

如何查找对应的KEY,可以使用hdbuserstore命令查看
How to delete SAP* from HANA Tenant database-LMLPHP
如上图所示,对应的Key为DEFAULT
我就可以用这个KEY去登了数据库了
hdbsql -U DEAFULT
How to delete SAP* from HANA Tenant database-LMLPHP

2.检查使用SAP是否存在
hdbsql=> select
from usr02 where mandt = '000' and bname = 'SAP*';
How to delete SAP* from HANA Tenant database-LMLPHP

如上图所示是否有内容,如有,按\q退出。
也可用命令
hdbsql=> select count() from usr02 where mandt = '000' and bname = 'SAP';
How to delete SAP* from HANA Tenant database-LMLPHP
How to delete SAP* from HANA Tenant database-LMLPHP

如上图所示是否有内容,如有,按\q退出。

3.删除SAP用户
hdbsql=> delete from usr02 where mandt = '000' and bname = 'SAP
';
不需要commit命令提交。
I'm pretty sure that you need to log in with the SAPABAP1 user and then run the SQL statement, since that user owns the schema. It should have the same password as your DDIC or SAP* users.

05-11 18:01