Estrazione configurazioni base SAP

Estrae la configurazione di base di un sistema SAP dai profili, utilizzando un singolo comando.

Elenca i principali parametri di configurazione di ogni istanza SAP e di ogni componente, basandosi sui profili trovati in /sapmnt.

Il comando è scritto in modo da essere facilmente personalizzabile a seconda delle differenti esigenze.

Per host Linux:

find /sapmnt/???/profile/* ! -name . -prune -type f \
  \( \
    \( -name DEFAULT.PFL \) \
    -o \( -name ???_ASCS* ! -name "*.*" \) \
    -o \( -name ???_SCS* ! -name "*.*" \) \
    -o \( -name ???_D* ! -name "*.*" \) \
    -o \( -name ???_J* ! -name "*.*" \) \
  \) \
  -exec echo \; -exec echo -e '\033[0;31m' {} '\033[0m' \; \
  \( -exec grep "SAPFQDN=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPFQDN =" {} \; -o -exec true \; \) \
  \( -exec grep "system/type=" {} \; -o -exec true \; \) \
  \( -exec grep "system/type =" {} \; -o -exec true \; \) \
  \( -exec grep "OS_UNICODE=" {} \; -o -exec true \; \) \
  \( -exec grep "OS_UNICODE =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPDBHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPDBHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/dbhost=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/dbhost =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPGLOBALHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPGLOBALHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/host=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/host =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/system=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/system =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPLOCALHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPLOCALHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPSYSTEM=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPSYSTEM =" {} \; -o -exec true \; \)

 

Per host AIX/Solaris:

find /sapmnt/???/profile/* ! -name . -prune -type f \
  \( \
    \( -name DEFAULT.PFL \) \
    -o \( -name ???_ASCS* ! -name "*.*" \) \
    -o \( -name ???_SCS* ! -name "*.*" \) \
    -o \( -name ???_D* ! -name "*.*" \) \
    -o \( -name ???_J* ! -name "*.*" \) \
  \) \
  -exec echo \; -exec echo '\033[0;31m' {} '\033[0m' \; \
  \( -exec grep "SAPFQDN=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPFQDN =" {} \; -o -exec true \; \) \
  \( -exec grep "system/type=" {} \; -o -exec true \; \) \
  \( -exec grep "system/type =" {} \; -o -exec true \; \) \
  \( -exec grep "OS_UNICODE=" {} \; -o -exec true \; \) \
  \( -exec grep "OS_UNICODE =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPDBHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPDBHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/dbhost=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/dbhost =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPGLOBALHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPGLOBALHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/host=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/host =" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/system=" {} \; -o -exec true \; \) \
  \( -exec grep "j2ee/scs/system =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPLOCALHOST=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPLOCALHOST =" {} \; -o -exec true \; \) \
  \( -exec grep "SAPSYSTEM=" {} \; -o -exec true \; \) \
  \( -exec grep "SAPSYSTEM =" {} \; -o -exec true \; \)

Non è testato su HP-UX, ma dovrebbe funzionare senza problemi.

Esempio di output (FQDN nascosto):

sap_get_cfg_extr_1