Re: Replication MSSQL-PostgreSQL - any success?
От | D Yeager |
---|---|
Тема | Re: Replication MSSQL-PostgreSQL - any success? |
Дата | |
Msg-id | 200211141346.58324.dyeager@teleport.com обсуждение исходный текст |
Ответ на | Re: Replication MSSQL-PostgreSQL - any success? (Chris Miles <chris_pg002@psychofx.com>) |
Список | pgsql-admin |
> Hi, actually what I was after was a continuous way to keep a > PostgreSQL db in sync with a changing MSSQL db. > Once the data is migrated, a method of syncing any updates > in the MSSQL db to the PostgreSQL db is what we require. > I haven't discovered a nice way of doing that yet. I've setup an active sync between an AS400->MSSQL which would work for MSSQL->Postgres. What you need to to is create a trigger on the MSSQL side which writes to a separate table the key fields from the changed table. You then write a program (mine's in Java on the AS400) which checks the tables the trigger wrote, fetches the new data, and updates the target database (postgres). Simply keep the check in a continuous loop (I actually wait a few minutes between checks) and all your data is kept in sync almost realtime. If you do use Java for this, the advantage is you can sync anything with a JDBC driver, although it's probably not the fastest way to do it.
В списке pgsql-admin по дате отправления: