본문 바로가기

Database

[HANA] SRTAKEOVER Key 등록 / 효과

 

- 출처 : https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/2.0.04/en-US/ab785910b8be46948cb1dce78b373a16.html

 

SAP Help Portal

 

help.sap.com

 

Configure a User Under the SRTAKEOVER Key

In preparation for maintenance tasks, you must configure a user in the local userstore under the SRTAKEOVER key.

Context

 

The SRTAKEOVER user requires the necessary privileges to import the repository content of the new version of the software during the takeover process.

 

Procedure

 

As <sid>adm configure a user in the local userstore under the SRTAKEOVER key. Use a public host name to access the corresponding SQL port of the System DB (<SystemDBsqlport>).
Execute this command on the primary and secondary systems:

hdbuserstore SET SRTAKEOVER <publichostname>:<SystemDBsqlport> <myrepouser> <myrepouser_password>


NoteThis configuration step should be performed only in the system database, not in every single tenant.

Create a <myrepouser> user with the necessary privileges to import the repository content as follows:
CREATE USER MY_REPO_IMPORT_USER PASSWORD MyRepoUserPW123;
GRANT EXECUTE ON SYS.REPOSITORY_REST TO MY_REPO_IMPORT_USER;
GRANT REPO.READ ON ".REPO_PACKAGE_ROOT" TO MY_REPO_IMPORT_USER;
GRANT REPO.IMPORT TO MY_REPO_IMPORT_USER;
GRANT SELECT ON _SYS_REPO.DELIVERY_UNITS TO MY_REPO_IMPORT_USER;
GRANT REPO.ACTIVATE_IMPORTED_OBJECTS ON ".REPO_PACKAGE_ROOT" TO MY_REPO_IMPORT_USER;

 

For example, for public host name "mypublichost" and system number "00", "MY_REPO_IMPORT_USER", and "MyRepoUserPW123" :

hdbuserstore SET SRTAKEOVER mypublichost:30013 MY_REPO_IMPORT_USER MyRepoUserPW123

 

The host name has to be the public host name of the host on which the command is executed and the port is the SQL port number of the system database.

 

For more information, see the Secure User Store (hdbuserstore) section in the SAP HANA Security Guide.

NoteIn a scale-out configuration, the command has to be executed on all hosts. If the password for the repository import user is changed, the password saved in the userstore also has to be changed.

 

 


 

설정 전/후 sr_takeover 수행 비교

 

[Before]

- Takeover finished successfully ~ done : 31초

  - 6초 간격 * 5회 대기 후 진행

 

 

 

[After]

- Takeover finished successfully ~ done : 7초

 

※ Serviceguard에서 sr_takeover를 수행 후 수행 결과를 받아서 Log "(takeover_hdb): done." 출력하고 watchdog 이용해서 다음 단계로 진행 -> 즉, sr_takeover 수행 시간에 상기 SRTAKEOVER Key 적용이 영향을 줌