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.
| Author |
Topic |
|
Hitesh Shah
Yak Posting Veteran
80 Posts |
Posted - 2007-06-28 : 04:19:30
|
| I want to execute a vbs file through SQL server agent using following command using operating system command exec .wscript E:\website\test.jewelexonline.com\ReadFile.vbs F:\sqlback\Diffl\jewelexgroupcom,,3It does not execute and the status remains executing only . What could be the problem . |
|
|
mharr
Starting Member
20 Posts |
Posted - 2007-06-28 : 09:30:10
|
Just a couple of observations, any of these could be the reason for what you see.- If you are running your script from the agent, you will not have a desktop session to display windows or messages. Consequently, you do not want to run "wscript", but run "cscript" with the //b option to suppress console messages. You could be hanging while the "wscript" shows the logo dialog and it's waiting for some one to answer it.
- If E: and F: are mapped drives, your Agent session may not have the same drive mappings. Use UNC names instead.
- I'm not sure, but you may need double quotes around the script path/filename for the script engine to recognize the long path name.
Try this:cscript //nologo //b "\\servershareE\website\test.jewelexonline.com\ReadFile.vbs" "\\servershareF\sqlback\Diffl\jewelexgroupcom",,3 Hope this helpsMark |
 |
|
|
|
|
|