cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase IQ downtime history

SybDBA
Participant
0 Kudos

Hi All,

How to check how many times the Sybase IQ was down/started/rebooted in the past few month ??

Is it possible to get reason for the same on the IQ server level ??

Thanks & Regards,

pankaj

Accepted Solutions (1)

Accepted Solutions (1)

saroj_bagai
Contributor
0 Kudos

syshistory system view does store last start date in the Operation column when server was initially started with particular version on specific OS.

But for Server Normal shutdown or abort, you will need to check .iqmsg

For Normal shutdown, you will see ClosedDatabase message in the .iqmsg, for Abort, there will be no ClosedDatabase message in message, IQ server will be terminated with a stack trace(most of the time).

And for startup,  you will have 2 OpenDatabases in the .iqmsg, First Open replays transaction log and checkpoints and second open is from  clean checkpoint

SybDBA
Participant
0 Kudos

Thanks a ton ,

Actually this requirement is from db owners side to provide details that in the previous month, how many times server got down and reason for that.

I can get the start time of the server from the .stderr file's creation time but how can the down time of the server, if there was clean shutdown, meanwhile it generates stacktrace when a erroneous shutdown occurs ??

I need some procedure/table/global variable to get that like in Sybase ASE @@boottime and @@bootcount (for example sp_iqbackupsummary ,it provides the backup history and its type)

Please correct me if I'm wrong

Thanks & Regards,

pankaj

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi,

For start time (@@boottime) , you can use the equivalent value property('starttime') :

select property('starttime') ;

For the bootcount,

if the srvlog files are defined with default setting (no -o option used), then file name look like servername.N.srvlog

where N is the bootcount.

Another way would be define a user history table and create an EVENT to feed it just before normal  shutdown and just after restart.

Other tip which may help to see activity in a range of time [T1-T2] :

select table_name, last_modified_at from SYS.SYSTAB

where ast_modified_at  between <T1> and <T2>

order by last_modified_at ;

markmumy
Advisor
Advisor
0 Kudos

This is a neat feature.  We should add it to the product.  The IQMSG files are not always around and can't be counted on.  An event could work to stuff a value into a catalog table at startup.  Shutdown would only work if it was graceful.  We also have to be careful for multiplex environments.  A single catalog table won't give you consolidated data and an IQ table gives issues with concurrent writes.

It could certainly be worked via events, but it would be quite nice if we could stuff this into a history table....

Mark

Answers (1)

Answers (1)

SybDBA
Participant
0 Kudos

Thanks a lot , and

for your precious inputs.

Hoping this will fulfill my eagerness to this question

Thanks & Regards

pankaj