is a checkpoint needed before doing shutdown of Sybase?


I have the following doubt for the Sybase experts:

Do you recommend to do a checkpoint of all databases before doing a shutdown of Sybase?
If one of the databases goes to recovery mode after start Sybase again and the checkpoint wasn't done, then you lose the transactions that were not written to disk, right? It will also take more time to finish the recovery since it has to undo all the transactions found in the memory, am I right?

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

First of all, you don't loose any transaction if you don't run checkpoint. Sybase takes care of transactions during start up. It rolls forward or rolls back transactions by cheking transaction log. In most of the cases it doesn't make much difference in terms of recovery. However, it depends on how busy your environment is and the chekpoint interval configured.

If transaction rate is very high or there are very recent large transactions (either completed or rolled back), running 'checkpoint all' command before shutdown reduces recovery time during start up. So if you want a fast recovery, you should run checkpoint. But, it may not make much difference if the environment is not  a really busy one.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe WoodhousePrincipal ConsultantCommented:
Actually any normal controlled shutdown (ie running "shutdown" and waiting for it to finish) issues a checkpoint in every database anyway. In these cases, doing a manual checkpoint first doesn't really do anything.

If you ever need to do a "shutdown with nowait" though, it's often a good idea to manually do checkpoints in as many databases as possible first.

As alpmoon says, the checkpoint is not what guarantees your transactions - the transaction log does that. A checkpoint simply ensures that all changed data pages have been written to disk. This means roll forwards will be faster when you restart Sybase - changes done by committed transactions don't have to be replayed - but rollbacks will be slower - changes made by incomplete transactions have been written out and now must be reversed.

If your transaction profiles have many large transactions and you shutdown in the middle of one, a checkpoint will actually make your Sybase startup slower for this reason.

Please note again though that your transactions are guaranteed (by which I mean, the results of committed transactions will be there, and the results of any incomplete or explicitly rolled back transactions will not) whether or not you do a checkpoint.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Sybase Database

From novice to tech pro — start learning today.