Forum Discussion

Jeff_Nyquist_44's avatar
Jeff_Nyquist_44
Icon for Nimbostratus rankNimbostratus
Mar 26, 2010

MS SQL Database Redirect

I have a problem that I am wondering if iRules can assist with.

 

 

We have a MS SQL server running 120-150 databases. Unfortunately, we only have a single generic "token" that the development teams have been using to call the SQL server. For lots of reasons, it would be helpful to be able to move those databases around behind the scenes, but since the token only points to a server name, we're very stuck without rewriting a lot of code.

 

 

Can I create a VIP for the SQL server and have iRules redirect SQL server traffic to various backend servers based on an incoming database request?

 

 

Hopefully this makes sense... any help would be greatly appreciated. Thanks!

 

 

Jeff

2 Replies

  • Jeff: this is an extremely tricky problem to solve in a robust way with the LTM alone. There are several other posts on this topic, and when it comes to actually switching on SQL statements it becomes extremely difficult.

     

     

    -Matt
  • I am not MSSQL export so I might be wrong.

     

    I think this might be possible if you just want to balance based on tcp connection (not by request inside tcp connection) and there is unique information in pre-login message (assume it is TDS protocol). you may take packet capture and check first tcp payload from client to find unique information (for example, database instance name)

     

     

    btw, I am not sure what do you mean by generic "token". could you provide more information? how does client connect to database?