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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Send an XML from SQL to a specific port!!!

Author  Topic 

mangalau
Starting Member

11 Posts

Posted - 2011-06-27 : 15:30:27
I wanna Send an XML (body of a xml or a select * from table FOR XML AUTO) from SQL to a specific port. I tried service broker but it use 2 instances of MSSQL, I wanna Send an XML from SQL to a windows service running on a specific port.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-27 : 15:54:16
Service Broker can do that. Or you can write a CLR routine. Or you can write a custom app for that.
Go to Top of Page

mangalau
Starting Member

11 Posts

Posted - 2011-06-27 : 16:08:23
Sql broker use 2 instance of sql ,I have a trigger on a table on insert that i wanna send some data via xml to this windows service on a specific port.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-27 : 20:56:03
You're going to have to write custom code either way.

What do you mean by "SQL Broker uses two instances"?
Go to Top of Page

mangalau
Starting Member

11 Posts

Posted - 2011-06-28 : 08:12:41
Service Broker is used between 2 instances of SQL , i cant configure one instance of SQL to send an xml on a specific port on a remote or local computer , i must specify remote instance... I just need to send an xml from SQl to a windows service who listen on port xxxx.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-28 : 10:31:21
Sure you can. You can make decisions based on the message that is sent.

Other options within SQL Server are CLR routine, or SP_OACreate.
Go to Top of Page

mangalau
Starting Member

11 Posts

Posted - 2011-06-28 : 16:47:45
Russel can u give me a hint ho to configure endpoint, route, service,message what to enter at receiver instances(mine its a local proces working on port xxx), for that ,I tried service broker but its seems its working between 2 instances of sql(if i am right), i need to process data instantly i just need to send a xml via trigger from sql(via service broker if possible) to a local process on the same server that listen to port xxxx
Go to Top of Page
   

- Advertisement -