April 4, 2007 at 8:16 am
Hi,
We are looking for a way to invoke an exe from a stored proc in sql server and pass parameters to it. It can be done using the xp_cmdshell, but the issue is that the exe is on another server.
Any pointers as to how to achive it???
April 4, 2007 at 9:12 am
Link the remote server first using sp_addlinkedserver 'remote server'. I assume you have authority in executing the exe on the remote server.
April 4, 2007 at 9:45 pm
What does the EXE do?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2007 at 10:41 pm
It takes in some parameters from the proc, makes an http call and inserts the values in the database
April 6, 2007 at 9:16 am
Make the account of the SQL Server service domain admin, and you can do whatever you want. Even execute remote .exe files
Before you go on doing this, please read on.
This would be a certain way of loosing control over your network very soon. If not from on external attack, then because of an internal attack.
Usually, you should avoid using xp_cmdshell. No wonder it is disabled by default in MS SQL Server 2005.
If you can not avoid using it, you should use it for read only types of activities. But certainly not for executing .exe files.
Try to find some workaround for this issue, because executing .exe file from a MS SQL Server is a security whole.
But this is only my opinion.
🙂
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply