Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execution Of EXE Expand / Collapse
Author
Message
Posted Tuesday, October 9, 2012 1:21 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 10, 2012 10:55 PM
Points: 4, Visits: 9
Hi every one , any one help me on below requirement

I had two servers

server 1 -------SSIS Package is present
server 2----- EXe location

I had SSIS Package in server 1 , at one step am calling the exe present in server 2 and passing arguments and working directory to server 2

when i execute the package the package should execute in Server 1, but when it trigger to exe the exe should execute in server 2 not in server 1

can any one help me on these i can use dotnet also

thanks in advance
Post #1370553
Posted Tuesday, October 9, 2012 1:57 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, August 30, 2014 7:18 PM
Points: 6,250, Visits: 7,409
You need to call a service running on Server2 to execute the process, else the exe gets transferred to server1 and ran there. So, you'll need something already existing on Server2 to get server2 to initiate the exe call.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1370567
Posted Tuesday, October 9, 2012 9:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 10, 2012 10:55 PM
Points: 4, Visits: 9
Can you please add some steps how to proceed

thanks for you reply
Post #1370661
Posted Wednesday, October 10, 2012 2:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, August 30, 2014 7:18 PM
Points: 6,250, Visits: 7,409
I'm sorry, but I'm afraid some details from this point forward will be a bit lacking from me, simply because I'm not an application coder.

To the basics: An executable called from a particular machine will run in the memory/cpu space of whatever machine called it. This is normal.

You want to run an executable from a machine that's not originating the call. That'd be Server 2. The only way to do that is to have a service (rt-click My computer, Manage, services) that will accept foreign input and then will activate a local .exe. Whatever is the login for SQL Server on Server1 will need rights to be able to send a message to the service on Server2, and that service will then fire the .exe call.

I would recommend speaking with your app developers on this. It shouldn't be overly difficult for them to create an active service for foreign requests, but it may break internal security policy. Either way, they'll be able to better answer what's the acceptable solution in your company far better than we will.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1370767
Posted Wednesday, October 10, 2012 6:34 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, August 14, 2014 3:30 AM
Points: 57, Visits: 193
Do you need to do this from SQL Server only? If your server2 has a SQL Server, create a job on it to execute the exe and invoke that job from SSIS package running on server1.

But note that if exe is invoking any UI it will not work, but an exe without UI should work fine.
Post #1370887
Posted Wednesday, October 10, 2012 10:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 10, 2012 10:55 PM
Points: 4, Visits: 9
The exe is invoking the UI and i need to send the working directory and arguments to the exe i mean server 2

am able to pass through process task using ssis but the exe is executing in server 1 , want the exe to trigger in server 2

Post #1371027
Posted Wednesday, October 10, 2012 10:23 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, August 14, 2014 3:30 AM
Points: 57, Visits: 193
When you run exe from a process in server 1, it will always get executed on server1's memory irrespective of where it is located.

If you have to run it on server 2, some service on server 2 should invoke it.
Post #1371033
Posted Sunday, October 21, 2012 4:14 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:34 AM
Points: 7,098, Visits: 12,606
v.sandeep06 (10/9/2012)
Hi every one , any one help me on below requirement

I had two servers

server 1 -------SSIS Package is present
server 2----- EXe location

I had SSIS Package in server 1 , at one step am calling the exe present in server 2 and passing arguments and working directory to server 2

when i execute the package the package should execute in Server 1, but when it trigger to exe the exe should execute in server 2 not in server 1

can any one help me on these i can use dotnet also

thanks in advance

Executing a command on a remote server is a trivial thing to do using PowerShell. PowerShell: Running Remote Commands

PsExec is also an option.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1375211
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse