[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Problem - OI Mirroring between two OI databases - Attach/Detach (OpenInsight 32-bit Specific) ====
=== At 08 MAY 2009 09:51:10AM David E Schranz wrote: ===
{{tag>"OpenInsight 32-bit Specific"}}
I have 2 OI systems installed on 2 seperate servers.
Server 1 - LIVE
Server 2 - MIRROR
On the Server 1 - LIVE - I have created a Directory external from OI the OI directory, to store temporary transactions (C:\oitemp) this directory contains 1 OI file called OI_MIRROR. I have created an MFS within this sytsem, so that once a record is written it also attaches to the c:\Oitemp directory and writes the created record in this area so that it could be read by the MIRROR system.
On the Server 2 - MIRROR, I have a mapped dirve to the Server 1 y:\Oitemp and am attaching this directory to allow me to select and read from the OI_MIRROR table then upload the data on the Server 2 - MIRROR system.
Once the records are read, I also delete them from within the OI_MIRROR table. I have a window within Server 2, that is using the TIMER event to Attach , Read, Delete and Detach this \Oitemp directory every 10 seconds.
I am using the Attach_table and Detach_volume to attach and detach this file on c:\oitemp
The problem is:
The system may work a few times, but every now and then either the OINSIGHT.EXE on Server 1 or Server 2 - hangs and give a Windows error.
Can anyone suggest what may be happening ?
Tks
David Schranz
----
=== At 08 MAY 2009 12:58PM Bob Carten wrote: ===
David,
My off the wall suggestions to take a look at using OLE and MSMQ
see [url=http://www.microsoft.com/windowsserver2003/technologies/msmq/default.mspx]http://www.microsoft.com/windowsserver2003/technologies/msmq/default.mspx[/url]
The two objects you need are:
QInfo=OleCreateInstance("MSMQ.MSMQQueueInfo")
Message=OleCreateInstance("MSMQ.MSMQMessage")
More to the point,
OEPROFILE.LOG might help you see why the attach /detach is failing.
I'm not sure why you need to keep attaching / detaching, you could just lock the records.
----
=== At 09 MAY 2009 04:38AM Stefano Cavaglieri wrote: ===
David-
Maybe a silly question - why don't you consider the Universal Driver Heavy? It does exactly the things you need, with some added security features and mechanisms.
-Stefano
----
=== At 09 MAY 2009 10:06AM David E Schranz wrote: ===
I need to prove that this mirroring is achievable in OI, as my potential client is comparing OI with MYSQL and SQL that both have simply and easy to use, built-in replication tools.
So does OI have problems when a REV directory is being attached by to seperate systems simultaneously ?
The 2 OI systems attaching the same one OI directory are on seperate servers, I do not think locking can be achieved ? As 2 seperate engines are both attached to one and the same directory!
Could it be a locking related problem ? or anything else.
But after a few minutes I get an OINSIGHT.exe error!!
tks
david
----
=== At 12 MAY 2009 05:48AM Stefano Cavaglieri wrote: ===
David-
] So does OI have problems when a REV directory is being attached by to seperate systems simultaneously ? The 2 OI systems attaching the same one OI directory are on seperate servers, I do not think locking can be achieved ? As 2 seperate engines are both attached to one and the same directory!
To my experience 2 different OI (and ARev- and even mixed up-) systems can simultaneously attach the same directory with no problems at all. Locking functions properly as long as you load and use the proper network driver on each system.
] Could it be a locking related problem ? or anything else.
I don't think your problem is related to locking. Most probably, as Bob pointed out already, it has to do with Windows permissions/message queuing/networking/etc. but it could certainly depend also on the configuration of your OI systems (I'm thinking of the environment settings in particular).
-Stefano
----
=== At 20 MAY 2009 08:39AM Bob Carten wrote: ===
David,
1. You should be able to leave the temp directory attached, not attach/detach every 10 seconds. Locks should work across OI systems
2. Is it possible that the process takes longer than 10 seconds?
I have run similar processes for years. When I call them from a timer event I use a property such as '@BUSY' to to tell me if the last timer event is still running
* Still processing? get out
if get_Property(@window, '@BUSY') then return 0
* Set flag
x=Set_Property(@window, @BUSY', 1)
* Do my thing ....
* Clear flag
x=Set_Property(@window, @BUSY', 0)
3. Is background indexing set to 5 seconds? Try extending it to 30 seconds or greater
4. With UD45 you can use a revparam like
ServerOnly=1
servername=www.myremotesite.com
TcpIpPort=23456
ShareName=Replication
have that in a subdirectory on your local server, with no .lk or ov files, define that share on the remote server also running UD45, punch a hole in firewall or better yet establish vpn connection with [url=http://openvpn.net/]OpenVpn[/url], you can attach that folder as if it is local, it will write to the other server.
5. Heck, replicate via MySql. Make a table with an identity key and columns table, row, at_Record. Use ADO to write to it, let mySQl replicate, Use ADO on the other side to pull transactions in
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=1864B16D98002B0B852575B0004C18AC|View this thread on the forum...]]