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
 General SQL Server Forums
 New to SQL Server Programming
 HELP - xp_cmdshell stalling processes?

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-01-29 : 04:29:26
SQL Server 2005, Windows Server 2003.

I am running a stored procedure (every 1 hour) which monitors a directory on the server for any changes of the files within, If there are any changes to the files, these details (path, filename, type) get added/updated to a table on the server within the stored procedure I call the following :-

EXEC xp_cmdshell 'dir G:\Imports\WD1\*.* /s /-c /4 /tc'

the problem I have is that since scheduling this it seems to stop or stick in a loop all other scheduled stored procedures (some of them run for hours, where they normally complete in minutes!).

Am I missing a switch or something that i should set/unset before running this type of command?

Any help appreciated.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-29 : 04:36:14
Add a -p option to remove confirmation for every new page display in the dir command.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-01-29 : 05:06:55
Thanks, will give it a shot.
Go to Top of Page
   

- Advertisement -