I have old apps which using VB6 and SQL Server 2000. This apps is build for offline purpose. Now, we want to get daily report via Online through website.
[local]
VB6
SQL Server 2000
[VPS]
PHP7
Mysql
What i done is, create install XAMPP in local server then use cronjob every 10min to execute sync.php which will syncronize db from SQL Server to Mysql.
My script flow:
foreach (SQL_SERVER_RESULT)
{
if(!checkExistOrNotInMysql()) insertDataToMysql()
}
I just check if data is already stored in VPS or not. If not, data will be inserted.
The Problem is : i cant check if data in SQL server is UPDATED. If i check updated data, it will force me to check WHOLE data in Mysql in every Cronjob (bad thing).
So, my question is, what is the best way to do this?
thanks for advance.
Related
I'm working on a CRM running on a MS Server working with a MSSQL Database and now I have designed a new platform for the CRM on a linux server with a MySQL database.
I've already used MySQL Workbench to migrate my MSSQL database to MySQL. However I would like to automatically sync them once per day.
Is there any tool or script (preferably on PHP) available for this kind of job. Otherwise can you give me an idea on how to do this?
Thanks in advance.
The process you want is called replication. Both SQL Server and MySQL support it. Here are links to the info you need to read:
MySQL Replication
SQL Server Replication
In our office we have a biometric scanner that inserts into a MS Access Database running on one of our local servers. That's just how the thing is built and we can't get into it to modify how it works.
We created a web-based attendance system that needs the Biometric information since the online system allows users to time in via the online form or the biometric scanner.
Our current setup right now is that every 1 minute, the local server runs a scheduled task in the scheduler to push the data to our remote server (this task is a PHP script) where the online app is hosted.
That slight delay isn't very nice and we'd like the data from the local server to sync right away with our online app, since sometimes the local server just dies and we don't know why.
TL;DR:
Is there a way to monitor any changes to the local server (MS Access) that will send the changes to our remote server using NodeJS or PHP? If there are other solutions available, those will be welcome as well.
The local server is running, a driver called ZK Attendance Manager with an MS Access Database. The remote server uses MySQL.
Thank you!
Even in SQL Server I try and avoid triggers if at all possible. Access does not have them per se... but here is an article I previously found in looking it up... because sometimes you just need the functionality. Granted I've never used a Data Macro but from what it says it may be able to help you in your situation.
Read:
MS Access trigger?
I have a PHP codeigniter page which sends data to database every 4 seconds from a device. The page also has options to change the status of the connected device.If there is a problem with the internet connection ,i need to run the page locally and sent the data to local database and later synchronize both the remote and local database so that they are the same.I need a mechanism to synchronize the 2 databases at equal intervals of time.When the site is run live the data go to the remote database.The mechanism should sent the data from remote database to local database also at these intervals.Please share your thoughts.my local server is XAMPP.Remote server is cpanel.
This might help:
have you tried using Replication in MySQL
here:
https://dev.mysql.com/doc/refman/5.0/en/replication.html
You can actually solve your problem but you need to code it and it might be complex and you might also have a problem if you are using an auto increment IDs to solve this try using a custom ID for each record.
I have a website running with php and mysql on Centos(Amazon instance). The newly brought ERP(to be integrated with existing system) uses Oracle as db(located on a separate Windows server). The orders from the website are inserted into the Master Mysql database and which are replicated into the Slave Mysql database. These orders need to be pushed to the Oracle Db. I have arrived on 4 methods to do this.
Use mysql UDF for http communication that would send the rows on a Insert Trigger on the slave to the Oracle webservices on Oracle server
Use cron jobs(with a low interval may be 5 mins,polling) with Php script that would get the new orders from mysql and send to the Oracle db via Oracle services/Php services on Oracle hosted server.
Use sys_exec() udf to invoke php script to insert into Oracle db
Use memcached with MySql and let Php poll the memcached to retrieve data and send it to Oracle server, but unsure whether we could migrate existing Mysql version to new version Mysql 5.6
I already have the UDF's in place and tested them, they are good to go. but still in dilemma regarding data integrity and reliability in case of using UDF's with triggers.
Is there a better method for doing this. Or else which method shall I follow to do the same.
I am aware of the security threats of UDF's, you can't restrict it to any user
One more thing I am not allowed to introduce new changes to the existing website php code for the operation.
SymmetricDS replicates parts of or entire database schemas across different vendor products. It works by installing triggers, but it replicates on a transaction basis ensuring that transactions gets replayed onn target database (s) in the right order.
I'm planning a PHP based application and am hoping to get some advice. Here's the background:
The application will be getting some data from multiple MS SQL Server 2008 databases which are on one remote server (about 50 databases, looking at about 200,000 records across these per day). This data will then need to have various calculations run against each record, and the results displayed to the end user via a web browser.
I'll only have read-only access to the MS SQL Server 2008, and because of this together with the fact that it's a remote server, I was thinking of putting the data into one or more local MySQL databases (which I have root access to) which I can do the calculations within and the web application can query directly.
My question is this:
In terms of performance, what would be the best way to handle the data transfer process? Should I:
Use PHP to pull out the data from MS SQL 2008 and drop it into MySQL, perhaps using a PDO connection
Use Linked Servers to do this? (and if so can I do this with read-only access to the MSSQL server
Another method I've not thought of...
Thanks for any help you can give.