Re: [firebird-support] How to shorten =================================== between header and data rows?
Am 08.06.2012 02:51, schrieb ehaerim: SQL select substring(data_feed_name from 1 for 10) dfn from test; [...] I want the = to be shortened to 15 so that it looks like DFN === InvestWare Strange request. Anyway, you could use cast to shorten the field. Note however, that the seperating line is always at least 6 characters long. select cast(substring(data_feed_name from 1 for 10) as varchar(10)) dfn from test; -- Magnus
Re: [firebird-support] How to shorten =================================== between header and data rows?
Magnus Titho schrieb am 08.06.2012 um 08:24 (+0200): Am 08.06.2012 02:51, schrieb ehaerim: SQL select substring(data_feed_name from 1 for 10) dfn from test; [...] I want the = to be shortened to 15 so that it looks like DFN === InvestWare Anyway, you could use cast to shorten the field. Note however, that the seperating line is always at least 6 characters long. I think ehaerim is referring to the row separators in ISQL, not to any data items. There's a special SET instruction for that: SQL help set; … SET WIDTH col [n] -- set/unset print width to n for column col SQL set width abc 5; SQL select * from T; -- now column ABC displays with a width of five This won't cast the data, but rather truncate it for display, including the == row separator. One thing to note is that the display width depends on the character set chosen for the ISQL session. See below. Michael -- D:\temp :: isql eins Database: eins SQL show table kader; NAMEVARCHAR(12) CHARACTER SET UTF8 Not Null SQL select * from kader; NAME Müller Özil Höwedes Götze Schürrle Gündogan SQL set width name 10; SQL select * from kader; NAME == Müller Özil Höwedes Götze Schürrle Gündogan SQL quit; D:\temp :: isql -ch win1252 eins Database: eins SQL select * from kader; NAME Müller Özil Höwedes Götze Schürrle Gündogan SQL
Re: [firebird-support] URGENT: Invalid request BLR
Alec, Thomas, the index used to exist but for some reason it was lost, probably because of the lack of disk space during index rebuild. Firebird should not leave the database in a bad state like this if ALTER INDEX ACTIVATE fails because of lack of disk space! What can you expect if Firebird needs temporary disk space which isn't available to create/activate an index? This all might be also related to: http://tracker.firebirdsql.org/browse/CORE-3757 -- With regards, Thomas Steinmaurer (^TS^) Firebird Technology Evangelist http://www.upscene.com/ Do you care about the future of Firebird? Join the Firebird Foundation: http://www.firebirdsql.org/en/firebird-foundation/ Alec On Thu, Jun 7, 2012 at 12:27 PM, Thomas Steinmaurert...@iblogmanager.comwrote: ** We are getting the following error during a SELECT-query and gfix with gback do not fix it. org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544343. invalid request BLR at offset 226 there is no index IDX_p39A2dTscKu7xw43c5lrjQ== for table COPY The customer is really frustrated, what should we do? Are you forcing the optimizer to use an index via an explicit PLAN, but the index doesn't exist? Regards, Thomas [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
Re: [firebird-support] Re: gbak to a non existing directory - Email found in subject
ma_golyo wrote: a. This is plan B. b. It's very creative, but ugly... :) How about: c. Modify Firebird source code, before it tries to create the database file, check for directory existence, and then create it. It seems exactly what you need and any decent C/C++ programmer should be able to implement this functionality quickly. ;) One question though. firebird user usually has no privileges on *any* directory in the filesystem by default. How would it be able to create the sub-directory then? After setting up firebird you have to give it rights to some directory, why not create the directory as well at that point? -- Milan Babuskov == The easiest way to import XML, CSV and textual files into Firebird: http://www.guacosoft.com/xmlwizard ==
Re: [firebird-support] Re: gbak to a non existing directory - Email found in subject
Hello, ma_golyo! Thursday, June 7, 2012, 5:32:10 PM, you wrote: m That is why I want/expect to create missing directory with m Firebird/gbak. It can create file but not a directory? It's strange to me. because directories for databases, etc, must be created by administator. It is not strange. Your wish - is strange. m why to separate customer's DBs by folders? Why not to place all of m them into one folder? m Namespace separation. Each customer has a fix named DB and any m number of (at least 1) custom named DB. you created that schema, don't want to change it, and want Firebird be changed for your needs? Really, as it was said, creating db anywhere at the filesystem is dangerous, and violates lot of administrative and security rules. m --- In firebird-support@yahoogroups.com, Dmitry Kuzmenko kdv@... wrote: Hello, ma_golyo! Thursday, June 7, 2012, 2:25:05 PM, you wrote: m To stat a new customer we have to m #1 : copy the app to new folder (win) m #2 : copy the initial DB to new folder (linux) m #3 : update inital DB metadata to current app version m I'm writing (Delphi) app which does the steps above. App runs on the terminal (win) server. what if Firebird on Linux is run under special account (as it usually made by linux administrators)? why to separate customer's DBs by folders? Why not to place all of them into one folder? Do you use aliases.conf? If not, and db and folder name somehow related to the customer (name, id, etc), some customer can think of hacking some other client's DB. So, I understand that you are trying to make process automatic, but the result looks insecure. m --- In firebird-support@yahoogroups.com, Michael Ludwig milu71@ wrote: ma_golyo schrieb am 07.06.2012 um 06:07 (-): Why do you not want something like that? What is te purpose of this restriction? Or it's not a restriction, just not implemeted? Guess most people back up their databases to known locations, be it locally or on the server. Willy-nilly creation of folders simply isn't necessary. I'd say it is even undesirable because it could create a folder by accident because you mistyped the path and then your important backup might end up in a folder that you don't have on your radar and so it would be effectively lost when you need it. Why would you want to create a new folder from another machine instead of just backing up to C:\Backups ? Explain your use case if you have a good one. Michael m m ++ m Visit http://www.firebirdsql.org and click the Resources item m on the main (top) menu. Try Knowledgebase and FAQ links ! m Also search the knowledgebases at http://www.ibphoenix.com m ++ m Yahoo! Groups Links -- Dmitry Kuzmenko, www.ib-aid.com m m ++ m Visit http://www.firebirdsql.org and click the Resources item m on the main (top) menu. Try Knowledgebase and FAQ links ! m Also search the knowledgebases at http://www.ibphoenix.com m ++ m Yahoo! Groups Links -- Dmitry Kuzmenko, www.ib-aid.com
[firebird-support] Re: gbak to a non existing directory - Email found in subject
After installation access right can be set up for Firebird. But directories needed not after the installation but in the future. --- In firebird-support@yahoogroups.com, Milan Babuskov milanb@... wrote: ma_golyo wrote: what if Firebird on Linux is run under special account (as it usually made by linux administrators)? That is why I want/expect to create missing directory with Firebird/gbak. It can create file but not a directory? Actually, you cannot create any file by default. The only directory where firebird has write access after installation is the directory where Firebird is installed (/opt/firebird or different, depends on distrubution and package you use). Creating directories for databases should really be done right after Firebird is installed. -- Milan Babuskov == The easiest way to import XML, CSV and textual files into Firebird: http://www.guacosoft.com/xmlwizard ==
[firebird-support] Re: gbak to a non existing directory - Email found in subject
You created that schema, don't want to change it, and want Firebird be changed for your needs? Yep, that is the case. ;) Really, as it was said, creating db anywhere at the filesystem is dangerous, and violates lot of administrative and security rules. I cannot create DB anywhere, because OS controls the access. If Firebird has no right to create file/directory then I expect to get error. --- In firebird-support@yahoogroups.com, Dmitry Kuzmenko kdv@... wrote: Hello, ma_golyo! Thursday, June 7, 2012, 5:32:10 PM, you wrote: m That is why I want/expect to create missing directory with m Firebird/gbak. It can create file but not a directory? It's strange to me. because directories for databases, etc, must be created by administator. It is not strange. Your wish - is strange. m why to separate customer's DBs by folders? Why not to place all of m them into one folder? m Namespace separation. Each customer has a fix named DB and any m number of (at least 1) custom named DB. you created that schema, don't want to change it, and want Firebird be changed for your needs? Really, as it was said, creating db anywhere at the filesystem is dangerous, and violates lot of administrative and security rules. m --- In firebird-support@yahoogroups.com, Dmitry Kuzmenko kdv@ wrote: Hello, ma_golyo! Thursday, June 7, 2012, 2:25:05 PM, you wrote: m To stat a new customer we have to m #1 : copy the app to new folder (win) m #2 : copy the initial DB to new folder (linux) m #3 : update inital DB metadata to current app version m I'm writing (Delphi) app which does the steps above. App runs on the terminal (win) server. what if Firebird on Linux is run under special account (as it usually made by linux administrators)? why to separate customer's DBs by folders? Why not to place all of them into one folder? Do you use aliases.conf? If not, and db and folder name somehow related to the customer (name, id, etc), some customer can think of hacking some other client's DB. So, I understand that you are trying to make process automatic, but the result looks insecure. m --- In firebird-support@yahoogroups.com, Michael Ludwig milu71@ wrote: ma_golyo schrieb am 07.06.2012 um 06:07 (-): Why do you not want something like that? What is te purpose of this restriction? Or it's not a restriction, just not implemeted? Guess most people back up their databases to known locations, be it locally or on the server. Willy-nilly creation of folders simply isn't necessary. I'd say it is even undesirable because it could create a folder by accident because you mistyped the path and then your important backup might end up in a folder that you don't have on your radar and so it would be effectively lost when you need it. Why would you want to create a new folder from another machine instead of just backing up to C:\Backups ? Explain your use case if you have a good one. Michael m m ++ m Visit http://www.firebirdsql.org and click the Resources item m on the main (top) menu. Try Knowledgebase and FAQ links ! m Also search the knowledgebases at http://www.ibphoenix.com m ++ m Yahoo! Groups Links -- Dmitry Kuzmenko, www.ib-aid.com m m ++ m Visit http://www.firebirdsql.org and click the Resources item m on the main (top) menu. Try Knowledgebase and FAQ links ! m Also search the knowledgebases at http://www.ibphoenix.com m ++ m Yahoo! Groups Links -- Dmitry Kuzmenko, www.ib-aid.com
[firebird-support] Re: How to shorten =================================== between header and data rows?
thanks for the answer. Set width works. However it still does not work when alias is used. For example, long_field_name varchar(30); Set width long_field_name 10; select long_field_name from test; // = display 10 char Set width long_field_name 10; select long_field_name lfn from test; // = display 30 char Is it also possible the latter case print 10 chars only? thx
Re: [firebird-support] Re: How to shorten =================================== between header and data rows?
On 08/06/12 10:29, ehaerim wrote: Is it also possible the latter case print 10 chars only? Yes: Set width LFN 10; select long_field_name LFN from test; // = display 30 char Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767
Re: [firebird-support] Re: How to shorten =================================== between header and data rows?
Sorry typo, Set width LFN 10; select long_field_name LFN from test; // = display 10 chars Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767
[firebird-support] Single trans per connection?
Hi, Please remind me, is it the case that you can only have a single active transaction per connection? But you can have any number of commands/queries open for that single transaction and connection? This is in .Net and I'm using the FB provider version 2.6 or 2.7 I think. Kjell -- -- Kjell Rilbe DataDIA AB E-post: kj...@datadia.se Telefon: 08-761 06 55 Mobil: 0733-44 24 64
[firebird-support] FK violation when creating FK, but tables are empty!
Hi all, I'm trying to create a Foreign Key Constraint and I'm getting the following error: violation of FOREIGN KEY constraint FK_LOG_ITEM_LOG on table LOG_ITEM Foreign key reference target does not exist However, both tables LOG (master) and LOG_ITEM (detail) are empty! Statement: ALTER TABLE LOG_ITEM ADD CONSTRAINT FK_LOG_ITEM_LOG FOREIGN KEY (LOGID) REFERENCES LOG (LOGID) ON DELETE CASCADE ON UPDATE NO ACTION Firebird version: WI-V6.3.0.26074 Firebird 2.5 Any clue? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird!
Re: [firebird-support] Single trans per connection?
On Fri, 8 Jun 2012 11:45:01 +0200, Kjell Rilbe kjell.ri...@datadia.se wrote: Hi, Please remind me, is it the case that you can only have a single active transaction per connection? Technically Firebird allows you to use multiple, concurrent transaction on a single connection, however not all drivers will expose it (eg Jaybird doesn't do this as the JDBC spec specifies a single active transaction on a connection). But you can have any number of commands/queries open for that single transaction and connection? Yes This is in .Net and I'm using the FB provider version 2.6 or 2.7 I think. Not sure, you might want to try the .NET provider mailinglist. Mark
Re: [firebird-support] FK violation when creating FK, but tables are empty!
On Fri, 8 Jun 2012 11:53:01 +0200, Martijn Tonies m.ton...@upscene.com wrote: Hi all, I'm trying to create a Foreign Key Constraint and I'm getting the following error: violation of FOREIGN KEY constraint FK_LOG_ITEM_LOG on table LOG_ITEM Foreign key reference target does not exist However, both tables LOG (master) and LOG_ITEM (detail) are empty! Statement: ALTER TABLE LOG_ITEM ADD CONSTRAINT FK_LOG_ITEM_LOG FOREIGN KEY (LOGID) REFERENCES LOG (LOGID) ON DELETE CASCADE ON UPDATE NO ACTION Firebird version: WI-V6.3.0.26074 Firebird 2.5 Any clue? Doesn't this error indicate that the table or column you are referencing doesn't exist? Did you commit the LOG table, is the table actually called LOG, and not Log, does the column LOGID exist? Mark
Re: [firebird-support] Single trans per connection?
At 09:45 PM 8/06/2012, Kjell Rilbe wrote: Hi, Please remind me, is it the case that you can only have a single active transaction per connection? Absolutely not the case! But you can have any number of commands/queries open for that single transaction and connection? You can have any number of transactions running in one connection. You can have any number of active statements in any transaction. For example, for an interactive program you usually need to have long-living selector sets running in read-only read committed transactions, while you want rapid-fire, high contention modification work in read-write snapshot transactions...and so on. This is in .Net and I'm using the FB provider version 2.6 or 2.7 I think. What any API host language interface supports (or not) is the business of client application, i.e., what the HL interface supports isn't always the whole of the API. The BDE, for example, dragged the InterBase API down about as low as it would go, to make it seem like Paradox or dBase III to the developers of early Delphi and C++Buillder. And the situation with the BDE is one connection, one transaction and autocommit on every operation. (Yep, I was alive in those days!) So your question is for the firebird-net-provider list. I'd be extremely surprised if, this far on in its life, the .net provider didn't fully support the Firebird API. ./heLen Kjell -- -- Kjell Rilbe DataDIA AB E-post: kj...@datadia.se Telefon: 08-761 06 55 Mobil: 0733-44 24 64 ++ 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
Re: [firebird-support] FK violation when creating FK, but tables are empty!
Hello Mark, I'm trying to create a Foreign Key Constraint and I'm getting the following error: violation of FOREIGN KEY constraint FK_LOG_ITEM_LOG on table LOG_ITEM Foreign key reference target does not exist However, both tables LOG (master) and LOG_ITEM (detail) are empty! Statement: ALTER TABLE LOG_ITEM ADD CONSTRAINT FK_LOG_ITEM_LOG FOREIGN KEY (LOGID) REFERENCES LOG (LOGID) ON DELETE CASCADE ON UPDATE NO ACTION Firebird version: WI-V6.3.0.26074 Firebird 2.5 Any clue? Doesn't this error indicate that the table or column you are referencing doesn't exist? Did you commit the LOG table, is the table actually called LOG, and not Log, does the column LOGID exist? The table is LOG, with column LOGID as the PK. Unknown columns gets error: unsuccessful metadata update could not find UNIQUE or PRIMARY KEY constraint in table LOG with specified columns Unknown table gets error: unsuccessful metadata update Table LOG2 not found The statement was generated by Database Workbench, I added quotes because I thought maybe there was a bug in DBW and it would help, same result though. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird!
Re: [firebird-support] FK violation when creating FK, but tables are empty!
I'm trying to create a Foreign Key Constraint and I'm getting the following error: violation of FOREIGN KEY constraint FK_LOG_ITEM_LOG on table LOG_ITEM Foreign key reference target does not exist However, both tables LOG (master) and LOG_ITEM (detail) are empty! Statement: ALTER TABLE LOG_ITEM ADD CONSTRAINT FK_LOG_ITEM_LOG FOREIGN KEY (LOGID) REFERENCES LOG (LOGID) ON DELETE CASCADE ON UPDATE NO ACTION Firebird version: WI-V6.3.0.26074 Firebird 2.5 Any clue? At 09:59 PM 8/06/2012, Mark Rotteveel wrote: Doesn't this error indicate that the table or column you are referencing doesn't exist? Did you commit the LOG table, is the table actually called LOG, and not Log, does the column LOGID exist? Or could be there's no PK or unique constraint on LOG.LOGID. no, generated statement based on selecting the constraint from a drop down box. ;) With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird!
solved Re: [firebird-support] FK violation when creating FK, but tables are empty!
That is, more or less. I restarted Firebird, problem is gone. Even though I already did a sweep and everything, it sounds like there was some kind of left over transaction or something? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird!
Re: [firebird-support] Single trans per connection?
Den 2012-06-08 12:04 skrev Helen Borrie såhär: your question is for the firebird-net-provider list. I'd be extremely surprised if, this far on in its life, the .net provider didn't fully support the Firebird API. Well, it actually does seem like concurrent transactions are NOT supported, as per version 2.6.5. That's what it actually says in the exception I get when calling FbConnection.Begintransaction while my first transaction is active. Oh well... Kjell -- -- Kjell Rilbe DataDIA AB E-post: kj...@datadia.se Telefon: 08-761 06 55 Mobil: 0733-44 24 64 [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] help with stored procedure: SYNTAX error
Dear List Please help me understand where I am going wrong with creating the following procedure: SET TERM ^ ; CREATE PROCEDURE TestProc ( CatName CHAR(15) ) AS BEGIN select cast('Now' as time) as TIME from rdb$database; END^ SET TERM ; ^ Engine Code: 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 7, column 57 ; Firebird 2.5.1 on Windows (SuperClassic) Many thanks
RE: [firebird-support] help with stored procedure: SYNTAX error
Dear List Please help me understand where I am going wrong with creating the following procedure: ... CREATE PROCEDURE TestProc ... select cast('Now' as time) as TIME from rdb$database; ... Token unknown - line 7, column 57 ; What should Firebird do with TIME? You simply need an INTO clause and a local variable or return parameter before the semicolon. HTH, Set
Re: [firebird-support] help with stored procedure: SYNTAX error
Hi, Please help me understand where I am going wrong with creating the following procedure: SET TERM ^ ; CREATE PROCEDURE TestProc ( CatName CHAR(15) ) AS BEGIN select cast('Now' as time) as TIME from rdb$database; END^ SET TERM ; ^ Engine Code: 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 7, column 57 ; Firebird 2.5.1 on Windows (SuperClassic) A SELECT statement needs an INTO clause (into variables/(output) parameters). With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird!
Re: [firebird-support] help with stored procedure: SYNTAX error
On Fri, Jun 8, 2012 at 7:37 AM, ktadimeti tadimetikes...@yahoo.com wrote: ** Dear List Please help me understand where I am going wrong with creating the following procedure: SET TERM ^ ; CREATE PROCEDURE TestProc ( CatName CHAR(15) ) AS BEGIN select cast('Now' as time) as TIME from rdb$database; END^ SET TERM ; ^ Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 7, column 57 ; Firebird 2.5.1 on Windows (SuperClassic) Many thanks Hi there, Your stored procedure does nothing. If you want to return a time you could try the following: SET TERM ^ ; create or alter procedure TEST_TIME returns ( the_time time) as begin the_time = Current_Time; end^ SET TERM ; ^ [Non-text portions of this message have been removed]
[firebird-support] Re: Server
--- In firebird-support@yahoogroups.com, Michael Vilhelmsen wrote: Ah - you are right :) Its the amount of start/commit I was referring to. My bad. Statistics are as of now: Database E:\DB\OCCeasyPos.Fdb Database header page information: Flags 0 Checksum12345 Generation 55467812 Page size 4096 ODS version 11.1 Oldest transaction 54691256 Oldest active 55360946 Oldest snapshot 55360946 Next transaction55467714 Next - OIT = 776458, i.e. every snapshot (concurrency) transaction requires ~192KB for private TIP snapshot. Also, at transaction start, it should read 48 TIP pages to build that private TIP snapshot. You should sweep database fromt time to time to unstuck OIT. Look also at Next - OAT = 106768, it show that there are long running transaction(s) present. Look at MON$TRANSACTION for tx 55360946 to see what is it and fix application which was started it. Good luck, Vlad
[firebird-support] SOLVED (was Re: help with stored procedure: SYNTAX error)
--- In firebird-support@yahoogroups.com, ktadimeti tadimetikeshav@... wrote: Dear List Please help me understand where I am going wrong with creating the following procedure: SET TERM ^ ; CREATE PROCEDURE TestProc ( CatName CHAR(15) ) AS BEGIN select cast('Now' as time) as TIME from rdb$database; END^ SET TERM ; ^ Engine Code: 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 7, column 57 ; Firebird 2.5.1 on Windows (SuperClassic) Many thanks Thanks Svein and Martjin. I am slowly picking up Firebird.
[firebird-support] Re: help with stored procedure: SYNTAX error
Thanks Thomas! --- In firebird-support@yahoogroups.com, Thomas Clarke thomas.p.clarke@... wrote: On Fri, Jun 8, 2012 at 7:37 AM, ktadimeti tadimetikeshav@... wrote: ** Dear List Please help me understand where I am going wrong with creating the following procedure: SET TERM ^ ; CREATE PROCEDURE TestProc ( CatName CHAR(15) ) AS BEGIN select cast('Now' as time) as TIME from rdb$database; END^ SET TERM ; ^ Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 7, column 57 ; Firebird 2.5.1 on Windows (SuperClassic) Many thanks Hi there, Your stored procedure does nothing. If you want to return a time you could try the following: SET TERM ^ ; create or alter procedure TEST_TIME returns ( the_time time) as begin the_time = Current_Time; end^ SET TERM ; ^ [Non-text portions of this message have been removed]
Re: [firebird-support] Single trans per connection?
On Fri, Jun 8, 2012 at 7:46 AM, Michael Ludwig mil...@gmx.de wrote: Kjell Rilbe schrieb am 08.06.2012 um 13:06 (+0200): Den 2012-06-08 12:04 skrev Helen Borrie såhär: the .net provider [ ] the Firebird API. Well, it actually does seem like concurrent transactions are NOT supported, as per version 2.6.5. That's what it actually says in the exception I get when calling FbConnection.Begintransaction while my first transaction is active. User Bill Karwin on StackOverflow.com: [ ] most database brands don't support multiple concurrent transactions on a single connection (InterBase/Firebird is the only exception I know of). Over their long lives, Firebird and InterBase have grown several layers of interfaces. In the very old days, the normal programming language was not SQL, but GDML - similar to a language Jim wrote at DEC called Datatrieve and another language he wrote at CCA called Data Language. GDML allowed you to qualify statements with transaction names and connections. At that time, we implemented only a pure subset of SQL, so the SQL side of the product, including the dynamic SQL interface, never allowed concurrent transactions on a single connection. What this history means is that the engine is inherently capable of handling concurrent transactions in a connection but there is no way to use them and the interface layers that surround the engine don't support the capability. The requirement for multiple transactions per connection came when a connection was very heavy-weight relative to a transaction. I'm not convinced that's the case now. Good luck, Ann [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] URGENT: Invalid request BLR
Thomas, What can you expect if Firebird needs temporary disk space which isn't available to create/activate an index? I expect the statement to fail but but not corrupt the state of the database. Similarly to how a query with a large sort would fail if there is not enough disk space for the temporary sort file and doesn't corrupt the database. Thanks, Alec [Non-text portions of this message have been removed]
Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE
Thanks Vlad, but this is too complicated to give as a guidance to our customers. However, it sounds like rebuilding an index cannot require more space that the database size itself, right? On Fri, Jun 8, 2012 at 7:22 AM, hvlad hv...@users.sourceforge.net wrote: ** --- In firebird-support@yahoogroups.com, Alec Swan wrote: My main question is how can we calculate the temp sort space required to ALTER INDEX ACTIVE (on all indexes serially) given the size of the database? Is twice the size of the database a good upper bound? Enumerate all fields in index, calculate summa of full size of every field (for [var]char(N) it is N * bytes_per_char, for ex.), add extra 8 bytes (for record number) - this is sort record size. Multiply it by number of records and you'll get a lower estimate of temp space required. Substract value of TempCacheLimit and you'll get estimate of disk space required. Regards, Vlad [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] Re: TempDirectories and ALTER INDEX ACTIVE
On Fri, Jun 8, 2012 at 11:24 AM, Alec Swan alecs...@gmail.com wrote: Thanks Vlad, but this is too complicated to give as a guidance to our customers. However, it sounds like rebuilding an index cannot require more space that the database size itself, right? On a bad day, yes it could. To have a day that bad, you'd have to have keys that are most of the size of the record, with columns that are often null, zero, or contain values much smaller than the declared size of the column. There may be a situation during the merge phase of the sort when there's more than one copy of each record. Good luck, Ann [Non-text portions of this message have been removed]
RE: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE
Alex, However, it sounds like rebuilding an index cannot require more space that the database size itself, right? Correct, in order to build the index, the engine must build and sort a projection of the index values. So, if you build an index on a string [say varchar(100)] column which is only sparsely populated (avg usage = 10 char) then it is reasonable/expected that the index will be much larger than the war data storage. Sean
[firebird-support] Re: How to shorten =================================== between header and data rows?
thx it works again! but when it comes to INTEGER or SMALLINT type, it won't work again. for example, ii INTEGER Not Null; si SMALLINT Not Null; set width ii 4; set width si 2; select ii, si from test; ii si == === 1001 1 ii and si displays 10 chars and 7 chars. I want them to be 4 chars and 2 chars like ii si == 1001 1 is this again possible? thx a lot HR --- In firebird-support@yahoogroups.com, Norman Dunbar Norman@... wrote: Sorry typo, Set width LFN 10; select long_field_name LFN from test; // = display 10 chars Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767