How can I write entity history records to another server?

69 Views Asked by At

I want write entity to server1, but entity history to server2, how do I config my datasource? Did anyone particular it?

1

There are 1 best solutions below

0
On

There is no simple DataSource configuration that you could use. The DataSource would need to analyse SQL statements in order to decide to which server to send them. You probably could implement something like this yourself, by searching for the names of the history tables in the SQL statements, but I wouldn't recommend that.

Assuming your database supports this it seems more appropriate to use database link or some comparable technology, which allows you to write to the same database but have the data actually end up on the second server.