#1 2012-10-12 10:29:40

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

TSQLDataBase.Backup

I'm having trouble with TSQLDataBase.Backup(const BackupFileName: TFileName). When run from within a service call it gives an ESQLLite3Exception with message 'cannot VACUUM - SQL statements in progress'.

It works ok if I call backup directly from the server.

Any suggestions on what's going wrong?

Thanks


type
TServiceServer = class(TSQLRestServerDB)
  published
    function doBackup(var aParams: TSQLRestServerCallBackParams): Integer;
  end;

var
  database: TServiceServer

implementation


function TServiceServer.doBackup(var aParams: TSQLRestServerCallBackParams): Integer;
begin
  Database.DB.Backup('c:\data\backup.db3');  //FAILS
end;

function bk;
begin
  Database.DB.Backup('c:\data\backup.db3');  //WORKS OK
end;

Offline

#2 2012-10-12 14:18:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: TSQLDataBase.Backup

I suspect you should better use the dedicated TSQLRestServerDB.Backup() and TSQLRestServerDB.BackupGZ() methods instead of calling DB.Backup().

Offline

#3 2012-10-12 15:11:02

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: TSQLDataBase.Backup

Thanks, got it working now.

Offline

Board footer

Powered by FluxBB