cancel
Showing results for 
Search instead for 
Did you mean: 

User Deletion in SAP HANA

Former Member
0 Kudos

Hi All

I have no access to test this. thus request the help from HANA community , I am curious to know that when a user is delted in HANA what all objects get deleted . I am assuming as below.

  1.All objects such as tables, views, procedures,sequence ,synonyms etc part of the users schema get deleted.

  2. Roles created by the user and Analytical privileges created by user.

  3.Tha analytical views and attributes will be there but they will not work as the underlying tables of the schema and schema itself got deleted.

Request you to share your views and scenarios you can think of .

Thanks

Santosh Varada

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santosh,

This is from SAP Help: http://help.sap.com/hana/html/sql_drop_user.html

"The DROP USER statement deletes a database user. <user_name> must specify an existing database user.


Only database users having the system privilege USER ADMIN are allowed to drop a database user. Each user having this privilege is allowed to drop any user. Only those users which are delivered with the SAP HANA database can not be dropped: SYS, SYSTEM, _SYS_REPO, _SYS_STATISTICS.


If the <drop_option> RESTRICT is specified implicitly or explicitly then the user will not be dropped in case he is the owner of any other object than the schema with his name and other schemas created by him or in case there is an object stored in one of his schemas which was not created by him.

If the <drop_option> CASCADE is specified, the schema with the user's name and the schemas belonging to the user, together with all objects stored in them (even if they are created by other users), are deleted. Objects owned by the user, even if they are part of another schema, are deleted. Objects that are dependent on deleted objects are deleted. Even public synonyms owned by the deleted user are deleted.

Privileges on deleted objects are revoked. Privileges granted by the deleted user are revoked. Revoke privileges may cause further revokes if they had been granted further.


Users created by the deleted user and roles created by him are not deleted.

Audit policies created by the deleted user are not deleted.


It is possible to delete a user even if an open session of this user exists. "

Thanks,

Anooj

Former Member
0 Kudos

Hi Anooj

  Thanks alot, but one more thing is that Attribute views, Analytical views and calulation views created by him or other users based on the tables of hi schema will be of no use right, correct me if I am wrong.

Thanks

Santosh Varada

Former Member
0 Kudos

Thats right.

Answers (0)