on 2012 Mar 15 8:59 AM
Hello,
Is it possible in SQL Anywhere 12 to temporarily disable connections to SA12 for non-DBA users (without simply deleting users)? The goal is to disable connections other than the one who is unloading/reloading database.
Request clarification before answering.
The easiest way to do this is
install a login procedure ( see this question or this question or the docs ) that selectively disables new connection - your condition within the login procedure will need to be revised (from what is posted in the pages that I have listed) to suit your requirements, and then
drop all of the users that you don't want connected while you do the operation
When you are finished your unload/reload you will want to reenable connections in your login procedure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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".)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see also the question How to limit the remote access to the database server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've already thought about such approach of migration after this topic.
This time the goal was just to find out the easiest or fastest way (or ways) to disable other connections. That can be used not only when unloading/reloading but also when validating databases as I prefer using Sybase Central or SQL statements instead of command line tools.
User | Count |
---|---|
46 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.