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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 I don't understand why

Author  Topic 

sg2255551
Constraint Violating Yak Guru

274 Posts

Posted - 2006-10-15 : 11:56:49
hi

I have created SSIS package that a Execute Process Task that launch a WinRar Program to zip up some files. I have tested it by click the Start Debugging button in VS2005 and is work fine. But When I save the package as a DTSX file and execute it using a stored procedure:

Exec master..xp_cmdshell 'dtexec /F "C:\NwTest\NWtest.dtsx"'

it didn't work out as i thought it should be. I don't know why? Please help. Thanks.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-10-16 : 03:48:54
I'm not familiar with dts in sql 2005, but can you run it in the sproc directly using dtsrun or its equivalent instead of going to the os level to run the package?

--------------------
keeping it simple...
Go to Top of Page

sg2255551
Constraint Violating Yak Guru

274 Posts

Posted - 2006-10-16 : 09:11:07
hi

Am not sure how to run it in the sproc directly using dtsrun or its equivalent. Do you mind give me some examples cause i search the internet and it seems to using Exec master..xp_cmdshell. Thanks
Go to Top of Page

gsgill76
Posting Yak Master

137 Posts

Posted - 2006-10-19 : 02:22:42
Hi i too cant say about the SSIS & .NET, but i can give u sample SP which uses the XP_CMDSHELL
1) http://www.databasejournal.com/features/mssql/article.php/3372131
2) http://www.sqlservercentral.com/columnists/bknight/xpcmdshell.asp
3) my own
CREATE PROCEDURE [dbo].[CreateFolder]
AS
DECLARE @sPath Varchar(100),@sMD varchar(100)
SET NOCOUNT ON
SET QUOTED_IDENTIFIER ON
--Create Directory
SET @sPath= 'C:\FolderName'
SET @sMD = 'MD ' + @sPath
EXEC master..xp_cmdshell @sMD , no_output


To execute this SP:
CreateFolder

Hope this will gives you idea.

Regards,
Thanks
Gurpreet S. Gill
Go to Top of Page
   

- Advertisement -