Wrox Programmer Forums
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 25th, 2006, 11:02 AM
Authorized User
Join Date: Mar 2005
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default Issues with xp_cmdshell

I have an xls file that is about 358 kb and contains about 1569 rows.
I am using the following code:

Use master
DECLARE @reult varchar(200)

EXEC @result = xp_cmdshell '\\ITITPAFS02\pds\voicenet\isiti\winzip\wzzip.exe \\ititpafs01\pds\inetpub\ftproot\accumen\political  \at0123.zip \\ititpafs01\pds\inetpub\ftproot\accumen\political  \at0123.xls'

IF (@result = 0)
     PRINT 'success'
     PRINT 'Failure'
It runs longer than 9 min. I just kill it. Am I doing something wrong?


Old August 26th, 2006, 09:39 AM
Friend of Wrox
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts

Slow network?

You open the file on one server, and zips it to another server. That takes time.
Try to zip on same server, and when done, move the file.

Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
xp_cmdshell help needed. Clauddvon SQL Server 2000 2 March 1st, 2006 11:00 AM
Securing xp_cmdshell Steve_tucker SQL Server 2000 1 December 8th, 2004 06:44 PM
xp_cmdshell Steve_tucker SQL Server 2000 3 November 22nd, 2004 04:15 PM
Executing xp_cmdShell Hari_Word SQL Server 2000 1 August 13th, 2004 03:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.