cancel
Showing results for 
Search instead for 
Did you mean: 

[Sybase] Check if backup log failed

jan_piescik
Explorer
0 Kudos

Hello,

How can I check status of the log backup in ASE Sybase using sql query?

For full backup I use: select LastBackupFailed from master..monOpenDatabases

What about log backups?

Thanks and Regards,

Jan

Accepted Solutions (1)

Accepted Solutions (1)

RobertWaywell
Product and Topic Expert
Product and Topic Expert

Take a look at the LastTranLogDumpTime field. Assuming you know when log backups are supposed to be happening, the LastTranLogDumpTime DATETIME value will let you figure out if a backup is overdue.

jan_piescik
Explorer
0 Kudos

Hello Robert,

Thanks for help. I use this field but I am not sure if it shows "completed" backup only? If we look on Full Backup we have LastBackupFailed field to check it.

Thanks and Regards,

Jan

RobertWaywell
Product and Topic Expert
Product and Topic Expert

Yes, the docs state that LastTranLogDumpTime is "Date and time of this database’s most recently successful transaction log dump.

The time is not updated if the transaction is dumped using the truncate_only or no_log."

Answers (1)

Answers (1)

If you are using ASE's dump history feature you may also query log backups from the dump history file .

1) enable dump history feature:

set ASE parameter 'enable dump history' to 1

2) Optional (but recommended) set a dedicated dump history flename for your ASE

set ASE parameter 'dump history filename'

3) Create a proxy table on the dump history file name using SP sp_dump_history ( create_table option)

(replace placeholders as per your needs for eample :

exec sp_dump_history @operation = 'create_table' , @name = 'mydb..DumpsHistory'

4) Select from the proxy table

SELECT FROM mydb..DumpsHistory

To select for transaction log dumps only : rec_type = 3
To select for database dumps : rec_type = 2

status = 1 --> means a successful dump

status = 2 --> error

See ASE documentation for sp_dump_history and the dump history feature HTHTilman Model-Bosch
SAP SE
0 Kudos

Should have noted: the new ASE Mangement Console (AMC) provides this information out of the box

See SAP help and learning resources for AMC .