VBScript file exceeds Job Step limit

  • I have a VBScript that works fine in standalone mode (It copies Trans logs dumps between SQL servers). Under SQL 2K I created a job and tried to import this script into a job step. When I do so I get the error:

    The specified file (…) is 3446 characters in size, which is larger than the available free space in the current job step command (3200 characters). Do you want to continue opening this file but have its contents truncated?”

    1.Can I increase the available “free space”>

    2.I haven’t tested it but I wonder if the Job step could call “myCopy.bat” which then will call the full VBScript?

    TIA,

    Bill

  • Nope, it stores it as nvarchar(4000). Sucks. Doing the batch file thing will work fine. What I usually do (since VBScript ain't my favorite) is to write it in VB and compile as a DLL, register on the server. Might have one or two properties, one 'execute' method. Code in the job ends up looking like this:

    set oSOmething=CreateObject("Mylibrary.someobject")

    oSOmething.maxrows=200

    Osomething.execute

    set oSOmething=nothing

    Nice part about this technique is you can then call it from VBScript directly, add it into an app by setting a reference, or even us the sp_oacreate series to use it.

    Andy

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply