How to get feedback from a db server?

Hello,

Can you please help...
 
We have tablet PC's that people use to create forms on(I'm not concerned with this step)
 
1) The tablets generate small 5-10 kb XML code files.
2) These are uploaded to a Server #1 on site #1
3) I have to design a system to automate the pulling of this code, then the transformation of it into some form of SQL so it can be plugged into the database on site # 2 and  database on site # 3.
 
Any tips? Specifically with how to automate the pulling from the server...how to interrogate/get notified when the db server has received the XML code( the form )

Thanks
dantchoAsked:
Who is Participating?
 
ozymandiasCommented:
Th trigger is best setup by the Oracle DBA on the #1 DB server.
It is not something that can be accomplished from in C#.

Normally a trigger is added to a table and attached to an event, update, insert or delete and it basically tells the RDBMS what it should do when those event occur on that table.
In the case you want either the data in the row in question or the id of the row in question passed to your other two DBs.

I'm afraid I don't know enough about Oracle to tell you the best way to accomplish this.
The best thing to do is speak to the Oracle DBA of the db that server #1 uses and explain what you need.
0
 
ozymandiasCommented:
Not enough information...

Steps 1 and 2 are already done ?
Are you saying that the data is already being sucessfully uploaded to site #1 and stored in db #1 and you just want to make sure that when that happens it goes into db #2 and #3 ?
Does it need to be transactional/in-real time, i.e. the data has to be sucessfully added to #1, #2 and #3 or not at all ?
Sounds like you need a distributed transaction run from site #1 to update all three databases.
0
 
dantchoAuthor Commented:
Ozymandias, thank you for your response.

Yes, uploading to Server #1 is done. I have to feed the other two servers with the entered forms in server #1.  Most likely I won't have access to that application's code. The DB server is Oracle.

I am not concerned with feeding the data to Server # 2 & # 3 but how to build the pulling of the uploaded data from Server #1. Exactly: how can I know if Server #1 received new data( forms )? Can I make the server send me feedback or should I poll( what exactly ) the server?

Jordan

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ozymandiasCommented:
That is going to be hard.

The application on Server 1 needs to notify you when it receives an update and pass you the data so you can put it on Server #2 and #3.
Either that or the Oracle DB needs some kind of trigger or replication or distributed transaction so that records inserted, updated or deleted on it are replicated to your other DB servers.
There is no simple answer to this unless you have access to the database or the application on server #1.
0
 
Gautham JanardhanCommented:
i would say that a trigger would be the most optimum solution say the guys upload their code from the tablet pc to a table in server #1 and u create an insert trigger on theat tbale and inside that table u have u logic where u transfer the data from that server #1 to server #2 and #3
0
 
dantchoAuthor Commented:
As I said before it is very doubtful that I will get access to the client app on the tablets. But I will get access to the DB.

I do like the idea of the trigger. I am not familiar with Oracle. I guess you mean a field of logi cla type  in a master table...??? The field will indicate a succesful uploaded form. SO, I could interrogate that field like every second ...

 
0
 
ozymandiasCommented:
Are you interested in inserts only, or do you need to know about updates and deletes ?

If its only inserts then you can just keep polling :

select max(id) from table.

If max changes then you can do :

select * from table where id > previousmaxofid

and that will get you all the new rows.

If you need deletes and updates then you are better of with some kind of trigger in the oracle db sending you the changed row.
However, if anyone ever does a bulk update of the table and they don't disable the trigger first you are going to get flooded.
0
 
dantchoAuthor Commented:
Ozymandias, thank you so much for your help. I wish I'd split the points btwn you and gauthampj. But you wrote about the trigger 5 hrs earlier...

I wish not to  limit myself with INSERTS. Wish to cover updates/deletes

Before we close the topic can you shed a little bit more light on how to accomplish "the trigger" with Oracle so I know what I should study. It is my first encounter with Oracle which should not be  a problem.   I am mainly a Clipper/Delphi head but I have to do this in C#( not a problem ).  

0
 
dantchoAuthor Commented:
Thank you, OZYMANDIAS. That sounds logical and it  helps indeed.

I've just accept your answer with grade A.

Jordan
0
 
ozymandiasCommented:
You are very welcome. Good luck.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.