Sunday, February 14, 2010

Point to remember while using Sybase Central

Problem:
Sybase central's SQL window is different from oracle's sql+ in atleast one way. If we have done updates or deletes accidentally in the SQL+ window, in oracle we can just issue a rollback and get back whatever we have lost but sybase central doesnt provide us with any such luxury. The only way to get back the data is to manually insert it again.

Hence it is very important for us to take control of transactions. So before we do any processing give this command
  • begin tran my_tran
  • do all the processing in the transaction andfinally after we are done with everything, if we need to rollback we just have to issue a rollback
  • rollback my_tran which will rollback all the statements issued inside the transaction.
    Hence make sure you start each SQL window of sybase central with begin tran tran_name

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory