Skip to main content

Im trying to restore tenant database to our HANA DR server but I’m getting Error Code 18:146 Failed to check and create tenant database. If doesn’t exist please create an empty tenant database and retry.

I checked with the SAP BASIS consultant and confirmed that tenant databases do exist in the HANA DR server.

I was able to restore the SYSTEMDB.

Any help is much appreciated.

Hi @ElmerT 

 

Could you have the DBA run the following command as SIDadm

 

hdbsql -u BACKUP -C “select * from "SYS"."M_DATABASES"

 

hdbsql -U BACKUP -C "ALTER SYSTEM STOP DATABASE <TNT_NAME>"

 

If this works then please attach the clHanaAgent.log 

 


Hi @Gowri Shankar 

commands have been run and the tenant databases are stopped. Attached is the ClHanaAgent.log.

 

 

 


Issue was fixed last Thursday, November 9, 2023. HDBUSERSTORE key recreated.


Unfortunately, upon doing another test restore the issue surfaces again.

I have verified the HDBUSERSTORE key is still present.

Checking ClHanagAgent.log, it is still showing 

45861 b325 11/13 17:07:22 1477399 ClHanaAgent::createTenantDbIfNotThere() - Creating the Tenant database eE01] ... [/usr/sap/JH1/HDB00/exe/hdbsql -U BACKUP "CREATE DATABASE E01 SYSTEM USER PASSWORD ******" 2>&1]
45861 b325 11/13 17:07:22 1477399 ClHanaAgent::createTenantDbIfNotThere() - <* 10: authentication failed SQLSTATE: 28000

The password is different from what I set in the HDBUSERSTORE key.

Any help would be appreciated.

 

 


Performed another test restore today I was able to restore the SYSTEMDB but when restoring the tenant database I’m getting the same error. HDBUSERSTORE key is already present but the restore overwrites it and assigns a different password for the SYSTEM user then it tries to create the tenant database using the previous password which then results to “authentication failed SQLSTATE:28000”.

Why does the restore overwrites the existing HDBUSERSTORE key? What was the new password for the SYSTEM user?

57814 e1d6 11/15 17:17:57 1426114 CvProcess::system() - /usr/sap/JH1/HDB00/exe/hdbuserstore List BACKUP 2>&1
57814 e1d6 11/15 17:17:57 1426114 CvProcess::system() - Command completed with rc=0
57814 e1d6 11/15 17:17:57 1426114 ClHanaAgent::createHdbStoreKey() - HDB Store key eBACKUP] exists. Still overwriting.
57814 e1d6 11/15 17:17:57 1426114 ClHanaAgent::createHdbStoreKey() - createBackupKeyCmd=</usr/sap/JH1/HDB00/exe/hdbuserstore -i set BACKUP jg-hanadr.jaidah.local:30013,jg-hanadr.jaidah.local:30015 SYSTEM '********'>
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::SwitchUserAndSetEnv() - Change user=jh1adm, gid=101, uid=1001
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::SwitchUserAndSetEnv() - Current uid = u0]gid = g0]
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::setEnvironment() - Not setting HANA environment variables as nSetHANAEnv is not set
57814 e1d6 11/15 17:17:59 1426114 JOBRESCACHEDIR: job 1426114 creating '/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/1426114'
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::ExecuteRestore() - Successfully retrieved jobResultsDir=[/opt/commvault/iDataAgent/jobResults/CV_JobResults/2/0/1426114]
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::GetHanaVersionUsingHDB() - <HDB version info:
>
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::GetHanaVersionUsingHDB() - <  version:             2.00.070.00.1679989823
>
57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::GetHanaVersionUsingHDB() - verNum=<20007000>
57814 e1d6 11/15 17:17:59 1426114 ::checkSymbolicLinksForBackint() - Got Simpana installation directory=[/opt/commvault] Simpana backint path=[/opt/commvault/iDataAgent/backint]
 

57814 e1d6 11/15 17:17:59 1426114 ClHanaAgent::ExecuteRestore() - Starting the Instance JH1] ... [/usr/sap/JH1/HDB00/HDB start 2>&1]
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::ExecuteRestore() - Started the Instance JH1] successfully
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::updateGlobalIni() - Failed to rename the file </usr/sap/JH1/SYS/global/hdb/custom/config/DB_E01/global.ini> to </usr/sap/JH1/SYS/global/hdb/custom/config/DB_E01/global.ini.prev>
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::getTenantDBList() - hanaCmd=</usr/sap/JH1/HDB00/exe/hdbsql -U BACKUP -C  "Select DATABASE_NAME,ACTIVE_STATUS,OS_USER,OS_GROUP from M_DATABASES">
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::createTenantDbIfNotThere() - Creating the Tenant database eE01] ... [/usr/sap/JH1/HDB00/exe/hdbsql -U BACKUP "CREATE DATABASE E01 SYSTEM USER PASSWORD Pa55w0rdDR" 2>&1]
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::createTenantDbIfNotThere() - <* 10: authentication failed SQLSTATE: 28000
>
57814 e1d6 11/15 17:18:09 1426114 ClHanaAgent::createTenantDbIfNotThere() - Failed to create the tenant databse tE01]. Please create manually and retry.
 

Any suggestions?

 

 


issue resolved.


Reply