Hi, I am trying to write a bash or PHP script that will execute a procedure on a MS-SQL server, does anybody have pointers on how to do that in the most easiest and convenient way? The script will run on a separate Linux box.
Thanks.
Hi, I am trying to write a bash or PHP script that will execute a procedure on a MS-SQL server, does anybody have pointers on how to do that in the most easiest and convenient way? The script will run on a separate Linux box.
Thanks.
Installing the php mssql drivers (on Linux) can become a real pain. Just take that in mind.
We had to deal with a hosting company, which refused to install them. I ended up with a wcf service (installed as a windows service) on the sql server machine, which just invokes the sp and a simple http request from the php script. I think it is quite cool actually.
I realize that a lot of people would qualify that as an absolute overkill, but there is no doubt that an http request can be performed from a lot of devices and platforms. You don't have to install the sql drivers on every machine and platform you need to execute the sp.
That way you don't have to 'open' the sql server for remote connections, but you host wcf service (which is not more secure or anything... just a difference, some people get crazy when hear about allowing sql remote connections)