Hello, |
The easiest way to do this is
When you are finished your unload/reload you will want to reenable connections in your login procedure. Comment Text Removed
Thank you all for the answers. This approach seems to be the most applicable for us.
(16 Mar '12, 07:15)
Arthoor
|
Confine the FAQ, that deals with a similar problem - though I do not know what exactly do you mean by "disable connections" without dropping them? How to get full control over a SQL Anywhere server? Basically, you will need to call call sa_server_option('ConnsDisabled', 'YES') or call sa_server_option('ConnsDisabledForDB', 'YES') to disable new connections temporarily to the server (or database), and will have to drop existing connections (I don't think there's a way to simply "disable" them - however, you might set their priority to "Background".) I had in mind "without simply deleting users from the database".
(15 Mar '12, 09:23)
Arthoor
Replies hidden
Ah, I should have read better...then I guess the cited solutions are "simpler/better" than than approach:)
(15 Mar '12, 09:30)
Volker Barth
|
As you state that the requirement to have just an exclusive connection is during unload/reload, I do assume that you are about to rebuild or migrate a big database, and you cannot afford to have the database unavailable for that timespan. (I do assume that as it is much easier to simply take down the database, do the rebuild/migration, and make the new database available again.) If my assumptions are true, a different approach which doesn't need to explicitly disconnecting users, is as following:
I've already thought about such approach of migration after this topic.
(19 Mar '12, 02:12)
Arthoor
Replies hidden
FWIW, the maintenance plans one can create with Sybase Central can be used to do scheduled validation (by creating according events), and that does include the disabling of new connections (but does not drop existing ones)... just as a hint, if you prefer GUI-based solutions:)
(19 Mar '12, 04:54)
Volker Barth
|