Sybase sql anywhere sync a Database view(pull from consolidated to remote)?
I am trying to set up a s开发者_运维技巧ynchronization model to sync my consolidated Oracle database with a remote SQL Anywhere database. I have a couple Views on the consolidated Oracle database that I want to pull into the Sql Anywhere database as tables. I want to pull them over as they touch 4-5 tables (gotta love good normalization) and only have 7-8 columns that I need read access to (i.e. I will never try to update them. I just need to pull from the consolidated to the remote db). How do I do this?
MobiLink can certainly support synchronizing with views, but that isn't supported in synchronization models because views don't have primary keys (which sync models need, as outlined on the first page of the wizard), and uploading to views requires an updatable view or "instead of" triggers.
A workaround is to temporarily define a table with the same schema as the view, plus appropriate primary key definitions. It would be simplest to use the same name for the table, but for that you'd need to use a different database. Pick that database/table when loading the consolidated schema, and define that table mapping to be download only.
Then you should be able to deploy that model to the Oracle database with the view. If you had to use a different name for the table than for the view, you should deploy to file and globally replace the table name with the view name in the generated SQL file.
精彩评论