I have a small problem, I am working on a project where I need to synchronize the databases to maintain the same data at diff locations, all have their own database the structure of all the database,tables,stored procedures,etc are the same. i.e. they are the copy of a single database but data is entered from different locations and I need to have data to be synchronized so that we can see the data from anywhere, will creating a windows service work?
C# code will be a nice help.
You can do this by two ways .....
1st way using combination of services
i) W CF Service with windows service Or Web service with Windows Service.
you will need a windows service which is installed on every client machince which will check the new data in local db and send that data to web or wcf service which will be installed on Server Machine for LAN.
but if client is on network then web service or w cf service should be on Static IP Address where Server Database is installed
and if client is offline in some case then u should use MSMQ or Rabbit MQ or any queuing mechanism for that ...to handle such case..
2nd way is using Replication in in sq l server 2008 go through this links:
http://www.codeproject.com/Articles/215093/Replication-in-MS-SQL-Server
http://www.informit.com/guides/content.aspx?g=sqlserver&seqNum=313) Database syncronization
Replication is what you need I guess, let SQL manage where you dont have write any code and is easy to configure.
have a look at http://www.codeproject.com/Articles/215093/Replication-in-MS-SQL-Server , or type SQL replication and there are loads of material available.
Related
For a school project, we want to create an app using flutter (dart + android studio), and for it we would need a database to which we connect the app.
We have two options :
A MySQL database that's hosted on our school's servers (on a Ubuntu VM, accessible from SSH with a host address, username an password)
Another MySQL database on our school's server, but hosted directly on a server for databases (no VM). For that one, we would have more 'common' logs as the host and port.
Here are the specs of the second one :
Linux Fedora Core 18 //
Apache/2.4.4 PHP/5.4.14 //
MySQL Community Server (GPL) 5.5.31 //
phpMyAdmin 3.5.8.1 (2013-04-24)
My question is, how can I access these sql databases (ideally using the second method) from my flutter app ? I know there's a way to access local MySQL databases from flutter, but as the base will be hosted on an external server, I don't know how to correctly connect and dialogue with it.
Thanks
I faced the same problem. The mysql1 package is not well maintained. Google Dart developers do not provide built-in support of RDBMS.
There is another package to work with mysql, maybe you can take a look. mysql_client
I think that the best solution is to create a restApi on your server to manage your crud operation with the mysql database. There are a lot of tutorials on how to create a node application that lives in your server and interact with your database.
This is also a good solution because you add a layer that manage all the back-end stuff of your application.
I am working on a POC to extract data from some devices and update in a DB. I want Tableau hosted online to connect to this DB and generate reports.
As the first step I want to setup a server ( using my PC for the testing purpose ) and allow it to host a DB ( preferably mysql) so that Tableau can connect to it.
I am very basic in terms of the IT skills.Can anyone help me in setting up this server from scratch?
You can download a mysql client such as XAMPP, install it in your pc and run mysql database, it comes with all the tools you need to do your POC + it's free.
You can start here : https://www.youtube.com/watch?v=WmFHreVid-k
I would like to create a desktop application that should work with data on a mySql server running on a remote machine.
So each user has a copy of the desktop app and edits data on the remote mySql server.
Now my problem is that the mySql server will not allow connections from other hosts.
Question, is this just the wrong way of creating the app. If not how do I give any host access to the MYsql server.
(I know I can open up for a specific IP but that won't work as the app could be running anywhere)
You should front your database on the server with a thin service layer, where you could do some validation / processing on the data, perform authentication, etc. Your client apps would then expose those methods in your service layer as web services, to which your client apps would communicate using either SOAP/XML, REST/JSON, etc. In general, it is a bad idea to expose your database directly if your application is within a LAN, and a terrible one to expose it on the internet.
I written a program to work with a MySQL database that powers my website and I have recently bought some reseller hosting however the hosting company has restricted external access on the shared server, so I was going to setup an external mySQL database on another server that can be accessed remotely, however to do this I need a PHP file on my reseller server that can connect to the local database and the remote database and sync them on request from the application via a url.
Does anyone know the best method achieve this?
Try using SQLyog's Database synchronization tool
We have an android app that currently sends data to a php script which writes to a mysql DB on the same server. We are thinking of using a scalable DB server e.g. FathomDB (which is just based on amazon RDS & rackspace) so that we can handle load increases easily.
The question is how does our android app write to these remote DBs? Do they have some kind of rest API, or allow you to have a php script similar to the one we have in place at the moment?
I'd say most of services like these have a connector running on the web, like the one you are using. But some of the services you mention (for example amazon rds) have a native mysql connection. So you can connect using mysql to the server and run queries like you currently do in php. You can use ACL to ensure security in your application :)