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
 project to push sql to plc

Author  Topic 

chapm4
Yak Posting Veteran

58 Posts

Posted - 2011-08-23 : 10:48:58
Have a new project and looking for help.

There is a sql server 2005 that contains a lab database (has analysis data). There are 4 tables that we need to throw the data to a PLC for reporting. That server is on a 192 network. There is a second sql server 2005(call this one elec) that is on the 192 network and also on a 10 network that the PLC resides on.

Some questions that come to mind: Do we want to export the data from the lab database and import it into the elec database then push it out to the PLC? Put a second nic in the lab server to hit the 10 network so the PLC can pull directly from there? (seems to me that might be a better way)?

So now we have our tables ready depending on the answer above. The lab throws a new record to the server. When that new data gets there, they want to send it to a PLC that is already set up. So next question is: should we poll the data say every 5 minutes to look for new records, or anytime a new record is added send it to the PLC? I would like to do the latter, but have no idea if that is possible in sql or how to accomplish.

Please give me thoughts and suggestions and I will pose some more questions.

chapm4
Yak Posting Veteran

58 Posts

Posted - 2011-08-23 : 11:20:16
I was just reading about sp_addlinked server. Would this work?
Go to Top of Page

gwilson67
Starting Member

42 Posts

Posted - 2011-08-23 : 21:10:44
I would go with the option of when a new record is added, then send it to the PLC. By using the trigger to accomplish this, you'll be able to have control of where you want to send the data. You can reference other databases and servers from within your current session.

Greg
http://www.freewebstore.org/tsqlcoderepository
Powerful tool for SQL Server development
Go to Top of Page
   

- Advertisement -