Re: [firebird-support] Table alias with AS in SELECT statement supported?
At 06:24 PM 18/10/2011, reinier_olislagers wrote: >Hi all, > >The Interbase 6 Language Reference mentions column aliases using the AS >notation, but doesn't show AS in table aliases, e.g. >select * from rdb$relations tables > >On Firebird 2.5, this seems to work fine: >select * from rdb$relations as tables; > >I had a look through the Firebird 2.5 Language Reference Update (8 >October 2011, version 1.1, covers Firebird 2.5 and 2.5.1). >It doesn't seem to say anything about using AS for table aliases in >SELECT statements. > >Have I overlooked something, was it already supported in Interbase 6, or >do the docs need updating? Much simpler than that, actually. AS is an optional keyword, just that most people don't bother to use it. ./heLen
Re: [firebird-support] Firebird database comparison tool.
Thomas Clarke wrote: > It is broken down into two major parts, i) > update the exe file based on version numbers and ii) update the Firebird > database structure. You could also version your database and make the upgrade simple. Database changes are often not just about metadata, but also data transformations and there is no way to do that in ad-hoc manner. Consider for example changing from timestamp column to store the same data into varchar(50) column with added timezone string. This requires something like: UPDATE mytable SET newcolumn = oldcolumn || ' default timezone'; Only way to apply such change to production database is to log it as such. No database structure comparison tool would be able to handle this. > Any ideas as to the best way to go about this? Log all your database changes and apply them in production. Some tools like IBExpert and FlameRobin have options to do this automatically for you. See this paper for example implementation (demo source code included): http://heanet.dl.sourceforge.net/sourceforge/fbexport/managing_metadata_fixed.zip -- Milan Babuskov == The easiest way to import XML, CSV and textual files into Firebird: http://www.guacosoft.com/xmlwizard ==
Re: [firebird-support] Table alias with AS in SELECT statement supported?
Hello Reinier, > The Interbase 6 Language Reference mentions column aliases using the AS > notation, but doesn't show AS in table aliases, e.g. (...) > Have I overlooked something, was it already supported in Interbase 6, or > do the docs need updating? The InterBase 6 LangRef needs updating ;-) Frankly, I never noticed that the optional [AS] for table aliases was missing from the IB6 docs. Now that I know, I'll mention it in the next revision of the LangRef Update. Kind regards, Paul Vinkenoog
Re: [firebird-support] Firebird database comparison tool.
On Tue, Oct 18, 2011 at 6:21 AM, Milan Babuskov wrote: > ** > > > Thomas Clarke wrote: > > It is broken down into two major parts, i) > > update the exe file based on version numbers and ii) update the Firebird > > database structure. > > You could also version your database and make the upgrade simple. > Database changes are often not just about metadata, but also data > transformations and there is no way to do that in ad-hoc manner. > Consider for example changing from timestamp column to store the same > data into varchar(50) column with added timezone string. This requires > something like: > > UPDATE mytable SET newcolumn = oldcolumn || ' default timezone'; > > Only way to apply such change to production database is to log it as > such. No database structure comparison tool would be able to handle this. > > > > Any ideas as to the best way to go about this? > > Log all your database changes and apply them in production. Some tools > like IBExpert and FlameRobin have options to do this automatically for you. > > See this paper for example implementation (demo source code included): > > > http://heanet.dl.sourceforge.net/sourceforge/fbexport/managing_metadata_fixed.zip > > -- > Milan Babuskov > > Thanks Milan, I have reached the same conclusion and that is to work with versions of the database structure and then create change scripts and use these for the updates. I will read your article a bit later today. Regards. Thomas Clarke. > == > The easiest way to import XML, CSV > and textual files into Firebird: > http://www.guacosoft.com/xmlwizard > == > > > -- Thomas Clarke Cyber Sea Incorporated #6 Kingston Terrace Flint Hall St. Michael Barbados BB11070 voice: (246) 234-9692 email: tcla...@cybersea.biz web: http://cybersea.biz [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/
[firebird-support] Re: Firebird database comparison tool.
I have been successfully updating PSQL ( stored procedures/triggers/views ) for over 8 years, to thousands of sites and over the internet. As well as updating the applications that go with them. The trick is to use the metadata to store the current version of the particular PSQL element. eg. UPDATE RDB$PROCEDURES SET RDB$DESCRIPTION = 'version=2' WHERE( RDB$PROCEDURE_NAME = 'PROC_MYPROC' ) run this after you update your stored procedure. You can reference what version is the stored procedure. Have fun, Robert.
[firebird-support] Handling deadlocks with classic mode
hello, We recently switched from superserver mode to classic mode (still stuck on Firebird 1.5 unfortunately) to take advantage of the 2nd CPU on the server and to prevent intensive queries from slowing down the whole system. It has worked out well except that we seem to see more deadlocks now. Currently, we have one user who has been unable to update a record for 3 days now (keeps getting a deadlock condition), so it seems that as a last resort I might have to restart Firebird to break this deadlock. Here's my question -- how do I do that? Do I have to kill all of the fb_inet_server processes? The easiest way for me is to reboot the server, but is there a better way? We have a GUI tool (Easy-IP DB manager), but it only kills the Firebird listener process. Two other things I've noticed with classic vs. superserver: 1) I'm having more trouble altering stored procedures. It seems classic mode won't let you update a stored procedure if it's currently being run. I don't recall this problem with superserver mode. 2) In superserver mode, when I abnormally terminated from IBExpert (our SQL query tool) due to the query taking too long -- the system response time improved immediately. However, in classic mode, the fb_inet_server process continues to run even though I abnormally terminated from IBExpert. Thanks in advance for any assistance. I know the long-term solution is to write better code, but for the short-term I need a way to break deadlocks without rebooting the database server constantly. vince
[firebird-support] Firebird Program loses network connection
Hi everyone, I have encountered a weird network problem and have no idea what might be the cause of it. Background info: Using Firebird 2.0.5 Program is written on Delphi with BDE. Server is Windows 7 Ultimate Clients are running mixed of Windows 7 Starter, Home Premium, WinXP, Vista Home Premium. Client connection path to the database is using TCP/IP Situation: Client's program frequently shows Error writing data to the connection An existing connection was forcibly closed by the remote host Client stated it happened after using the program for some time. As testing, I tried saving couple of big transaction on the client computer and will encountered the same error. Note: Processing time for the transaction takes less then 3 mins. Initially thought might be related to memory but hit the same problem with a computer with 2 GB memory. Tried adjusting memory usage in Firebird.conf file but makes no different. Firebird.conf was then restore back to original to continue testing for other possibility. Testing on network so far shows it is stable. Perform test by pinging the server and then transferring file to the server while the program is running. Will get the same error above but ping and file transfer continue without hiccup. Perform another test by having two program open. Only the program running the test above will crashed with error and the second program can continue being used without any problem. Server Firebird's log file only recorded 10054 error. Tried running both SuperServer and Classic mode and tried Firebird 2.5.1 as well but no go. Also suspected something is not right with the program but running the same test at my own office with lower end computer and much heavier transaction will not have any problem. I pretty much given up and not sure what so unique about this client network that keep getting this error. Thanks and regards, John