Sybase minor upgrade – service pack part1
There has been a lot of topic discussion around this, I was hoping this may clear things up for some of just provide insight to others. I extend invites to all to critique this this document for improvement to the benefit of others, as I am now in an oracle environment it would be difficult for me to make improvements on this lacking access to the necessary if this could help one person it would make me happy
Sybase minor upgrade
This document describes the upgrade steps for Sybase Adaptive Server Enterprise (ASE) database.
You want to install a new software release of SAP ASE in the SAP Business Suite Environment. If you upgrade from ASE 15.7 to ASE 16.0 this is considered a major upgrade.
If you upgrade from ASE 15.7 SP110 to ASE 15.7 SP122 as example this is considered a minor upgrade.
Please note section Continuing with minor upgrade note 1607816 – SYB: Installing Service Packs for SAP ASE (Windows) can only be used for minor upgrades. That means do not use this section to upgrade from SAP ASE 15.7 (any SP level) to SAP ASE 16.0 or higher.
I have combined the preparations from note 1607816 SYB: Installing Service Packs for SAP ASE (Windows) and note 2162735 – SYB Performing a major ASE upgrade (Windows). So these preparatory steps should accommodate both upgrades, I was extra careful so some of my steps may seem redundant to you.
This upgrade was performed on Microsoft Windows 2012 R2.
Section 1 Prerequisites
Go to C:\Program Files\SAP\hostctrl\work access the file dev_saphostexec to check the version it should be a minimum of 7.21 SP03 or higher.
Go to https://support.sap.com/swdc In the navigation bar, choose SAP Software Download Center -> Support Packages and Patches -> Browse our Download Catalog -> SAP Technology Components -> SAP HOST AGENT -> SAP HOST AGENT 7.21 -> <your operating system> -> Choose the latest we are choosing SAP Host Agent 7.21 SP06
Be logged on as <SID>ADM Create a temporary directory (e.g. /tmp/ha), and copy the package SAPHOSTAGENT<PatchNr>.SAR to this directory.
Extract the binary in this directory
Once extracted run command saphostexec – upgrade
You will see the upgrade runs very quickly.
Go to C:\Program Files\SAP\hostctrl\work access the file dev_saphostexec to check the new version it should be 7.21 SP06
Command saphostexec –version should also work
Download the software from the SAP service marketplace https://support.sap.com/software.html click on Databases->SAP Adaptive Server Enterprise->Database Patches->SAP ASE for Business Suite->Now download both the SAP ASE 16 DBCLIENT BUS.SUITE and SAP ASE 16.0 FOR BUS. SUITE
Click On Windows on x86_64 which is our windows and technology format Download the SAP ASE 16.0 FOR BUS. SUITE DBCLIENT SP01 PL02
Now to download the DB patch Click On Windows on x86_64 which is our windows and technology format Download the SAP ASE 16.0 FOR BUS. SUITE Patch PL02 for ASEBS160 SP01
These are what the downloaded patch files look like
Log on as SYB<SID> user create the directory droplocation on <drive>:\droplocation copy the ASEBS16001P_2.SAR file and extract with CMD in elevated administration mode, otherwise you will get permission denied error.
Log on as <sid>adm stop sap and stop Sybase services disable the two Sybase services and sap services as well. At this point ask network administrator to do a checkpoint backup of the VM if not a physical server.
Perform a file system backup for the software installation directory $Sybase\<SID> also perform a backup image of the VM if not a physical server. Create a folder called robologs in C:\ drive.
robocopy X:\tobebackedup\ E:\backuplocation\ /S /SEC /R:1 /W:1 /V /LOG:c:\robologs\robolog-logfilename.txt
Command syntax below <source folder> <backup folder> make sure Sybase and SAP is stopped completely by disabling the services after stopped. Wait for the checkpoint of the VM to be completed by network administrator. If full checkpoint is done ,backup of FS is redundant.
Once the VM has been handed back after checkpoint VM backup is completed (if not a physical server), logon as user SYB<ADM> and enable services so you can do the following section for backups. This is for backups to disk
Still as user SYB<SID> run sp_helpdb note down the name of all the databases on your server and make a backup of all of these databases usually would be a list like this <SID,master,model,saptempdb,saptools,sybmgmtdb,sybsystemdb,sybsystemprocs,sybsecurity
,tempdb) the sybsecurity does not always exist.
It is mandatory to perform a full database backup of all databases in the ASE server before the SAP system is restarted!!
Command: dump database tempdb to “D:\Backup\upgrade\tempdb.dmp” with compression = 2
Verify the backups are created successfully as per above It should be 100% make the name of the dump file the same as the name of the database being backed up for clarity purposes.
Check the configuration for sp_config_dump
Search database for where thresholds are installed to confirm where they are installed run the query from the master database in this example thresholds are only installed for SID database:
where object_id(name+’..sp_thresholdaction_logfreespace’) is not NULL
order by name
Now check the thresholds for the SID database as per screenshot above, note down the logsegment page values and script name.
Now that you have done all the backups , as user SYB<SID> logon to isql64 as the sapsso (System Security Officer) user and unlock sa user it should state Account Unlocked
Stop job scheduler and disable it , Login to ASE with ASE login for sap user sapsa and execute the following commands:
exec sp_configure ‘enable job scheduler’,0
exec sybmgmtdb..sp_sjobcontrol ”,’stop_js’
As user <sid>adm Perform a backup of the <drive>:\usr\sap\<SID>\SYS\global\syb\NTAMD64\ using robocopy. This folder contains the ODBC and JDBC drivers if installed. Run CMD in elevate administration mode also create directory robologs in C: drive if it does not exist.
Verify the log file as well afterwards. Check for any errors or omissions.
If you are going to perform a major upgrade from ASE 15.7 to SAP 16.0 take screenshots of your ENV variables for Sybase SYBASE_ASE, SYBASE_OCS, SYBASE_WS, INCLUDE, LIB, PATH. Note that the exact value of variables INCLUDE, LIB and PATH depend on your system. This is just in case you may need to restore. Where screenshot cuts off save the value to a text file for later reference.
For major upgrades you need to additionally on virtualised systems to set environment variable ‘SYBCLOSEWAIT’ to some value greater 10, before starting the upgrade. See SAP KBA 2116143
Continuing with minor upgrade check the database version before the update logon as syb<sid> user. Open administrator cmd shell from directory D:\sybase\SID\ASE-16_0\bin and type sqlsrvr.exe –sbssav and after sqlsrvr.exe –version make a note of the current version for later comparison
Continued on doc url:Sybase minor upgrade – service pack part2