Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to push data from MSSql server 2012

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-06-17 : 04:31:11
Hi All,

I have 2 databases name are responceDB,requestDB and 1 Web App,I placed this web App in Apache Tomcat.

Actually we have requestDB in USA and responceDB in INDIA.just for my testing purpose I created 2 databases in my local system.

Actually what I want,if database(requestDB) is modify at anytime,it sends HTTP-request to the web-App,inside App some computation will be happen based on modification on requestDB and finally that compute data will be stored in responceDB.

End-users should not interact with web-App,it's just for internal computation.

If you do like this, I don't need to monitor requestDB at every time.

I hope,you understood what my problem.

I searched in Google for this,I didn't get anything.

If you know any materials for this concept,mention the links.

Which concept is better to solve this.

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-17 : 04:38:01
what you could do is to trigger a sql agent job periodically for this http request. There should be a queue tale (control table) which logs the changes to requestDB through a trigger. The sql agent job checks for records in the table with status open and processes it one by one
you can check below thread for http request from sql
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=18425

At the end of processing make status as Completed in queue table so it wont be picked again next time job runs. The job schedule can be set to a frequency as you desire like 15mts, 3mts, 1 hr etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

grandhi
Starting Member

31 Posts

Posted - 2013-06-17 : 06:04:33
@visakh Thanks for your reply.

as per my understanding using Stored procedure,we can send HTTP request from sql server 2012 to my App.

Is it right ?

Even I don't know, how to create stored procedure.I will check it Google.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-17 : 06:08:16
quote:
Originally posted by grandhi

@visakh Thanks for your reply.

as per my understanding using Stored procedure,we can send HTTP request from sql server 2012 to my App.

Is it right ?

Even I don't know, how to create stored procedure.I will check it Google.


yep...you may wrap it inside a procedure or you may even call it via adhoc sql. the logic would be something like that in the posted link.
You can call the stored procedure or sql from the sql agent job.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -