We have an old Sybase server whose database is acting up. We have tried rebuilding the file-system and the database file. But the problem returns. We want to replace the hard drive that the database-files and transaction-files are stored. We want to determine exactly which hard drive it is because we are not familiar with Unix. Moreover, we also want to see if those files are stored in the same hard drive as the operating system or not; if they are, we will need to re-install the operating system as well as restoring the database to the new hard drive. Please help me to determine these two things.
So far, I have found these:
• I use sp_helpdb command and sp_helpdevice command and find that the database files and the transaction files are stored in these physical devices:
• I want to know more about those physical devices. I use the following commands to examine them:
df -k /dev/rdsk/c0t0d0s1
df -k /dev/rdsk/c0t3d0s4
df -k d_master
df -k /dev/rdsk/sybdbs2
The df command complains that the first three devices are “not a block device, directory or mounted resource”.
On the other hand, the df command shows the following info for the last device:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 576558 371019 147889 71% /
In any case, this doesn’t tell me which drive(s) those devices are on.
• We don’t see any external device attached to the Sybase server. Having said this, there is a backup Sybase server, and the backup Sybase server has an external device attached to it (through a SCSI cable). At this point, I assume the database-files and transaction-files are all stored inside the Sybase server.
By the way, the Sybase server uses this Unix operating system:
SunOS <my-server-name> 5.4 Generic_101945-62 sun4m sparc
By the way, what we have tried so far to repair the database are:
dbcc checkalloc(<db_name>, fix)
. Unfortunately, this command could not fix and could not complete.
. Unfortunately the restore failed to complete.
. It could not complete and complained about “MAGIC NUMBER WRONG”.
, and then add-new-db and restore-db-from-backup. This method seemed to work. But after one week or so, we found a table has I/O error. Honestly, we don’t even know if the databases are really in Disk-0 or not.
Please help me to determine which hard drive those database-files and transaction-files are stored, and whether they are in the same hard drive as the Unix operating system. Thanks in advance.