How to make sure whenever application runs it first fetches data from database and then from coherence? - oracle-coherence

I am using QueryHint to set a jpa entity into coherence and updating it ,which in turn updates the value in coherence and database.
However when I again Run the application ,my first fetch is occuring directly from coherence.hence any update on the database is not reflecting into it.
How to make sure whenever application runs it first fetches data from database and then from coherence?

If you need updates made directly to the database to automatically show up in Coherence, then look at the Oracle Coherence "Hot-Cache" feature: http://docs.oracle.com/middleware/1212/coherence/COHIG/golden_g.htm
If you are using JPA and you just want to keep the data from getting out of sync, look at TopLink Grid: http://docs.oracle.com/middleware/1212/coherence/COHIG/tlg_integrate.htm

Related

Transfer huge data from maria db to ssms when their is data change in mariadb

I did tried using schedular for Databricks notebook but it is creating unnecessary of loading data. The data in mariadb changes randomly it is not fixed , if I try pipeline I cant call a trigger for change in data and transfer of data from one Database to another.
Please help me with any pipeline ideas , azure datafactory ideas or python codes as well so that I can transfer tables when their are changes in Mariadb
One way to trigger pipeline is to use event-based trigger.
Creating event-based trigger in Azure Data Factory. Create trigger and select Type as Custom events.
Refer - https://www.mssqltips.com/sqlservertip/6063/create-event-based-trigger-in-azure-data-factory/
Second way is to use logic app. This is the best approach for your query.
Refer this answer by Trent Tamura

best practice for bulk update in document DB

we have a scenario where we need to populate the collection every one hour with the latest data whenever we receive the data file in blob from external sources and at the same time , we do not want to impact the live users while updating the collection.
So, we have done below
Created 2 databases and collection 1 in both databases
Created a another collection in different database( configuration database ) with property as Active and Passive and this will have the Database1 and Database2 as values for the above properties
Now , our web job will run every time it sees the file in blob and check this configuration database and identify which one is active or passive and process the xml file and update the collection in passive database as that is not used by the live feed and once it is done , will update the active database to current and passive to live
now , our service will always check which one is active and passive and fetch the data accordingly and show to user
As we have to delete the data and insert the newly data in web job , wanted to know is this is best design we have come up with ? Does deleting and inserting the data will cost ? Is there better way to do bulks delete and insert as we are doing sequentially now
wanted to know is this is best design we have come up with ?
As David Makogon said, as for your solution, you need to manage and pay for multiple databases. If possible, you could create new documents in same collection and control which document is active in your program logic.
Does deleting and inserting the data will cost ?
the operation/request will consume the request units, which will be charged. To know Request Units and DocumentDB Pricing details, please refer to:
What is a Request Unit
DocumentDB pricing details
Is there better way to do bulks delete and insert as we are doing sequentially now
Stored Procedure that provides a way to group operations like inserts and submit them in bulk. You could create the stored procedures and then execute the stored procedure in your Webjobs function.

weblogic 11gr2 taking too long for update data on database

I have two oracle forms and reports server.
oracle forms and reports server 11gr1 (weblogic 10.3.5.0)
oracle forms and reports server 11gr2 (weblogic 10.3.6.0)
both are connected with same database but at time of update data on database new server(11gr2) taking twice or more then that, time for data update compare to old one (11gr1).
I have checked deployed form and procedure inside that form they are same.
further analysis:
form has a PROCEDURE which update data in database and do some IO operation.
found that this PROCEDURE takes more time on 11gr2 compare to 11gr1.
Issue resolved, it was slow due to SYNCHRONIZE was used inside of loop in plsql code in FORM.

How do you force the OAuth Sql Server database objects to be recreated once deleted?

Using ASP.net 4.5, I created a membership database and set up some open auth providers. In the course of adjusting the database, I deleted the open auth tables (UsersOpenAuthAccounts and UsersOpenAuthData) - I can find no script to generate these items or any other way to regenerate them.
The ASP.Net membership libraries create a system table called __MigrationHistory. When these OAuth elements are created, it creates this table (if missing) and creates a record there which acts as a flag indicating that it is not necessary to create the db items. Delete the table, and the membership libraries will recreate the elements.
You will receive an exception indicating that the __MigrationHistory table is missing - ignore this error, as it will be recreated along with the other elements.
BUT BEWARE - __MigrationHistory is a table used by Entity Framework...you may jack it up in try to fix this, so keep a backup handy.

Entity framework activates trigger to other database: error

I have a ASP.NET web application which does some changes on a table in SQL Server 2008 R2.
On this table there is a trigger that does updates on another table in another database on the same database server.
When saving the changes I'm having the following error:
- The error message: The underlying provider failed on Commit.
- InnerException: This SqlTransaction has completed; it is no longer usable.
Also allowing the database user to connect to the other database isn't working.
Somebody knows how I can make this work?
The trigger is not related to Entity Framework.
The trigger fires when changes are made to the table irrespective of where that change came from.
This is probably a rights issue, the system is attempting to make the change to the second database with the security context that was used to connect to the first database. It the change that was caused by the trigger fails, then everything in the same transaction will fail.
Since you are accessing 2 databases in a transaction, you are using MSDTC, make sure that it is started and that you have rights to it.

Resources