Jump to content

simultaneous cross database connection


Muddy_Funster

Recommended Posts

Hi all.  I was looking through some old code and found some pages for a year or so back.  In one of the pages there are a couple of SQL queries run from within the while loop of another query.  I had to do this mainly because the first query is a SELECT query that is run against an MS SQL Server on what I will reffer to as "Host_A", and the queries run from within the while loop of this result set are running INSERTs agains a MySQL Server that I'm going to call "Host_B".

 

Now Host_A and Host_B are two different physical servers, Host_A was WinServer 2003 and Host_B was CentOS Linux distro' (used as web front end due to the owners only having 5CAL's for the WinServer).  Both are on the same network (not that I think that makes a difference).  I just got to wondering - As I'm not a fan of querying within a query in this nature - Is it actualy possable to code a connection to both Host_A and Host_B simultaneously running a single query using both types of DB server?  -- I assume "not at all" will be the answer, given that mssql_query() and mysql_query() are different commands.

 

Just thought I would ask the question on the off chance that someone knows of a way (in case I ever come accross this type of scenario again...I like to prepare for the worst ;))

 

Let me know your thoughts.

Cheers.

Link to comment
Share on other sites

The query is executed on and by the database server, so no, this is not possible as it would require the database server where the query is being executed to have the ability to connect to and access the data on the other database server.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.