Day 4 of training was really all about backup and restore. This was a good class and I learned a lot about why my company does some of the things that they do. I knew how to do a Database dump and a Database load, but I did learn a lot and found a couple things to be very interesting.
First, I did learn that it is easy to backup all of the DDL for everything in the database and that it is a good idea to do so. This way if disaster strikes you can quickly get everything back up and running. Even if you have backups of the databases you might not have the ability to quickly get all of you disks re inited and done in the correct order. If you have to rebuild master then you have to get all the devices bult with the original vdevno #. I do not know about most of you but I do not specify the Vdevno # when I do a disk init. Sybase automatically finds the lowest available vdevno # and assigns it to the device. If you do not have the original DDL for this then you may have a hard time getting this correct. So you can use Sybase Central or other third party tools to extract the ddl of objects, but a cooler faster way is to use ddlgen on the server host and output this to a file or set of files that you will keep someplace safe just in case.
Second, I learned that compression is pretty awesome. You can specify the level of compression that you want to use when backing up a database. The levels aare 0-9 and 9 is the most compressed. We found though, that you do not really gain much after the first level of compression. The first level will dramatically reduce the backup file size. Anything after that may not be worth the extra work that has to be done by the server. The difference between the first level of compression and the last is not that much.
Third is that backups are very light on the actual database server. Since backups use the backup server to do the backup you can do the backup on-line and users will most likely not even know that you are doing a backup.
Fourth is that you should do a dbcc check of the database to make sure that you do not have any sort of problem before doing the backup. Do this as much as you can anyway. This will help prevent a problem from going unnoticed for a long time, if this happens then you might not have a backup without the error and that can get you into a world of hurt.
And of course we talked about how important it is to do regular backups of your databases. If you want to be able to recover to the most recent point in time then you will want to do transaction log dumps as well. Just do them often and try to check your dbs using dbcc’s as often as possible as well.
Once again if you have any questions or need anything just let me know.