Activate / Deactivate user in SAP HANA DB

The administrator can “activate / deactivate” a user account with the following SQL command or SQL console of the SAP HANA studio, the only prerequisite is, you need to have system privilege “USER ADMIN”.

We can use the following SQL query to DEACTIVATE HANA DB user ;

ALTER USER <user_name> DEACTIVATE USER NOW;

Example ;

alter user SAPBASISINFO deactivate user now;

Activate / Deactivate user in SAP HANA DB

We can list the deactivated user with following queries ;

select * from users where user_deactivated= ‘TRUE’;

or

select * from “SYS”.”USERS” where user_deactivated=’TRUE’;

Activate / Deactivate user in SAP HANA DB

We can list the output according to deactivated user ;

select * from users where user_deactivated= ‘TRUE’ and user_name=’SAPBASISINFO’;

Activate / Deactivate user in SAP HANA DB

To activate the user again we can use the below SQL query ;

ALTER USER <user_name> ACTIVATE USER NOW;

Example ;

alter user SAPBASISINFO activate user now;

Activate / Deactivate user in SAP HANA DB

 

 

 

Leave a Reply


seven × = 35

Blogroll