Monday 11 April 2011

ASE : Dealing with a Server Failure

There are rare instances when the server crashes down so hard that it cannot
be started again. In the synopsis that follows, the crash was due to extremely
high database activity after the transaction log filled up - making it impossbile
to clear. The server was brought down, and could not be restarted. The trick here
was to bring up the server in "non-recovery" mode, and then clear the transaction
log using some tricks from the Sybase support team.


/* Note: dbname = the database name, X = the dbid */

/* In the runserver file, add the following flags: */

-m
-T3608 (recover master and nothing else)

-or-

-T3607 (no recovery)


/* Now, recycle the server */

Then, in isql:

sp_configure 'allow updates',1
go

update sysdatabases set status=-32768
where name = 'dbname'
go

select config_admin(1,102,1,0,null,null)
go

update sysdatabases set status=0 where dbid=X
go

/* recycle again, things should be OK */

No comments:

Post a Comment