Skip to Content

Configuring Logical Server Policies


In this doc we will discuss two scenario. In first scenario Coordinator is not a member of logical server and in second scenario, we Coordinator  as member in the logical Server.

1. First Scenario:


            Vicky_iq0801c(Coordinator) , Vicky_iq0801q1 and Vicky _iq0801q2 Writers.

$ dbisql -c 'uid=DBA;pwd=sql;eng=vicky_iq0801c' -nogui

(DBA)> create user testusr1 identified by sql

Execution time: 0.141 seconds

(DBA)> create logical server ls1 membership(vicky_iq0801q1,vicky_iqsp0801q2)  ------Create logical server ls1

(DBA)> create ls policy lsp1  REDIRECTION_WAITERS_THRESHOLD=3 LOGIN_REDIRECTION=ON ; -------Create ls policy lsp1

Execution time: 0.138 seconds

(DBA)> alter logical server ls1 policy lsp1 ----------> Assign ls policy lsp1 to logical server ls1

Execution time: 0.148 seconds

(DBA)> create login policy lp1 DEFAULT_LOGICAL_SERVER=SERVER MAX_CONNECTIONS=100;  ---------Create login policy lp1

Execution time: 0.161 seconds

(DBA)> alter login policy lp1  add logical server ls1 --------assign logical server ls1 to login policy lp1

Execution time: 0.129 seconds


$ dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c' -nogui



[q2]$ dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c;Ls=ls1;NODETYPE=WRITER'  –nogui

Could not connect to the database.---------------Expected error, because login policy lp1 haven't assigned user testusr1

Connection disallowed by login policy for this user

SQLCODE=-1212, ODBC 3 State="HY000"

---Now assign login policy lp1 to testusr1

dbisql -c 'uid=DBA;pwd=sql;eng=vicky_iq0801c' -nogui

(DBA)> alter user testusr1 login policy lp1

Execution time: 0.182 seconds



dbisql -c 'uid=testusr1;pwd=sql;eng=vicky_iq0801c;Ls=ls1;NODETYPE=WRITER'  -nogui

(testusr1)> quit

2. Second Scenario

                     Vicky_iq0801c(Coordinator) , Vicky_iq0801q1

(DBA)> create user testusr4 identified by sql
Execution time: 0.187 seconds

(DBA)> create logical server ls3 membership (vicky_iq0801c,vicky_iq0801q1) -------create logical server ls3
Execution time: 0.149 seconds

(DBA)> create ls policy lsp3 REDIRECTION_WAITERS_THRESHOLD=3 LOGIN_REDIRECTION=ON;--------create login policy lsp3
Execution time: 0.136 seconds

(DBA)> alter logical server  ls3 policy lsp3--------assign ls policy lsp3 to logical server ls3
Execution time: 0.138 seconds

(DBA)> create login policy lp3 DEFAULT_LOGICAL_SERVER=SERVER MAX_CONNECTIONS=100 ---------create login policy lp3

Execution time: 0.135 seconds

(DBA)> alter login policy lp3 add logical server ls3-------Assign logical server ls3 to login policy lp3
Execution time: 0.151 seconds

(DBA)> alter user testusr4 login policy lp3-------Assign login policy lp3 to user testusr4
Execution time: 0.203 seconds

$ dbisql -c 'uid=testusr4;pwd=sql;eng=vicky_iq0801c;Ls=ls3;NODETYPE=WRITER' -nogui

(testusr4)> quit