RE: [firebird-support] Firebird replication help needed
Hello Alan, Thank you for your answer. I will download the FB Replicator try it and see if it will work for me. That part with the triggers i've already done. I have after I, U, D triggers for every table and they insert into my replication log table. The problem is that I used to put the sql query that was executedon the client DB on this table in the log and then just execute it on the server DB. But if the table metadata is changed, then that doesn't work anymore, cos its says can't execute to server because the fields in the insert do not equal to those in the table. So I decided insted to log only the table name, the PK of record, timestamp and the type of query - I U D. And if it's I, to execute insert or update on server. But probably when I execute them I'll have to separate them by table and get every field name and then value of that table and then onstruct the query as a string so it will be probably slow. My other problem is should I do it in the C# replication app of use a script instead? Thank you again.If I have further questions I'll write.
RE: [firebird-support] Firebird replication help needed
I am writing a two way server - client Firebird replication with a C# app and I am facing the following problem. I have a log table with the table name pk of the record and type of the query executet on it. For example if in the sales table there has been inserted a line with primery key of 4 there will be the table name, pk of the record and insert. My idea is if the statement is insert to take every value from the client's DB and insert it into the server's. How do I do this and how to do it so that it can work fast. Should I devide every record by tables and select all unreplicated records from that table or there is some other way. Please help me. By the way I used the method where every query that has been executed is written in a fild in the log table, but that makes it impossible to add columns to the table, cos the query will be wrong. Please help me. I've been strugling to write a good replication for years. If you want, you can have the source for FBReplicator. Replication Manager, Service and Service Controller. The manager allows for you to update table structures and install and maintain triggers in the source DBs such that all I, D and U operations are stored in a changes table. The service then runs at your desired interval and replicates to a target. You can have 2-way replication. I’ve been running 3 way replication (i.e. 4 servers each puching 3 ways) since 1997. That’s 72 server years of 24x7 traffic. Alan
[firebird-support] Firebird replication help needed
I am writing a two way server - client Firebird replication with a C# app and I am facing the following problem. I have a log table with the table name pk of the record and type of the query executet on it. For example if in the sales table there has been inserted a line with primery key of 4 there will be the table name, pk of the record and insert. My idea is if the statement is insert to take every value from the client's DB and insert it into the server's. How do I do this and how to do it so that it can work fast. Should I devide every record by tables and select all unreplicated records from that table or there is some other way. Please help me. By the way I used the method where every query that has been executed is written in a fild in the log table, but that makes it impossible to add columns to the table, cos the query will be wrong. Please help me. I've been strugling to write a good replication for years.
RE: [firebird-support] Firebird replication help needed
Hello Alan, Thank you for your answer. I will download the FB Replicator try it and see if it will work for me. That part with the triggers i've already done. I have after I, U, D triggers for every table and they insert into my replication log table. The problem is that I used to put the sql query that was executedon the client DB on this table in the log and then just execute it on the server DB. But if the table metadata is changed, then that doesn't work anymore, cos its says can't execute to server because the fields in the insert do not equal to those in the table. So I decided insted to log only the table name, the PK of record, timestamp and the type of query - I U D. And if it's I, to execute insert or update on server. But probably when I execute them I'll have to separate them by table and get every field name and then value of that table and then onstruct the query as a string so it will be probably slow. My other problem is should I do it in the C# replication app of use a script instead? Thank you again.If I have further questions I'll write. There’s IBReplicator (Commercial) at IBPhoenix. FBReplicator is open source.
AW: [firebird-support] Support for OS X 10.11 El Capitan
Having identified and fixed a problem in file_params.h and Info.plist, we now have a working prototype installer via pkgbuild, albeit very alpha, but its installing and working OK for me on El Capitan. Hopefully I should have something constructive early next week. Regards Paul
AW: [firebird-support] Support for OS X 10.11 El Capitan
Ok, thank you! Bernd Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Gesendet: Donnerstag, 8. Oktober 2015 17:14 An: firebird-support@yahoogroups.com Betreff: AW: [firebird-support] Support for OS X 10.11 El Capitan Having identified and fixed a problem in file_params.h and Info.plist, we now have a working prototype installer via pkgbuild, albeit very alpha, but its installing and working OK for me on El Capitan. Hopefully I should have something constructive early next week. Regards Paul
Re: [firebird-support] Using Zeos 7 and FB 2.5, how do you see in main thread changes made in background thread
At 02:05 p.m. 9/10/2015, Mark Patterson mark.aurel...@gmail.com [firebird-support] wrote: >Hi > >I am using Zeos 7.1.4 stable, and FB 2.5 embedded. I am processing a directory >full of SQL scripts to generate a database. All the tables are getting created >in a background thread, but after than if I then try to list the tables in the >main thread, they don't immediately show up. I have to exit the app and rerun >it. > >Is there some standard way to have the results of a background thread visible >in the main thread? Commit the transaction in the main thread and start a new one. Then you will see the **committed** work from other transactions. You will never see uncommitted work from other transactions, under any circumstances. Please would you refrain from unsubscribing and resubscribing to this list every time you post a message. All new subs are moderated - that is to protect all of us, including you, from spam. If you don't want to get the list messages, set your account to No Email. Helen
Re: [firebird-support] Using Zeos 7 and FB 2.5, how do you see in main thread changes made in background thread
On 9 October 2015 at 11:28, Helen Borrie hele...@iinet.net.au [firebird-support]wrote: > > > At 02:05 p.m. 9/10/2015, Mark Patterson mark.aurel...@gmail.com > [firebird-support] wrote: > > >Hi > > > >I am using Zeos 7.1.4 stable, and FB 2.5 embedded. I am processing a > directory full of SQL scripts to generate a database. All the tables are > getting created in a background thread, but after than if I then try to > list the tables in the main thread, they don't immediately show up. I have > to exit the app and rerun it. > > > >Is there some standard way to have the results of a background thread > visible in the main thread? > > Commit the transaction in the main thread and start a new one. Then you > will see the **committed** work from other transactions. You will never see > uncommitted work from other transactions, under any circumstances. > Thanks for the suggestion. I wrote this procedure, after a bit of avoiding exceptions with autocommit mode and the methods: procedure TdFBZeos.Refresh; begin ZConnection1.AutoCommit := false; ZConnection1.Commit; ZConnection1.AutoCommit := true; ZConnection1.StartTransaction; end{ Refresh}; I call it as soon as the background thread has fininshed, but I still cannot see the tables I add until I rerun the program. Is this what you had in mind? Regards Mark
Re: [firebird-support] Using Zeos 7 and FB 2.5, how do you see in main thread changes made in background thread
On 9 October 2015 at 11:52, Mark Pattersonwrote: > Thanks for the suggestion. I wrote this procedure, after a bit of avoiding > exceptions with autocommit mode and the methods: > > procedure TdFBZeos.Refresh; > begin > ZConnection1.AutoCommit := false; > ZConnection1.Commit; > ZConnection1.AutoCommit := true; > ZConnection1.StartTransaction; > end{ Refresh}; > > I call it as soon as the background thread has fininshed, but I still > cannot see the tables I add until I rerun the program. > I do see the new tables I create if I do this in that Refresh method: ZConnection1.Disconnect; ZConnection1.Connect; That is a bit drastic, but it will do for this case. --- Mark
[firebird-support] Using Zeos 7 and FB 2.5, how do you see in main thread changes made in background thread
Hi I am using Zeos 7.1.4 stable, and FB 2.5 embedded. I am processing a directory full of SQL scripts to generate a database. All the tables are getting created in a background thread, but after than if I then try to list the tables in the main thread, they don't immediately show up. I have to exit the app and rerun it. Is there some standard way to have the results of a background thread visible in the main thread? TIA Mark