Sybase 12.4.2 Validating your database, 393, For this size database It takes about this long

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 413
Image 413

CHAPTER 11 Backup and Data Recovery

Ensuring that all files exist

Checking ownership and permissions

Before restoring, review the table of contents of the backup to ensure that all files required for IQ are present. The list of files depends on your application. See the discussion of required and optional files in “Backing up the right files” on page 392.

Ensure that ownership and permission levels do not change during the system- level restore.

Validating your database

Backing up a database is useful only if the database is internally consistent. Backup always makes sure that a database is in a usable state before it proceeds. However, it's a good idea to validate any database before you back it up, to ensure that any database you restore is stable. The restore program does not check for corruption in the data it is restoring, since the database may not even exist.

To validate your database, issue the following command:

sp_iqcheckdb

You should run sp_iqcheckdb periodically, and whenever you suspect a problem with the database. The sections that follow provide basic information on using sp_iqcheckdb. For full details see the Adaptive Server IQ Troubleshooting and Error Messages Guide.

This stored procedure works in conjunction with the set option

DBCC_OPTION. This option should be set to its default value, 0, when you run sp_iqcheckdb for a routine validation before backup.

sp_iqcheckdb reads every database page from disk into memory and does various consistency checks. For this reason, running this procedure on a large database can take a long time. Reading the data consumes most of the execution time, so you can estimate how long it will take to run the procedure by the size of your database:

For this size database

It takes about this long

10GB

30 minutes

 

 

100GB

400 minutes (6 1/2 hours)

 

 

393

Page 413
Image 413
Sybase 12.4.2 manual Validating your database, 393, For this size database It takes about this long