It is well known that updating a CDX of a table needs to be done while having exclusive access to a table. I don't know if there is a way around this, but if there is, I would love to know about it.
What occurred to me is that while many users are in a certain table, adding and editing records, the added ones are having their indexes updated while not having exclusive access. I wonder why it works this way but does not enable separate updating of the CDX while another session is open.
I noticed one way to get around this is to copy the DBF and CDX somewhere else, open it exclusively, update the CDX, then copy the CDX back to the original location. This results in a de facto updating of the CDX while other users are in. Sure, there are risks if anyone was about to add a new record when you removed the DBF and CDX, but I'm thinking more about a situation where you want to update the CDX in off hours but someone(s) left the table open on their desktop. If you can't force that session closed, then the technique of copying back the CDX after separately updating it elsewhere is a way.
My question is whether there is an easier way to handle this situation. That is, someone on the network has a table open, and you want to update the index file. I can understand why you would not be able to, say, restructure the table in this situation, but again, if a CDX can update itself while several users are open and a user adds a record, why not have the ability to separately update the CDX while multiple sessions are open.
Thank you if you have insight into this.
Jeff Fried
What occurred to me is that while many users are in a certain table, adding and editing records, the added ones are having their indexes updated while not having exclusive access. I wonder why it works this way but does not enable separate updating of the CDX while another session is open.
I noticed one way to get around this is to copy the DBF and CDX somewhere else, open it exclusively, update the CDX, then copy the CDX back to the original location. This results in a de facto updating of the CDX while other users are in. Sure, there are risks if anyone was about to add a new record when you removed the DBF and CDX, but I'm thinking more about a situation where you want to update the CDX in off hours but someone(s) left the table open on their desktop. If you can't force that session closed, then the technique of copying back the CDX after separately updating it elsewhere is a way.
My question is whether there is an easier way to handle this situation. That is, someone on the network has a table open, and you want to update the index file. I can understand why you would not be able to, say, restructure the table in this situation, but again, if a CDX can update itself while several users are open and a user adds a record, why not have the ability to separately update the CDX while multiple sessions are open.
Thank you if you have insight into this.
Jeff Fried
Comment