RE: [firebird-support] Strategy to get a sequence in a strict ascending order for a log table
You need a persistent FIFO message queue where you insert all committed changes. The device consume from this queue in the same order as they were committed on the sending side. Oracle has a great feature set around this… From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: 01 September 2015 06:26 PM To: firebird-support@yahoogroups.com Subject: [firebird-support] Strategy to get a sequence in a strict ascending order for a log table I am trying to create a log table. This table has a "version" column, it is an incremental number. In each transaction (ie a purchase, sale,...) , I add a record in this log table. The "version" column is assigned in the insert trigger using the value of a sequence. This version number is used to update mobile devices. They ask something like "send me all changes until version x". My problem is I need that the log table shows the records in a strict ascending order. It is not important if there are gaps or not. Example of the problem: 1-Star transaction A 2-Changes 3-Insert LOG record, version=1 (get it from sequence) 4-More changes 5-Commit A Now, between the 3 and 5 of A transaction, a concurrent connection do a smaller transaction: 1-Star transaction B 2-Changes 3-Insert LOG record, version=2 (get it from sequence) 4-Commit B And the commit B is done before the transaction A finishes. Then, in the log table, for an instant, I have a record with the "2" as value. The table will not have the "1" until transaction A finishes. If before the A finishes, a mobile device asks for any changes, the server sends only "2" ("1" is not visible yet). The device updates its internal state and now it is updated to "2". The "1" log will never be applied. When transaction A finished, the "1" is added in the log, but now it is too late because the mobile device has been updated to "2" version. Which strategy can I use to solve this problem? [Non-text portions of this message have been removed]
[firebird-support] Re: Getting a list of system users via SQL
01.09.2015 17:24, Dalton Calford wrote: > With firebird 2.5 we received some wonderful tools that allowed us to create, > update and drop users without needlessly mucking about with smacking the > security database. Yea! > > But, we also where locked out from reading the security database so we can > no longer see who is defined in the database via sql. Boo! > > So, what I want to know is, is it possible to get a list of currently defined > users for the system database, via sql. > > ie., select * from mon$security2 or some other such method? Only in FB3, via sec$users. Dmitry ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ 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: https://info.yahoo.com/legal/us/yahoo/utos/terms/
[firebird-support] Getting a list of system users via SQL
With firebird 2.5 we received some wonderful tools that allowed us to create, update and drop users without needlessly mucking about with smacking the security database. Yea! But, we also where locked out from reading the security database so we can no longer see who is defined in the database via sql. Boo! So, what I want to know is, is it possible to get a list of currently defined users for the system database, via sql. ie., select * from mon$security2 or some other such method?
RE: [firebird-support] Re: Getting a list of system users via SQL
Is there a method to remove the restriction on connecting to security2.fdb until fb3 goes gold? From: firebird-support@yahoogroups.com [firebird-support@yahoogroups.com] Sent: 01 September 2015 11:01 To: firebird-support@yahoogroups.com Subject: [firebird-support] Re: Getting a list of system users via SQL 01.09.2015 17:24, Dalton Calford wrote: > With firebird 2.5 we received some wonderful tools that allowed us to create, > update and drop users without needlessly mucking about with smacking the > security database. Yea! > > But, we also where locked out from reading the security database so we can > no longer see who is defined in the database via sql. Boo! > > So, what I want to know is, is it possible to get a list of currently defined > users for the system database, via sql. > > ie., select * from mon$security2 or some other such method? Only in FB3, via sec$users. Dmitry ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links