Page 1 of 1
IBCRestoreService - database shutdown unsuccessful
Posted: Fri 12 Aug 2011 07:23
by yota
Code: Select all
IBCConfigService1.Active := True;
IBCConfigService1.ShutdownDatabase(smForced, 1);
IBCConfigService1.Active := False;
IBCRestoreService1.Active := TRUE;
IBCRestoreService1.Attach;
IBCRestoreService1.ServiceStart;
while IBCRestoreService1.IsServiceRunning do begin
Application.ProcessMessages;
end;
IBCRestoreService1.Detach;
I'm trying to recreate database. I've got the Options.roReplace set to True.
It gives me: (on while IsServiceRunning)
Code: Select all
database shutdown unsuccessful
failed to create database D:\test\test.fdb'.
And then
Code: Select all
Target shutdown mode is invalid for database "D:\test\test.fdb"'
It clears the DB but do not restore it.
I'm using IBDAC 3.50.0.21, Firebird 2.5 and Delphi 2010
Where can be the problem?
Posted: Fri 12 Aug 2011 08:50
by AndreyZ
Hello,
You can find more information about this problem here:
http://tracker.firebirdsql.org/browse/CORE-869
To solve the problem, please try using the following code:
Code: Select all
IBCConfigService1.Active := True;
IBCConfigService1.ShutdownDatabase(smForced, 1);
IBCConfigService1.BringDatabaseOnline;
IBCConfigService1.Active := False;
IBCRestoreService1.Active := True;
IBCRestoreService1.ServiceStart;
while IBCRestoreService1.IsServiceRunning do begin
Application.ProcessMessages;
end;
IBCRestoreService1.Active := False;
Posted: Fri 12 Aug 2011 11:43
by yota
Working like a charm, thank you AndreyZ.
Posted: Fri 12 Aug 2011 11:53
by AndreyZ
Feel free to contact us if you have any further questions about IBDAC.
Re: IBCRestoreService - database shutdown unsuccessful
Posted: Wed 22 Jun 2016 04:11
by Haydar Aji
I have same error problem " TARGET SHUTDOWN MODE IS INVALID FOR DATABASE D:\Database\DB.fdb"
Im Using IBDAC Profesional Edition Version: 5.7.23, Firebird 3.0, Delphi XE4
Code: Select all
IBCCS.Database := 'D:\Database\DB.fdb';
IBCCS.Params.Clear;
IBCCS.Username := dbInfo.ServerUserName;
IBCCS.Password := GetPassword(dbInfo.ServerUserName, dbInfo.ServerPassword) ;
IBCCS.Active := true;
IBCCS.ShutdownDatabase(smForced, 1);
IBCCS.Active := False;
Debug error on line IBCCS.ShutdownDatabase(smForced, 1);
how to fix it? Thanks Devart
Re: IBCRestoreService - database shutdown unsuccessful
Posted: Thu 23 Jun 2016 11:44
by ViktorV
A similar issue was discussed at Firebird RDBMS Issue Tracker. See more details about the issue at
http://tracker.firebirdsql.org/browse/CORE-869 To solve the issue, try to call the TIBCConfigService.BringDatabaseOnline method after calling the TIBCConfigService.ShutdownDatabase method.