In SQL Server there is a way to join tables from multiple sql servers by using link tables.
I wonder whether is it possible to do the same? I am using PHP, does PHP provides this kind of facilities?
Try the federated storage engine to link to tables on other servers.
http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html
It isn't necessarily easy, nor pretty, but this article gives some solutions to your problem:
http://www.linux.com/archive/feature/52390
UPDATE
Since the link is gone now, here is more text
Creating a linked server using OLE DB for SQL Server
This example creates a linked server named MyDatabase that uses the Microsoft OLE DB Provider for SQL Server.
USE master
GO
EXEC sp_addlinkedserver
'MyDatabase',
N'SQL Server'
GO
Then you can reference as though they are on the same server, so if the databases are on the same mssql server then skip the above step and just do the following:
[Server name].[database name].[owner].table_name
Related
I have this technical task, 2 times this week.
Task consist to link, connect and work with 2 Databases on different servers. Inject the datas from the old DB into the new DB. As this the old DB is use like an accessible backup and the new server will be more light, just get the datas when it needs.
I saw there is relational DB-tables but it needs to be on the same server no ?
Does an online Cloud works this way ?
Thanks
Noe
You can use distributed tables in MySQL whenever FEDERATED engine is used.
MySQL -- Joins Between Databases On Different Servers Using Python?
I need to join table from other database and sometimes other server
Join tables from two different server
Otherwise you have to create application that will connect both databases and transfer data between them. With any programming language. Even with MS Access :)
Or use internal replication engine if it suits.
What you need is a service like google cloud,
First you would create VM instance and load balance the mysql connection between two databases.
Note**
If you want faster or more lean mysqls calls, you should try indexing. try the link below
#http://www.infoworld.com/article/2616674/database-administration/10-essential-performance-tips-for-mysql.html
Is there a way to sync specific tables from MySQL to MSSQL and vice versa?
For example:
-Sync tbl_employees(MySQL) to tbl_employees(MSSQL)
-Sync tbl_attendance(MSSQL) to tbl_attendance(MySQL)
I've read about MSSQL Linked Server, but I don't really understand how it works.
What I want is that whenever there are changes on the MySQL database when I use PHP, the changes will be synced automatically to MSSQL database which is manipulated by a .NET application.
I don't know if I explained it well enough. If you have any questions, please ask on the comments. It would really help me a lot.
set-up SQL Server Linked Server to MySQL,
then synchronize the tables what ever u want
more details are here???
http://www.ideaexcursion.com/2009/02/25/howto-setup-sql-server-linked-server-to-mysql/
You can manually create a middle layer application with multiple connection... and do it manually...but its only applicable for small scale purposes.else
You can Create a linked server between SQLServer and MySQL Server. configure the Linked Server Provider, but all subsequent connections require only a DSN and Linked Server.
I am writing for advice on whether solution you recommend to choose.
Here is in a nutshell what I have:
Axapta databse on MS SQL Server 2008 R2.
Several SQL queries using the data of the database through PHP web application.
Webserver, which is running web application.
No administrator privileges on the Axapta databse (only SELECT permission).
Rights to write and modify on the webserver with MySQL database.
Light computer with Windows OS permanently working on the network. On this light computer I have admin rights.
Here's what I want to achieve :
Creating replication (exact copy) of few (10) tables on the webserver as another database, which will sync up as often as possible with Axapta database .
Adding some dictionary tables and views for the new database (to be able to insert the dictionary to earlier SQL queries) .
For now, I came up with this solutions:
I tried to add 'replace' and 'case when' to SQL queries on the Axapta database, without any other additional databases. However, with these new large dictionaries, query performance was poor and waiting for the results drived me crazy ;)
The only thing I could do is a manual export via ODBC to a MySQL webserver database. Is there a free program to automate this process? I mean eg. hourly update data from Axapta MSSQL database to webserver MySQL database (with help of this light computer which I mentioned before)?
Please let me know if you see any other possibilities to expand utlility of webapplication which uses Axapta database.
I don't know if there are some SQL sync agent from MSSQLServer to MySQL.
If you are writing your own tool, you can try to get your diff by yourself:
delete MySQL records where the RecId is not available in MSSQLServer anymore
insert new records for MSSQLServer records with unknown RecId
update records when ModifiedDateTime is greater than your last sync
At last I found a powerful solution, and reccomend it to everyone who has similar issue. PDI -Pentaho Data Integration (Community Edition) is a perfect way to do the dictionary transformations I mentioned above. It could even read from .xls or .txt files. You could get it from the link below, and don't forget to be active developer community member.
http://community.pentaho.com/projects/data-integration/
This is just a quick question, I couldn't find it on the internet, but I did wanted to have a confirmation.
Say that if I, using PHP, want to connect to (for both the same) MySQL server, but I want to use two databases, not tables. Because you can connect to only one MySQL-database in the PHP mysqli_connect() command, will, connecting to two databases, though on the same server, use two connections.
Because then it'll probably go fast with the max_connections, right?
P.S. What was the SQL-command again to see the mac_connections value again? I thought it started with GET GLOBAL ... or something, but I might be wrong.
I do not have access to the server, only to (limited) FTP files (it's a bit irritating).
SHOW VARIABLES LIKE '%max_connections%'
If you have both databases in same server you can connect to the server and select one database. You can query from any other databases in the server as long as you have permission. Use the syntax databasename.tablename.columnname in your queries.
If your databases are in different server you may have to do little more work on the server side. you can use the The FEDERATED Storage Engine
I already found it, though I ran into it by pure accident mysqli_select_db().
I want to connect a MySQL server (a gs server from mediaTemple) to a MySQL server using PHP, I cannot use the mssql_pconnect() function because they don't support it for their gs servers so I'm looking for an alternate route, I don't know if it's even possible.
What I want is to generate a connection on the MySQL server using PHP that will allow me to retrieve certain information from a View on a different server that's running SQL.
They probably don't support mssql_pconnect() because its for connecting to MSSQL and not MySQL, try using mysql_connect() or mysql_pconnect();
You should be able to establish 2 different database connections to 2 mysql servers simultaneously, as long as the host doesn't have some firewall rule that blocks the connection or some other safeguard like selinux.