Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
Possiblebug when creating a database schema from a SP |
Sat, Jun 30 2007 6:43 AM | Permanent Link |
"Felix Gartsman" | Hello,
To create a database schema at run-time, I load a stored procedure sql (generated by EDB manager) and execute it. But if a table has more than 1 additional index I get error #300 for that table (failed exclusive locking). Code: EXECUTE IMMEDIATE 'CREATE TABLE "Hazmats" ( "HazmatName" VARCHAR(50) COLLATE "ANSI" NOT NULL, "HazmatId" VARCHAR(50) COLLATE "ANSI", "HazmatUNNumber" CHAR(4) COLLATE "ANSI", "HazmatClass1" CHAR(6) COLLATE "ANSI", "HazmatClass2" CHAR(6) COLLATE "ANSI", "HazmatLastUpdate" TIMESTAMP, "HazmatUser" BOOLEAN, CONSTRAINT "PK_HazmatName" PRIMARY KEY ("HazmatName"), CONSTRAINT "U_HazmatId" UNIQUE ("HazmatId") ) VERSION 1 UNENCRYPTED INDEX PAGE SIZE 4096 BLOB BLOCK SIZE 512 MAX ROW BUFFER SIZE 32768 MAX INDEX BUFFER SIZE 65536 MAX BLOB BUFFER SIZE 32768'; EXECUTE IMMEDIATE 'CREATE INDEX "Ix_HazmatUNNumber" ON "Hazmats" ("HazmatUNNumber" COLLATE "ANSI")'; EXECUTE IMMEDIATE 'CREATE INDEX "Ix_HazmatUser" ON "Hazmats" ("HazmatUser")'; If I comment the last statement it works. Running the code in EDB manager always works, and my application rarely also works!?! Maybe some race? Felix. |
Mon, Jul 2 2007 11:53 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Felix,
<< If I comment the last statement it works. Running the code in EDB manager always works, and my application rarely also works!?! Maybe some race? >> If the code works in the EDB Manager, then most likely the situation has to do with your application having a table open that EDB needs to open exclusively. If you have a sample project that reproduces the issue, I can show where the problem is. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 3 2007 7:44 AM | Permanent Link |
"Felix Gartsman" | I attach a sample project that shows it. After some playing I found that
setting session's KeepTablesOpen to false fixes it, while true fails to lock. Is it expected? "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:BBAE4AAE-76C0-4D6E-AF9D-D7AF22D8B750@news.elevatesoft.com... > Felix, > > << If I comment the last statement it works. Running the code in EDB > manager always works, and my application rarely also works!?! Maybe some > race? >> > > If the code works in the EDB Manager, then most likely the situation has > to do with your application having a table open that EDB needs to open > exclusively. If you have a sample project that reproduces the issue, I > can show where the problem is. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > Attachments: DBTest2.zip |
Wed, Jul 4 2007 2:21 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Felix,
<< I attach a sample project that shows it. After some playing I found that setting session's KeepTablesOpen to false fixes it, while true fails to lock. Is it expected? >> Yep, it's a bug. Exclusively-opened tables should not be kept open irregardless of the KeepTablesOpen property setting. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |