SQL Server Developer Center >
SQL Server Forums
>
SQL Server Integration Services
>
Command line output with ssis script task
Command line output with ssis script task
- Hello,
I'm trying to start a server from my ssis package. My idea is to write a ssis script task, which sends a string to the command line.
Do anyone know examples or ideas for this problem?
Thanks !
Answers
- For information about managing services remotely see this link http://www.experts-exchange.com/Operating_Systems/WinNT/Q_20896218.html (make sure you scroll right to the bottom of the page to see the answer)
In SSIS, you can use expressions within the execute process task. If the command line is too tricky then you could resort to a script task that generates the commnad line into an SSIS variable and then use that variable as the source of the command for the execute process task.
Adam Tappis. (MCSD VB6 & .NET, MCDBA SQL 2000)- Marked As Answer byNai-dong Jin - MSFTMSFT, ModeratorWednesday, November 04, 2009 4:00 AM
- Proposed As Answer bySudeep Raj Thursday, October 29, 2009 8:33 PM
- I found the solution for my problem. Thank you for your excellent help. Here is the code:
m_Process = New Process() With m_Process.StartInfo .FileName = "%PATH%startserver.exe" .Arguments = "arguments" .UseShellExecute = False .CreateNoWindow = True .RedirectStandardOutput = True .RedirectStandardError = True .RedirectStandardInput = True End With m_Process.Start()
maybe it helps somebody else- Proposed As Answer byETL vs ELTL Wednesday, November 04, 2009 4:33 PM
- Marked As Answer byAdam TappisModeratorWednesday, November 04, 2009 6:08 PM
All Replies
Hello,
I'm trying to start a server from my ssis package. My idea is to write a ssis script task, which sends a string to the command line.
Do anyone know examples or ideas for this problem?
Thanks !
What do you mean start a server??
Can you start a server from code??
Hope this helps !!
Sudeep | My Blog- For information about managing services remotely see this link http://www.experts-exchange.com/Operating_Systems/WinNT/Q_20896218.html (make sure you scroll right to the bottom of the page to see the answer)
In SSIS, you can use expressions within the execute process task. If the command line is too tricky then you could resort to a script task that generates the commnad line into an SSIS variable and then use that variable as the source of the command for the execute process task.
Adam Tappis. (MCSD VB6 & .NET, MCDBA SQL 2000)- Marked As Answer byNai-dong Jin - MSFTMSFT, ModeratorWednesday, November 04, 2009 4:00 AM
- Proposed As Answer bySudeep Raj Thursday, October 29, 2009 8:33 PM
- did you mean services?
If thats the case Adam has given you the answer.
Hope this helps !!
Sudeep | My Blog did you mean services?
If thats the case Adam has given you the answer.
Hope this helps !!
Sudeep | My Blog
I assumed he meant [SQL] Server [Service] as opposed to a physical server
Saying that, I would presume that there are some management tools out there (from HP and the like) that could start a server remotely too e.g. wake on LAN (this is pure speculation and not my area of expertise).
Adam Tappis. (MCSD VB6 & .NET, MCDBA SQL 2000)I assumed he meant [SQL] Server [Service] as opposed to a physical server
Hey thanks Adam,
Saying that, I would presume that there are some management tools out there (from HP and the like) that could start a server remotely too e.g. wake on LAN (this is pure speculation and not my area of expertise).
Adam Tappis. (MCSD VB6 & .NET, MCDBA SQL 2000)
Every day you learn something. That was something I did not expect at all, did some wiki and got this link.
May be people who are interested cold go through this: Wake-on-LAN
Hope this helps !!
Sudeep | My Blog- I found the solution for my problem. Thank you for your excellent help. Here is the code:
m_Process = New Process() With m_Process.StartInfo .FileName = "%PATH%startserver.exe" .Arguments = "arguments" .UseShellExecute = False .CreateNoWindow = True .RedirectStandardOutput = True .RedirectStandardError = True .RedirectStandardInput = True End With m_Process.Start()
maybe it helps somebody else- Proposed As Answer byETL vs ELTL Wednesday, November 04, 2009 4:33 PM
- Marked As Answer byAdam TappisModeratorWednesday, November 04, 2009 6:08 PM


