Re: [firebird-support] GBak Backup Restore Problem
Benson, Thanks for insist for to have a solution for this. We believe we found a pratical solution = for the first, we restored the DB structure only and after then, DB data only. This worked in a test machine, we believe this will work at a production machine. Today, we will see how we can run this as an script, since we know we can have other pratical problems. If this can be resolved in this manner, if this problem happen simultaneously at many columns and many tables, this way we will have the problem resolved at all his many occurrences. Thanks a lot for your follow up. Roberto Camargo. From: Alexandre Benson Smith ibl...@thorsoftware.com.br To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 9:40 PM Subject: Re: [firebird-support] GBak Backup Restore Problem Roberto, Em 25/6/2013 17:07, Tupy... nambá escreveu: Mr.Benson, No, the constraint wasn´t change. As I explain to mr.Jesus Garcia, we take the DB having the data and the constraint in the needed conditions, we made a backup and then the restore. This mean = all the conditions were assured that the DB were in good conditions and, during the backup/restore process, the data at this column was lost. Thank you, i.c.u.2 ! Roberto Camargo Did you tried my suggestion ? I will insist on that... Update the problematic column/table update MyTable set MyColumn = 0 where Mycolumn is null or MyColumn = 0; commit; then try to back-up/restore. see you ! ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
[firebird-support] GBak Backup Restore Problem
Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil [Non-text portions of this message have been removed]
Re: [firebird-support] GBak Backup Restore Problem
Hello, I think you have a row with null value. The option is update table set column = 0 where column is null and then try to backup restore. I have seen this issue when changing columns from null to not null and you have rows in the table. 2013/6/25 Tupy... nambá anhangu...@yahoo.com ** Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) * To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [firebird-support] GBak Backup Restore Problem
Hello, Tupy...! Tuesday, June 25, 2013, 11:23:47 PM, you wrote: Tn Dear Friends, Tn We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. Tn When restoring, GBak returns null for this column. As this column Tn is not null, we get an error message (Error: Validation error for column .). Tn Between these two steps (backup and restore), no further action is done with the backup file. Tn I ask you = What can cause this problem? Is there any solution Tn for this? Any idea about this problem? 1. somebody altered column to not null default 0 while column had null data 2. somebody added column not null default 0. solution - update that column to 0 like this update table set field = 0 p.s. gbak backups data, it does not check correspondence of data and constraints. If it is broken (somehow, by db corruption or by actions I mentioned), restore will show that column data does not correspond to it's check. -- Dmitry Kuzmenko, www.ib-aid.com
Re: [firebird-support] GBak Backup Restore Problem
Em 25/6/2013 16:23, Tupy... nambá escreveu: Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil Did the null/not null constraint was applied after the table has some rows ? IIRC there is something regarding NULL stored and the column be changed to NOT NULL with a DEFAULT, and so FB will return the DEFAULT value to NOT NULL columns that in fact is NULL. I suggest you to do: update MyTable set MyColumn = 0 where MyColumn is null or MyColumn = 0; commit; and then perform a new back-up/restore cycle. see you !
Re: [firebird-support] GBak Backup Restore Problem
Señor Garcia, Gracias por su retorno. If I understood well, you say to make a first insertion at this table, manually apply values to the columns of this table, save the values to the table, delete this line and then restore the table. It´s a possible solution, but not a pratical. Specially if this happens to many other tables and columns. The most important is first understand why (to eventually avoid the causes) and the technical solution for the question, which can be automatically applied (by code, by scripts or something like this). Your suggestion will be taken in consideration, since we go more deeply into the problem. Best regards, Roberto Camargo. From: Jesus Garcia jeg...@gmail.com To: firebird-support@yahoogroups.com firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 4:28 PM Subject: Re: [firebird-support] GBak Backup Restore Problem Hello, I think you have a row with null value. The option is update table set column = 0 where column is null and then try to backup restore. I have seen this issue when changing columns from null to not null and you have rows in the table. 2013/6/25 Tupy... nambá anhangu...@yahoo.com ** Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
Re: [firebird-support] GBak Backup Restore Problem
Hi, Dmitry, Thanks for you response. No one has changed this table. At most, as a not null column, someone could have change it to another value, but not to null. And no one changed it´s validation rule (as not null). This is discarded. We repeated the action = we take the DB, checked the content of this colum (all lines having 0 at this column), then we run a backup and imediatelly a restore, and we reproduced the problem (it ocurred when restoring). Roberto Camargo. From: Dmitry Kuzmenko k...@ibase.ru To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 4:33 PM Subject: Re: [firebird-support] GBak Backup Restore Problem Hello, Tupy...! Tuesday, June 25, 2013, 11:23:47 PM, you wrote: Tn Dear Friends, Tn We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. Tn When restoring, GBak returns null for this column. As this column Tn is not null, we get an error message (Error: Validation error for column .). Tn Between these two steps (backup and restore), no further action is done with the backup file. Tn I ask you = What can cause this problem? Is there any solution Tn for this? Any idea about this problem? 1. somebody altered column to not null default 0 while column had null data 2. somebody added column not null default 0. solution - update that column to 0 like this update table set field = 0 p.s. gbak backups data, it does not check correspondence of data and constraints. If it is broken (somehow, by db corruption or by actions I mentioned), restore will show that column data does not correspond to it's check. -- Dmitry Kuzmenko, www.ib-aid.com ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
Re: [firebird-support] GBak Backup Restore Problem
Mr.Benson, No, the constraint wasn´t change. As I explain to mr.Jesus Garcia, we take the DB having the data and the constraint in the needed conditions, we made a backup and then the restore. This mean = all the conditions were assured that the DB were in good conditions and, during the backup/restore process, the data at this column was lost. Thank you, i.c.u.2 ! Roberto Camargo From: Alexandre Benson Smith ibl...@thorsoftware.com.br To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 4:33 PM Subject: Re: [firebird-support] GBak Backup Restore Problem Em 25/6/2013 16:23, Tupy... nambá escreveu: Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil Did the null/not null constraint was applied after the table has some rows ? IIRC there is something regarding NULL stored and the column be changed to NOT NULL with a DEFAULT, and so FB will return the DEFAULT value to NOT NULL columns that in fact is NULL. I suggest you to do: update MyTable set MyColumn = 0 where MyColumn is null or MyColumn = 0; commit; and then perform a new back-up/restore cycle. see you ! ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
Re: [firebird-support] GBak Backup Restore Problem
Thanks, Looks like it is working now. Appreciate your guidance - Original Message - From: Tupy... nambá To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 2:23 PM Subject: [firebird-support] GBak Backup Restore Problem Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
Re[2]: [firebird-support] GBak Backup Restore Problem
Hello, Tupy...! Wednesday, June 26, 2013, 12:07:07 AM, you wrote: Tn backup and then the restore. This mean = all the conditions were Tn assured that the DB were in good conditions and, during the backup/restore process, the Tn data at this column was lost. The funny thing is that gbak is not a rocket sience, it simply does select * from table and writes the data to the backup file. So, if you have problem, the source is in the database or in the backup. I also do not see what Firebird version do you use. p.s. please, do not overquote. -- Dmitry Kuzmenko, www.ib-aid.com
Re: Re[2]: [firebird-support] GBak Backup Restore Problem
Dmitry, Yes, the problem seems incredible. If I heard it from someone else, I would also have difficult to believe on that. But this is as it is ! I will not repeat (ooops, I am already in the way !) that the source DB (for the backup) is ok. And the backup, as only could be, really has the problem. And the backup was generated not by a rocket, but only by the GBak ! This mean = or the problem happens at the backup process, or during the restore process. But as we have no tool to see the backup content, it´s not possible to know where, in these two steps, the problem happens. We experimented to restore first only the DB structure and then restore the data, and then we got no error. Using the same backup file. We have FB 2.1. Roberto Camargo From: Dmitry Kuzmenko k...@ibase.ru To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 5:13 PM Subject: Re[2]: [firebird-support] GBak Backup Restore Problem Hello, Tupy...! Wednesday, June 26, 2013, 12:07:07 AM, you wrote: Tn backup and then the restore. This mean = all the conditions were Tn assured that the DB were in good conditions and, during the backup/restore process, the Tn data at this column was lost. The funny thing is that gbak is not a rocket sience, it simply does select * from table and writes the data to the backup file. So, if you have problem, the source is in the database or in the backup. I also do not see what Firebird version do you use. p.s. please, do not overquote. -- Dmitry Kuzmenko, www.ib-aid.com ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
Re: [firebird-support] GBak Backup Restore Problem
Sorry, Softtech, I didn´t understand your message, since I still want to understand what happened. From: Softtech Support stwiz...@att.net To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 5:13 PM Subject: Re: [firebird-support] GBak Backup Restore Problem Thanks, Looks like it is working now. Appreciate your guidance - Original Message - From: Tupy... nambá To: firebird-support@yahoogroups.com Sent: Tuesday, June 25, 2013 2:23 PM Subject: [firebird-support] GBak Backup Restore Problem Dear Friends, We have a strange problem with GBak. We make a backup with gbak and then a restore, also with the same. We have a table with 60 rows where a not null type SmallInt column has 0 (zero) as content. When restoring, GBak returns null for this column. As this column is not null, we get an error message (Error: Validation error for column .). Between these two steps (backup and restore), no further action is done with the backup file. I ask you = What can cause this problem? Is there any solution for this? Any idea about this problem? Thanks a lot, Roberto Camargo, Rio de Janeiro / Brasil [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org/and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com/ ++ Yahoo! Groups Links [Non-text portions of this message have been removed]
Re[4]: [firebird-support] GBak Backup Restore Problem
Hello, Tupy...! Wednesday, June 26, 2013, 12:35:34 AM, you wrote: Tn I will not repeat (ooops, I am already in the way !) that the Tn source DB (for the backup) is ok. currently no evidence that it is ok :-) Tn GBak ! This mean = or the problem happens at the backup process, or during the restore Tn process. usually process is - backup see data, store it - restore creates metadata, restores data, data does not fit to constraints - error. Tn But as we have no tool to see the backup content, it´s Tn not possible to know where It's possible. Tool name is IBBackupSurgeon. You can dig in that direction, too. Tn We experimented to restore first only the DB structure and then Tn restore the data, and then we got no error. Using the same backup file. You can't do that. You can restore metadata+data or only metadata. Gbak is unable to restore data into existing database. So, please explain what you are doing. Tn We have FB 2.1. this is misty. I know 5 versions of 2.1. 2.1.0, 2.1.1, 2.1.2... and all of them up to 2.1.4 have bugfixes. -- Dmitry Kuzmenko, www.ib-aid.com
Re[4]: [firebird-support] GBak Backup Restore Problem
At 08:56 a.m. 26/06/2013, Dmitry Kuzmenko wrote: Tn I will not repeat (ooops, I am already in the way !) that the Tn source DB (for the backup) is ok. currently no evidence that it is ok :-) The gbak restore problem IS evidence that the source DB is not OK. This problem could have been lying unnoticed in that database for a long time, if you have never done a backup-and-restore on it until now. Applying a NOT NULL constraint with a DEFAULT to a column does not magically update nulls that already exist in that column. A DEFAULT applies **only** to inserts and then **only** if the insert statement excludes that column from the input set. Tn We have FB 2.1. this is misty. I know 5 versions of 2.1. 2.1.0, 2.1.1, 2.1.2... and all of them up to 2.1.4 have bugfixes. Actually, 2.1.5 and 2.1.5 Update 1 after that. ;-) Firebird 3 will disallow changing a column from nullable to NOT NULL if you do not fix the data manually beforehand. Helen Borrie, Support Consultant, IBPhoenix (Pacific) Author of The Firebird Book and The Firebird Book Second Edition http://www.firebird-books.net __
Re: [firebird-support] GBak Backup Restore Problem
Roberto, Em 25/6/2013 17:07, Tupy... nambá escreveu: Mr.Benson, No, the constraint wasn´t change. As I explain to mr.Jesus Garcia, we take the DB having the data and the constraint in the needed conditions, we made a backup and then the restore. This mean = all the conditions were assured that the DB were in good conditions and, during the backup/restore process, the data at this column was lost. Thank you, i.c.u.2 ! Roberto Camargo Did you tried my suggestion ? I will insist on that... Update the problematic column/table update MyTable set MyColumn = 0 where Mycolumn is null or MyColumn = 0; commit; then try to back-up/restore. see you !