cancel
Showing results for 
Search instead for 
Did you mean: 

restart SUSE. but failed after HDB start.

Former Member
0 Kudos

Hi All 

      I have a HANA database runs on one SUSE11 sp3 server. after i restart server.    I start the database with HDB  start commands.    but failed :

ERROR: SAP_RETRIEVAL_PATH missing

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

charles_paulet
Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

can you check if your envirnoment variable SAP_RETRIEVAL_PATH is maintained ?

You can check by executing sidadm> cd $SAP_RETRIEVAL_PATH

It should take you to /usr/sap/<SID>/HDB<nr>/<Instance hostname>

or >env

chek if the env variable is maintained or not . If not please maintain.

Former Member
0 Kudos

how to maintain?   #vi  hdbenv.sh?    In general, SAP_RETRIEVAL_PATH =?

Former Member
0 Kudos

can you send a email of hdbenv.sh?

55783511@qq.com

thanks a lot.

Former Member
0 Kudos

Yes, It should be maintained in hdbenv.sh

SAP_RETRIEVAL_PATH = $DIR_INSTANCE/$VTHOSTNAME


what is the output of the below


1. sidadm> env   -> are you finding SAP_RETRIEVAL_PATH ?


2. sidadm> cd $SAP_RETRIEVAL_PATH 

Former Member
0 Kudos

hi,

  it's have SAP_RETRIEVAL_PATH = $DIR_INSTANCE/$VTHOSTNAME  in  hdbenv.csh , but  no find in hdbenv.sh .

sidadm> env    no finded  SAP_RETRIEVAL_PATH

  sidadm> cd $SAP_RETRIEVAL_PATH   

  sidadm /root

  I suspect that the file (hdbenv.sh) is damaged,  Can you send the file ? 

  thanks a lot.

Former Member
0 Kudos

# SAP R/3 Environment - please do not edit

[HIS_DSN]

Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0

ServerName=CIS_DB

doexit=return

if  expr match "$0" ".*hdbenv.sh$" >/dev/null; then doexit=exit; fi

#$doexit -1

#

# this statement remains only because it is edited by installer software. Should be eliminated

#

DEFAULTHOSTNAME=fdhana

# For SAP HANA development: put path to locally-built executables

# to override installed executables here (.../gen/opt or .../gen/dbg).

DEV_PATH=""

function checks_and_settings {

    typeset doexit=return

    #

    # check for SIDadm user name convention

    # guess SAPSYSTEMNAME, if not yet defined, and add it to environment

    #

    if [ "x$SAPSYSTEMNAME" = "x" ]; then

        typeset usr=$(whoami)

        if expr match ${usr} "[a-z][a-z0-9][a-z0-9]adm" != 6 >/dev/null ; then

            echo "hdbenv.sh: HDB script requires <sid>adm user, but got '${usr}'"

            $doexit 1

        fi

        SAPSYSTEMNAME=`expr substr "$usr" 1 3 | tr "[:lower:]" "[:upper:]"`

        export SAPSYSTEMNAME

    fi

    #

    # Evaluate Virtual Hostname: given as $1, or found in sapservices, or defaulted to 'physical' hostname

    #

    # the next block assures that the variable VTHOSTNAME 'virtual host name' be defined

typeset source

    if [ "$1" = "" ]; then

        [ $# != 0 ] && shift

        #

        # get local virtual host name out of sapservices. take only the first host name found if more given

        # ignore lines commented out

        #

        typeset inputfile=/usr/sap/sapservices

        typeset SID=$SAPSYSTEMNAME

        VTHOSTNAME=`grep "^[  ]*[^#].*pf=/.*/${SID}/\(SYS/profile\|profile\)/${SID}_HDB[0-9][0-9]_"  $inputfile | sed "s:.*pf=/.*/${SID}/\(SYS/profile\|profile\)/${SID}_HDB[0-9][0-9]_\([^ ]*\).*:\2:" | head -1`

        if [ "$VTHOSTNAME" = "" ]

        then

            source="in $inputfile"

            VTHOSTNAME=`grep "^/usr/sap/waitforhdb.*[#].*pf=/.*/${SID}/\(SYS/profile\|profile\)/${SID}_HDB[0-9][0-9]_"  $inputfile | sed "s:.*pf=/.*/${SID}/\(SYS/profile\|profile\)/${SID}_HDB[0-9][0-9]_\([^ ]*\).*:\2:" | head -1`

        fi

        if [ -z "$VTHOSTNAME" ]

        then

           echo "hdbenv.sh: Host name not found out of $inputfile, defaulting to local physical host" >&2

           source='as physical host'

           VTHOSTNAME=`hostname`

        fi

    else

      source='on command line'

      VTHOSTNAME="$1"; shift

    fi

    #

    # check for consistency between an already defined SAP_RETRIEVAL_PATH and the VTHOSTNAME evaluated before

    #

    if [ "x$SAP_RETRIEVAL_PATH" != "x" ]; then

        typeset host=`basename $SAP_RETRIEVAL_PATH`

        if [ "$VTHOSTNAME" != "$host" ]

        then

        echo "hdbenv.sh: Hostname $host defined in \$SAP_RETRIEVAL_PATH=$SAP_RETRIEVAL_PATH differs from host name defined $source." >&2

        fi

    fi

    #

    # guess instance number - there may be only one in this SID per virtual host

    #

    typeset TINSTANCE=`find /usr/sap/"$SAPSYSTEMNAME"/SYS/profile/"$SAPSYSTEMNAME"_HDB[0-9][0-9]_$VTHOSTNAME -exec expr substr {} 33 2 \; 2>/dev/null`

# variable 'COMMAND' may be set by the 'HDB' command script sourcing this file:

    if [ ${#TINSTANCE} -lt 2 ] && [ "$COMMAND" = "start" ]; then # find any instance

      TINSTANCE=`find /usr/sap/"$SAPSYSTEMNAME"/SYS/profile/"$SAPSYSTEMNAME"_HDB[0-9][0-9]_* -exec expr substr {} 33 2 \; 2>/dev/null`

      if [ ${#TINSTANCE} -gt 2 ]; then # take only first

        TINSTANCE=`expr substr "$TINSTANCE" 1 2`

      fi

    fi

    if [ ${#TINSTANCE} -lt 2 ]; then

        echo "hdbenv.sh: Error: Instance not found for host $VTHOSTNAME"

        $doexit 1

    fi

    if [ ${#TINSTANCE} -gt 2 ]; then

Former Member
0 Kudos

The content above is hdbenv. sh.

I feel it is incomplete!

Former Member
0 Kudos

whats is there next to

if [ ${#TINSTANCE} -lt 2 ]; then

        echo "hdbenv.sh: Error: Instance not found for host $VTHOSTNAME"

        $doexit 1

    fi

    if [ ${#TINSTANCE} -gt 2 ]; then

Former Member
0 Kudos

lost

Former Member
0 Kudos

Yes, The hadbenv.sh file is corrupted. Not sure, how you have lost that.

Try copying it from another server.

Regards,

Pavan Gunda