Discussion:
Recovery of database
(too old to reply)
unknown
2007-12-18 16:59:55 UTC
Permalink
How do you recover a database when the file system where the
sybase devices (flat files) resided were deleted? The ASE
was up and running and I tried several tasks but they all
failed. Task one I tried to run the diskinit on the devices
again. Task two I tried to recreate the devices with the
touch command.

Because the sybase devices are open our System Administrator
is unable to backup the file system. Does Sybase have a way
to do this without shutting down the ASE?
mpeppler@peppler.org
2007-12-19 07:23:07 UTC
Permalink
Post by unknown
How do you recover a database when the file system where the
sybase devices (flat files) resided were deleted? The ASE
was up and running and I tried several tasks but they all
failed. Task one I tried to run the diskinit on the devices
again. Task two I tried to recreate the devices with the
touch command.
Because the sybase devices are open our System Administrator
is unable to backup the file system. Does Sybase have a way
to do this without shutting down the ASE?
On some OSes you can use the touch command to recreate a link to the
file.
However, if you already tried that, and it failed then you are pretty
much dead.

If the dataserver is still running I would do a full dump of all the
databases, and a print out of sp_helpdevice and sp_helpdb. Then
shutdown the dataserver, restart it (lots of errors about missing
devices), drop the broken databases and missing devices, recreate the
missing devices (disk init), recreate the broken databases, and reload
the databases from the dumps.

You could also try opening a case with Tech Support - maybe they have
a better way of dealing with this situation.

Michael
Mark A. Parsons
2007-12-19 11:58:13 UTC
Permalink
If the dataserver is still up and running, how about:

0 - grab copy of current master..sysdevices table (eg, bcp '-c' to flat file)

1 - create ASE mirrors ('disk mirror') for *all* devices onto another/new filesystem

2 - once mirrors are in sync, break the mirrors ('unmirror disk') making sure to maintain the new/secondary disks as the
primary [at this point you've migrated all devices to the new filesystem]

3 - leave the dataserver devices where they are (make sure you update your RUNserver file to reference new master device
location), or repeat the mirror/unmirror operation to move the devices back to the original location [alternatively,
update master..sysdevices to reference the old filesystem devices - see step #0 for original names - shutdown
dataserver, move devices from new filesystem back to old filesystem, restart dataserver]
Post by unknown
How do you recover a database when the file system where the
sybase devices (flat files) resided were deleted? The ASE
was up and running and I tried several tasks but they all
failed. Task one I tried to run the diskinit on the devices
again. Task two I tried to recreate the devices with the
touch command.
Because the sybase devices are open our System Administrator
is unable to backup the file system. Does Sybase have a way
to do this without shutting down the ASE?
mpeppler@peppler.org
2007-12-19 13:25:33 UTC
Permalink
On Dec 19, 12:58 pm, "Mark A. Parsons"
Post by Mark A. Parsons
0 - grab copy of current master..sysdevices table (eg, bcp '-c' to flat file)
1 - create ASE mirrors ('disk mirror') for *all* devices onto another/new filesystem
Rats - I always forget about that option!

That should indeed work pretty nicely!

Michael
Derek Asirvadem
2007-12-23 11:23:56 UTC
Permalink
(note I am not addressing the deleted fs files/SYbase devices)
Post by unknown
Because the sybase devices are open our System Administrator
is unable to backup the file system. Does Sybase have a way
to do this without shutting down the ASE?
That sounds very suspicious.
1 There is no need to backup the Sybase fs devices (for the unix fs
backup). Standard practive is to separate the Sybase fs, from the
"normal" directory tress, for many reasons, that being one of them (so
that the SA can backup the relevant fs trees and forget the irrleevant
trees, without having to bring ASE down, just to do a unix backup).

2 In case you or your unix SA are not aware, ASE provides fully online
Db backup and restore; mutli-threaded; multi-striped and with many
options. You do not have to take Sybase down, then copy the Sybase fs
devices: that is brute force, outside Sybase, and MUCH slower; and the
recovery is much slower as well. Normal for Oracle and other DBMS, but
not for this one. Becoming more and more "normal" for MS as well, in
spite of its heritage, and might be fast compared to that now mutated
online Db dump, but not for this one. When the shop grows into bigegr
unix systems, and raw deviecs ...
--
Cheers
Derek
Senior Sybase DBA / Information Architect
Copyright © 2007 Software Gems Pty Ltd
Quality Standards = Zero Maintenance + Zero Surprises
Performance Standards = Predictability + Scaleability
--
This is technical forum, an inappropriate medium to confer tone,
feeling, etc. None intended, none taken.
That said, for those who cannot help reading "tone" into posts: I
respond, in the same "tone" as the Poster, it is a consequence; apply
universal law, not hypocritical demand, change your "tone" first, and I
will match it in my next consequential post.
Loading...