Restoring a Database to Multiple Files
Go Up to Restoring Databases
You might want to restore a database to multiple files to distribute it among different disks, which provides more flexibility in allocating system resources. The following code example shows how to do this.
procedure TForm1.Button2Click(Sender: TObject); begin with IBRestoreService1 do begin ServerName := 'Poulet'; LoginPrompt := False; Params.Add('user_name=sysdba'); Params.Add('password=masterkey'); Active := True; try Verbose := True; Options := [Replace, UseAllSpace]; PageBuffers := 3000; PageSize := 4096; BackupFile.Add('c:\temp\employee1.gbk'); DatabaseName.Add('c:\temp\employee2.ib = 2048'); DatabaseName.Add('c:\temp\employee3.ib = 2048'); DatabaseName.Add('c:\temp\employee4.ib'); ServiceStart; While not Eof do Memo1.Lines.Add(GetNextLine); finally Active := False; end; end; end;