How to separate write and read for sql database?
huzhiqi
Member ✭
I have four vm,it is three microsoft sql server 2012 and one microsoft AD,three sql sever auto synchronize date with always on mode.
I want to separate write action and read action to different sql server,for example,If I execute select command,A10 will forward the query to read sql server,if I execute write/update/delete/others command, A10 will forward the query to write sql server.
I know we need design a aFlex scrite to achieve the requirement,but how?
Tagged:
0
Comments
This is from the SLB admin guide and seems to follow your use-case. Perhaps this can get you started?
I configured VIP with protocol of mssql,did not bind the aFlex,just load balancing.
When I Connected VIP of SQL server with a tool named navicat,it showing 'Protocol error in TDS stream'.
But when I connected VIP of SQL server with a tool named SQLdbx,it showing login success.
I guess,it may be the reason of version,different version can't compatible.
How to fix this issue?
Sorry I'm not sure on that one. Perhaps the Navicat connection was sent to a different back end server than SQLdbx?
Yeah,maybe it is the reason,different tools connected with different way.When login,the SQLdbx just uses query operation,Microsoft management uses query and write operation,navicat maybe uses query and write operation.But how to fix this issue?