미 설치되어 있는 SAP HANA DB의 Hostname을 변경하는 방법
SID: THD
변경 전 Hostname: hanadb
변경 후 Hostname: hanadb01
root 계정으로 로그인
hosts 파일에 Target Hostname 추가
hanadb:~ # vi /etc/hosts
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.45.132 hanadb hanadb01
Hostname 변경
hanadb:~ # hostnamectl set-hostname hanadb01
hdblcm 실행
hanadb:~ # cd /hana/shared/THD/hdblcm/
hanadb:/hana/shared/THD/hdblcm # ./hdblcm
SAP HANA Lifecycle Management - SAP HANA Database 2.00.040.00.1553674765
************************************************************************
Choose an action
Index | Action | Description
------------------------------------------------------------------------------ -------------
1 | add_host_roles | Add Host Roles
2 | add_hosts | Add Hosts to the SAP HANA Database System
3 | check_installation | Check SAP HANA Database Installation
4 | configure_internal_network | Configure Inter-Service Communication
5 | configure_sld | Configure System Landscape Directory Regi stration
6 | extract_components | Extract Components
7 | print_component_list | Print Component List
8 | remove_host_roles | Remove Host Roles
9 | rename_system | Rename the SAP HANA Database System
10 | uninstall | Uninstall SAP HANA Database Components
11 | unregister_system | Unregister the SAP HANA Database System
12 | update_component_list | Update Component List
13 | update_components | Install or Update Additional Components
14 | update_host | Update the SAP HANA Database Instance Hos t integration
15 | update | Update the SAP HANA Database System
16 | exit | Exit (do nothing)
9번 rename_system 옵션 선택
Enter selected action index [16]: 9
Local Host Name: hanadb
System Properties:
THD /hana/shared/THD HDB_ALONE
HDB00
version: 2.00.040.00.1553674765
host: hanadb (Database Worker (worker))
edition: SAP HANA Database
변경할 Target Hostname 입력
Enter Target Host Name for Source Host 'hanadb' [hanadb]: hanadb01
Index | System Usage | Description
-------------------------------------------------------------------------------
1 | production | System is used in a production environment
2 | test | System is used for testing, not production
3 | development | System is used for development, not production
4 | custom | System usage is neither production, test nor development
시스템 용도 선택
Select System Usage / Enter Index [4]: 4
Index | Listen Interface | Description
-----------------------------------------------------------------------------------------------
1 | global | The HANA services will listen on all network interfaces
2 | internal | The HANA services will only listen on a specific network interface
3 | local | The HANA services will only listen on loopback interface (127.0.0.1)
네트워크 Listening을 어떻게 설정할 것인지 선택
The recommended value for single-host system is 'local'
Select Listen Interface / Enter Index [3]: 3
Certificate Host Name 입력
Certificate host Name이란, SSL 인증서가 DB와 통신할 때 사용할 이름으로 간단하게 네트워크에서 사용하는 이름 정도로 생각하면 됌
Enter Certificate Host Name For Host 'hanadb01' [hanadb]: hanadb01
<SID>adm 계정의 패스워드 입력
Enter Source System Administrator (thdadm) Password:
Target SID 입력 (여기서는 변경하지 않지만 변경도 가능)
Enter Target System ID [THD]: THD
Target 인스턴스 번호 입력 (여기서는 변경하지 않지만 변경도 가능)
Enter Target Instance Number [00]: 00
데이터 볼륨 경로 입력
Enter Location of Data Volumes [/hana/data/THD]: /hana/data/THD
로그 볼륨 경로 입력
Enter Location of Log Volumes [/hana/log/THD]: /hana/log/THD
데이터 백업 경로 입력
Enter Location of Data Backups [/hana/shared/THD/HDB00/backup/data]: /hana/shared/THD/HDB00/backup/data
로그 백업 경로 입력
Enter Location of Log Backups [/hana/shared/THD/HDB00/backup/log]: /hana/shared/THD/HDB00/backup/log
카탈로그 백업 경로 입력
Enter Location of Catalog Backups [/hana/shared/THD/HDB00/backup/log]: /hana/shared/THD/HDB00/backup/log
System DB 계정의 패스워드를 바꿀지 여부 선택
Change the password of the System Database user [n]: n
서버 재부팅 시 HANA DB를 시작할 지 여부 선택
Restart system after machine reboot? [n]: n
Summary before execution:
=========================
SAP HANA Database
Rename Parameters
Installation Path: /hana/shared
Source System ID: THD
Target System ID: THD
Target Instance Number: 00
Remote Execution: ssh
Host Name: hanadb -> hanadb01
System Usage: custom
Listen Interface: local
Certificate Host Names: hanadb01 -> hanadb01
Location of Data Volumes: /hana/data/THD
Location of Log Volumes: /hana/log/THD
Log File Locations
Log directory: /var/tmp/hdb_THD_hdblcm_rename_system_2020-02-14_15.29.24
Trace location: /var/tmp/hdblcm_2020-02-14_15.29.24_12649.trc
Note: SAP HANA Database System will be restarted
설정 변경 진행 여부 선택
Do you want to continue? (y/n): y
Renaming System...
SAP HANA Lifecycle Management - Database Rename 2.4.59
Renaming instance...
Stopping system...
All server processes stopped on host 'hanadb' (worker).
Stopping sapstartsrv service...
Removing sapservices entry...
Updating system configuration files...
Renaming instance...
Configuring environment scripts...
Creating sapservices entry...
Starting service (sapstartsrv)...
Starting instance THD (HDB00) on host 'hanadb01'...
Starting 7 processes on host 'hanadb01' (worker):
Starting on 'hanadb01' (worker): hdbdaemon, hdbcompileserver, hdbindexserver (THD), hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine (THD)
Starting on 'hanadb01' (worker): hdbdaemon, hdbindexserver (THD), hdbwebdispatcher, hdbxsengine (THD)
Starting on 'hanadb01' (worker): hdbdaemon, hdbwebdispatcher, hdbxsengine (THD)
Starting on 'hanadb01' (worker): hdbdaemon, hdbwebdispatcher
All server processes started on host 'hanadb01' (worker).
Registering Instance Service...
Updating Component List...
Updating SAP HANA Database Instance Integration on Local Host...
Regenerating SSL certificates...
Deploying SAP Host Agent configurations...
SAP HANA Database System renamed
You can send feedback to SAP with this form: https://hanadb:1129/lmsl/HDBLCM/THD/feedback/feedback.html
Log file written to '/var/tmp/hdb_THD_hdblcm_rename_system_2020-02-14_15.29.24/hdblcm.log' on host 'hanadb'.
<SID>adm으로 로그인해서 HANA DB 프로세스들이 제대로 동작 중인지 확인
hanadb:/hana/shared/THD/hdblcm # su - thdadm
thdadm@hanadb01:/usr/sap/THD/HDB00> HDB info
USER PID PPID %CPU VSZ RSS COMMAND
thdadm 14565 14564 0.8 17628 7372 -sh
thdadm 14620 14565 0.0 13984 3776 \_ /bin/sh /usr/sap/THD/HDB00/HDB inf
thdadm 14651 14620 0.0 34600 3220 \_ ps fx -U thdadm -o user:8,pid:
thdadm 13958 1 0.0 666472 49824 hdbrsutil --start --port 30003 --volu
thdadm 13626 1 0.0 666472 50064 hdbrsutil --start --port 30001 --volu
thdadm 13506 1 0.0 22580 3164 sapstart pf=/hana/shared/THD/profile/T
thdadm 13515 13506 0.4 408568 64840 \_ /usr/sap/THD/HDB00/hanadb01/trace/
thdadm 13533 13515 71.8 5751208 3872312 \_ hdbnameserver
thdadm 13721 13515 1.4 1777608 318384 \_ hdbcompileserver
thdadm 13724 13515 1.1 778288 154332 \_ hdbpreprocessor
thdadm 13773 13515 118 5800824 4013480 \_ hdbindexserver -port 30003
thdadm 13776 13515 7.4 3037716 1130196 \_ hdbxsengine -port 30007
thdadm 14146 13515 3.2 1928424 550772 \_ hdbwebdispatcher
thdadm 13429 1 0.2 434208 35888 /hana/shared/THD/HDB00/exe/sapstartsrv
HANA Studio 로그인 테스트 및 호스트명 확인
root로 로그인 돌아와서 hosts 파일에 남아 있던 기존 Hostname 제거
hanadb01:~ # vi /etc/hosts
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.45.132 hanadb01
'o HANA o' 카테고리의 다른 글
HANA Admin - 멀티테넌트 DB 접속포트 (0) | 2023.09.11 |
---|