Skip to Content

Updating SAP ASE with “sapdbctrl

I have tried to conclude the SAP ASE patch update (16.0.00.05 to 16.0.01.01) in this document with “sapdbctrl”. SAP has already described entire update process in SAP Note 1982469 (SYB: Updating SAP ASE with saphostctrl / sapdbctrl) very magnificently; from this Note I have taken key steps along with screen prints and errors where I have found hurdle but not big worry at all.

To update SAP ASE 16.0.01.01 (16.0 SP01) is important of the customers who are using SAP ASE 16. as per Note 2113995 – Missing authentication check in SAP ASE

sapdbctrl support the SAP ASE update to releases 15.7 SP100 or higher, and ASE 16.0 or higher.

Prerequisite:

Must ensure you have taken a DB backup and create a file system backup of directory /sybase/<DBSID> (UNIX / Linux), or <DRIVE>:\sybase\<DBSID> plus a system image (Windows) before you perform the upgrade.

The SAP Host Agent must be installed on the system and the version must be 7.20 patch levels 202 or higher, so check host Agent version by using saphostexec –version

Upgrade of ASE to 16.0 or higher, the ‘startdb’ script of the SAP kernel needs to be adapted. So make ensure you have updated latest kernel.

Checking  existing version of SAP ASE, Host Agent and kernel.V1.JPG

v2.JPG

There are few steps needs to perform for SAP ASE update:

  1. Download the software from the SAP Service Marketplace.
  2. Download the SAP Netweaver specific upgrade script ‘syb_db_update.TXT’.
  3. Update the ASE software.
  4. Update the ODBC and JDBC drivers.

Step_1. Download the software from the SAP Service Marketplace.

https://support.sap.com/software/databases.html

v3.JPG

When downloading an update for ASE release 16.0

File ASEBS160aabb_0.SAR contains the ASE server software (aa and bb are two numbers and refer to the current ASE support package and patch level – ASE 160 SPaa PLbb)

File ASEBC160aabb_0.SAR contains the ODBC and JDBC drivers (version SPaa PLbb).

Copy the downloaded files (File ASEBS160aabb_0.SAR contains the ASE server software) from your download directory. Unpack the SAR archive file containing the ASE server package using the command:

SAPCAR -xvf <file>.SAR

Do not unpack the SAR file containing the client software in this temporary directory.

Make sure user syb<sid> does have at least read and execute permission on the download directory and all its subdirectories safer if we goes with full permission.

Make sure that all executable files in this download directory tree have read and execute permission for user syb<sid>.

Step_2. Download the SAP NetWeaver-specific upgrade script ‘syb_db_update.txt’. 

Download the attached script ‘syb_update_db.txt’ and place it in directory /usr/sap/hostctrl/work/<SAPSID>  (UNIX/Linux), or <DRIVE>:\usr\sap\Program Files\hostctrl\work\<SAPSID>\ (Windows). If the directory <SAPSID> does not exist, create it.

v4.JPG

Download the attached script ‘syb_update_db.txt’ and place it in directory /usr/sap/hostctrl/work/<SAPSID>  (UNIX/Linux), or <DRIVE>:\usr\sap\Program Files\hostctrl\work\<SAPSID>\ (Windows). If the directory <SAPSID> does not exist, create it.

The script checks the newly installed ASE version and sets important SAP-specific parameters depending on the ASE version. The latest version of script ‘syb_update_db.txt’ is always attached to this note 1982469.

If the script is not downloaded, sapdbctrl generates this script – however, depending on the sapdbctrl version you are using the contents might not be totally current.

Step_3. Update the ASE Software.

SAP ASE has to be up and running before the upgrade starts. The SAP system has to be offline. Stop the application servers before upgrading ASE. SAP ASE will be stopped and restarted during the installation process, open connections from applications will be terminated, and application processes will be disrupted.

The upgrade procedure will stop the database server, upgrade the ASE software, start the database, execute the required ASE upgrade scripts and the SAP NetWeaver-specific upgrade script ‘syb_update_db.txt’.

The whole procedure may take several minutes – be patient and check the log under /Sybase/<SID>/log/ directory.

To run update  through “sapdbctrl” log in as user root (UNIX/Linux), or as Global Administrator (Windows), and execute

sapdbctrl LiveUpdate <SAPSID> -tsyb -mExecute -oTASK=UPDATE_ASE -oDROP_LOCATION=”<drop location>”

<drop location> is the directory where the software has been extracted previously. It is recommended that this directory is local on the machine where the upgrade is executed. 

##UNIX/Linux only: Before you can call “sapdbctrl” as user root you have to set environment variable LD_LIBRARY_PATH for root to the install

location of saphostexec (typically this is /usr/sap/hostctrl/exe).

LD_LIBRARY_PATH=/usr/sap/hostctrl/exe

:/usr/sap/hostctrl/exe>./ sapdbctrl LiveUpdate <SAPSID> -tsyb -mExecute -oTASK=UPDATE_ASE -oDROP_LOCATION=”<drop location>”

v5.JPG

Yeah!!! After some time ASE update got completed successfully

Step_4. Update the ODBC and JDBC drivers.

No need to stop the SAP system when you copy the new ODBC and JDBC software to the global directory. It has to be restarted for the new version to be used.

Log in as user <sid>adm.

Get a file system backup of the global client driver software directory:

on UNIX/Linux: /sapmnt/<SID>/global/syb/<platform>/

on Windows: <drive>:\usr\sap\<SID>\SYS\global\syb\NTAMD64

Copy the SAR archive file containing the client software (File ASEBC160aabb_0.SAR contains the ODBC and JDBC drivers) from your download directory.

Unpack the SAR archive file with the command:

SAPCAR -xvf <archive_file>.SAR

v6.JPG

Restart the SAP system when the ASE upgrade has finished

Checked the version of upgrade SAP ASE.

v7.JPG

*****

Important section: I have considered errors section as an important section where I have mentioned errors along with corrective action those I have handled during update. 

a.    1. Custom Action: com.sybase.ia.common.InstallMergeModuleStatus

Status: FATAL ERROR

Additional Notes: FATAL ERROR – class com.sybase.ia.common.InstallMergeModuleStatus FatalInstallException: Adaptive Server Enterprise: FAILED.  See log file /sybase/<SID>/log/ase.log for detail.

While checked log /sybase/<SID>/log/ase.log following was the reason

Additional Notes: ERROR – Flexeraal3: /sybase/<SID>/./ASE-16_0/scripts/installpubs3 (The file access permissions do not allow the specified action.)

Corrective action: corrected the file permission level of files.

  

b.    2.  Custom Action:  com.sybase.ia.common.InstallMergeModuleStatus

Status: FATAL ERROR

Additional Notes: FATAL ERROR –  class com.sybase.ia.common.InstallMergeModuleStatus   FatalInstallException: SAP Java Runtime Environment: FAILED.  See log file /sybase/<SID>/log/jre7.log for detail.

While checked log /sybase/<SID>/ log/jre7.log following was the reason

Additional Notes: ERROR – Flexeraal3: /sybase/<SID>/./shared/SAPJRE 7_1_018_64BIT/lib/ppc64/libnio.so (Cannot open or remove a file containing a running program.)

Corrective action: check the processes and stop running files or renamed the files i.e. libnio.so to libnio.so.backup before executing the ASE   update script so process can’t use these file before (update will auto copy new files hence these  files are not required but you can keep as backup.)

c.   3. failed. Error: Msg 5861, Level 16, State 2:

Server ‘<SID>’, Line 7:

The current ‘max memory’ value ‘2816000’, is not sufficient to change the parameter ‘allow updates to system tables’ to ‘1’. ‘max memory’ should be greater than ‘total logical memory’ ‘2817460’ required for the configuration.

Corrective action: Increased the max memory value ‘2816000’ to greater than ‘total logical                memory’ ‘2817460’ more than ‘total logical memory’ i.e. sp_configure ‘max memory’, 2900000

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply