Planning for a Disaster Recovery
Rebuilding the Operating System
Resolve and Restore Defective Devices and Suspected Databases
Before you begin a disaster recovery, make sure to perform the following:
As a best practice, it is recommended that you group databases into multiple subclients as follows:
In the case of disaster recovery, where a full system restore is required, you must first rebuild the system to exactly the state as it existed before the problem. Use the following steps to rebuild the operating system:
This will restore the Sybase application files and all of the iDataAgent software. If there are any problems with the Sybase iDataAgent, we recommend that you un-install and re-install the software in the same drive as it was previously installed. Use the same installation parameters, passwords, and backup type settings as were previously used. In addition to restoring your operating system, this operation will restore the Sybase application files and the Sybase iDataAgent.
When the Sybase server is corrupted or lost, you can restore and recover it from the latest full backup.
Make sure that the physical devices of the database exist physically on the server before performing a full system restore. If they do not exist on the server or you do not know the device list, perform the following to retrieve the list of devices existing on the server:
1. |
|
![]() |
||
2. | Click OK. |
![]() |
||
3. |
|
![]() |
||
4. | Click Advanced. |
![]() |
||
5. | Click Options tab. You will see the list of all the devices and their sizes. You can create devices needed for restore based on this list. |
![]() |
||
6. | Create a master device with an empty password. Login as
Sybase user and execute the following command: sybase$/Sybase/sybase<version># $SYBASE/$SYBASE_ASE/bin/dataserver –s <SybaseInstanceName> -b <device size in MB> -f –z <Pagesize> -d <master device physical path> -c <Sybase dataserver config file> Run the following query on CommServe database to find the max page size of your sybase server: select * from APP_InstanceProp where componentNameId in (select id from APP_InstanceName where name = '<your sybase server name>') and attrName = 'SYBASE Max page size' |
Example: To get max page size for S155dbs12 Sybase server: select * from APP_InstanceProp where componentNameId in (select id from APP_InstanceName where name = 'S155dbs12') and attrName = 'SYBASE Max page size' # /Sybase/sybase15.0.3/ASE-15_5/bin/dataserver -s S155dbs12 -b 60M -f -z 2048 -d /Sybase/sybase15.0.3/data/S155dbs12/master.dat -c /Sybase/sybase15.0.3/ASE-15_5/S155dbs12.cfg |
||
7. | Start the dataserver. cd $SYBASE/$SYBASE_ASE/install |
Example: /Sybase/sybase15.0.3/ASE-15_5/installstartserver -f RUN_S155dbs12 |
||
8. |
If you have lost the devices due a corruption or hardware issue, you have to manually create them. Use the following command to manually create a device: For 15.x and above: # isql –Usa –P –S<Sybase Instance Name> 1> disk init name = “<device name>” , physname = “device physical path>” , vstart=0, size = “<device size>M” go For 12.5 and above: # isql –Usa –P –S<Sybase Instance Name>
|
Example: 1> disk init name='sysprocsdev', |
||
9 | Use the following command to shutdown the dataserver
after creating the devices: isql –Usa –P –S<Sybase
Instance Name> Perform a full restore to restore an entire Sybase server. |
When restoring an entire server, make sure that the server is offline. Use the following steps to restore the Sybase server from CommCell browser:
A full Sybase restore may fail if one or more database devices are defective or have been physically deleted and the corresponding databases have therefore been marked as suspected. In such a case, all the databases marked as suspected and the corresponding devices whose files have been lost must be dropped and re-created.
Use the following steps to resolve and restore defective devices and suspected datbases:
1. |
Issue the following command to determine whether the database is
suspected: sp_marksuspect (<database name>) |
Example: sp_marksuspect (<sybdb1>) |
2. | Drop the suspected database using the following command: dbcc dbrepair (<database name>, dropdb) |
Example: dbcc dbrepair (<sybdb1>, dropdb) |
3. |
If the database to be recovered is "sybsystemprocs"(system
database),
use the following command to drop the corresponding device (since stored
procedures are not available at this point): disk release name = <device name> |
Example disk release name = <tempdbdev> |
4. | If any of the data device files do not exist but the device entry exists
in sysdevices, drop those devices using the
following command: sp_dropdevice <device name> |
Example: sp_dropdevice <tempdbdev> |
5. | Repeat the above procedure for each suspected database. | |
6. | Resume the restore starting with the first database that was deemed suspected. |