Wednesday, 17 April 2019

Error 1142 "Invalid OAM Page..." during boot-time recovery of saptempdb database in Sybase

Tags

Symptom

    Error 1142 is reported while starting the ASE server:

Error: 1142, Severity: 22, State: 4 Invalid OAM Page 0. Found pstat=0x0, object=0, database=6, indid=0

    An accompanying stacktrace is generated and refers to following functions during 'saptempdb' database recovery:

pg__objdeall_validate_obj()
pg_ptndeal()
closetable()
close_range()
s_estmt_loopend()
s_execute.fdpr.chunk()
sequencer()
execproc()
s_execute()


     As a result, database recovery fails since the database is not brought online.

Environment

SAP Adaptive Server Enterprise (ASE) 15.7 SP122 for Business Suite
Cause

    Access to saptempdb occurs prior to the database being online.
    This issue has been addressed by SAP CR 771382: Its description reads, "error 1142 was raised on a user defined tempdb (saptempdb) during boot time recovery against 15.7 sp122 ASE. Please use system procedure sp_dbrecovery_order to change database recovery order. It will let ASE rebuild user defined tempdb saptempdb first after recovery system databases, then recovery other user databases".

Resolution

Ensure that saptempdb recovers and is brought online, prior to the user database (SID) recovery. This can be done via the sp_dbrecovery_order stored procedure.

sp_dbrecovery_order saptempdb, 1, force, strict
If there is already an recovery order defined for 1, it needed to be removed with the command:  sp_dbrecovery_order saptempdb, -1







More details refer Snote: 2072361

Wednesday, 10 April 2019

What is TSK files in SAP ?


 What is TSK files in SAP ?


    These .TSK files are pure text files and contain an entry of SAP installtion entry.
TSK file contains with = T, D, P, I, V

T = Table Structure
D = Data
P = Primary Key
I = Index
V= View

and  entry in tsk file C, I, E.

C = Create
I =  Import
E = Export

 Every entry in the tsk file have status  such as

xeq = waiting
err  = Error
ok   = Completed


   When started for the first time, R3load reads a TSK file completely, closes the file, renames it in a TSK.bck (for example, SAPSDIC.TSK.bck) and opens the TSK file for writing. After each executed action an entry is written with the corresponding status.





   If all actions are processed, or if the unprocessed actions could be written back to the TSK file after an error, the TSK.bck file is deleted. If R3load also finds a TSK.bck file in addition to a TSK file during start-up, it terminates immediately with a corresponding error message, as this either means that an R3load process is running and is processing this request, or that a serious error has already occurred that may not be eliminated during the restart, but requires user intervention. When the error has been eliminated you must merge the TSK file and the TSK.bck file prior to or during the restart of the R3load.