PDA

View Full Version : Mssql


starfighter
05-12-2004, 08:35 PM
Anyone have any idea on how to connect from our servers to a mssql server and build a query that will extract all of the data within the database that the data that im looking for resides in. There are supposed to be several tables in theis database and i will need to grab all of them and once i have them turn around and dump it into a database on my account.


Dan

eugene
05-12-2004, 10:34 PM
Hmmm... It all depends on how the other site has it set up. Some servers restrict DB access to localhost. If that is not the case, it should be pretty straightforward.

starfighter
05-13-2004, 12:47 AM
Originally posted by eugene@May 13 2004, 01:34 AM
Hmmm... It all depends on how the other site has it set up. Some servers restrict DB access to localhost. If that is not the case, it should be pretty straightforward.
The server is open to outside access, its made for others to get into it remotely and extract data. I'm doing this for my parents to help them with the family real estate business which they inherited from my grandparents and im now realizing just how much i dont know about getting data off of a MS server. Now if it was just a mysql server, the whole thing would be a lot easier, but then solving the hard stuff is why we get paid to do this stuff.


Dan

eugene
05-13-2004, 01:55 AM
Well, you could connect either via php (or some other server-side software) or through your local box.
Is this a one-time deal, or an ongoing issue? If one-time, it might be easiest to pull the data down to a local box and then upload it to the hostpc server. On the other hand, if you need periodic updating and querying you may have little choice but to implement the sync in perl, python, c++, or php.

eugene
05-13-2004, 02:07 AM
PHP:
To use the MSSQL extension on our HostPC servers, you need to build and install the FreeTDS library. http://www.freetds.org/ And then enable the extension by adding extension=php_mssql.so to php.ini.

A good reference: http://www.php.net/mssql

Another package to consider is ODBTP http://odbtp.sourceforge.net/ .

Guest
05-13-2004, 10:27 AM
Originally posted by eugene@May 13 2004, 12:07 AM
PHP:
To use the MSSQL extension on our HostPC servers, you need to build and install the FreeTDS library. http://www.freetds.org/ And then enable the extension by adding extension=php_mssql.so to php.ini.

A good reference: http://www.php.net/mssql

Another package to consider is ODBTP http://odbtp.sourceforge.net/ .
Joe,
Can I do the steps Eugene mentions or do you have to do this???


Dan

Guest
05-13-2004, 10:37 AM
Originally posted by eugene@May 12 2004, 11:55 PM
Well, you could connect either via php (or some other server-side software) or through your local box.
Is this a one-time deal, or an ongoing issue? If one-time, it might be easiest to pull the data down to a local box and then upload it to the hostpc server. On the other hand, if you need periodic updating and querying you may have little choice but to implement the sync in perl, python, c++, or php.
Eugene,
I will be having to grab the data and sync it with the local copy here on www11 every night, preferably by a cron job. Thanks for your help so far and I appreciate your kind help to me so far.


Dan

starfighter
05-13-2004, 10:38 AM
Both of the above posts are from me, forgot that I don't have this machine set to automatically log me in.


Dan

starfighter
05-17-2004, 04:05 PM
bump

starfighter
05-17-2004, 05:26 PM
FYI,
Just found out through a help desk ticket that Joe, cannot enable this, guess it caused him quite a few problems.


Dan

thevillageinn
05-18-2004, 02:22 AM
Dan,
what can he not enable...

freeTDS

or

ODBTP

or both

starfighter
05-18-2004, 03:20 PM
Originally posted by thevillageinn@May 18 2004, 05:22 AM
Dan,
what can he not enable...

freeTDS

or

ODBTP

or both
I just asked Joe generally about it and he said no, I never asked which solution he had a problem with.



Dan

eugene
05-19-2004, 07:18 PM
Sorry for not responding to this post earlier. I have been on a very tough schedule lately . . .
In the worst case scenario, you could download the data to a home PC and then upload them to the hostpc box. Although this is less than ideal, it should work. Of course, you would probably want to schedule it.

eugene
05-19-2004, 08:14 PM
I may have another solution for you, but as I do not have a server on which to test it, i.e. a machine running mssql that has an open channel I can access from a hostpc account, it is difficult for me to determine whether this solution can move from theory to practice. If you would be willing to send me your specific specs, I can try it out.