Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL for 2 servers?

Author  Topic 

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2011-07-27 : 20:26:06
HI I Have to do a query that will produce an unmatched listing.

On server A which is our vendor's server, which is a SQL Server 2005, we have a transactions table. We want to see for the past 2 days only:
which InvoiceNumber(int 20 null) is NOT on our Document server
which is mysql the column there is:
Docnumber Varchar 64 Binary.
I am not sure how to get to the servers. I am used to getting to a different server in c# using 'connection strings' but how to do this in query?

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-07-28 : 04:05:57
Could you clarify that you are attempting to connect to a SQL server? If so , you can use Linked Server.
If you are attempting to connecto from a mysql to a sql server - use ODBC

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2011-07-28 : 11:26:03

Yes i want to read the numbers on one server (the MySQL) and verify that they exists on the second server (sql server 2005).
I hve heard that I need to use a windows service.

so it can' be done just in a QUery?

quote:
Originally posted by jackv

Could you clarify that you are attempting to connect to a SQL server? If so , you can use Linked Server.
If you are attempting to connecto from a mysql to a sql server - use ODBC

Jack Vamvas
--------------------
http://www.sqlserver-dba.com

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-08-09 : 01:38:16
Yes. Check this page for setup - http://www.packtpub.com/article/mysql-linked-server-on-sql-server-2008

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -