preventing users from using the texis DBs

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

preventing users from using the texis DBs

Post by barry.marcus »

I've built a process that synchronizes the daily changes to certain tables in our Texis databases. For a correct outcome its essential that no one make any changes to the data in tables while the process is running, so I'm looking for a way to a) kill current connections to the DBs and b) prevent users from reconnecting until the sync process is complete. I've looked at the documentation for texisd, and am wondering if looking further into this is a good way to go. If not, perhaps someone can provide a better suggestion. If it is a good way to go, I have a number of questions:

While there is reference in the documentation to the /tmp directory, there is no mention of the Windows analog to this. Is texisd used/usable in a Windows environment?

Can texisd be used in a script to kill the Texis server (i.e., with texisd -k)? Wouldn't the script that calls it then be killed, too? (Maybe I'm confused, or thinking about this the wrong way!?!)

Do I understand correctly that if texisd is started by a non-root (or the equivalent Windows non-administrator) user, then only users with the same permissions as that user may subsequently log in. It seems that by correctly managing the permissions of the user under which the script runs, that this could be used to prevent other logins while the script is running. If this is the case, then how do I put things back the way they were AFTER the script finishes, if the user running the script is NOT root/Administrator?

These are the first few questions I have. I'm sure I'll have others. Again, I realize I may be completely in choosing the best approach to solving this. If so, I look forward to being enlightened!

Thanks.
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

preventing users from using the texis DBs

Post by John »

It sounds like the lockandrun program might be what you are looking for, it will get a read lock on all tables to prevent updates, but still allow reads, and then executes a command, and unlocks when that command completes.

http://www.thunderstone.com/site/texism ... ndrun.html
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

preventing users from using the texis DBs

Post by mark »

Unless you're using the Texis C network api, timportn, or copydb you can pretty much forget about texisd as it's not used otherwise.

There's the lockandrun utility to lock a db for backup etc.

Or you can handle it at the application level having your script(s) check for some lock file or such indicating to them to wait or quit rather than proceeding.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

preventing users from using the texis DBs

Post by barry.marcus »

Thanks. It sounds like I WAS barking up the wrong tree with texisd. I will give lockandrun a try.
Post Reply