Hi,
You can enable and disable users to connect to a specific multiplex server.
It's a different way to control the connection by version. (IQ15.2 and below versus IQ15.4 and above)
Login policies control the capabilities of users and connections to a database.
1. In case of IQ15.2 and below.
The following statement creates a login policy called Reader1OnlyPolicy.
By default, this policy prohibits access to servers:
1) This statement allows holders of Reader1OnlyPolicy to access only server Reader1:
- CREATE LOGIN POLICY Reader1OnlyPolicy
LOCKED=ON;
2) UserA is allowed to log in only on Reader1 and not on any other server in the multiplex:
- ALTER LOGIN POLICY Reader1OnlyPolicy
LOCKED=OFF MULTIPLEX SERVER Reader1;
ALTER USER UserA LOGIN POLICY
Reader1OnlyPolicy ;
2. In case of IQ15.4 and above.
In a multiplex, login policies control access to logical servers.
All users of a login policy can only access those multiplex servers that are effective members of the assigned logical servers.
When you connect to a multiplex server, logical server context of the connection is determined based on the effective logical server assignment of the
user's login policy and the current node.
1) creates a user-defined logical server TEST_LS with multiplex nodes as its members:
In case of coordinator, ... MEMBERSHIP (FOR LOGICAL COORDINATOR)
- CREATE LOGICAL SERVER TEST_LS MEMBERSHIP (MPX154_W1);
2) creates the login policy with locked is "off".
- create login policy test_login_policy
locked=off;
3) This statement allows access of logical servers TEST_LS from login policy test_login_policy.
- alter login policy test_login_policy set logical server TEST_LS;
4) UserA is allowed to log in only on Reader1 and not on any other server in the multiplex:
4-1) If UserA is not created,
- sp_iqaddlogin 'UserA', 'sybase','OFF', 'test_login_policy';
4-2) If UserA is created,
- sp_iqmodifylogin 'UserA','test_login_policy';
See Also
1. Logical Server Configuration
- http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01771.1603/doc/html/san1283555365297.html
2. Multiplex extensions to login policy DDL
- http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00802.1520/html/iqmpx/iqmpx44.htm
3. Creating a Login Policy for a Multiplex
- http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01267.0327/doc/html/jcu1281720659819.html
4. Related System Tables
- SYSIQLOGICALSERVER
- SYSIQLSMEMBERS
- SYSLOGINPOLICY
- SYSLOGINPOLICYOPTION
- SYSIQLSLOGINPOLICIES
Thanks,
Gi-Sung Jang