I have an Xamarin cross platform application. I am currently storing my data in a Sqlite Database. However we want to have bi-directional syncing with an Azure Sql Database. After much reading I decided to give Dotmim Sync a try. The initial sync worked, however when adding a column to a table and attempting to migrate the data (following the tutorial), I got an error stating that the tracking table was missing. I redid everything again and realized that the entity tracking table was never created and I am not sure why. However Sql created a tracking table but it was not the entity tracking table that the error stated was missing.
I am curious if anyone with Xamarin has been able to successfully create bi-directional syncing with Sqlite and Azure Sql using Dotmim Sync. I have yet to find anything else that will work. Other than hand jamming it in this tutorial: https://www.xamarinhelp.com/mobile-database-bi-directional-synchronization-rest-api/
I am not against that, just seems like a lot of room for error. I am hoping someone out there has had success with what I am trying to do.
Hello I'm using Dotmim sync to synchronize a Sql Server database with a Sqlite database hotsted in a xamarin forms application through an API.
I think that I had the same problem as yours.
The problem is, as far as I understood, that the tracking tables are created only on the first sync.
If you change the schema of those tables you will need to call the Deprovision method.
This method will re-create the stored procedures and the triggers with the new database schema.
I'll leave you the link to the docs:
https://dotmimsync.readthedocs.io/Provision.html#provision-deprovision.
Related
I have been tasked with migrating an existing MS Access database to SQL Server 2012. It appears that using the SSMA for Access is the best choice for completing this migration. I have done some review of the migration assistant and it seems to be pretty straight forward. The kicker is that this client wants to use the existing Access forms with the data that has been migrated to SQL Server. So once the migration is complete, I need to point all of the current Access forms, queries, and reports at the new data source. I am not sure of the best way to accomplish this. I see that there is an option to 'link tables' when using the migration assistant but I am guessing there is more work to do to get the entire access front end working with the SQL backend. I don't have much Access experience so any help or advice on the best way to accomplish this would be much appreciated. Thanks!
The SSMA tool can also redirect its table definitions (the entries under the 'Tables' tab in the database window) so that they reference the migrated data in SQL Server. Forms, queries and reports all use these table definitions, so you may well find that most things work as expected immediately after migration. However, there are some aspects that do not move successfully, and you are likely to hit some of these if there is much VBA code in your application.
I'm creating a plugin for an existing application and I need to add a table to the database this application is using (MSSQL-database). The problem is that I can't find any tutorial or documentation about how to do this with wix. I use msiext for the UI to retrieve the database server and the credentials to access and execute operations on the database.
I hope you can help me and if you need any additional information please ask me.
It is not in because it is a VERY bad idea to manipulate a database in the installer - which my and should normally not execute with permissions in the database.
You are a lot better off to follow best practices and handle database maintenance outside the application installation, as every other commercial application I have ever seen does. Generally DB updates and application updates are and should be separate.
If you HAVE To do it - execute a custom action.
Well eventhough it is not the most beautifull solution i managed to get it working with an sql script tag like:
<sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' ExecuteOnInstall='yes' />
and it creates my table.
I have a web application that has an SQL database.
For clarity I'm using Asp.Net 4.0/c#/SQL Server 2008 Web edition.
I recently puclished the site, which was my first, by creating a deployment package for the database.
Now a couple of months down the line, I need to update the database structure. The web application now has data that has been entered via the web, so i'll need to update the structure, then copy data across.
As this is the first time I've done it, I'm unsure of the process I should follow - is there a standard practice for this kind of update?
Also, since some of the tables use incremental ID's I need to ensure they remain the same in the newly updated database.
Any tips, links, advice appreciated.
Important Guidelines:
I assume you have not changed structure entirely (means keys column are same though solution is around for that too)
Steps are as follows:
Take export of the database
Add or remove the columns or whatever changes you want
Import the database back
Check the log for rows/tables (if some) were not updated successfully
Make SQL queries for them and run them to sync
Here are some general steps for this:
Take backup of your online database and restore it locally
Modify local database to suite your needs
Use third party comparison and synchronization tool to publish changes to your production database
There are many of these available and you can use them in trial mode to get the job done if you’re on a tight budget. You can try tools from Red Gate, ApexSQL, Idera, Dev Art and others…
I have a wp7 app that uses the local database implemented with linq. I have an external MS-SQL (2008 R2) server. Both databases have the same schema.
I would like to know how to do the following:
Download information from the MS-SQL to the Database into the local DB of the phone. (Can I use some data-binding technique - I have found no links that do this)
If Changes made on the phone (add new record, edit existing record) how can I push changes back to server.
If changes are made to server then push to phone (I know I can use an observer pattern here)
I should also note that the client app is not used always-on access to the internet.
Thanks
There's no magic here.
You will need to create functionality to get updates from the server (probably meaning you need some kind of timestamp on each record, saying when it was last changed so you can query it).
You will need to create the functionality to upload data and update the database on the server (and potentially handle conflicts).
I would either use ODATA to communicate with the server, or plain old WCF/JSON service.
have a look at the Sync Framework Toolkit
I'm trying to create an environment like the one in the pic where I have two Azure SQL Server databases, one for dev work and one for production. If I need to make a table change, column change, SP change, etc. Do I do it in the database copy? If yes, then how do I push those changes to production? Any tutorials or guides will be appreciated! I'm working mostly in a code-first approach with Entity Framework, but I also use SSMS frequently. Can this be scripted with TFS?
If you're using Entity Framework Code First, you should leverage the migrations functionality.
https://msdn.microsoft.com/en-us/data/jj591621.aspx