Tomasz 0 Posted June 27, 2023 Hello. I am migrating project from Delphi XE3 to Delphi 10.4 Proffessional. I have Interbase Express included in Delphi. Problem is with IBBackupService on Delphi 10.4 with RELEASE build. When I try do backup databse it throw me an error: Quote Cannot attach to services manager No providers loaded. And it happens only when I compile program as RELEASE build. After compiling as DEBUG configuration, IBBackupService backup my database. I checked IBRestoreService - it works without errors. I cannot understand what happend - why DEBUG works, but RELEASE not 😞 Do I need some kind of DLL (I tried fbclient.dll, gds32.dll, installed InterBase 2020 ToGo by GetIt package). But why DEBUG configuration works without any other libraries. This function starts, when I click to run backup, error is throw when property Active is set to True: try dbLog.Lines.Clear(); IBBackupService1.Verbose := True; IBBackupService1.LoginPrompt := False; IBBackupService1.BackupFile.Clear(); IBBackupService1.BackupFile.Add(System.IOUtils.TPath.GetFullPath(pathBackup.Text)); IBBackupService1.DatabaseName := pathDB.Text; IBBackupService1.ServerName := dbServerIP.Text + '/' + dbPort.Text; IBBackupService1.Protocol := IBX.IBUtils.TIBProtocol.TCP; //IBX.IBServices.TProtocol.TCP; IBBackupService1.Params.Add('user_name=' + dbUserName.Text); IBBackupService1.Params.Add('password=' + dbPassword.Text); IBBackupService1.ServerType := {'IBEmbedded';} 'IBServer'; //IBBackupService1.Attach(); IBBackupService1.Active := True; IBBackupService1.ServiceStart(); while not IBBackupService1.Eof do begin dbLog.Lines.Add(IBBackupService1.GetNextLine()); end; finally IBBackupService1.Active := False; end; Share this post Link to post
tgbs 14 Posted June 27, 2023 Any chance for mixing 32 and 64bit in Release ? Share this post Link to post
Tomasz 0 Posted June 27, 2023 (edited) I deleted all entries in library and Debug path in Delphi, and search Win64 path in %PATH% system environment, but with no difference. Then I added new platform Win64 to project and recompile. Program then ask me to add ibclient64.dll and ibtogo64.dll to run. But Backup tool still not working. But application uses FireBird 3.0 database (and that server is installed), but many years ago someone decided to uses IBX component to connect with that database. Maybe I shouldn't install Interbase ToGo from Getit package, should it works without it ? If I copy Win64 dll's files, I have error, that tell connection was rejected by remote server. After change dll fbclient.dll to ibclient64.dll I got problem with service manager. So maybe I have wrong dll's included to application folder, not in Delphi path ? Nah, it doesn't make sense - DEBUG and RELEASE Win32 application uses the same path and dll's files. Edited June 27, 2023 by Tomasz Share this post Link to post
tgbs 14 Posted June 27, 2023 "connection was rejected by remote server" - maybe different server and client version. IBX is written for IB not for FB. If app is using FB then grab dll from FB install. But rewrite program to use Firedac or native FB client. Also run Process explorer and see what dlls is using app with Debug(working) and Release. Share this post Link to post
Tomasz 0 Posted June 28, 2023 With help of Procmon, I realized that application search for Engine12.dll, then I coped plugin folder from Firebird 3.0 Win32 to application folder. Now application throw me an error: "Cannot attach to services manager service 127.0.0.1:service_mgr is not defined." I am trying to understand, what this error is. Share this post Link to post
tgbs 14 Posted June 28, 2023 (edited) The name of Firebird service is different after 2.5 or 3.0 version i think Edit: But how works in debug then... "service 127.0.0.1:service_mgr is not defined." no port here ? Edited June 28, 2023 by tgbs Share this post Link to post
Tomasz 0 Posted June 28, 2023 (edited) Quote "service 127.0.0.1:service_mgr is not defined." no port here ? During some tests, temporary I removed from connection string port, but restored it again like in first post, and then error string has included port number: 127.0.0.1/3050. I gave up with trying to run backup with TIBBackupService. I tested FDIBBackup on Windows SandBox and it can connect to database on main Windows, so I think it should work on customers hardware. I will go with this option. Edited June 28, 2023 by Tomasz Share this post Link to post
tgbs 14 Posted June 28, 2023 We use gbak.exe for backup/restore via CreateProcess Share this post Link to post