In my application I am trying to add a column to the table, I will be using the column as unique identifier to update the other columns of the table.
In order to do that, i am locking the table in exclusive mode and then adding the new column UNIQ_ID. I am getting the below error while trying to alter the table.
Update Query : LOCK TABLE PUB."customer" IN EXCLUSIVE MODEUpdate Query : ALTER TABLE PUB."customer" ADD (UNIQ_ID integer)java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Failure getting table lock on table PUB._File.
what am I missing here?
are these queries in same transaction? Could you please check record locks in promon before executing these queries?
sjardosh Yes..all the queries are in the same transaction. before executing these queries record lock is not ther..
Making online schema changes in OE isn't quite the same as with other databases. Quite a bit depends on your exact version of OE, if the table is SQL or ABL (yours is ABL) and if other users are connected to the database at the same time (and what they are doing).
there will be only one user connected to the database. the OE version is v11.6. i am using java database connectivity - openedge.jar.
You keep asking what you are missing - can't help but mention: you appear to me like a person that has a Prius in the driveway and desperately tries to tie some horses in front of it so he can go to the grocery store! :)
I'd suggest instead of spending all that time and effort in doing what you're trying to do using whatever tool you are using, to rather look into the whole OpenEdge tool, check out the ABL, and get your project done in no time... :)
But, hey, horse drawn Prius is surely a nice picture, too...
SMAT-Tools - Web-Apps with RollBase simpleness, ABL flexibility and power