cancel
Showing results for 
Search instead for 
Did you mean: 

CRSXI: Problem Executing .vbs

Former Member
0 Kudos

Simple .vbs (which has no problem running directly when clicked)...but in CRS XI

get:

Server Used: r2crny01.programjobserver

Error Message: An unknown COM error has occurred while trying to run the script.

---

Not familiar with COM issues - and this is so vague. Can anyone help?

Thanks...BK

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member203619
Contributor
0 Kudos

What exactly is the script trying to do?

I assume from your description that you are trying to schedule the vbs script through CR Server. The error could be a permissions error in that the user that the program job server runs under doesn't have access to some needed resource. I would suggest adding some logging to the script (just save to a disk file) so that you can find out the exact line on which the error occurs.

Shawn

Former Member
0 Kudos

Thanks for the help. The last step of the vbs does write to a file - so I do see the error.

The whole vbs is:

Dim WSHShell, filesys, logfile

Set WSHShell = WScript.CreateObject("WScript.Shell")

Set filesys = CreateObject("Scripting.FileSystemObject")

WSHShell.run "C:\Oracle\product\10.1.0\Client_1\BIN\sqlplus id/pw@server @D:\RCRA\UniverseUpdate\V3-Synonyms.txt", 0, TRUE

WSHShell.run "C:\Oracle\product\10.1.0\Client_1\BIN\sqlplus id/pw@server @D:\FOIA\CreateR2HandlerExportTable.txt", 0, TRUE

Set logfile= filesys.CreateTextFile("D:\FOIA\R2HandlerExportTable.txt", True)

logfile.WriteLine "HandlerExportTable Created."

logfile.Close

Set WSHShell=Nothing

__________

This used Oracle sqlplus to execute a synonyms file and then some other SQL via a Shell. What comes out if I run the .vbs from inside a bat (and load the bat as an executable in CRS) is:

D:\FOIA\FOIAStaticSQLTable.vbs(5, 1) (null): The system cannot find the file specified.

(5,1) = Row 5 refers the first row the WSHShell.run appears. The paths are correct, so it just can't seem to find the WSHShell variable? Again, not sure how it can't, the script run fine, on the same server if clicked on directly.