Firebird ADO.NET Provider SDK Documentation - v1.7

FbValidation Class

Request a database validation. This class cannot be inherited.

For a list of all members of this type, see FbValidation Members.

System.Object
   FirebirdSql.Data.Firebird.Services.FbService
      FirebirdSql.Data.Firebird.Services.FbValidation

[Visual Basic]
NotInheritable Public Class FbValidation
    Inherits FbService
[C#]
public sealed class FbValidation : FbService

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Database validation scans internal data structures for specific types of corruption. In some cases, the validation operation can repair corruption.

The validation operation cannot guarantee to repair all cases of corruption. Do not rely on database validation as a disaster recovery policy in lieu of making regular backups of your database.

Example

The following example makes a database validation for locate and release pages that are allocated but unassigned to any data structures.

FbValidation validationSvc = new FbValidation();

validationSvc.UserName = "SYSDBA";
validationSvc.UserPassword = "masterkey";

validationSvc.Database = @"D:\TESTDB.GDB";
validationSvc.Options = FbValidationFlags.ValidateDatabase; 

validationSvc.Start();

string lineOutput;
while((lineOutput = validationSvc.GetNextLine()) != null)
{
    Console.WriteLine(lineOutput);
}

validationSvc.Close();    
                

Requirements

Namespace: FirebirdSql.Data.Firebird.Services

Assembly: FirebirdSql.Data.Firebird (in FirebirdSql.Data.Firebird.dll)

See Also

FbValidation Members | FirebirdSql.Data.Firebird.Services Namespace