Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 1st, 2008, 01:45 PM
Registered User
Join Date: Dec 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default xp_cmdshell to run VBS file

Hi, I am trying to use xp_cmdshell to run a VBS file on a SQL server (ver 2000). The command I am running in query analyzer is
EXEC master..xp_cmdshell 'CScript "H:\PM_Apps\GP-TEST\LTS.vbs"'
I am getting this error:
Input Error: Can not find script file "H:\PM_Apps\GP-TEST\LTS.vbs".
I have verified that the file exists in that path by opening it in a notepad and it exists.
I know that xp_cmdshell runs as the SQL server agent account and the account has full access to this folder.
I am not sure why I am getting this error. Please advice.

Reply With Quote
  #2 (permalink)  
Old December 1st, 2008, 02:09 PM
Registered User
Join Date: Dec 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I figured it out. We have 2 SQL servvers running in a cluster. When I ran the SQL it was executing on an active node that had no folder structure that I am testing. When the other node was active I created folder structure and VBS files in it and it used to run.
Ever since failover it stopped working.
If I am not clear enough in my explanation please drop me a note. I
will try to explain a bit more.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I attach a file to an email in my .vbs file savoym VBScript 3 July 2nd, 2011 08:02 AM
Question on .vbs file savoym VBScript 2 February 24th, 2005 12:12 PM
.NET EXE won't run right in SHELL from VBS Ron Howerton General .NET 1 December 20th, 2004 05:49 PM
Scheduling VBS file madhukp VBScript 1 September 22nd, 2004 07:14 AM
HELP with .VBS file savoym VBScript 1 July 31st, 2003 08:39 PM

All times are GMT -4. The time now is 08:51 AM.

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