Perform the below steps to rollback the patch, if required
- Disable Auditing
sp_configure “auditing”, 0
- Stop Replication Server, Backup server and Foglight Agents
- Re-start ASE in single user mode by specifying the -m option in RUN File. When starting ASE, you should see the below message in error log
00:0002:00000:00002:2024/08/13 16:08:05.91 server *** WARNING ******************
00:0002:00000:00002:2024/08/13 16:08:05.91 server ASE booted single user mode – updates allowed to system catalogs
00:0002:00000:00002:2024/08/13 16:08:05.91 server WARNING ***************
- Run sp_downgrade_esd on each database. You need not downgrade temporary databases. These include tempdb as well as user-created temporary databases, as they are re-created from a template database when Adaptive Server starts.
Note: Please perform sp_downgrade_esd on all of your non-temporary databases, then downgrade the master database last.
Shown below is an example where the entire instance was downgraded from SP04 PL04 to SP04 PL02
1> use master
2> go
1> select @@version
2> go
—————————————————————————————————————————————————————————————————————————————————————
Adaptive Server Enterprise/16.0 SP04 PL04/EBF 30650 SMP/P/x86_64/SLES 12.4/ase160sp04pl04x/3585/64-bit/FBO/Tue Feb 14 09:59:39 2023
(1 row affected)
1> select name from sysdatabases
2> go
name
——————————
SYBTORE_SYS_DEV_RS09_RSSD
audit_arch
dbccdb
master
model
questdb
sa_tempdb
sybsecurity
sybsystemdb
sybsystemprocs
tempdb
tempdb_surveillance
test_db
(13 rows affected)
1> sp_downgrade_esd SYBTORE_SYS_DEV_RS09_RSSD, “SP04 PL02”
2> go
Reverting database ‘SYBTORE_SYS_DEV_RS09_RSSD’ to SP04 PL02.
Running CHECKPOINT on database ‘SYBTORE_SYS_DEV_RS09_RSSD’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘SYBTORE_SYS_DEV_RS09_RSSD’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd audit_arch, “SP04 PL02”
2> go
Reverting database ‘audit_arch’ to SP04 PL02.
Running CHECKPOINT on database ‘audit_arch’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘audit_arch’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd dbccdb, “SP04 PL02”
2> go
Reverting database ‘dbccdb’ to SP04 PL02.
Running CHECKPOINT on database ‘dbccdb’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘dbccdb’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd model, “SP04 PL02”
2> go
Reverting database ‘model’ to SP04 PL02.
Running CHECKPOINT on database ‘model’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘model’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd sybsecurity, “SP04 PL02”
2> go
Reverting database ‘sybsecurity’ to SP04 PL02.
Running CHECKPOINT on database ‘sybsecurity’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘sybsecurity’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd sybsystemdb, “SP04 PL02”
2> go
Reverting database ‘sybsystemdb’ to SP04 PL02.
Running CHECKPOINT on database ‘sybsystemdb’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘sybsystemdb’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd sybsystemprocs, “SP04 PL02”
2> go
Reverting database ‘sybsystemprocs’ to SP04 PL02.
Running CHECKPOINT on database ‘sybsystemprocs’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘sybsystemprocs’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd test_db, “SP04 PL02”
2> go
Reverting database ‘test_db’ to SP04 PL02.
Running CHECKPOINT on database ‘test_db’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘test_db’ is now suitable for use by SP04 PL02.
(return status = 0)
1> sp_downgrade_esd master, “SP04 PL02”
2> go
Reverting database ‘master’ to SP04 PL02.
Running CHECKPOINT on database ‘master’ for option ‘downgrade’ to take effect.
Downgrade is complete.
Database ‘master’ is now suitable for use by SP04 PL02.
(return status = 0)
- Shutdown ASE
- Under /sybdba01/sybase (or equivalent directory) rename ase_16.0 to ase_16.0_. So in your install, you will perform the below move
cd /sybdba01/sybase
mv ase_16.0 ase_16.0_sp04_pl05
- Move SP04 PL02 backed up directory under ESD_Rollback to ase_16.0 under Sybase Software File system, as shown below
cd ESD_Rollback/
ls -ltr
total 29280
-rwxr-x—. 1 sybdba sybase 1024 Sep 28 2023 RUN_SYBTORE_SYS_DEV_DS02_BK
drwxr-x—. 23 sybdba sybase 4096 Sep 28 2023 ase_16.0_SP04_PL02_EBF29987
-rwxr-x—. 1 sybdba sybase 1235 Sep 28 2023 RUN_SYBTORE_SYS_DEV_DS02
-rw-r—–. 1 sybdba sybase 19036 Oct 4 2023 SYBTORE_SYS_DEV_DS02.cfg
-rw-r—–. 1 sybdba sybase 2336768 Oct 9 2023 SYBTORE_SYS_DEV_RS09_RSSD.master.20231009.065009.dmp
-rw-r—–. 1 sybdba sybase 26529792 Oct 9 2023 SYBTORE_SYS_DEV_RS09_RSSD.sybsystemprocs.20231009.065009.dmp
-rw——-. 1 sybdba sybase 1076877 Oct 9 2023 SYBTORE_SYS_DEV_RS09_RSSD_restoremsgs.ebf
drwxr-x—. 15 sybdba sybase 4096 Oct 9 2023 rep_16.0_EBF_30655_SP04_PL04_rs160sp04pl04
mv ase_16.0_SP04_PL02_EBF29987 ../ase_16.0
- Re-start ASE in regular mode by removing ‘-m’ switch from RUN file, which will start the instance in SP04 PL02 binary
- Run installmaster, installmodel, installcommit, installsecurity, installdbccdb scripts
- Restore the messages by loading _restoremsgs.ebf from ESD_Rollback directory, as shown in below example
isql -Usa -S SYBTORE_SYS_DEV_DS02 -w2000 -X -i /sybdba02/sybase/ESD_Rollback/SYBTORE_SYS_DEV_DS02_restoremsgs.ebf
- After the downgrade, all the versions should be at SP04 PL02, as shown below
1> select @@version
2> go
—————————————————————————————————————————————————————————————————————————————————————
Adaptive Server Enterprise/16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/FBO/Thu Mar 17 21:44:05 2022
(1 row affected)
1> sp_version
2> go
Script Version Status
——————- ———————————————————————————————————————- ——–
ADO.NET MDA Scripts 16.0.04.02.1019/Thu Feb 17 UTC 14:35:44 2022 Complete
ODBC MDA Scripts 16.0.04.02.1019/Tue Feb 15 UTC 16:42:49 2022 Complete
installcommit 16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:15:51 2022 Complete
installdbccdb 16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:15:51 2022 Complete
installjdbc jConnect (TM) for JDBC(TM)/16.0 SP04 PL02 (Build 27518)/P/EBF30180/JDK 1.8.0/jdbcsp04/OPT/Tue Feb 15 01:29:04 PST 2022 Complete
installmaster 16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:15:51 2022 Complete
installmodel 16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:15:51 2022 Complete
installsecurity 16.0 SP04 PL02/EBF 29987 SMP/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:15:51 2022 Complete
montables 16.0/29987/P/x86_64/SLES 12.4/ase160sp04pl02x/3545/64-bit/OPT/Thu Mar 17 20:05:28 2022 Complete
(9 rows affected)
(return status = 0)
- Run the Ansible job Sybase Action – SYB_Enable_Audit_Settings to re-enable all audit settings