cushy-tech on Mon, 27 Aug 2012 03:04:45


I am working to convert some PHP/Java web apps to use SQL Azure-- currently they use MySQL.

Microsoft provides a converter to convert a MySQL database to SQL Server so db conversion is not a problem

What I am concerned about is the code conversion--

Even here, from what I see (in PHP)-- mostly the change to be made to php code is the name of the function that actually makes the call.

But am I correct? Are the code changes in PHP much more than cosmetic? And also what about code changes that may need to be made to the PHP code to take federation into account?

The same concerns are also applicable for the java apps that I want to convert to use SQL server with federation--

(a) What are the typical java code changes

(b) How and in what ways does federation affect java code.

(c) If a library like hibernate is used- I understand that the config file for hibernate has to be changed-- but how does federation affect the code?




Dilkush Patel on Thu, 21 Mar 2013 11:29:32

Hi Arvind,

Typical java code changes includes using latest driver for SQL server as previously you must be using MySQL driver.

Use DSN connection if possible and use SQL native Client 11.0

Also most of the function calls should remain same if i'm not wrong queries will change.

regarding federation you need to make sure you take care of data range while adding data to federated tables else it will error out.

So it will need extra coding at application level.

I haven't used hibernate so won't be able to answer much on hat side but again as it comes to federation you need to make sure you add record to shard in which it belongs to.

When you use federation it involved one more command where first you connect to federation and then you connect to particular range in federation and i don't think so hibernate will do that by defauly you need make sure you do this using custom coding.