From: Takeshi K. <tak...@gm...> - 2011-01-08 16:26:28
|
I am using Firebird 2.5 and Firebird ADO for .Net 4.0. In my develop machine, when I restore a database using FbRestore class, everything works fine. When I use the same application but in my Web server, the FDB file created always has 1064,960 bytes as size. I have used different FBK files, but the restored file is always the same size. FbRestore does not throw any error and I have no clue about the reason. I have noted that 1064,960 is my page size (4096) x 260, but it says nothing to me. My develop machine uses Windows 7 64 bits. My Web server is Windows 2008 Server, 64 bits. Any indication will be welcome. Thank you. |
From: Jiri C. <di...@ci...> - 2011-01-08 18:53:13
|
If you use gbak via service_mgr is the backup same size? -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Takeshi K. <tak...@gm...> - 2011-01-09 00:18:00
|
No, using gbak with -se service_mgr, then the restore works fine, with the correct size. The C# code that I use is simple and in a basic console application. I use VS 2010 and .Net 4.0: FbRestore restore = new FbRestore(); restore.ConnectionString = conStr; restore.BackupFiles.Add(new FbBackupFile(backupPath, 2048)); restore.PageSize = 4096; restore.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace; restore.Execute(); On 08/01/2011 19:53, Jiri Cincura wrote: > If you use gbak via service_mgr is the backup same size? > |
From: Jiri C. <di...@ci...> - 2011-01-09 11:48:30
|
On Sun, Jan 9, 2011 at 01:17, Takeshi Kabuto <tak...@gm...> wrote: > FbRestore restore = new FbRestore(); > restore.ConnectionString = conStr; > restore.BackupFiles.Add(new FbBackupFile(backupPath, 2048)); > restore.PageSize = 4096; > restore.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace; > restore.Execute(); What's the output? Isn't there some error? The FbRestore class has no idea about what going on there. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Takeshi K. <tak...@gm...> - 2011-01-09 13:16:18
|
Sorry, I am not sure what you mean with output. conStr string contains the typical con string: "Server=localhost;Port=3051;User=SYSDBA;Password=masterkey;Database=d:\databases\mydb.fdb" The thing is that it works fine in my develop computer, but not in the production computer. restore.Execute() does not throw any exception On 09/01/2011 12:48, Jiri Cincura wrote: > On Sun, Jan 9, 2011 at 01:17, Takeshi Kabuto<tak...@gm...> wrote: >> FbRestore restore = new FbRestore(); >> restore.ConnectionString = conStr; >> restore.BackupFiles.Add(new FbBackupFile(backupPath, 2048)); >> restore.PageSize = 4096; >> restore.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace; >> restore.Execute(); > What's the output? Isn't there some error? The FbRestore class has no > idea about what going on there. > |
From: Jiri C. <di...@ci...> - 2011-01-09 17:23:11
|
On Sun, Jan 9, 2011 at 14:16, Takeshi Kabuto <tak...@gm...> wrote: > Sorry, I am not sure what you mean with output. conStr string contains > the typical con string: Output from server. > restore.Execute() does not throw any exception Sure. It will not throw any, at least not one related to operation on server side. -- Jiri {x2} Cincura (x2develop.com founder) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Takeshi K. <tak...@gm...> - 2011-01-09 20:07:00
|
Ok, I have found the problem. It is related with the Verbose property. When it is false, FbRestore works in development computer but not in production. In production the database size is 640 or 1064 KB. The real size should be 14000KB. The production computer is a dynamic cloud server. Maybe it is relayed, but I do not think so. When I set Verbose=true, then FbRestore works fine in both computers. In both cases, I do not use the ServiceOutput event, I do not need to show the output. I solved the problem simply setting Verbose=true, but it seems a bug in FbResotre class. If I understand it well, Verbose is used to get or set if the output will be sent to the client, but it should not affect to the database file. Thank you for your prompt responses. On 09/01/2011 18:23, Jiri Cincura wrote: > On Sun, Jan 9, 2011 at 14:16, Takeshi Kabuto<tak...@gm...> wrote: >> Sorry, I am not sure what you mean with output. conStr string contains >> the typical con string: > Output from server. > >> restore.Execute() does not throw any exception > Sure. It will not throw any, at least not one related to operation on > server side. > |