Stop interfaces via sql

Stop interfaces via sql

Postby Rhunt » Wed Sep 21, 2011 12:54 pm

Great query to stop interfaces that are hanging in a stop requested or start requested status.

begin tran

UPDATE SystemStatus
SET StopFlag = 'Y', StartFlag = 'N'
WHERE SystemID IN
(
SELECT cpa.SystemID FROM ComProtocolAttributes cpa
WHERE cpa.ODBCDataSourceName = 'TouchWorks_LIVE_sys'
)
AND
(
SystemID IN
(
SELECT TargetIntID
FROM vwSystemStatusGrid
)
OR SystemID IN
(
SELECT SourceIntID
FROM vwSystemStatusGrid
)
)
rollback
Ryan Hunt
Interface Analyst
Galen Healthcare Solutions
Rhunt
 
Posts: 52
Joined: Fri Mar 18, 2011 12:56 pm
Location: Chicago

Return to Tools: Queries, Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron