﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Integration Services  / Issues while executing the xp_cmdshell through SSIS / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 18:55:05 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>For both of the posters asking about this, I'm going to second Phil's earlier comment.  If you're using SSIS for ETL, don't use xp_cmdshell to fire executables against the operating system.  The Execute Process Task is a much better tool for this.</description><pubDate>Mon, 14 Jan 2013 10:33:01 GMT</pubDate><dc:creator>Tim Mitchell</dc:creator></item><item><title>RE: Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>Did you get this resolved? I need to do something similar but am getting the same error. I had the code working on an xp machine running ss 2005 but now that I upgraded to Server 2012 and ss 2012, I get this error. I can also run the vbs file from windows directly and it runs fine, just fails when I run it in SQL Server. Thanks, Mike[code="sql"]EXEC XP_CMDSHELL 'CScript C:\folder\VBScript\DXPETE7.vbs'[/code]Results below:Microsoft (R) Windows Script Host Version 5.8Copyright (C) Microsoft Corporation. All rights reserved.C:\folder\VBScript\DXPETE7.vbs(4, 1) Microsoft Excel: Microsoft Excel cannot access the file '\\servernm\c$\folder\archive\DXPETE7.xls'. There are several possible reasons:&#x7; The file name or path does not exist.&#x7; The file is being used by another program.&#x7; The workbook you are trying to save has the same name as a currently open workbook.</description><pubDate>Fri, 11 Jan 2013 10:45:08 GMT</pubDate><dc:creator>michael.catalano</dc:creator></item><item><title>RE: Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>Notwithstanding the fact that SSIS is the wrong tool - ditto comments already made ...Have you investigated the 'Execute Process' SSIS task - this might run the .VBS scripts (never tried, but worth a shot).</description><pubDate>Tue, 13 Mar 2012 11:43:31 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>RE: Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>Why is the business requirement to run macros thru SSIS??   That's odd, to say the least.  However, I have had stranger things dictated to me ...  If you really need this vba code, use a script component in a data flow.  That uses VSA, and VBA is a very close match to it.  not perfect, you'll have editing to do.    Otherwise, unless there are significant reasons not to, I would recreate the macro actions is SSIS if data tranforms and loading are part of the project.  If you aren't moving data, I'd question why you "have to" use SSIS if you already have the macros.More info, please.</description><pubDate>Tue, 13 Mar 2012 11:39:40 GMT</pubDate><dc:creator>herladygeekedness</dc:creator></item><item><title>RE: Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>Why are you using SSIS for this? This is the wrong tool for the job, SSIS is used to transfer and manipulate data, not fiddle around with macro's.</description><pubDate>Tue, 13 Mar 2012 00:26:43 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>Issues while executing the xp_cmdshell through SSIS</title><link>http://www.sqlservercentral.com/Forums/Topic1265661-148-1.aspx</link><description>Hi All -First let me tell you what my SSIS package does,[u][b]SSIS Package[/b][/u]: -As per the business requirement, i have to run the Excel &amp; Access Macro's thru SSIS package. So, what i did is, i have created the .vbs scripts and trying to executing them through SSIS package but unable to succeed becasue of the following errorMicrosoft (R) Windows Script Host Version 5.8Copyright (C) Microsoft Corporation. All rights reserved.NULLC:\LCSP Applications\Alcspscript.vbs(6, 1) Microsoft Office Excel: Microsoft Office Excel cannot access the file 'C:\LCSP Applications\partner_email.xls'. There are several possible reasons:NULLThe file name or path does not exist.The file is being used by another program.The workbook you are trying to save has the same name as a currently open workbook.NULLNULLBut the interesting thing is, if i run those .vbs scripts just by double clicking them its working fine.Note: - I have enabled the "xp_cmdshell" command also.Any ideas will be greatly appreciated.Many Thanks in Advance.</description><pubDate>Mon, 12 Mar 2012 19:34:44 GMT</pubDate><dc:creator>skpanuganti</dc:creator></item></channel></rss>