Solved

How to get feedback from a db server?

Posted on 2006-11-07
10
236 Views
Last Modified: 2010-04-16
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
0
Comment
Question by:dantcho
  • 5
  • 4
10 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 17888967
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
 

Author Comment

by:dantcho
ID: 17894286
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
 
LVL 15

Expert Comment

by:ozymandias
ID: 17896184
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
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 17897546
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
 

Author Comment

by:dantcho
ID: 17900776
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 15

Expert Comment

by:ozymandias
ID: 17900887
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
 

Author Comment

by:dantcho
ID: 17901180
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
 
LVL 15

Accepted Solution

by:
ozymandias earned 500 total points
ID: 17901380
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
 

Author Comment

by:dantcho
ID: 17901548
Thank you, OZYMANDIAS. That sounds logical and it  helps indeed.

I've just accept your answer with grade A.

Jordan
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17901621
You are very welcome. Good luck.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now