0
(0)
Case description : Bypass recovery for Sybase ASE server database.
Cause :Database recovery failed during Sybase ASE reboot due to log full issue.
Solution:- Perform Bypass Recovery as shown below.
1.      Steps to perform before shutting down


Login to the Sybase server and note "status" column value of affected database
>isql  -Uusername –Ppassword –Sservername
 1> select status from master..sysdatabases where name = "<database_name>"
2> go
1> sp_configure "allow updates", 1
2> go


1> begin transaction
2> go


1> update master..sysdatabases set status = -32768 where name="<database_name> "
2> go



Check that each of the above update commands affected only one row. If more than one row was affected, issue a rollback transaction. Otherwise, commit the transaction and shut down Adaptive Server:

1> commit transaction
2> go
1> shutdown
2> go

Note: When you reboot server, the user database for which you have changed the status to -32768, will be bypassed and no recovery will be done on it.

2) Steps to perform after restarting Adaptive Server.


1> use master 
2> go
1> online database <database_name>
 2> go
1>alter database <database_name> log on <log device>='<size in MB>'
2> go

1> use <database_name> 
2> go

1> checkpoint
2> go

1> sp_configure "allow updates", 0
2> go 


3) Changing the status of database back to normal.
1> begin transaction
2> go

1> update master..sysdatabases 
2> set status = 12 (put "status" value that was captured initially)
3> where name = "<database_name>"
4> go



Check that each of the above update commands affected only one row. If more than one row was affected, issue a rollback transaction. Otherwise, commit the transaction and shut down Adaptive Server:

1> commit transaction
2> go
1> shutdown
2> go

Once above steps are successfully completed, start Sybase server and check health of database by running below command.
1> sp_helpdb <database_name>
2> go  

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.