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 2005 Forums
 Transact-SQL (2005)
 Run other applications by T-SQL?

Author  Topic 

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2007-12-21 : 03:37:04
Hello.

Is there a way to run some other application by using T-SQL?
For example, I am on the clinet side and on the server side is lying an application called DoSomething.exe. I would like to run it by telling SQL Server "run this application" ;)
Two additional questions:
1. Can SQL Server retrive data returned by that application?
2. Can SQL server run functions from .dll ?

Thanks for any help.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-21 : 03:44:36
1. Yes. See Books Online about xp_cmdshell
2. Yes. See Books Online about oa_ methods.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-12-21 : 03:45:03
1. Yes. You can do it using xp_cmdshell extended stored procedure.
2. To some extent in case of OLE Automation related procedures.
3. Yes, using OLE Automation SPs.

Double
Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-21 : 03:45:08
If you are using CLR, both tasks are more easily done than native T-SQL.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Wodzu
Yak Posting Veteran

58 Posts

Posted - 2007-12-27 : 17:18:23
Thank You guys.

I've menaged to develop my own library and its runing nicely on the server.

Go to Top of Page
   

- Advertisement -