Over the weekend we've just finished an experiment of changing HANA SID. The research we are doing includes:

  1. Procedures to change HANA SID
  2. Will hardware key change after changing HANA SID
  3. How licenses work after HANA SID changed

So, first of all, let's backup the system and start this experiment!

Since we are running VMWare ESXi, so the offline backup is very straightforward, simply shutdown HANA DB, then shutdown OS (Redhat Linux), then do a VM clone

Here we have an question: based on our experience, in the old days, when we installed multiple SAP systems on the same VM host but different VM guest systems, the hardware keys across these VM guest systems actually are the same. This kind of behavior means, for SAP systems, the calculation of hardware keys are purely based on the actual hardware, such as system board, NICs and so on. I believe you may also experienced the scenarios like changing the Network Card will void the existing license, right?

Will HANA DB calculate the hardware key the same way? Will the cloned system be running OK if we bring it up? Let's find out later.

Over the weekend we've just finished an experiment of changing HANA SID. The research we are doing includes: 1. Procedures to change HANA SID 2. Will hardware key change after changing HANA SID 3. How licenses work after HANA SID changed So, first of all, let's backup the system and start this experiment! **Since we are running VMWare ESXi, so the offline backup is very straightforward, simply shutdown HANA DB, then shutdown OS (Redhat Linux), then do a VM clone** Here we have an question: based on our experience, in the old days, when we installed multiple SAP systems on the same VM host but different VM guest systems, the hardware keys across these VM guest systems actually are the same. This kind of behavior means, for SAP systems, the calculation of hardware keys are purely based on the actual hardware, such as system board, NICs and so on. I believe you may also experienced the scenarios like changing the Network Card will void the existing license, right? Will HANA DB calculate the hardware key the same way? Will the cloned system be running OK if we bring it up? Let's find out later.

Project 'Clam' founder

Then we login as root to run the HANA resident lifecycle manager hdblcm

So we can compare the difference options when we login as root or login as hdbadm users

When we login as hdbadm user, we see 7 options

login as: root
root@192.168.1.13's password:
Last login: Sat Apr 30 14:59:11 2016 from 192.168.1.179
[root@HANADB ~]# su - hdbadm
Last login: Sat Apr 30 14:59:17 EDT 2016 on pts/4
UNSUPPORTED RHEL VERSION: 7
hdbadm@HANADB:/hana/shared/HDB/hdblcm> hdblcm


SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171
***************************************************************


The following actions cannot be selected because the tool was not started as root user:
    - Uninstall SAP HANA Components
    - Unregister the SAP HANA System
    - Update the SAP HANA Instance Host integration
    - Update Component List
    - Rename the SAP HANA System




Choose an action to perform

  Index | Action to be performed     | Description
  --------------------------------------------------------------------------------------
  1     | add_hosts                  | Add Additional Hosts to the SAP HANA System
  2     | configure_internal_network | Configure Inter-Service Communication
  3     | configure_sld              | Configure System Landscape Directory Registration
  4     | extract_components         | Extract Components
  5     | print_component_list       | Print Component List
  6     | update_components          | Install or Update Additional Components
  7     | exit                       | Exit (do nothing)

Enter selected action index [7]: 7
hdbadm@HANADB:/hana/shared/HDB/hdblcm>

But if we login as root, we see 12 options

[root@HANADB hdblcm]# ./hdblcm


SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171
***************************************************************





Choose an action to perform

  Index | Action to be performed     | Description
  --------------------------------------------------------------------------------------
  1     | add_hosts                  | Add Additional Hosts to the SAP HANA System
  2     | configure_internal_network | Configure Inter-Service Communication
  3     | configure_sld              | Configure System Landscape Directory Registration
  4     | extract_components         | Extract Components
  5     | print_component_list       | Print Component List
  6     | rename_system              | Rename the SAP HANA System
  7     | uninstall                  | Uninstall SAP HANA Components
  8     | unregister_system          | Unregister the SAP HANA System
  9     | update_component_list      | Update Component List
  10    | update_components          | Install or Update Additional Components
  11    | update_host                | Update the SAP HANA Instance Host integration
  12    | exit                       | Exit (do nothing)
**Then we login as root to run the HANA resident lifecycle manager hdblcm** So we can compare the difference options when we login as root or login as hdbadm users When we login as hdbadm user, we see 7 options ```` login as: root root@192.168.1.13's password: Last login: Sat Apr 30 14:59:11 2016 from 192.168.1.179 [root@HANADB ~]# su - hdbadm Last login: Sat Apr 30 14:59:17 EDT 2016 on pts/4 UNSUPPORTED RHEL VERSION: 7 hdbadm@HANADB:/hana/shared/HDB/hdblcm> hdblcm SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171 *************************************************************** The following actions cannot be selected because the tool was not started as root user: - Uninstall SAP HANA Components - Unregister the SAP HANA System - Update the SAP HANA Instance Host integration - Update Component List - Rename the SAP HANA System Choose an action to perform Index | Action to be performed | Description -------------------------------------------------------------------------------------- 1 | add_hosts | Add Additional Hosts to the SAP HANA System 2 | configure_internal_network | Configure Inter-Service Communication 3 | configure_sld | Configure System Landscape Directory Registration 4 | extract_components | Extract Components 5 | print_component_list | Print Component List 6 | update_components | Install or Update Additional Components 7 | exit | Exit (do nothing) Enter selected action index [7]: 7 hdbadm@HANADB:/hana/shared/HDB/hdblcm> ```` But if we login as root, we see 12 options ```` [root@HANADB hdblcm]# ./hdblcm SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171 *************************************************************** Choose an action to perform Index | Action to be performed | Description -------------------------------------------------------------------------------------- 1 | add_hosts | Add Additional Hosts to the SAP HANA System 2 | configure_internal_network | Configure Inter-Service Communication 3 | configure_sld | Configure System Landscape Directory Registration 4 | extract_components | Extract Components 5 | print_component_list | Print Component List 6 | rename_system | Rename the SAP HANA System 7 | uninstall | Uninstall SAP HANA Components 8 | unregister_system | Unregister the SAP HANA System 9 | update_component_list | Update Component List 10 | update_components | Install or Update Additional Components 11 | update_host | Update the SAP HANA Instance Host integration 12 | exit | Exit (do nothing) ````

Project 'Clam' founder

Before executing the rename option, we would like to do an extra test: create the symbolic link for the target system DBH, to see what happens when we run the rename procedure

hdbadm@HANADB:/hana/shared> ln -s HDB DBH
**Before executing the rename option, we would like to do an extra test: create the symbolic link for the target system DBH, to see what happens when we run the rename procedure** ```` hdbadm@HANADB:/hana/shared> ln -s HDB DBH ````

Project 'Clam' founder

First run, rename, failed. The reason was: sapstartsrv failed, but actually this was related to the symbolic link that we created, which confused the rename procedure (SAP developed scripts I guess). As you can see, some of the target file systems still contain information about HDB, which is not correct

[root@HANADB hdblcm]# ./hdblcm


SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171
***************************************************************





Choose an action to perform

  Index | Action to be performed     | Description
  --------------------------------------------------------------------------------------
  1     | add_hosts                  | Add Additional Hosts to the SAP HANA System
  2     | configure_internal_network | Configure Inter-Service Communication
  3     | configure_sld              | Configure System Landscape Directory Registration
  4     | extract_components         | Extract Components
  5     | print_component_list       | Print Component List
  6     | rename_system              | Rename the SAP HANA System
  7     | uninstall                  | Uninstall SAP HANA Components
  8     | unregister_system          | Unregister the SAP HANA System
  9     | update_component_list      | Update Component List
  10    | update_components          | Install or Update Additional Components
  11    | update_host                | Update the SAP HANA Instance Host integration
  12    | exit                       | Exit (do nothing)

Enter selected action index [12]: 6

Local Host Name: hanadb

System Properties:
HDB /hana/shared/HDB HDB_ALONE
        HDB00
        version: 1.00.112.02.1459851171
        host: hanadb (Database Worker (worker))

Enter Target Host Name for Source Host 'hanadb' [hanadb]:

  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 [3]:
Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]:
Enter Source System Administrator (hdbadm) Password:
Enter Target System ID [HDB]: DBH
Enter Target Instance Number [00]:
Enter Location of Data Volumes [/hana/shared/DBH/global/hdb/data]:
Enter Location of Log Volumes [/hana/shared/DBH/global/hdb/log]:
Enter Location of Data Backups [/hana/shared/DBH/HDB00/backup/data]:
Enter Location of Log Backups [/hana/shared/DBH/HDB00/backup/log]:
Enter Target System Administrator (DBHadm) Password:
Confirm Target System Administrator (DBHadm) Password:
Enter System Administrator (DBHadm) Home Directory [/usr/sap/DBH/home]:
Enter System Administrator (DBHadm) Login Shell [/bin/sh]:
Enter System Administrator (DBHadm) User ID [1002]:
Keep Source System Administrator User (hdbadm) [n]:
Keep Home Directory of Source System Administrator (hdbadm) [n]:
Change the password of the Database user [n]:
Restart system after machine reboot? [n]:

Summary before execution:
=========================

SAP HANA System Rename
   Rename Parameters
      Installation Path: /hana/shared
      Source System ID: HDB
      Target System ID: DBH
      Target Instance Number: 00
      Remote Execution: ssh
      Host Name: hanadb
      System Usage: development
      Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE
      Location of Data Volumes: the path will be set automatically
      Location of Log Volumes: the path will be set automatically
      System Administrator (DBHadm) Home Directory: /usr/sap/DBH/home
      System Administrator (DBHadm) Login Shell: /bin/sh
      System Administrator (DBHadm) User ID: 1002
      Keep Source System Administrator User (hdbadm): No
      Keep Home Directory of Source System Administrator (hdbadm): No

Note: SAP HANA System will be restarted

Do you want to continue? (y/n): y

Executing SAP HANA System rename

Renaming system...
    Renaming instance...
    Stopping system...
      Stopping 7 processes on host 'hanadb' (worker):
        Stopping on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
      All server processes stopped on host 'hanadb' (worker).
    Stopping sapstartsrv service...
    Creating system administrator user 'DBHadm'...
    Updating system configuration files...
    Renaming instance...
    Creating sapservices entry...
    Starting service (sapstartsrv)...
    Renaming SAP HANA instance failed!
      Renaming master failed!
Renaming of SAP HANA system failed.
  Error occurred while executing SAP HANA System rename (hdbrename)

You can send feedback to SAP with this form: https://hanadb, OU=Dezhi_Systems, C=DE:1129/lmsl/HDBLCM/HDB/feedback/feedback.html
Log file written to '/var/tmp/hdb_HDB_hdblcm_rename_system_2016-04-30_15.37.54/hdblcm.log' on host 'HANADB'.

Also checked some of the file owners, obvious they were not changed to the target SIDadm, and give a lot of permission denied issue

dbhadm@HANADB:/hana/shared/DBH/HDB00> ls -ltr
total 68
lrwxrwxrwx. 1   1001 sapsys    22 Feb  2 11:30 exe -> ../exe/linuxx86_64/hdb
drwxrwx--x. 4   1001 sapsys  4096 Feb  2 11:31 backup
drwxr-x---. 2   1001 sapsys  4096 Apr 20 11:25 work
-rw-r-----. 1   1001 sapsys  5258 Apr 30 15:29 dev_rfc.trc
drwxr-x---. 9   1001 sapsys  4096 Apr 30 15:44 hanadb
-r-xr-xr-x. 1 dbhadm sapsys 11996 Apr 30 15:44 HDB
-r-xr-xr-x. 1 dbhadm sapsys  2133 Apr 30 15:44 HDBSettings.sh
-r-xr-xr-x. 1 dbhadm sapsys  1627 Apr 30 15:44 HDBSettings.csh
-r-xr-xr-x. 1 dbhadm sapsys   538 Apr 30 15:44 HDBAdmin.sh
-r-xr-xr-x. 1 dbhadm sapsys  3714 Apr 30 15:44 xterms
-r-xr-xr-x. 1 dbhadm sapsys  9796 Apr 30 15:44 hdbenv.sh
-r-xr-xr-x. 1 dbhadm sapsys  6419 Apr 30 15:44 hdbenv.csh
dbhadm@HANADB:/hana/shared/DBH/HDB00> chown -R dbhadm:sapsys *
chown: changing ownership of ‘backup/data’: Operation not permitted
chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461122305761’: Operation not permitted
chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124289256’: Operation not permitted
chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124727010’: Operation not permitted
chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124391638’: Operation not permitted
chown: changing ownership of ‘backup/log’: Operation not permitted
chown: changing ownership of ‘backup’: Operation not permitted
chown: changing ownership of ‘dev_rfc.trc’: Operation not permitted
chown: changing ownership of ‘exe’: Operation not permitted
chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.loads.013.trc’: Operation not permitted
chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.stat’: Operation not permitted
chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.unloads.001.trc’: Operation not permitted
chown: changing ownership of ‘hanadb/trace/hdblcm_2016-04-30_15.37.54_3329.cfg.xml’: Operation not permitted
chown: changing ownership of ‘hanadb/trace/webdispatcher_hanadb.30006.000.trc’: Operation not permitted
**First run, rename, failed. The reason was: sapstartsrv failed, but actually this was related to the symbolic link that we created, which confused the rename procedure (SAP developed scripts I guess). As you can see, some of the target file systems still contain information about HDB, which is not correct ** ```` [root@HANADB hdblcm]# ./hdblcm SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171 *************************************************************** Choose an action to perform Index | Action to be performed | Description -------------------------------------------------------------------------------------- 1 | add_hosts | Add Additional Hosts to the SAP HANA System 2 | configure_internal_network | Configure Inter-Service Communication 3 | configure_sld | Configure System Landscape Directory Registration 4 | extract_components | Extract Components 5 | print_component_list | Print Component List 6 | rename_system | Rename the SAP HANA System 7 | uninstall | Uninstall SAP HANA Components 8 | unregister_system | Unregister the SAP HANA System 9 | update_component_list | Update Component List 10 | update_components | Install or Update Additional Components 11 | update_host | Update the SAP HANA Instance Host integration 12 | exit | Exit (do nothing) Enter selected action index [12]: 6 Local Host Name: hanadb System Properties: HDB /hana/shared/HDB HDB_ALONE HDB00 version: 1.00.112.02.1459851171 host: hanadb (Database Worker (worker)) Enter Target Host Name for Source Host 'hanadb' [hanadb]: 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 [3]: Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]: Enter Source System Administrator (hdbadm) Password: Enter Target System ID [HDB]: DBH Enter Target Instance Number [00]: Enter Location of Data Volumes [/hana/shared/DBH/global/hdb/data]: Enter Location of Log Volumes [/hana/shared/DBH/global/hdb/log]: Enter Location of Data Backups [/hana/shared/DBH/HDB00/backup/data]: Enter Location of Log Backups [/hana/shared/DBH/HDB00/backup/log]: Enter Target System Administrator (DBHadm) Password: Confirm Target System Administrator (DBHadm) Password: Enter System Administrator (DBHadm) Home Directory [/usr/sap/DBH/home]: Enter System Administrator (DBHadm) Login Shell [/bin/sh]: Enter System Administrator (DBHadm) User ID [1002]: Keep Source System Administrator User (hdbadm) [n]: Keep Home Directory of Source System Administrator (hdbadm) [n]: Change the password of the Database user [n]: Restart system after machine reboot? [n]: Summary before execution: ========================= SAP HANA System Rename Rename Parameters Installation Path: /hana/shared Source System ID: HDB Target System ID: DBH Target Instance Number: 00 Remote Execution: ssh Host Name: hanadb System Usage: development Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE Location of Data Volumes: the path will be set automatically Location of Log Volumes: the path will be set automatically System Administrator (DBHadm) Home Directory: /usr/sap/DBH/home System Administrator (DBHadm) Login Shell: /bin/sh System Administrator (DBHadm) User ID: 1002 Keep Source System Administrator User (hdbadm): No Keep Home Directory of Source System Administrator (hdbadm): No Note: SAP HANA System will be restarted Do you want to continue? (y/n): y Executing SAP HANA System rename Renaming system... Renaming instance... Stopping system... Stopping 7 processes on host 'hanadb' (worker): Stopping on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine All server processes stopped on host 'hanadb' (worker). Stopping sapstartsrv service... Creating system administrator user 'DBHadm'... Updating system configuration files... Renaming instance... Creating sapservices entry... Starting service (sapstartsrv)... Renaming SAP HANA instance failed! Renaming master failed! Renaming of SAP HANA system failed. Error occurred while executing SAP HANA System rename (hdbrename) You can send feedback to SAP with this form: https://hanadb, OU=Dezhi_Systems, C=DE:1129/lmsl/HDBLCM/HDB/feedback/feedback.html Log file written to '/var/tmp/hdb_HDB_hdblcm_rename_system_2016-04-30_15.37.54/hdblcm.log' on host 'HANADB'. ```` Also checked some of the file owners, obvious they were not changed to the target SIDadm, and give a lot of permission denied issue ```` dbhadm@HANADB:/hana/shared/DBH/HDB00> ls -ltr total 68 lrwxrwxrwx. 1 1001 sapsys 22 Feb 2 11:30 exe -> ../exe/linuxx86_64/hdb drwxrwx--x. 4 1001 sapsys 4096 Feb 2 11:31 backup drwxr-x---. 2 1001 sapsys 4096 Apr 20 11:25 work -rw-r-----. 1 1001 sapsys 5258 Apr 30 15:29 dev_rfc.trc drwxr-x---. 9 1001 sapsys 4096 Apr 30 15:44 hanadb -r-xr-xr-x. 1 dbhadm sapsys 11996 Apr 30 15:44 HDB -r-xr-xr-x. 1 dbhadm sapsys 2133 Apr 30 15:44 HDBSettings.sh -r-xr-xr-x. 1 dbhadm sapsys 1627 Apr 30 15:44 HDBSettings.csh -r-xr-xr-x. 1 dbhadm sapsys 538 Apr 30 15:44 HDBAdmin.sh -r-xr-xr-x. 1 dbhadm sapsys 3714 Apr 30 15:44 xterms -r-xr-xr-x. 1 dbhadm sapsys 9796 Apr 30 15:44 hdbenv.sh -r-xr-xr-x. 1 dbhadm sapsys 6419 Apr 30 15:44 hdbenv.csh dbhadm@HANADB:/hana/shared/DBH/HDB00> chown -R dbhadm:sapsys * chown: changing ownership of ‘backup/data’: Operation not permitted chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461122305761’: Operation not permitted chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124289256’: Operation not permitted chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124727010’: Operation not permitted chown: changing ownership of ‘backup/log/log_backup_0_0_0_0.1461124391638’: Operation not permitted chown: changing ownership of ‘backup/log’: Operation not permitted chown: changing ownership of ‘backup’: Operation not permitted chown: changing ownership of ‘dev_rfc.trc’: Operation not permitted chown: changing ownership of ‘exe’: Operation not permitted chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.loads.013.trc’: Operation not permitted chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.stat’: Operation not permitted chown: changing ownership of ‘hanadb/trace/indexserver_hanadb.30003.unloads.001.trc’: Operation not permitted chown: changing ownership of ‘hanadb/trace/hdblcm_2016-04-30_15.37.54_3329.cfg.xml’: Operation not permitted chown: changing ownership of ‘hanadb/trace/webdispatcher_hanadb.30006.000.trc’: Operation not permitted ````

Project 'Clam' founder

edited May 2 '16 at 5:01 pm

So now what we do? The HANA DB is in "half dead" status. The only method we can do is to rename it back to whatever it was, HDB. This was executed successfully

[root@HANADB hdblcm]# ./hdblcm


SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171
***************************************************************





Choose an action to perform

  Index | Action to be performed | Description
  ----------------------------------------------------------------------------
  1     | add_hosts              | Add Additional Hosts to the SAP HANA System
  2     | register_rename_system | Register and Rename SAP HANA System
  3     | exit                   | Exit (do nothing)

Enter selected action index [3]: 2
Target installation directory '/hana/shared/HDB' already exists

Local Host Name: hanadb

System Properties:
DBH /hana/shared/HDB HDB_ALONE
        HDB00
        version: 1.00.112.02.1459851171
        host: hanadb (Database Worker (worker))

The HANA system is installed with SID mountpoint. Based on the file system layout, the system id will be changed from DBH to HDB
Enter Target Host Name for Source Host 'hanadb' [hanadb]:

  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 [3]:
Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]:
Enter Source System Administrator (dbhadm) Password:
Source System Administrator (dbhadm) Password: Unknown user password combination

Enter Source System Administrator (dbhadm) Password:
Enter Target Instance Number [00]:
Enter Location of Data Volumes [/hana/shared/HDB/global/hdb/data]:
Enter Location of Log Volumes [/hana/shared/HDB/global/hdb/log]:
Enter Location of Data Backups [/hana/shared/HDB/HDB00/backup/data]:
Enter Location of Log Backups [/hana/shared/HDB/HDB00/backup/log]:
Enter Target System Administrator (hdbadm) Password:
Confirm Target System Administrator (hdbadm) Password:
Enter System Administrator (hdbadm) Home Directory [/usr/sap/HDB/home]:
Enter System Administrator (hdbadm) Login Shell [/bin/sh]:
Enter System Administrator (hdbadm) User ID [1001]:
Keep Source System Administrator User (dbhadm) [n]:
Keep Home Directory of Source System Administrator (dbhadm) [n]:
Change the password of the Database user [n]:
Restart system after machine reboot? [n]:

Summary before execution:
=========================

SAP HANA System Rename
   Rename Parameters
      Installation Path: /hana/shared
      Source System ID: DBH
      Target Instance Number: 00
      Remote Execution: ssh
      Host Name: hanadb
      System Usage: development
      Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE
      Location of Data Volumes: /hana/shared/HDB/global/hdb/data
      Location of Log Volumes: /hana/shared/HDB/global/hdb/log
      System Administrator (hdbadm) Home Directory: /usr/sap/HDB/home
      System Administrator (hdbadm) Login Shell: /bin/sh
      System Administrator (hdbadm) User ID: 1001
      Keep Source System Administrator User (dbhadm): No
      Keep Home Directory of Source System Administrator (dbhadm): No

Note: SAP HANA System will be restarted

Do you want to continue? (y/n): y

Executing SAP HANA System rename

Renaming system...
    Renaming instance...
    Stopping system...
      All server processes stopped on host 'hanadb' (worker).
    Stopping sapstartsrv service...
    Creating system administrator user 'hdbadm'...
    Updating system configuration files...
    Renaming instance...
    Creating sapservices entry...
    Starting service (sapstartsrv)...
    Starting instance HDB (HDB00) on host 'hanadb'...
    Starting 7 processes on host 'hanadb' (worker):
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbwebdispatcher
      All server processes started on host 'hanadb' (worker).
Registering Instance Service...
Updating component list...
Updating SAP HANA Instance Integration on Local Host...
  Deploying SAP Host Agent configurations...
SAP HANA system renamed.
You can send feedback to SAP with this form: https://hanadb, OU=Dezhi_Systems, C=DE:1129/lmsl/HDBLCM/HDB/feedback/feedback.html
Log file written to '/var/tmp/hdb_HDB_hdblcm_register_rename_system_2016-04-30_15.52.57/hdblcm.log' on host 'HANADB'.
**So now what we do? The HANA DB is in "half dead" status. The only method we can do is to rename it back to whatever it was, HDB. This was executed successfully** ```` [root@HANADB hdblcm]# ./hdblcm SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171 *************************************************************** Choose an action to perform Index | Action to be performed | Description ---------------------------------------------------------------------------- 1 | add_hosts | Add Additional Hosts to the SAP HANA System 2 | register_rename_system | Register and Rename SAP HANA System 3 | exit | Exit (do nothing) Enter selected action index [3]: 2 Target installation directory '/hana/shared/HDB' already exists Local Host Name: hanadb System Properties: DBH /hana/shared/HDB HDB_ALONE HDB00 version: 1.00.112.02.1459851171 host: hanadb (Database Worker (worker)) The HANA system is installed with SID mountpoint. Based on the file system layout, the system id will be changed from DBH to HDB Enter Target Host Name for Source Host 'hanadb' [hanadb]: 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 [3]: Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]: Enter Source System Administrator (dbhadm) Password: Source System Administrator (dbhadm) Password: Unknown user password combination Enter Source System Administrator (dbhadm) Password: Enter Target Instance Number [00]: Enter Location of Data Volumes [/hana/shared/HDB/global/hdb/data]: Enter Location of Log Volumes [/hana/shared/HDB/global/hdb/log]: Enter Location of Data Backups [/hana/shared/HDB/HDB00/backup/data]: Enter Location of Log Backups [/hana/shared/HDB/HDB00/backup/log]: Enter Target System Administrator (hdbadm) Password: Confirm Target System Administrator (hdbadm) Password: Enter System Administrator (hdbadm) Home Directory [/usr/sap/HDB/home]: Enter System Administrator (hdbadm) Login Shell [/bin/sh]: Enter System Administrator (hdbadm) User ID [1001]: Keep Source System Administrator User (dbhadm) [n]: Keep Home Directory of Source System Administrator (dbhadm) [n]: Change the password of the Database user [n]: Restart system after machine reboot? [n]: Summary before execution: ========================= SAP HANA System Rename Rename Parameters Installation Path: /hana/shared Source System ID: DBH Target Instance Number: 00 Remote Execution: ssh Host Name: hanadb System Usage: development Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE Location of Data Volumes: /hana/shared/HDB/global/hdb/data Location of Log Volumes: /hana/shared/HDB/global/hdb/log System Administrator (hdbadm) Home Directory: /usr/sap/HDB/home System Administrator (hdbadm) Login Shell: /bin/sh System Administrator (hdbadm) User ID: 1001 Keep Source System Administrator User (dbhadm): No Keep Home Directory of Source System Administrator (dbhadm): No Note: SAP HANA System will be restarted Do you want to continue? (y/n): y Executing SAP HANA System rename Renaming system... Renaming instance... Stopping system... All server processes stopped on host 'hanadb' (worker). Stopping sapstartsrv service... Creating system administrator user 'hdbadm'... Updating system configuration files... Renaming instance... Creating sapservices entry... Starting service (sapstartsrv)... Starting instance HDB (HDB00) on host 'hanadb'... Starting 7 processes on host 'hanadb' (worker): Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbwebdispatcher All server processes started on host 'hanadb' (worker). Registering Instance Service... Updating component list... Updating SAP HANA Instance Integration on Local Host... Deploying SAP Host Agent configurations... SAP HANA system renamed. You can send feedback to SAP with this form: https://hanadb, OU=Dezhi_Systems, C=DE:1129/lmsl/HDBLCM/HDB/feedback/feedback.html Log file written to '/var/tmp/hdb_HDB_hdblcm_register_rename_system_2016-04-30_15.52.57/hdblcm.log' on host 'HANADB'. ````

Project 'Clam' founder

This time we know that the symbolic link is the reason that cause the failures. So we deleted the symbolic link and retry to rename the SID again, from HDB to DBH

hdbadm@HANADB:/hana/shared> rm DBH

Then we start the rename procedure again, this time it was able to rename the system to DBH successfully, meanwhile create a whole bunch of directories, create the user dbhadm, and so on

[root@HANADB hdblcm]# ./hdblcm


SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171
***************************************************************





Choose an action to perform

  Index | Action to be performed     | Description
  --------------------------------------------------------------------------------------
  1     | add_hosts                  | Add Additional Hosts to the SAP HANA System
  2     | configure_internal_network | Configure Inter-Service Communication
  3     | configure_sld              | Configure System Landscape Directory Registration
  4     | extract_components         | Extract Components
  5     | print_component_list       | Print Component List
  6     | rename_system              | Rename the SAP HANA System
  7     | uninstall                  | Uninstall SAP HANA Components
  8     | unregister_system          | Unregister the SAP HANA System
  9     | update_component_list      | Update Component List
  10    | update_components          | Install or Update Additional Components
  11    | update_host                | Update the SAP HANA Instance Host integration
  12    | exit                       | Exit (do nothing)

Enter selected action index [12]: 6

Local Host Name: hanadb

System Properties:
HDB /hana/shared/HDB HDB_ALONE
        HDB00
        version: 1.00.112.02.1459851171
        host: hanadb (Database Worker (worker))

Enter Target Host Name for Source Host 'hanadb' [hanadb]:

  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 [3]:
Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]:
Enter Source System Administrator (hdbadm) Password:
Enter Target System ID [HDB]: DBH
Enter Target Instance Number [00]:
Enter Location of Data Volumes [/hana/shared/DBH/global/hdb/data]:
Enter Location of Log Volumes [/hana/shared/DBH/global/hdb/log]:
Enter Location of Data Backups [/hana/shared/DBH/HDB00/backup/data]:
Enter Location of Log Backups [/hana/shared/DBH/HDB00/backup/log]:
Enter Target System Administrator (dbhadm) Password:
Confirm Target System Administrator (dbhadm) Password:
Enter System Administrator (dbhadm) Home Directory [/usr/sap/DBH/home]:
Enter System Administrator (dbhadm) Login Shell [/bin/sh]:
Enter System Administrator (dbhadm) User ID [1002]:
Keep Source System Administrator User (hdbadm) [n]:
Keep Home Directory of Source System Administrator (hdbadm) [n]:
Change the password of the Database user [n]:
Restart system after machine reboot? [n]:

Summary before execution:
=========================

SAP HANA System Rename
   Rename Parameters
      Installation Path: /hana/shared
      Source System ID: HDB
      Target System ID: DBH
      Target Instance Number: 00
      Remote Execution: ssh
      Host Name: hanadb
      System Usage: development
      Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE
      Location of Data Volumes: the path will be set automatically
      Location of Log Volumes: the path will be set automatically
      System Administrator (dbhadm) Home Directory: /usr/sap/DBH/home
      System Administrator (dbhadm) Login Shell: /bin/sh
      System Administrator (dbhadm) User ID: 1002
      Keep Source System Administrator User (hdbadm): No
      Keep Home Directory of Source System Administrator (hdbadm): No

Note: SAP HANA System will be restarted

Do you want to continue? (y/n): y

Executing SAP HANA System rename

Renaming system...
    Renaming instance...
    Stopping system...
      Stopping 7 processes on host 'hanadb' (worker):
        Stopping on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
      All server processes stopped on host 'hanadb' (worker).
    Stopping sapstartsrv service...
    Creating system administrator user 'dbhadm'...
    Updating system configuration files...
    Renaming instance...
    Creating sapservices entry...
    Starting service (sapstartsrv)...
    Starting instance DBH (HDB00) on host 'hanadb'...
    Starting 7 processes on host 'hanadb' (worker):
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbwebdispatcher, hdbxsengine
        Starting on 'HANADB': hdbdaemon, hdbwebdispatcher
      All server processes started on host 'hanadb' (worker).
Registering Instance Service...
Updating component list...
Updating SAP HANA Instance Integration on Local Host...
  Deploying SAP Host Agent configurations...
SAP HANA system renamed.
Log file written to '/var/tmp/hdb_HDB_hdblcm_rename_system_2016-04-30_15.59.03/hdblcm.log' on host 'HANADB'.
**This time we know that the symbolic link is the reason that cause the failures. So we deleted the symbolic link and retry to rename the SID again, from HDB to DBH** ```` hdbadm@HANADB:/hana/shared> rm DBH ```` **Then we start the rename procedure again, this time it was able to rename the system to DBH successfully, meanwhile create a whole bunch of directories, create the user dbhadm, and so on** ```` [root@HANADB hdblcm]# ./hdblcm SAP HANA Lifecycle Management - SAP HANA 1.00.112.02.1459851171 *************************************************************** Choose an action to perform Index | Action to be performed | Description -------------------------------------------------------------------------------------- 1 | add_hosts | Add Additional Hosts to the SAP HANA System 2 | configure_internal_network | Configure Inter-Service Communication 3 | configure_sld | Configure System Landscape Directory Registration 4 | extract_components | Extract Components 5 | print_component_list | Print Component List 6 | rename_system | Rename the SAP HANA System 7 | uninstall | Uninstall SAP HANA Components 8 | unregister_system | Unregister the SAP HANA System 9 | update_component_list | Update Component List 10 | update_components | Install or Update Additional Components 11 | update_host | Update the SAP HANA Instance Host integration 12 | exit | Exit (do nothing) Enter selected action index [12]: 6 Local Host Name: hanadb System Properties: HDB /hana/shared/HDB HDB_ALONE HDB00 version: 1.00.112.02.1459851171 host: hanadb (Database Worker (worker)) Enter Target Host Name for Source Host 'hanadb' [hanadb]: 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 [3]: Enter Certificate Host Name For Host 'hanadb' [hanadb, OU=Dezhi_Systems, C=DE]: Enter Source System Administrator (hdbadm) Password: Enter Target System ID [HDB]: DBH Enter Target Instance Number [00]: Enter Location of Data Volumes [/hana/shared/DBH/global/hdb/data]: Enter Location of Log Volumes [/hana/shared/DBH/global/hdb/log]: Enter Location of Data Backups [/hana/shared/DBH/HDB00/backup/data]: Enter Location of Log Backups [/hana/shared/DBH/HDB00/backup/log]: Enter Target System Administrator (dbhadm) Password: Confirm Target System Administrator (dbhadm) Password: Enter System Administrator (dbhadm) Home Directory [/usr/sap/DBH/home]: Enter System Administrator (dbhadm) Login Shell [/bin/sh]: Enter System Administrator (dbhadm) User ID [1002]: Keep Source System Administrator User (hdbadm) [n]: Keep Home Directory of Source System Administrator (hdbadm) [n]: Change the password of the Database user [n]: Restart system after machine reboot? [n]: Summary before execution: ========================= SAP HANA System Rename Rename Parameters Installation Path: /hana/shared Source System ID: HDB Target System ID: DBH Target Instance Number: 00 Remote Execution: ssh Host Name: hanadb System Usage: development Certificate Host Names: hanadb -> hanadb, OU=Dezhi_Systems, C=DE Location of Data Volumes: the path will be set automatically Location of Log Volumes: the path will be set automatically System Administrator (dbhadm) Home Directory: /usr/sap/DBH/home System Administrator (dbhadm) Login Shell: /bin/sh System Administrator (dbhadm) User ID: 1002 Keep Source System Administrator User (hdbadm): No Keep Home Directory of Source System Administrator (hdbadm): No Note: SAP HANA System will be restarted Do you want to continue? (y/n): y Executing SAP HANA System rename Renaming system... Renaming instance... Stopping system... Stopping 7 processes on host 'hanadb' (worker): Stopping on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine All server processes stopped on host 'hanadb' (worker). Stopping sapstartsrv service... Creating system administrator user 'dbhadm'... Updating system configuration files... Renaming instance... Creating sapservices entry... Starting service (sapstartsrv)... Starting instance DBH (HDB00) on host 'hanadb'... Starting 7 processes on host 'hanadb' (worker): Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbcompileserver, hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbwebdispatcher, hdbxsengine Starting on 'HANADB': hdbdaemon, hdbwebdispatcher All server processes started on host 'hanadb' (worker). Registering Instance Service... Updating component list... Updating SAP HANA Instance Integration on Local Host... Deploying SAP Host Agent configurations... SAP HANA system renamed. Log file written to '/var/tmp/hdb_HDB_hdblcm_rename_system_2016-04-30_15.59.03/hdblcm.log' on host 'HANADB'. ````

Project 'Clam' founder

Finally we renamed the SID again, from DBH back to HDB. However you know what, the hardware key was changed! Even with the same hardware, same SID, it changed!!!

Before then, the hardware key was

U0573728973

Now it has changed to

K3818087348

This means, when HANA DB calculates the hardware, obvious it also considers other factors, such as the DB creation time? DB registration time? Or purely a random function() that impact the hardware key result?

This means, when you're doing HANA system copy in storage level / SAN level from your production system back to QA systems, then rename the HDB SID, you cannot reuse any of your previous licenses, even though you may have had your QA license already, but still, you have to apply for an additional one, and your previous license will be useless.

**Finally we renamed the SID again, from DBH back to HDB. However you know what, the hardware key was changed! Even with the same hardware, same SID, it changed!!!** Before then, the hardware key was ```` U0573728973 ```` Now it has changed to ```` K3818087348 ```` This means, when HANA DB calculates the hardware, obvious it also considers other factors, such as the DB creation time? DB registration time? Or purely a random function() that impact the hardware key result? This means, when you're doing HANA system copy in storage level / SAN level from your production system back to QA systems, then rename the HDB SID, you cannot reuse any of your previous licenses, even though you may have had your QA license already, but still, you have to apply for an additional one, and your previous license will be useless.

Project 'Clam' founder

edited May 2 '16 at 4:23 pm

Hi Adam,

Thanks for the good Article, so could you help me to know if changing of SID will also change the scheme also [i.e. PRDADM to QASADM] or it will be same prdadm.

HANA DB Backup SID and schema - PRD and PRDADM
Need to change SID to QAS the scheme would be

Regards,
Sanath Kumar

Hi Adam, Thanks for the good Article, so could you help me to know if changing of SID will also change the scheme also [i.e. PRDADM to QASADM] or it will be same prdadm. HANA DB Backup SID and schema - PRD and PRDADM Need to change SID to QAS the scheme would be Regards, Sanath Kumar

Hi Adam,

Thanks for the good Article, so could you help me to know if changing of SID will also change the scheme also [i.e. PRDADM to QASADM] or it will be same prdadm.

HANA DB Backup SID and schema - PRD and PRDADM
Need to change SID to QAS the scheme would be

Regards,
Sanath Kumar

Schema remains as is... Also schema name had nothing to do with the $SIDadm name

>Hi Adam, >Thanks for the good Article, so could you help me to know if changing of SID will also change the scheme also [i.e. PRDADM to QASADM] or it will be same prdadm. >HANA DB Backup SID and schema - PRD and PRDADM >Need to change SID to QAS the scheme would be >Regards, >Sanath Kumar Schema remains as is... Also schema name had nothing to do with the $SIDadm name

Project 'Clam' founder

Thanks Adam.

So schema name would be PRDADM only if we change SID from PRD to QAS.

Could you please let us know if we can changes schema name?

Regards,

Sanath Kumar

Thanks Adam. So schema name would be PRDADM only if we change SID from PRD to QAS. Could you please let us know if we can changes schema name? Regards, Sanath Kumar
1.44k
views
9
replies
1
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft